System and control method for testing signal strength of CAT1 equipment
Through the circular testing method of testing software, server and mqtt platform, the problems of high cost and low accuracy of signal strength testing of CAT1 equipment are solved, efficient and accurate signal strength evaluation is achieved, and the dependence on signal detection equipment is reduced.
Patent Information
- Application Number
- CN202411418150.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-14
AI Technical Summary
In the prior art, the signal strength test of CAT1 equipment requires a large number of signal detection equipment, which leads to high testing costs and the installation position of the signal detection equipment affects the test results, reducing the accuracy of signal strength.
Using testing software, server and mqtt platform, the test commands are sent cycle-by-cycle, packet loss rate and response time are counted, signal strength is calculated, and the use of a large number of signal detection equipment is avoided, and the impact of installation location on the test results is reduced.
The cost of signal strength testing of CAT1 equipment is reduced, the accuracy of the test is improved, and the signal strength is evaluated through cyclic testing and average response time calculation, and the reliability of the test results is ensured.
Smart Images

Figure CN119316313A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of computer technology, and in particular is a system and a control method for testing the strength of a CAT1 device signal. Background Art
[0002] During the use of CAT1 equipment, the strength of the signal may be affected due to the different locations of the equipment. Therefore, in the actual installation process of the equipment, a method is needed to test the signal strength of the equipment at this location to help installers choose a better installation location and prevent the equipment signal from being too poor to affect its use.
[0003] The prior art installs a number of signal detection devices at the attachment of the CAT1 device, and then obtains the signal strength of all the signal detection devices to obtain the average signal strength of the CAT1 device; however, the prior art requires a large number of signal detection devices, which makes the cost of testing the signal strength of the CAT1 device high; in addition, the installation position of the signal detection device in the prior art will affect the test result of the average signal strength, resulting in low accuracy of the signal strength of the CAT1 device.
[0004] The present invention provides a system and a control method for testing the strength of a CAT1 device signal to solve the above technical problems. Summary of the invention
[0005] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes a system and a control method for testing the signal strength of a CAT1 device, which are used to solve the problem that the prior art requires a large number of signal detection devices, resulting in a high cost for testing the signal strength of the CAT1 device; in addition, the installation position of the signal detection device in the prior art affects the test result of the average signal strength, resulting in a technical problem that the accuracy of the signal strength of the CAT1 device is not high.
[0006] To achieve the above object, a first aspect of the present invention provides a system for testing the signal strength of a CAT1 device, comprising: testing software, a server, an mqtt platform and a CAT1 device;
[0007] The test software is used to preset the number of cycles and send the imei number of the CAT1 device to be tested to the server in a cycle;
[0008] The server is used to create and cache a unique ID; generate a test command based on the unique ID and the IMEI number, and mark the time when the test command is generated as the first time; forward the test command to the CAT1 device through the MQTT platform;
[0009] Receive the reply command sent by the CAT1 device and parse it to obtain a response ID; mark the time of parsing the reply command as the second time; count the number of packet losses according to the response result of the reply command and calculate the packet loss rate based on the total number of test commands issued; wherein the response result includes received and lost packets;
[0010] Obtain the response time and update the current number of cycles based on the consistency between the response ID and the unique ID; obtain the signal strength based on several response times and packet loss rates; wherein the signal strength includes weak signals and strong signals;
[0011] The MQTT platform is used to receive the test command sent by the server and forward the test command to the CAT1 device; and receive the reply command of the CAT1 device and forward the reply command to the server;
[0012] The CAT1 device is used to parse the test command to obtain the reply command, and forward the reply command to the server through the MQTT platform.
[0013] Preferably, the mqtt platform is respectively connected to the server and the CAT1 device through communication and / or electrical connection; the test software is connected to the server through communication and / or electrical connection.
[0014] Preferably, the server creates a unique ID in each cycle, and the unique IDs created in each cycle are different.
[0015] Preferably, the step of calculating the packet loss rate based on the total number of test commands sent after counting the number of packet losses according to the response result of the reply command includes:
[0016] Determine whether the server receives a reply command; if yes, mark the response result as received; if no, mark the response result as packet loss, and increase the number of packet losses by one and update;
[0017] Extract the number of packet losses and the total number of test commands sent by the server; through the formula Calculate the packet loss rate DBL; where DBC is the number of packet losses and m is the total number of test commands sent by the server.
[0018] Preferably, obtaining the response time and updating the current number of cycles according to the consistency between the response ID and the unique ID includes:
[0019] Determine whether the response ID is consistent with the unique ID cached by the server; if yes, subtract the first time from the second time to get the response time, add one to the current number of loops and update; if no, terminate the current loop and reset the number of loops in the test software.
[0020] Preferably, the acquiring the signal strength based on a number of response times and packet loss rates includes:
[0021] Extract several response times and packet loss rates;
[0022] Calculate an average response time based on several response times;
[0023] It is determined whether the average response time is less than the response time threshold and the packet loss rate is less than the packet loss threshold; if yes, the signal strength is marked as a strong signal; if no, the signal strength is marked as a weak signal.
[0024] Preferably, the calculating the average response time based on a plurality of response times comprises:
[0025] By formula Calculate the average response time T of the CAT1 device avg ; Among them, T i is the response time of the i-th cycle, i=1, 2, ..., n, and n is the total number of times the server receives reply commands.
[0026] A second aspect of the present invention provides a system and control method for testing signal strength of a CAT1 device, comprising:
[0027] S1: The test software presets the number of cycles and sends the imei number of the CAT1 device to be tested to the server in a cycle;
[0028] S2: The server creates and caches a unique id;
[0029] S3: Generate a test command based on the unique ID and IMEI number, and mark the time when the test command is generated as the first time;
[0030] S4: The server forwards the test command to the CAT1 device through the MQTT platform;
[0031] S5: CAT1 device parses the test command to obtain a reply command, and forwards the reply command to the server through the MQTT platform;
[0032] S6: Counting the number of packet losses according to the response result of the reply command and calculating the packet loss rate based on the total number of test commands sent;
[0033] S7: The server receives the reply command sent by the CAT1 device and parses it to obtain a response ID; and marks the time of parsing the reply command as the second time;
[0034] S8: Obtain the response time and update the current number of cycles based on the consistency between the response ID and the unique ID;
[0035] S9: Determine whether the current number of loops is equal to the preset number of loops; if yes, jump to S10; if no, the server removes the cached unique ID and jumps to S2;
[0036] S10: Acquire signal strength based on a number of response times and packet loss rates.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] By using the test software, server and mqtt platform to perform a loop test on the CAT1 device, there is no need to test the signal strength of the CAT1 device through a large number of signal detection devices, which is beneficial to reducing the cost of testing the signal strength of the CAT1 device. The test software can further preset the number of cycles, and the average response time of all cycles is calculated to obtain the average response time of the CAT1 device. By counting the packet loss rate of the CAT1 device, the signal strength of the CAT1 device is evaluated according to the average response time and the packet loss rate, thereby avoiding the influence of the installation position of the signal detection device on the signal strength test result, which is beneficial to improving the accuracy of the signal strength test of the CAT1 device. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 It is a schematic diagram of the principle of the system for testing the signal strength of CAT1 equipment in the present invention;
[0041] Figure 2 It is the overall flow chart of the control system for testing the signal strength of the CAT1 equipment in the present invention. DETAILED DESCRIPTION
[0042] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] See also Figure 1-Figure 2 , the first aspect of the present invention provides a system for testing the signal strength of a CAT1 device, comprising: testing software, a server, an mqtt platform and a CAT1 device;
[0044] Test software: used to preset the number of cycles and send the imei number of the CAT1 device to be tested to the server in a cycle;
[0045] Server: used to create and cache a unique ID; generate a test command based on the unique ID and IMEI number, and mark the time when the test command was generated as the first time; forward the test command to the CAT1 device through the MQTT platform;
[0046] Receive the reply command sent by the CAT1 device and parse it to obtain a response ID; mark the time of parsing the reply command as the second time; count the number of packet losses according to the response result of the reply command and calculate the packet loss rate based on the total number of test commands issued; wherein the response result includes received and lost packets;
[0047] Obtain the response time and update the current number of cycles based on the consistency between the response ID and the unique ID; obtain the signal strength based on several response times and packet loss rates; wherein the signal strength includes weak signals and strong signals;
[0048] MQTT platform: used to receive the test command sent by the server and forward the test command to the CAT1 device; and, receive the reply command of the CAT1 device and forward the reply command to the server;
[0049] CAT1 device: used to parse the test command to get the reply command, and forward the reply command to the server through the MQTT platform.
[0050] Exemplarily, the preset number of cycles in the test software is set to 4 times, and the IMEI number of the CAT1 device is HCL9000456DATET91000D368.
[0051] In the first cycle, the server creates a unique ID of 1001 and caches it. It generates a test command HCL9000456DATET91000D368 / 1001 based on the unique ID (1001) and the IMEI number (HCL9000456DATET91000D368), and marks the time of generating the test command as the first time d1 (2019-08-1810:33:13).
[0052] Forward the test command to the CAT1 device through the MQTT platform;
[0053] Count the number of packet losses based on the server's response to the reply command;
[0054] The server parses the reply command to obtain a unique id of 1001, marks the unique id obtained by the parsing as the response id (1001), and marks the current time with the second time d2 (2019-08-18 10:35:13);
[0055] Since the response id (1001) is consistent with the unique id (1001) cached by the server, the response time is T1=120s obtained by subtracting the first time d1 from the second time d2, and the current number of cycles is increased by one and updated, and the current number of cycles is 1;
[0056] Since the current loop count is 1, which is less than the preset loop count of 4, the server removes the cached unique ID (1001) and executes the second loop;
[0057] In the second loop, the server creates a unique ID of 1002 and caches it. It generates a test command HCL9000456DATET91000D368 / 1002 based on the unique ID (1002) and the IMEI number (HCL9000456DATET91000D368), and marks the time of generating the test command as the first time d3 (2019-08-1810:35:13).
[0058] Forward the test command to the CAT1 device through the MQTT platform;
[0059] The CAT1 device parses the test command (HCL9000456DATET91000D368 / 1002) and obtains the reply command (HCL9000456DATET91000D368 / 1002), and forwards the reply command to the server through the MQTT platform;
[0060] Count the number of packet losses based on the server's response to the reply command;
[0061] The server parses the reply command to obtain a unique id of 1002, marks the unique id obtained by the parsing as the response id (1002), and marks the current time with the second time d4 (2019-08-18 10:37:15);
[0062] Since the response id (1002) is consistent with the unique id (1002) cached by the server, the response time is obtained by subtracting the first time d3 from the second time d4, which is T2=122s. The current number of loops is increased by one and updated. The current number of loops is 2.
[0063] Since the current loop count is 2, which is less than the preset loop count of 4, the server removes the cached unique ID (1002) and executes the third loop;
[0064] In the third loop, the server creates a unique ID of 1003 and caches it. It generates a test command HCL9000456DATET91000D368 / 1003 based on the unique ID (1003) and the IMEI number (HCL9000456DATET91000D368), and marks the time of generating the test command as the first time d5 (2019-08-1810:38:10).
[0065] Forward the test command to the CAT1 device through the MQTT platform;
[0066] The CAT1 device parses the test command (HCL9000456DATET91000D368 / 1003) and obtains the reply command (HCL9000456DATET91000D368 / 1003), and forwards the reply command to the server through the MQTT platform;
[0067] Count the number of packet losses based on the server's response to the reply command;
[0068] The server parses the reply command to obtain a unique ID of 1002, marks the unique ID obtained by parsing as the response ID (1003), and marks the current time with the second time d6 (2019-08-18 10:39:40);
[0069] Since the response id (1003) is consistent with the unique id (1003) cached by the server, the response time is obtained by subtracting the first time d5 from the second time d6, which is T3=90s. The current number of cycles is increased by one and updated. The current number of cycles is 3.
[0070] Since the current loop count is 3, which is less than the preset loop count of 4, the server removes the cached unique ID (1003) and executes the fourth loop;
[0071] In the fourth loop, the server creates a unique ID of 1004 and caches it. It generates a test command HCL9000456DATET91000D368 / 1004 based on the unique ID (1004) and the IMEI number (HCL9000456DATET91000D368), and marks the time of generating the test command as the first time d5 (2019-08-1810:40:10).
[0072] Forward the test command to the CAT1 device through the MQTT platform;
[0073] The CAT1 device parses the test command (HCL9000456DATET91000D368 / 1003) and obtains the reply command (HCL9000456DATET91000D368 / 1003), and forwards the reply command to the server through the MQTT platform;
[0074] Assuming that the server receives the test command replied by the CAT1 device at this time, it will mark the response result as packet loss, and increase the number of packet losses by one and update it.
[0075] In this embodiment, the mqtt platform is connected to the server and the CAT1 device through communication and / or electrical connection respectively; the test software is connected to the server through communication and / or electrical connection.
[0076] In this embodiment, the server creates a unique ID in each cycle, and the unique IDs created in each cycle are different.
[0077] In this embodiment, after counting the number of packet losses according to the response result of the reply command, the packet loss rate is calculated based on the total number of test commands issued, including:
[0078] Determine whether the server receives a reply command; if yes, mark the response result as received; if no, mark the response result as packet loss, and increase the number of packet losses by one and update;
[0079] Extract the number of packet losses and the total number of test commands sent by the server; through the formula Calculate the packet loss rate DBL; where DBC is the number of packet losses and m is the total number of test commands sent by the server.
[0080] Exemplarily, the number of packet loss times DBC=1 is set, and the total number of test commands sent by the server is m=4; the packet loss rate DBL=25% is calculated by the formula.
[0081] In this embodiment, the response time is obtained and the current cycle number is updated according to the consistency between the response ID and the unique ID, including:
[0082] Determine whether the response ID is consistent with the unique ID cached by the server; if yes, subtract the first time from the second time to get the response time, add one to the current number of loops and update; if no, terminate the current loop and reset the number of loops in the test software.
[0083] In this embodiment, the signal strength is obtained based on several response times and packet loss rates, including:
[0084] Extract several response times and packet loss rates;
[0085] Calculate an average response time based on several response times;
[0086] It is determined whether the average response time is less than the response time threshold and the packet loss rate is less than the packet loss threshold; if yes, the signal strength is marked as a strong signal; if no, the signal strength is marked as a weak signal.
[0087] Exemplarily, the average response time is set to 110.6s, the packet loss rate is 25%, the response time threshold is 115s, and the packet loss threshold is 5%; since the average response time is less than the response time threshold and the packet loss rate is greater than the packet loss threshold, the signal strength is marked as a weak signal.
[0088] In this embodiment, the average response time is calculated based on several response times, including:
[0089] By formula Calculate the average response time T of CAT1 devices avg ; Among them, T i is the response time of the CAT1 device in the i-th cycle, i=1, 2, ..., n, and n is the total number of times the server receives the reply command.
[0090] For example, the response time of the CAT1 device in the first cycle is set to T1=120s, the response time of the CAT1 device in the second cycle is set to T2=122s, and the response time of the CAT1 device in the third cycle is set to T3=90s; the average response time of the CAT1 device is calculated by the formula T avg ≈110.67s.
[0091] A second aspect of the present invention provides a method for controlling the strength of a CAT1 device test signal, comprising:
[0092] S1: The test software presets the number of cycles and sends the imei number of the CAT1 device to be tested to the server in a cycle;
[0093] S2: The server creates and caches a unique id;
[0094] S3: Generate a test command based on the unique ID and IMEI number, and mark the time when the test command is generated as the first time;
[0095] S4: The server forwards the test command to the CAT1 device through the MQTT platform;
[0096] S5: CAT1 device parses the test command to obtain a reply command, and forwards the reply command to the server through the MQTT platform;
[0097] S6: Counting the number of packet losses according to the response result of the reply command and calculating the packet loss rate based on the total number of test commands sent;
[0098] S7: The server receives the reply command sent by the CAT1 device and parses it to obtain a response ID; and marks the time of parsing the reply command as the second time;
[0099] S8: Obtain the response time and update the current number of cycles based on the consistency between the response ID and the unique ID;
[0100] S9: Determine whether the current number of loops is equal to the preset number of loops; if yes, jump to S10; if no, the server removes the cached unique ID and jumps to S2;
[0101] S10: Acquire signal strength based on a number of response times and packet loss rates.
[0102] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A system for testing the signal strength of a CAT1 device, comprising: Test software, server, mqtt platform and CAT1 equipment; characterized in that, The test software is used to preset the number of cycles and send the imei number of the CAT1 device to be tested to the server in a cycle; The server is used to create and cache a unique ID; generate a test command based on the unique ID and the IMEI number, and mark the time when the test command is generated as the first time; forward the test command to the CAT1 device through the MQTT platform; Receive the reply command sent by the CAT1 device and parse it to obtain a response ID; mark the time of parsing the reply command as the second time; count the number of packet losses according to the response result of the reply command and calculate the packet loss rate based on the total number of test commands issued; wherein the response result includes received and lost packets; Obtain the response time and update the current number of cycles based on the consistency between the response ID and the unique ID; obtain the signal strength based on several response times and packet loss rates; wherein the signal strength includes weak signals and strong signals; The MQTT platform is used to receive the test command sent by the server and forward the test command to the CAT1 device; and receive the reply command of the CAT1 device and forward the reply command to the server; The CAT1 device is used to parse the test command to obtain the reply command, and forward the reply command to the server through the MQTT platform.
2. A system for testing signal strength of CAT1 equipment according to claim 1, characterized in that: The server creates a unique id in each loop, and the unique id created in each loop is different.
3. A system for testing signal strength of CAT1 equipment according to claim 1, characterized in that: The calculating of the packet loss rate based on the total number of test commands sent after counting the number of packet losses according to the response result of the reply command includes: Determine whether the server receives a reply command; if yes, mark the response result as received; if no, mark the response result as packet loss, and increase the number of packet losses by one and update; Extract the number of packet losses and the total number of test commands sent by the server; through the formula Calculate the packet loss rate DBL; where DBC is the number of packet losses and m is the total number of test commands sent by the server.
4. A system for testing signal strength of CAT1 equipment according to claim 1, characterized in that: The step of obtaining the response time and updating the current number of cycles according to the consistency between the response ID and the unique ID includes: Determine whether the response ID is consistent with the unique ID cached by the server; if yes, subtract the first time from the second time to get the response time, add one to the current number of loops and update; if no, terminate the current loop and reset the number of loops in the test software.
5. A system for testing signal strength of CAT1 equipment according to claim 1, characterized in that: The signal strength is obtained based on a number of response times and packet loss rates, including: Extract several response times and packet loss rates; Calculate an average response time based on several response times; It is determined whether the average response time is less than the response time threshold and the packet loss rate is less than the packet loss threshold; if yes, the signal strength is marked as a strong signal; if no, the signal strength is marked as a weak signal.
6. A system for testing signal strength of CAT1 equipment according to claim 5, characterized in that: The calculating the average response time based on a plurality of response times includes: By formula Calculate the average response time T of the CAT1 device avg ; Among them, T i is the response time of the i-th cycle, i=1, 2, ..., n, and n is the total number of times the server receives reply commands.
7. A method for controlling the strength of a CAT1 device test signal, based on the operation of a system for testing the strength of a CAT1 device test signal according to any one of claims 1 to 6, characterized in that: include: S1: The test software presets the number of cycles and sends the imei number of the CAT1 device to be tested to the server in a cycle; S2: The server creates and caches a unique id; S3: Generate a test command based on the unique ID and IMEI number, and mark the time when the test command is generated as the first time; S4: The server forwards the test command to the CAT1 device through the MQTT platform; S5: CAT1 device parses the test command to obtain a reply command, and forwards the reply command to the server through the MQTT platform; S6: Counting the number of packet losses according to the response result of the reply command and calculating the packet loss rate based on the total number of test commands sent; S7: The server receives the reply command sent by the CAT1 device and parses it to obtain a response ID; and marks the time of parsing the reply command as the second time; S8: Obtain the response time and update the current number of cycles based on the consistency between the response ID and the unique ID; S9: Determine whether the current number of cycles is equal to the preset number of cycles; If yes, jump to S10; If not, the server will remove the cached unique ID and jump to S2; S10: Acquire signal strength based on a number of response times and packet loss rates.