Method for detecting data packet loss, self-moving device and storage medium
Patent Information
- Application Number
- CN202310364165.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-03
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2043-04-03
AI Technical Summary
[0004]本申请提供了一种数据丢包的检测方法、自移动设备和存储介质,解决了相关技术仅仅对RTK模组进行检测,无法准确地确定数据丢包的具体位置,导致排查RTK定位异常因素的效率较低的问题
[0004]本申请提供了一种数据丢包的检测方法、自移动设备和存储介质,解决了相关技术仅仅对RTK模组进行检测,无法准确地确定数据丢包的具体位置,导致排查RTK定位异常因素的效率较低的问题。
Smart Images

Figure CN116455789B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of positioning technology, and in particular to a method for locating data packet loss, a self-moving device, and a storage medium. Background Technology
[0002] In RTK (Real-Time Kinematic) positioning technology, the accuracy of RTK positioning depends on the signal quality of the base station. Differential data from the base station to the mobile station is typically transmitted using a radio frequency (RF) module. However, the performance of the RF module is unstable, which can easily lead to packet loss during differential data transmission. This affects the signal quality of the base station and consequently, the accuracy of RTK positioning. Therefore, when RTK positioning malfunctions, it is necessary to first check whether packet loss has occurred in the differential data from the base station.
[0003] In related technologies, the RTK module in the rover is inspected to determine if differential data packet loss has occurred. However, simply inspecting the RTK module cannot accurately pinpoint the exact location of the data packet loss, nor can it determine whether the data packet loss is the primary cause of the RTK positioning anomaly. Summary of the Invention
[0004] This application provides a data packet loss detection method, a self-moving device, and a storage medium, which solves the problem that related technologies only detect RTK modules and cannot accurately determine the specific location of data packet loss, resulting in low efficiency in investigating RTK to locate abnormal factors.
[0005] Firstly, this application provides a method for detecting data packet loss, the method comprising: Obtain a first packet loss detection result corresponding to the base station, the first packet loss detection result including the packet loss detection result of each of the first communication nodes; obtain a second packet loss detection result corresponding to the self-moving device, the second packet loss detection result including the packet loss detection result of each of the second communication nodes; perform data packet loss location detection based on the first packet loss detection result and the second packet loss detection result to obtain a data packet loss location result.
[0006] The above method obtains the packet loss detection results of each first communication node in the base station and the packet loss detection results of each second communication node in the self-moving device, and performs data packet loss location detection based on the first packet loss detection results and the second packet loss detection results. This can accurately determine the specific location of the data packet loss, solving the problem in related technologies where packet loss detection is only performed on the RTK module in the self-moving device, which makes it impossible to accurately determine the specific location of the data packet loss. Thus, it is possible to determine whether data packet loss is the cause of RTK positioning anomalies.
[0007] Secondly, this application also provides a self-moving device, which includes a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the data packet loss detection method described above.
[0008] Thirdly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the data packet loss detection method described above. Attached Figure Description
[0009] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a schematic diagram of a communication system provided in an embodiment of this application; Figure 2 This is a schematic diagram of a communication link provided in an embodiment of this application; Figure 3 This is a schematic diagram of another communication link provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a self-moving device provided in an embodiment of this application; Figure 5 This is a schematic flowchart of a data packet loss detection method provided in an embodiment of this application; Figure 6 This is a schematic flowchart illustrating another data packet loss detection method provided in the embodiments of this application; Figure 7 This is a schematic flowchart illustrating a sub-step for obtaining a third sub-detection result provided in an embodiment of this application; Figure 8 This is a schematic flowchart illustrating a sub-step for obtaining a second packet loss detection result provided in an embodiment of this application; Figure 9 This is an illustrative flowchart of another sub-step for obtaining the second packet loss detection result provided in an embodiment of this application. Detailed Implementation
[0011] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0012] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0013] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0014] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0015] This application provides a data packet loss detection method, a self-moving device, and a storage medium. The data packet loss detection method can be applied to a self-moving device. By acquiring packet loss detection data from each first communication node in the base station and each second communication node in the self-moving device, and by performing data packet loss location detection based on the first and second packet loss detection results, the specific location of the data packet loss can be accurately determined, thereby enabling the determination of whether data packet loss is the cause of RTK positioning anomalies.
[0016] Please see Figure 1 , Figure 1 This is a schematic diagram of a communication system 10 provided in an embodiment of this application. For example... Figure 1 As shown, the communication system 10 may include a self-moving device 11 and a base station 12. The self-moving device 11 performs positioning based on differential data sent by the base station 12, and the communication link between the self-moving device 11 and the base station 12 for transmitting differential data includes at least one first communication node 120 located in the base station 12 and at least one second communication node 110 located in the self-moving device 11.
[0017] For example, the self-moving device 11 may include, but is not limited to, movable devices such as lawn mowers, sweeping robots, food delivery robots, and welcome robots. During the operation of the self-moving device 11, the position is constantly moving, so it is necessary to update the position of the self-moving device 11 in real time or at regular intervals.
[0018] It should be noted that the base station 12 refers to a reference station, which is configured to receive differential data from satellites and send the differential data to the self-moving device 11, so that the self-moving device 11 performs a differential positioning operation according to the differential data. For example, the base station 12 may be a charging pile supporting the self-moving device 11, or other devices with positioning functions.
[0019] In the embodiment of the present application, the first communication node 120 may at least include an RTK module, where the RTK module is configured to receive differential data from satellites through an antenna and send the differential data to the self-moving device 11. It can be understood that the second communication node 110 in the self-moving device 11 also includes an RTK module, and the self-moving device 11 performs differential positioning according to the differential data of satellites received by its own RTK module and the differential data sent by the base station 12, so as to obtain the current position of the self-moving device 11.
[0020] In some embodiments, the self-moving device 11 may acquire a first packet loss detection result corresponding to the base station 12, where the first packet loss detection result includes the packet loss detection result of each first communication node 120; acquire a second packet loss detection result corresponding to the self-moving device 11, where the second packet loss detection result includes the packet loss detection result of each second communication node 110; perform data packet loss positioning detection according to the first packet loss detection result and the second packet loss detection result, to obtain a data packet loss positioning result.
[0021] Please refer to Figure 2 , Figure 2 which is a schematic diagram of a communication link provided by an embodiment of the present application. As shown in Figure 2 , the communication link includes a first communication node 120 and a second communication node 110; the first communication node 120 may include, but is not limited to, a first real-time kinematic module, a first control unit and a wireless transmitting module, and the second communication node 110 may include, but is not limited to, a wireless receiving module, a second control unit, a third control unit and a second real-time kinematic module, etc. The first control unit is connected between the first real-time kinematic module and the wireless transmitting module; the wireless transmitting module is in communication connection with the wireless receiving module, and the wireless receiving module is configured to receive differential data sent by the wireless transmitting module; the second control unit is connected between the wireless receiving module and the third control unit, and the third control unit is connected between the second control unit and the second real-time kinematic module.
[0022] It should be noted that the first communication node 120 and the second communication node 110 can also add or delete some communication nodes according to actual needs.
[0023] For example, the first control unit can be a microcontroller or a processor. The processor can include, but is not limited to, a central processing unit (CPU), a digital signal processor (DSP), an ARM (Advanced RISC Machine) processor, an application-specific integrated circuit (ASIC), and a field-programmable gate array (FPGA), etc.
[0024] For example, the wireless transmitting module and the wireless receiving module can be LoRa modules, or other types of RF modules, which are not limited here. For example, LoRa wireless transmitting modules and LoRa wireless receiving modules.
[0025] For example, the second control unit and the third control unit can be microcontrollers or processors.
[0026] In this embodiment, the second control unit can be an independent communication node or it can be merged with other communication nodes.
[0027] For example, the second control unit can be a control unit inside the wireless receiving module, in which case the second control unit and the wireless receiving module act as a communication node. Alternatively, the second control unit can be merged with the third control unit, in which case the second control unit and the third control unit together form a new second control unit.
[0028] Please see Figure 3 , Figure 3 This is a schematic diagram of another communication link provided in an embodiment of this application. For example... Figure 3 As shown, when the second control unit is a control unit inside the wireless receiving module, the second control unit and the wireless receiving module act as a communication node. In this case, the third control unit acts as a new second control unit.
[0029] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of a self-moving device 11 provided in an embodiment of this application. The self-moving device 11 may include a processor 1001 and a memory 1002, wherein the processor 1001 and the processor 1002 can be connected via a bus, such as an I bus. 2Any applicable bus, such as the C (Inter-integrated Circuit) bus.
[0030] The processor 1002 may include a storage medium and internal memory. The storage medium may store an operating system and a computer program. The computer program includes program instructions that, when executed, cause the processor 1001 to perform a data packet loss detection method.
[0031] The processor 1001 provides computing and control capabilities to support the operation of the entire self-moving device 11.
[0032] The processor 1001 can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0033] In one embodiment, processor 1001 is used to run a computer program stored in processor 1002 to perform the following steps: Obtain the first packet loss detection result corresponding to the base station, which includes the packet loss detection result of each first communication node; obtain the second packet loss detection result corresponding to the self-mobile device, which includes the packet loss detection result of each second communication node; perform data packet location detection based on the first packet loss detection result and the second packet loss detection result to obtain the data packet location result.
[0034] In one embodiment, the first communication node includes a first real-time dynamic differential module, a first control unit, and a wireless transmission module; when the processor 1001 acquires the first packet loss detection result corresponding to the base station, it is used to: The system receives a first sub-detection result and a second sub-detection result sent by the base station. The first sub-detection result is the packet loss detection result corresponding to the first real-time dynamic differential module, and the second sub-detection result is the packet loss detection result corresponding to the first control unit. The first sub-detection result is determined based on a preset output frequency and the output frequency of the differential data received by the first control unit from the first real-time dynamic differential module. The second sub-detection result is determined based on the utilization rate of the first control unit's first-in-first-out (FIFO) memory.
[0035] In one embodiment, the second communication node includes a wireless receiving module, which is used to receive differential data transmitted by the wireless transmitting module; the processor 1001, when performing packet loss detection on the wireless transmitting module and obtaining a third sub-detection result, is used to implement: Calculate the first difference between the identification information corresponding to two adjacent frames of differential data received by the wireless receiving module; calculate the packet loss rate based on the first difference to determine the third sub-detection result.
[0036] In one embodiment, the second communication node includes a wireless receiving module, a second control unit, and a second real-time dynamic differential module, wherein the second control unit is connected between the wireless receiving module and the second real-time dynamic differential module; the processor 1001, when acquiring the second packet loss detection result corresponding to the mobile device, is used to: Packet loss detection is performed based on the differential data received by the second control unit to obtain the fourth sub-detection result; packet loss detection is performed based on the differential data received by the second real-time dynamic differential module to obtain the fifth sub-detection result; and the second packet loss detection result is determined based on the fourth and fifth sub-detection results.
[0037] In one embodiment, the second control unit is used to receive differential data transmitted by the wireless receiving module; when the processor 1001 performs packet loss detection based on the differential data received by the second control unit to obtain the fourth sub-detection result, it is used to implement: Calculate the second difference value of the identification information corresponding to the differential data of two adjacent frames received by the second control unit; calculate the packet loss rate based on the second difference value, and determine the fourth sub-detection result.
[0038] In one embodiment, when the processor 1001 performs packet loss detection based on the differential data received from the second real-time dynamic differential module and obtains the fifth sub-detection result, it is used to implement: Obtain the preset total number of epochs, which is the total number of epochs in the differential data pre-configured for the base station; determine the number of epochs lost corresponding to the differential data received by the second real-time dynamic differential module; calculate the epoch loss rate based on the total number of epochs and the number of lost epochs; and determine the fifth sub-detection result based on the epoch loss rate.
[0039] In one embodiment, the second communication node includes a wireless receiving module, a second control unit, a third control unit, and a second real-time dynamic differential module. The second control unit is connected to the wireless receiving module, and the third control unit is connected between the second control unit and the second real-time dynamic differential module. When the processor 1001 acquires the second packet loss detection result corresponding to the mobile device, it is used to: Packet loss detection is performed based on the differential data received by the second control unit to obtain the fourth sub-detection result; packet loss detection is performed based on the differential data received by the third control unit to obtain the fifth sub-detection result; packet loss detection is performed based on the differential data received by the second real-time dynamic differential module to obtain the sixth sub-detection result; based on the fourth, fifth, and sixth sub-detection results, the second packet loss detection result is determined.
[0040] The following detailed description, in conjunction with the accompanying drawings, outlines some embodiments of this application. Unless otherwise specified, the following embodiments and features described herein can be combined with each other. Please refer to... Figure 5 , Figure 5 This is a schematic flowchart illustrating a data packet loss detection method provided in an embodiment of this application, such as... Figure 5 As shown, the data packet loss detection method may include steps S101 to S103.
[0041] Step S101: Obtain the first packet loss detection result corresponding to the base station. The first packet loss detection result includes the packet loss detection result of each first communication node.
[0042] For example, the mobile device can obtain the first packet loss detection result corresponding to the base station, wherein the first packet loss detection result includes the packet loss detection result of each first communication node. For instance, when the first communication node includes a first real-time dynamic differential module, a first control unit, and a wireless transmission module, the packet loss detection results of the first real-time dynamic differential module, the first control unit, and the wireless transmission module can be obtained.
[0043] The first packet loss detection result may include the packet loss rate corresponding to the first communication node, and may also include the location identification information corresponding to the first communication node. For example, the location identification information may include, but is not limited to, the name, number, IP (Internet Protocol) address or MAC (Media Access Control) address of the communication node, etc.; the location identification information is used to locate and detect data packet loss in the communication node.
[0044] By obtaining the first packet loss detection result corresponding to the base station, the packet loss detection result of each first communication node can be obtained.
[0045] Step S102: Obtain the second packet loss detection result corresponding to the self-moving device. The second packet loss detection result includes the packet loss detection result of each second communication node.
[0046] For example, a second packet loss detection result corresponding to the mobile device can be obtained, wherein the second packet loss detection result may include the packet loss detection result of each second communication node. For instance, when the second communication node includes a wireless receiving module, a second control unit, a third control unit, and a second real-time dynamic differential module, the packet loss detection results of the wireless receiving module, the second control unit, the third control unit, and the second real-time dynamic differential module can be obtained.
[0047] It should be noted that, in this embodiment, the self-moving device can perform packet loss detection on the wireless receiving module, the second control unit, and the third control unit respectively, and obtain the corresponding packet loss detection results. It is understood that, since the second real-time dynamic differential module is the last communication node in the communication link, packet loss detection is not required on the second real-time dynamic differential module. However, packet loss detection can be performed on the differential data received by the second real-time dynamic differential module to obtain the detection results from the third control unit.
[0048] In this embodiment, the second packet loss detection result may include the packet loss rate corresponding to the second communication node, and may also include the location identification information corresponding to the second communication node. For example, the location identification information may include, but is not limited to, the name, number, IP address, or MAC address of the communication node; the location identification information is used to locate and detect data packet loss at the communication node.
[0049] By obtaining the second packet loss detection result corresponding to the mobile device, the packet loss detection result corresponding to each second communication node can be obtained.
[0050] Step S103: Based on the first packet loss detection result and the second packet loss detection result, perform data packet location detection to obtain the data packet location result.
[0051] In this embodiment of the application, after obtaining the first packet loss detection result corresponding to the base station and the second packet loss detection result corresponding to the self-moving device, the location detection of data packet loss can be performed based on the first packet loss detection result and the second packet loss detection result to obtain the data packet loss location result.
[0052] For example, when detecting and locating data packet loss, the location information of the communication node experiencing data packet loss can be determined based on the packet loss rate and location identification information of each communication node. Any location detection method from relevant data packet loss technologies can be used, and the specific process is not limited here.
[0053] The above embodiments, by acquiring the packet loss detection results of each first communication node in the base station and the packet loss detection results of each second communication node in the self-moving device, and performing data packet loss location detection based on the first packet loss detection results and the second packet loss detection results, can accurately determine the specific location of the data packet loss. This solves the problem in related technologies where packet loss detection is only performed on the RTK module in the self-moving device, resulting in the inability to accurately determine the specific location of the data packet loss. Thus, it is possible to determine whether data packet loss is the cause of RTK positioning anomalies.
[0054] In this embodiment of the application, in order to determine whether the wireless transmitting module and the wireless receiving module can meet the performance requirements for data transmission, the transmission speed of each first communication node and each second communication node can also be detected.
[0055] In some embodiments, the data packet loss detection method provided in this application may further include: determining the transmission speed of each first communication node and each second communication node, wherein the transmission speed is obtained based on the total number of first bytes and the total number of second bytes of differential data in two adjacent frames within a preset time; and outputting the maximum transmission speed and the communication node corresponding to the maximum transmission speed.
[0056] The preset time can be set according to actual conditions, and the specific value is not limited here. For example, for the second control unit, if the difference in the total number of bytes of two adjacent frames of differential data is 10 bytes within 1 second, the transmission speed of the second control unit can be determined to be 10 bytes / s. As another example, for the wireless receiving module, if the difference in the total number of bytes of two adjacent frames of differential data is 20 bytes within 1 second, the transmission speed of the wireless receiving module can be determined to be 20 bytes / s.
[0057] For example, after determining the transmission speed of each first communication node and each second communication node, the maximum transmission speed and the communication node corresponding to the maximum transmission speed can be output.
[0058] It should be noted that by outputting the maximum transmission speed and the corresponding communication node, the performance of the wireless transmitting module and the wireless receiving module can be evaluated based on the maximum transmission speed.
[0059] Please see Figure 6 , Figure 6 This is a schematic flowchart of another data packet loss detection method provided in the embodiments of this application, which may include the following steps S201 to S203.
[0060] Step S201: Receive the first sub-detection result and the second sub-detection result sent by the base station. The first sub-detection result is the packet loss detection result corresponding to the first real-time dynamic differential module, and the second sub-detection result is the packet loss detection result corresponding to the first control unit.
[0061] For example, the self-moving device can receive the first sub-detection result and the second sub-detection result sent by the base station.
[0062] It should be noted that since the first real-time dynamic differential module, the first control unit, and the wireless transmission module are located within the base station, the packet loss detection results of the first real-time dynamic differential module and the first control unit need to be obtained by the base station. However, the packet loss detection results for the wireless transmission module are obtained by performing packet loss detection based on the differential data received by the wireless receiving module; therefore, the packet loss detection results for the wireless transmission module are obtained by the self-moving device.
[0063] In some implementations, when the mobile device receives differential data sent by the base station based on the communication link, it can send a packet loss detection command to the base station, so that the base station performs packet loss detection on the first real-time dynamic differential module and the first control unit according to the packet loss detection command, and returns the first sub-detection result corresponding to the first real-time dynamic differential module and the second sub-detection result corresponding to the first control unit.
[0064] In other embodiments, the self-moving device can receive a first sub-detection result and a second sub-detection result sent periodically by the base station. It should be noted that, in this embodiment, the base station can be pre-configured to periodically perform packet loss detection on the first real-time dynamic differential module and the first control unit when transmitting differential data, and send the first sub-detection result corresponding to the first real-time dynamic differential module and the second sub-detection result corresponding to the first control unit to the self-moving device.
[0065] By receiving the first sub-detection result and the second sub-detection result sent by the base station, the packet loss detection results of the first real-time dynamic differential module and the first control unit can be obtained, thereby accurately determining the specific location of the data packet loss. This solves the problem in related technologies where packet loss detection is only performed on the RTK module in the self-moving device, resulting in the inability to accurately determine the specific location of the data packet loss. Thus, it is possible to determine whether the data packet loss is the cause of the RTK positioning anomaly.
[0066] In this embodiment, the first sub-detection result is determined based on the preset output frequency and the output frequency of the differential data output by the first real-time dynamic differential module received by the first control unit, and the second sub-detection result is determined based on the usage rate of the first-in-first-out memory corresponding to the first control unit.
[0067] In some embodiments, when the base station performs packet loss detection on the first real-time dynamic differential module, it can compare a preset output frequency with the output frequency of the differential data output by the first control unit received from the first real-time dynamic differential module to obtain a first sub-detection result corresponding to the first real-time dynamic differential module. For example, the base station can parse the differential data received by the first control unit, and when the output frequency of the differential data received by the first control unit is less than the preset output frequency, it determines that the first real-time dynamic differential module has experienced data packet loss. At this time, the frequency difference between the preset output frequency and the output frequency of the differential data output by the first real-time dynamic differential module can be calculated, and the ratio of the frequency difference to the preset output frequency is determined as the packet loss rate. The preset output frequency can be set according to actual conditions, and the specific value is not limited here.
[0068] It is understandable that whether the first real-time dynamic differential module has experienced data packet loss needs to be determined by packet loss detection based on the differential data received by the first control unit.
[0069] For example, the first sub-detection result corresponding to the first real-time dynamic differential module may include the packet loss rate corresponding to the first real-time dynamic differential module, and may also include the positioning identification information corresponding to the first real-time dynamic differential module.
[0070] In the above embodiment, the packet loss rate corresponding to the first real-time dynamic differential module is determined based on the output frequency of the differential data received by the first control unit from the first real-time dynamic differential module. The calculation process is simple and convenient, which can effectively improve the efficiency of packet loss detection, and thus improve the efficiency of subsequent acquisition of data packet loss location.
[0071] In some embodiments, when the base station performs packet loss detection on the first control unit, it can determine the packet loss rate based on the usage rate of the first-in-first-out (FIFO) memory corresponding to the first control unit. For example, when the FIFO memory usage rate is greater than a preset usage rate threshold, it is determined that data packet loss has occurred in the first control unit. In this case, the difference between the FIFO memory usage rate and the preset usage rate threshold can be determined as the packet loss rate. The usage rate threshold can be set according to actual conditions, and its specific value is not limited here. For example, the usage rate threshold can be 100%.
[0072] Understandably, the first control unit uses a first-in-first-out (FIFO) memory for data transmission. When the FIFO memory cannot transmit data in a timely manner, it becomes full, resulting in a FIFO memory utilization rate exceeding 100%. When the FIFO memory utilization rate exceeds 100%, data loss is likely to occur.
[0073] For example, the second sub-detection result corresponding to the first control unit may include the packet loss rate corresponding to the first control unit, and may also include the positioning identification information corresponding to the first control unit.
[0074] In the above embodiments, by determining the packet loss rate based on the usage rate of the first-in-first-out (FIFO) memory corresponding to the first control unit, the packet loss rate of the first control unit can be determined by combining the transmission characteristics of differential data, which improves the accuracy of packet loss detection to a certain extent. At the same time, it avoids parsing the differential data transmitted by the first control unit, reducing system computational requirements and improving detection efficiency.
[0075] Step S202: Perform packet loss detection on the wireless transmission module to obtain the third sub-detection result.
[0076] It should be noted that when performing packet loss detection on the wireless transmitting module, packet loss detection can be performed on the differential data received by the wireless receiving module from the wireless transmitting module to obtain a third sub-detection result.
[0077] It is understandable that data packet loss in the wireless transmitting module usually occurs during the process of the wireless transmitting module sending differential data to the wireless receiving module. Therefore, it is necessary to perform packet loss detection on the differential data received by the wireless receiving module from the wireless transmitting module.
[0078] Step S203: Determine the first packet loss detection result based on the first sub-detection result, the second sub-detection result, and the third sub-detection result.
[0079] For example, after the first sub-detection result, the second sub-detection result, and the third sub-detection result, a first packet loss detection result can be generated based on the first sub-detection result, the second sub-detection result, and the third sub-detection result.
[0080] Please see Figure 7 , Figure 7 This is a schematic flowchart illustrating a sub-step for obtaining a third sub-detection result provided in an embodiment of this application, such as... Figure 7 As shown, step S202 involves performing packet loss detection on the wireless transmission module to obtain a third sub-detection result, which may include the following steps S301 and S302.
[0081] Step S301: Calculate the first difference of the identification information corresponding to the differential data of two adjacent frames received by the wireless receiving module.
[0082] In the embodiments of this application, the identification information may include the sequence number of the differential data, or it may include an identifier such as a timestamp of the differential data to identify the uniqueness of the differential data, which is not limited here. The following description will use the sequence number as the identification information.
[0083] For example, the packet loss rate can be calculated based on the sequence number of the differential data. When the sequence numbers of the differential data are not consecutive, it can be determined that packet loss has occurred. It should be noted that the first control unit in the base station can add a sequence number to each differential data before sending it, and use one byte of the differential data to store the sequence number.
[0084] For example, when calculating the first difference between the identification information corresponding to two adjacent frames of differential data received by the wireless receiving module, the first identification information corresponding to the current frame of differential data and the second identification information corresponding to the previous frame of differential data can be obtained. The first identification information includes the current sequence number corresponding to the current frame of differential data, and the second identification information may include the previous sequence number corresponding to the previous frame of differential data. For example, the first difference can be obtained by subtracting the current sequence number of the current frame of differential data from the previous sequence number corresponding to the previous frame of differential data.
[0085] Step S302: Calculate the packet loss rate based on the first difference to determine the third sub-detection result.
[0086] For example, the packet loss rate can be calculated based on the packet loss rate calculation formula. This is done by subtracting the current sequence number corresponding to the current frame's differential data from the previous frame's differential data, resulting in the first difference, to obtain the third sub-detection result. The packet loss rate calculation formula is as follows:
[0087] In order to improve the accuracy of the packet loss rate, the packet loss rate can be calculated for the differential data of two adjacent frames within a preset time period, and the average packet loss rate can be taken as the packet loss rate of the wireless transmission module. The preset time can be set according to the actual situation, and the specific value is not limited here.
[0088] The above embodiments calculate the packet loss rate of the wireless transmitting module based on the identification information of the differential data received by the wireless receiving module. The calculation process is simple and convenient, and can effectively improve the efficiency of packet loss detection. At the same time, it can avoid parsing the differential data transmitted by the wireless transmitting module, reducing system overhead.
[0089] Please see Figure 8 , Figure 8 This is a schematic flowchart illustrating a sub-step for obtaining a second packet loss detection result provided in an embodiment of this application, as shown below. Figure 8 As shown, obtaining the second packet loss detection result corresponding to the mobile device in step S102 may include the following steps S401 to S403.
[0090] Step S401: Perform packet loss detection based on the differential data received by the second control unit to obtain the fourth sub-detection result.
[0091] For example, such as Figure 3 As shown, the second communication node may include a wireless receiving module, a second control unit, and a second real-time dynamic differential module. The self-moving device can perform packet loss detection on the wireless receiving module and the second control unit respectively to obtain a second packet loss detection result. Since the second real-time dynamic differential module is the last communication node, it is not necessary to calculate the packet loss rate of the second real-time dynamic differential module. It should be noted that in this embodiment, packet loss detection can be performed on the wireless receiving module and the second control unit sequentially. Of course, packet loss detection can also be performed out of order. For example, the second control unit and the wireless receiving module can be detected sequentially.
[0092] It is understandable that packet loss detection for the wireless receiving module requires packet loss detection based on the differential data received by the second control unit; and packet loss detection for the second control unit requires packet loss detection based on the differential data received by the second real-time dynamic differential module.
[0093] For example, when performing packet loss detection on the wireless receiving module, packet loss detection can be performed based on the differential data received by the second control unit to obtain the fourth sub-detection result.
[0094] In some embodiments, performing packet loss detection based on the differential data received by the second control unit to obtain a fourth sub-detection result may include: calculating a second difference value of the identification information corresponding to two adjacent frames of differential data received by the second control unit; calculating the packet loss rate based on the second difference value to determine the fourth sub-detection result.
[0095] The identification information may include the sequence number of the differential data, or it may include a timestamp or other identifier used to uniquely identify the differential data; this is not limited here. The following explanation will use the sequence number as the identification information.
[0096] For example, the differential data between two adjacent frames may include the differential data of the current frame and the differential data of the previous frame. When calculating the second difference value of the identification information corresponding to the differential data between two adjacent frames received by the wireless receiving module, the first identification information corresponding to the differential data of the current frame and the second identification information corresponding to the differential data of the previous frame can be obtained. The first identification information may include the current sequence number corresponding to the differential data of the current frame, and the second identification information may include the previous sequence number corresponding to the differential data of the previous frame.
[0097] In this embodiment, packet loss detection of the wireless receiving module can be performed based on a sequence number detection method to obtain a fourth sub-detection result. For example, the current sequence number of the current frame differential data is subtracted from the previous sequence number corresponding to the previous frame differential data to obtain a second difference. Based on the packet loss rate calculation formula in step S302, the packet loss rate is calculated according to the second difference obtained by subtracting the current sequence number corresponding to the current frame differential data from the previous frame differential data to obtain the fourth sub-detection result.
[0098] In this embodiment, the fourth sub-detection result may include not only the packet loss rate of the wireless receiving module, but also the location identification information of the wireless receiving module. For example, the location identification information of the wireless receiving module can be obtained, and the fourth sub-detection result can be determined based on the packet loss rate and the location identification information. The location identification information is used to detect data packet loss in the wireless receiving module, thereby improving the efficiency of location detection.
[0099] It is understandable that, such as Figure 3 As shown, the second control unit is an internal control unit of the wireless receiving module, and in this case, the second control unit and the wireless receiving module act as a communication node. At this time, the first control unit adds a sequence number to the differential data; therefore, the packet loss rate corresponding to the wireless receiving module is equivalent to the packet loss rate between the first control unit and the second control unit.
[0100] The above embodiments utilize a sequence number-based detection method for packet loss detection in the wireless receiving module. This simple and convenient calculation process effectively improves packet loss detection efficiency, thereby enhancing the efficiency of subsequent packet loss location acquisition. Furthermore, it avoids parsing the differential data transmitted by the wireless receiving module, reducing the system's data processing requirements and contributing to lower system costs.
[0101] Step S402: Perform packet loss detection based on the differential data received by the second real-time dynamic differential module to obtain the fifth sub-detection result.
[0102] It should be noted that packet loss detection for the second control unit requires packet loss detection based on the differential data received by the second real-time dynamic differential module.
[0103] In some embodiments, packet loss detection based on differential data received by the second real-time dynamic differential module to obtain a fifth sub-detection result may include: obtaining a preset total number of epochs, where the total number of epochs is the total number of epochs in the differential data pre-configured for the base station; determining the number of epochs lost corresponding to the differential data received by the second real-time dynamic differential module; calculating the loss rate based on the total number of epochs and the number of lost epochs to obtain the epoch loss rate; and determining the fifth sub-detection result based on the epoch loss rate.
[0104] It should be noted that, in this embodiment, the self-moving device or base station can pre-configure the total number of epochs in the differential data transmitted by the base station. Here, an epoch refers to the start time of a period or event, or a reference date representing a measurement system. The number of epochs acquired by RTK is related to the sampling interval; for example, if the epoch sampling interval is 1 second, then 10 epochs represent 10 seconds of effective data acquisition. The preset total number of epochs can be set according to actual conditions, and the specific value is not limited here.
[0105] For example, a preset total number of epochs can be obtained from a local database or local disk, and the differential data received by the second real-time dynamic differential module can be parsed to obtain the number of lost epochs corresponding to the differential data received by the second real-time dynamic differential module. Then, the loss rate is calculated based on the total number of epochs and the number of lost epochs to obtain the epoch loss rate. For example, the ratio of the number of lost epochs to the total number of epochs can be determined as the epoch loss rate. Finally, the epoch loss rate is used as the packet loss rate of the second control unit to obtain the fifth sub-detection result.
[0106] The fifth sub-detection result can include not only the packet loss rate of the second control unit, but also the location identification information of the second control unit. For example, the location identification information of the second control unit can be obtained, and the fifth sub-detection result can be determined based on the packet loss rate and location identification information of the second control unit. The location identification information is used to detect data packet loss in the second control unit, thereby improving the efficiency of location detection.
[0107] It is understandable that, such as Figure 3 As shown, the packet loss rate corresponding to the second control unit is equivalent to the packet loss rate between the second control unit and the second real-time dynamic differential module.
[0108] In the above embodiment, by calculating the loss rate of the number of lost epochs corresponding to the differential data received by the second real-time dynamic differential module and the total number of epochs, the loss rate of the second control unit can be calculated from the perspective of the number of epochs, thereby improving the accuracy of packet loss detection.
[0109] Step S403: Determine the second packet loss detection result based on the fourth sub-detection result and the fifth sub-detection result.
[0110] For example, after obtaining the fourth sub-detection result corresponding to the wireless receiving module and the fifth sub-detection result corresponding to the second control unit, a second packet loss detection result can be generated based on the fourth sub-detection result and the fifth sub-detection result.
[0111] The above embodiments, by performing packet loss detection on the wireless receiving module and the second control unit respectively, can achieve comprehensive packet loss detection on the differential data transmitted by each second communication node, and can accurately determine the specific location of data packet loss. This solves the problem in related technologies where packet loss detection is only performed on the RTK module in the self-moving device, which makes it impossible to accurately determine the specific location of data packet loss. Thus, it is possible to determine whether data packet loss is the cause of RTK positioning anomalies.
[0112] Please see Figure 9 , Figure 9 This is an illustrative flowchart of another sub-step for obtaining a second packet loss detection result provided in an embodiment of this application, which may include the following steps S501 to S504.
[0113] Step S501: Perform packet loss detection based on the differential data received by the second control unit to obtain the fourth sub-detection result.
[0114] For example, such as Figure 2 As shown, the second communication node may include a wireless receiving module, a second control unit, a third control unit, and a second real-time dynamic differential module. The self-moving device can perform packet loss detection on the wireless receiving module, the second control unit, the third control unit, and the second real-time dynamic differential module respectively to obtain a second packet loss detection result.
[0115] It is understood that step S501 is the same as step S401, and will not be repeated here.
[0116] Step S502: Perform packet loss detection based on the differential data received by the third control unit to obtain the fifth sub-detection result.
[0117] For example, when performing packet loss detection on the wireless receiving module, packet loss detection can be performed on the differential data received by the third control unit based on the serial number detection method to obtain the fifth sub-detection result. The specific process of packet loss detection can be found in the packet loss detection method in step S302 above, and will not be elaborated here.
[0118] Step S503: Perform packet loss detection based on the differential data received by the second real-time dynamic differential module to obtain the sixth sub-detection result.
[0119] It is understood that step S503 is the same as step S402, and will not be repeated here.
[0120] Step S504: Determine the second packet loss detection result based on the fourth sub-detection result, the fifth sub-detection result, and the sixth sub-detection result.
[0121] For example, a second packet loss detection result can be generated based on the fourth sub-detection result, the fifth sub-detection result, and the sixth sub-detection result.
[0122] The above embodiments, by performing packet loss detection on the wireless receiving module, the second control unit, and the third control unit respectively, can achieve comprehensive packet loss detection on the differential data transmitted by each second communication node, and can accurately determine the specific location of the data packet loss. This solves the problem in related technologies where packet loss detection is only performed on the RTK module in the self-moving device, which makes it impossible to accurately determine the specific location of the data packet loss. Thus, it is possible to determine whether the data packet loss is the cause of the RTK positioning anomaly.
[0123] The embodiments of this application also provide a computer-readable storage medium storing a computer program, which includes program instructions. A processor executes the program instructions to implement any of the data packet loss detection methods provided in the embodiments of this application.
[0124] For example, when the program is loaded by the processor, it can perform the following steps: Obtain the first packet loss detection result corresponding to the base station, which includes the packet loss detection result of each first communication node; obtain the second packet loss detection result corresponding to the self-mobile device, which includes the packet loss detection result of each second communication node; perform data packet location detection based on the first packet loss detection result and the second packet loss detection result to obtain the data packet location result.
[0125] The computer-readable storage medium can be an internal storage unit of the self-moving device described in the foregoing embodiments, such as a hard drive or memory of the self-moving device. Alternatively, the computer-readable storage medium can be an external storage device of the self-moving device, such as a plug-in hard drive, smart media card (SMC), secure digital card (SD card), flash card, etc., equipped on the self-moving device.
[0126] Furthermore, a computer-readable storage medium may primarily include a program storage area and a data storage area, wherein the program storage area may store the operating system, programs required for at least one function, etc.; and the data storage area may store data created according to each program, etc.
[0127] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered 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.
Claims
1. A method for detecting data packet loss, characterized in that, Applied to self-moving devices, the self-moving devices perform positioning based on differential data sent by a base station, and the communication link between the self-moving devices and the base station for transmitting the differential data includes at least one first communication node located in the base station and at least one second communication node located in the self-moving devices, the method comprising: Obtain the first packet loss detection result corresponding to the base station, wherein the first packet loss detection result includes the packet loss detection result of each of the first communication nodes; Obtain the second packet loss detection result corresponding to the self-moving device, wherein the second packet loss detection result includes the packet loss detection result of each of the second communication nodes; Based on the first packet loss detection result and the second packet loss detection result, the data packet loss location detection is performed to obtain the data packet loss location result; The first communication node includes a first real-time dynamic differential module, a first control unit, and a wireless transmission module; obtaining the first packet loss detection result corresponding to the base station includes: receiving a first sub-detection result and a second sub-detection result sent by the base station, wherein the first sub-detection result is the packet loss detection result corresponding to the first real-time dynamic differential module, and the second sub-detection result is the packet loss detection result corresponding to the first control unit; performing packet loss detection on the wireless transmission module to obtain a third sub-detection result; and determining the first packet loss detection result based on the first sub-detection result, the second sub-detection result, and the third sub-detection result. The second communication node includes a wireless receiving module, a second control unit, and a second real-time dynamic differential module. The second control unit is connected between the wireless receiving module and the second real-time dynamic differential module. Obtaining the second packet loss detection result corresponding to the self-moving device includes: performing packet loss detection based on the differential data received by the second control unit to obtain a fourth sub-detection result; performing packet loss detection based on the differential data received by the second real-time dynamic differential module to obtain a fifth sub-detection result; and determining the second packet loss detection result based on the fourth sub-detection result and the fifth sub-detection result.
2. The method according to claim 1, characterized in that, The first sub-detection result is determined based on the preset output frequency and the output frequency of the differential data received by the first control unit from the first real-time dynamic differential module. The second sub-detection result is determined based on the usage rate of the first-in-first-out memory corresponding to the first control unit.
3. The method according to claim 1, characterized in that, The second communication node includes a wireless receiving module, which is used to receive differential data transmitted by the wireless transmitting module; The step of performing packet loss detection on the wireless transmitting module to obtain a third sub-detection result includes: Calculate the first difference between the identification information corresponding to two adjacent frames of differential data received by the wireless receiving module; The packet loss rate is calculated based on the first difference to determine the third sub-detection result.
4. The method according to claim 1, characterized in that, The second control unit is used to receive differential data transmitted by the wireless receiving module; The step of performing packet loss detection based on the differential data received by the second control unit to obtain the fourth sub-detection result includes: Calculate the second difference value of the identification information corresponding to two adjacent frames of differential data received by the second control unit; The packet loss rate is calculated based on the second difference to determine the fourth sub-detection result.
5. The method according to claim 1, characterized in that, The step of performing packet loss detection based on the differential data received by the second real-time dynamic differential module to obtain the fifth sub-detection result includes: Obtain a preset total number of epochs, where the total number of epochs is the total number of epochs in the differential data pre-configured for the base station; Determine the number of lost epochs corresponding to the differential data received by the second real-time dynamic differential module; The epoch loss rate is calculated based on the total number of epochs and the number of lost epochs. The fifth sub-detection result is determined based on the epoch loss rate.
6. The method according to claim 1, characterized in that, The second communication node includes a wireless receiving module, a second control unit, a third control unit, and a second real-time dynamic differential module. The second control unit is connected to the wireless receiving module, and the third control unit is connected between the second control unit and the second real-time dynamic differential module. The step of obtaining the second packet loss detection result corresponding to the self-moving device includes: Packet loss detection is performed based on the differential data received by the second control unit to obtain the fourth sub-detection result; Based on the differential data received by the third control unit, packet loss detection is performed to obtain the fifth sub-detection result; Packet loss detection is performed based on the differential data received by the second real-time dynamic differential module to obtain the sixth sub-detection result; The second packet loss detection result is determined based on the fourth sub-detection result, the fifth sub-detection result, and the sixth sub-detection result.
7. A self-moving device, characterized in that, The self-moving device includes a processor and a memory, the processor being configured to execute a computer program stored in the memory to implement the data packet loss detection method as described in any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to implement the data packet loss detection method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Packet loss position detecting method and device
CN104506369A
Network packet loss detection method and device
CN110932934A