CPU end radar data stream receiving exception processing method and device
By designing a radar data stream receiving exception handling method on the CPU side, the problems of interrupt flow and packet loss of fiber optical data transmission are solved, and the effects of resource conservation and data integrity are achieved.
Patent Information
- Application Number
- CN202411556966.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-07
AI Technical Summary
The existing receiving module cannot effectively handle the flow interruption and packet loss in fiber data transmission, resulting in wasted CPU computing resources and the server-side program cannot run normally.
Design radar data stream reception abnormality processing methods on the CPU side, including code error verification, stream interruption and packet loss detection. For fibers that are off-stream or lost packets, stop reading and perform zero-compensation operations, monitor queue usage to restore data reading. The packet loss is detected through the PRI total count value, and the splicing radar data is rearranged according to the configuration table.
Effectively identify and handle abnormal situations in fiber optic data transmission, save CPU computing resources, ensure normal operation of the program, ensure the integrity of data reception, and improve the accuracy of packet loss detection.
Smart Images

Figure CN119402085A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of radar signal processing, and in particular to a method and device for processing abnormal reception of radar data streams on a CPU. Background Art
[0002] During the development and design of the radar system, radar data often needs to be transmitted between different hardware devices. As an important part of the entire radar system, the radar signal processing module has a direct impact on the performance of the radar if the data processing results are correct. However, in actual applications, when the data collected by the fiber optic acquisition board is forwarded to the downstream CPU through FPGA processing, there may be abnormalities such as data packet loss and bit errors. Limited by its own hardware characteristics, it is often difficult for FPGA to detect abnormalities in the data being sent during the data transmission process. In order to ensure the correctness of the signal processing results, a reasonable data stream receiving module program is designed on the CPU side, which can greatly reduce the impact of abnormal front-end data transmission and ensure the normal implementation of subsequent signal processing functions.
[0003] The existing receiving module can only determine the data error situation. When a certain or all optical fibers lose packets, it cannot make a judgment and process it. For the disconnected optical fiber data, it continues to read data from the optical fiber in the "disconnected" state, resulting in a waste of CPU computing resources, which in turn makes the server-side program unable to run normally. Summary of the invention
[0004] The main purpose of this application is to provide a CPU-side radar data stream reception exception processing method and device, aiming to solve the problem that the existing receiving module causes the server-side program to fail to run normally.
[0005] To achieve the above-mentioned purpose, the present application provides a CPU-side radar data stream reception exception processing method, including: performing error checking on each fiber optic radar data; reading the checked fiber optic radar data, and performing interruption and packet loss detection; when it is determined that the radar data of any optical fiber is interrupted or lost, stopping the reading of the fiber optic radar data, and performing zero padding operation on the fiber optic radar data to obtain the usage value of the queue of the interrupted optical fiber; when it is determined that the usage value of the queue is greater than the usage threshold or the idle value is less than the idle threshold, reading the radar data transmission queue of the current optical fiber empty, and resuming the reading of the radar data of the current optical fiber; the radar data of each optical fiber read are rearranged and spliced into the form of all beam data of a single CPI.
[0006] Optionally, the method for packet loss detection includes: obtaining the total PRI value of each optical fiber and determining the minimum value of the total PRI count; comparing the total PRI value of each optical fiber with the minimum value of the total PRI count of all optical fibers, and when it is determined that the total PRI value of any optical fiber is greater than the minimum value of the total PRI count of any optical fiber, the detection result of the current optical fiber is packet loss.
[0007] Optionally, the detection result is that the difference between the total PRI count value of packet loss and the minimum PRI total count value is the number of packet loss in the optical fiber.
[0008] Optionally, after the radar data of each optical fiber read is rearranged and spliced into the form of all beam data of a single CPI, the method also includes: obtaining the time slice value in the radar data of the optical fiber corresponding to the minimum value of the PRI total count, and when the time slice value changes, sending the rearranged and spliced radar data.
[0009] Optionally, the format of all beam data of a single CPI is: radar data is arranged according to beam sequence number, and data of each beam is arranged according to the sequence number of PRI data.
[0010] Optionally, the rearrangement is to arrange the radar data of each optical fiber read according to a configuration table; wherein the configuration table contains the position of the radar data of each optical fiber read in a single CPI data in each working mode.
[0011] Optionally, a non-blocking method is used to read the radar data of each optical fiber.
[0012] Optionally, after performing a zero-padding operation on the radar data of the corresponding optical fiber, the method further includes setting a zero-padding label array enable, an initial value of the zero-padding label array being a first eigenvalue, and setting the zero-padding label array at the position where the zero-padding operation is performed to a second eigenvalue; when rearranging the radar data of each optical fiber, placing the corresponding radar data at the position where the zero-padding label array value is the first eigenvalue, and padding the position where the zero-padding label array value is the second eigenvalue; and after the rearrangement is completed, all values of the zero-padding label array are reset to the first eigenvalue.
[0013] Optionally, the error checking method is: performing error checking based on the frame header information and frame tail information of the radar data of the optical fiber; the flow interruption detection method is: reading the radar data of each optical fiber, and when it is confirmed that the radar data transmission of any optical fiber is interrupted, the detection result of the current optical fiber is flow interruption.
[0014] To achieve the above-mentioned purpose, the present application also provides a CPU-side radar data stream receiving exception processing device, including an optical fiber thread and a splicing thread; the optical fiber thread is used to perform error checking on the radar data received from each optical fiber, and pass the radar data of the optical fiber that passes the error checking to the splicing thread through a queue, and discard the radar data of the optical fiber that fails the error checking; the splicing thread is used to read the radar data of each optical fiber that passes the check, and perform flow interruption and packet loss detection on the radar data of each optical fiber; the radar data of the optical fiber that has flow interruption and packet loss is processed, and the radar data of the optical fiber that has not experienced flow interruption and packet loss is rearranged and spliced into the form of all beam data of a single CPI.
[0015] Compared with the prior art, the present invention has the following beneficial effects: The invention discloses a CPU-side radar data stream reception exception processing method, which can identify and protect the abnormal situation in the optical fiber data transmission process; when the optical fiber is in the "disconnected" state or the data packet sent by the optical fiber is erroneous, the optical fiber in the "disconnected" state is no longer read, and the computing resources of the CPU can be saved, and the normal operation of the program can be guaranteed; the optical fiber in the "disconnected" state is monitored by the use of the queue, and after the optical fiber resumes transmission, normal reading is performed to ensure the integrity of data reception; a count value is set, and whether packet loss occurs is determined according to the difference between a PRI total value and a minimum PRI total count value, so that when all optical fibers lose the same one or several packets of data, the program cannot judge the packet loss from the obtained PRI total count minimum value, thereby ensuring the accuracy of packet loss detection; the received data is arranged by reading a configuration table, and when the front-end data sending design is changed, only the configuration table needs to be modified without modifying the main program. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a flowchart of a CPU-side radar data stream reception exception processing method for this application; Figure 2 This is a flow chart of step S1 in a CPU-side radar data stream reception exception processing method of the present application; Figure 3 This is a flow chart of step S2 in a CPU-side radar data stream reception exception processing method of the present application; Figure 4 This is a functional module diagram of a CPU-side radar data stream reception exception processing device for the present application.
[0017] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0019] The first embodiment of the present invention provides a CPU-side radar data stream reception exception processing method, such as Figure 1 As shown, the specific steps include: Step S1, performing error check on the radar data received from each optical fiber, and when it is confirmed that the radar data of the optical fiber passes the check, the radar data of the optical fiber is transmitted through the queue, otherwise, it is discarded; It can be understood that in the process of transmitting and receiving beam-level radar data, different beam data are generally transmitted by multiple optical fibers.
[0020] Specifically, the radar data of each optical fiber is received through the middleware, and error checking is performed according to the frame header and frame tail information of the radar data of each optical fiber.
[0021] Step S2, read the verified fiber optic radar data, and perform interruption and packet loss detection. When it is determined that the radar data of any optical fiber is interrupted or lost, stop reading the fiber optic radar data and fill the fiber optic radar data with zeros; obtain the usage value of the queue of the interrupted optical fiber, and when it is determined that the usage value of the queue is greater than the usage threshold or the idle value is less than the idle threshold, read the radar data transmission queue of the current optical fiber empty and resume reading the radar data of the current optical fiber.
[0022] It is worth noting that the usage value of a queue refers to the number of data elements already stored in the queue, and the free value refers to the remaining space in the queue that can still store data elements. The usage threshold refers to the maximum number of data elements stored in each optical fiber (i.e., each queue) in the event of a traffic outage, and the free threshold refers to the minimum number of data elements that can still be stored in each optical fiber (i.e., each queue) in the event of a traffic outage.
[0023] Specifically, for each fiber radar data to be verified, when the radar data transmission of any fiber is interrupted, the detection result of the current fiber is a flow interruption; and for the fiber with a flow interruption, the queue usage is read. At the same time, for the fiber that has not experienced a flow interruption, packet loss detection is performed, and the specific method is: obtain the PRI total value of each fiber, determine the minimum PRI total count, and establish a count value inside the thread; compare the PRI total value of each fiber in the count value with the minimum PRI total count of all fibers. When it is determined that the PRI total value of any fiber is greater than any minimum PRI total count, the detection result of the current fiber is a packet loss, and the difference between the PRI total value and the minimum PRI total count is the number of packet losses of the current fiber.
[0024] In this embodiment, non-blocking reading is adopted. When there is no data in the queue, a null pointer is returned and the subsequent program is continued. When the optical fiber is in the "broken flow" state, data is no longer read from the optical fiber in the "broken flow" state. This method can save CPU computing resources and ensure the normal operation of the program. Since the "broken flow" optical fiber data recovery requires the optical fiber thread to receive several packets of data before the counting thread can determine the result, the process is realized by reading the usage of the queue. Specifically, if the optical fiber data transmission is not restored, the usage value of the queue will not change. At this time, it can be judged that the optical fiber is still in the "broken flow" state; if the optical fiber is restored from data transmission, the usage value of the queue will increase or the remaining idle value will decrease. At this time, it can be judged that the optical fiber has recovered from the "broken flow" state. Since the optical fiber has performed zero padding on the corresponding data packet during the period when it was marked as the "broken flow" state, when the optical fiber "broken flow" state is removed, the data in the queue is directly erased and the data after the "broken flow" recovery is received again.
[0025] It can be understood that, according to the transmission protocol, the total PRI count is a cumulative value, which marks the sequence number of each packet of data sent by the front end.
[0026] In this embodiment, parameter information and data information are encapsulated in the same data packet for transmission. If the data packet is lost, the parameter information in the packet will also be lost, and the parameter content of the data packet cannot be obtained. As for the packet loss problem, only after receiving the next packet of data can the loss of the previous data packet be analyzed from the information parameters. In the actual transmission process of optical fiber data, there may be a loss of data packets on one or several optical fiber channels, or there may be a situation where all optical fiber data packets are lost. In order to solve this problem, this embodiment sets a count value, and determines whether packet loss occurs based on the difference between the PRI total count value and the minimum PRI total count value. This can prevent the program from being unable to determine packet loss from the obtained minimum PRI total count value when all optical fibers lose the same one or several packets of data.
[0027] Furthermore, zero padding is performed on radar data that is interrupted or lost, which can ensure that each packet of received data is correctly arranged in the radar data array. The zero padding annotation array is set to be enabled, and the initial value of the zero padding annotation array at all positions is the first eigenvalue, and the zero padding annotation array at the position where the zero padding operation is performed is set to the second eigenvalue; when each packet of data is rearranged, the corresponding radar data is placed at the position with the first eigenvalue of the zero padding annotation array value, and the position with the second eigenvalue of the zero padding annotation array value is zero-padded; after each packet of data is rearranged, all values of the zero padding annotation array are reset to the first eigenvalue. This method has strong flexibility. In practical applications, when radar data does not need to be padded with zeros but needs to be padded with noise data, deployment can be completed quickly.
[0028] Step S3, rearrange and splice the read optical fiber radar data into the form of all beam data of a single CPI.
[0029] Specifically, the radar data read is arranged according to the configuration table; the configuration table contains the position of the radar data read in the CPI data in each working mode, and the position where each field in the radar data should be placed can be obtained according to the configuration table. By consulting the configuration table, the data processing program can determine how to parse, classify and rearrange the received data. It provides a clear blueprint for data processing, ensuring that the complete CPI data can be correctly constructed in different working scenarios. For example, when the system switches from one working mode to another, the data processing program can quickly adjust the data processing strategy according to the configuration table without complex reprogramming.
[0030] Furthermore, the format of all beam data of a single CPI is: the radar data is arranged according to the beam sequence number, and the data of each beam is arranged according to the sequence number of the PRI data.
[0031] After the data is arranged in the form of a single CPI, it must be sent to the next level through a queue for signal processing. This embodiment uses time slice switching to control the time for sending radar data to the next level for signal processing. Specifically, the time slice value in the radar data of the optical fiber corresponding to the minimum value of the PRI total count is obtained. When the time slice value changes, the rearranged and spliced radar data is sent.
[0032] Example 1 The transmission format of the received data packet in this embodiment is: Frame parameters + [(beam 1 parameters + beam 1 data) + (beam 2 parameters + beam 2 data) + … + (beam n parameters + beam n data)], where a data packet is the data of a PRI.
[0033] Step S10, as Figure 2As shown, each packet of radar data of each optical fiber in the buffer area is obtained through the middleware. It can be understood that the middleware is a bridge connecting the system software and the application software; the frame header and frame tail information of the radar data are extracted; the frame header and frame tail data are verified, and the data that passes the verification is queued and transmitted to the next level, and the data that fails is discarded; Step S20, detect the data that has passed the verification to determine whether there is packet loss or transmission interruption in the data. Figure 3 As shown, the specific steps are: Step S201, initializing the data receiving status of each optical fiber, that is, fiber_status[i]=0; Step S202, for all optical fibers with fiber_status[i]=0, queue data is read non-blockingly in a cyclic manner. If all data of the i-th optical fiber is read within the timeout period, the value of fiber_status[i] is increased by 1, that is, the radar data of the i-th optical fiber is not interrupted; Step S211, determine whether the fiber_status[i] value of each optical fiber is 0, if fiber_status[i]≠0, proceed to step S221; if fiber_status[i]=0, proceed to step S212; Step S212, counting the number of optical fibers that can receive data recvcount; Step S213, if recvcount=0, it means that all optical fibers have no data transmission, and the optical fiber data is read again after a certain delay; If recvcount>0, it means that some of the fibers can transmit data. The i-th fiber with fiber_status[i]=0 has no data transmission, so it is marked as "broken flow" and the value of fiber_status[i] is set to -1. Step S221, determine whether the fiber_status[i] value of each optical fiber is greater than 0; if fiber_status[i]>0, it means that the optical fiber data transmission is normal, the value of fiber_status[i] is -1, and step S3 is performed; if fiber_status[i]=-1, it means that the optical fiber is marked as "disconnected" state, and step S222 is performed; Step S222, read the usage of the fiber thread data transmission queue corresponding to the optical fiber. If the usage value of the queue is too large or the idle value is too small, it means that the data transmission of the optical fiber has been restored. It is necessary to read the data transmission queue of the optical fiber thread empty, that is, erase the data in the queue, and set the value of fiber_status[i] to 0, and resume reading the data of the optical fiber, that is, return to step S202; Step S3: For optical fibers with normal optical fiber data transmission, data packet loss may occur. Use the control information parameters to determine whether there is a packet loss problem in the data received by each optical fiber. For optical fiber lines with packet loss, count the number of packet losses, set the value of fiber_status[i] to the number of packet losses, and perform zero padding on its beam data. Step S4, according to the transmission protocol, the data received from each optical fiber is rearranged and spliced in a specific form to obtain a data format of a single CPI, specifically: (beam 1’s 1st PRI data + beam 1’s 2nd PRI data + … + beam 1’s nth PRI data) + (beam 2’s 1st PRI data + beam 2’s 2nd PRI data + … + beam 2’s nth PRI data) + … + (beam m’s 1st PRI data + beam 2’s 2nd PRI data + … + beam m’s nth PRI data).
[0034] The second embodiment of the present invention provides a CPU-side radar data stream reception exception processing device, such as Figure 4 As shown, including fiber optic threads and spelling threads; The optical fiber thread is used to perform error checking on the radar data received from each optical fiber, and transmit the radar data of the optical fiber that passes the error checking to the number-splitting thread through a queue, and discard the radar data of the optical fiber that fails the error checking; The splicing thread is used to read the radar data of each optical fiber that has passed the verification, and perform interruption and packet loss detection on the radar data of each optical fiber; process the radar data of the optical fiber that has interruption and packet loss, and rearrange and splice the radar data of the optical fiber that has not experienced interruption and packet loss into the form of all beam data of a single CPI, and send it to the signal processing module for processing.
[0035] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A CPU-side radar data stream reception exception processing method, characterized in that: include: Perform error checking on each channel of fiber optic radar data; Read the verified fiber radar data and perform flow interruption and packet loss detection; When it is determined that the radar data of any optical fiber is disconnected or lost, the reading of the optical fiber radar data is stopped, and the optical fiber radar data is padded with zeros to obtain the usage value of the queue of the disconnected optical fiber; When it is determined that the usage value of the queue is greater than the usage threshold or the idle value is less than the idle threshold, the radar data transmission queue of the current optical fiber is read empty, and the reading of the radar data of the current optical fiber is resumed; The radar data of each optical fiber is read and re-arranged and spliced into the form of all beam data of a single CPI.
2. The CPU-side radar data stream reception exception processing method according to claim 1 is characterized in that: The packet loss detection method comprises: Obtain the total PRI value of each optical fiber and determine the minimum total PRI value; The total PRI value of each optical fiber is compared with the minimum total PRI count of all optical fibers. When it is determined that the total PRI value of any optical fiber is greater than the minimum total PRI count of any optical fiber, the detection result of the current optical fiber is packet loss.
3. The CPU-side radar data stream reception exception processing method according to claim 2 is characterized in that: The difference between the total PRI count value and the minimum PRI total count value in the optical fiber with the detection result of packet loss is the number of packet loss in the optical fiber.
4. The CPU-side radar data stream reception exception processing method according to claim 2 is characterized in that: After rearranging and splicing the radar data of each optical fiber read into the form of all beam data of a single CPI, the method further includes: The time slice value in the radar data of the optical fiber corresponding to the minimum value of the PRI total count is obtained, and when the time slice value changes, the rearranged and spliced radar data is sent.
5. The CPU-side radar data stream reception exception processing method according to claim 1, characterized in that: The format of all beam data of a single CPI is: the radar data is arranged according to the beam sequence number, and the data of each beam is arranged according to the sequence number of the PRI data.
6. The CPU-side radar data stream reception exception processing method according to claim 1, characterized in that: The rearrangement is to arrange the radar data of each optical fiber according to the configuration table; wherein the configuration table contains the position of the radar data of each optical fiber read in each working mode in a single CPI data.
7. The CPU-side radar data stream reception exception processing method according to claim 1, characterized in that: The radar data of each optical fiber is read in a non-blocking manner.
8. The CPU-side radar data stream reception exception processing method according to claim 1, characterized in that: After performing a zero-padding operation on the radar data of the corresponding optical fiber, the method further includes setting a zero-padding label array enable, an initial value of the zero-padding label array being a first eigenvalue, and setting the zero-padding label array at the position where the zero-padding operation is performed to a second eigenvalue; when rearranging the radar data of each optical fiber, placing the corresponding radar data at the position where the zero-padding label array value is the first eigenvalue, and padding the position where the zero-padding label array value is the second eigenvalue; and after the rearrangement is completed, all values of the zero-padding label array are reset to the first eigenvalue.
9. The CPU-side radar data stream reception exception processing method according to claim 1, characterized in that: The error checking method is: performing error checking according to the frame header information and frame tail information of the optical fiber radar data; The method for detecting the interruption of the flow is as follows: the radar data of each optical fiber is read, and when it is confirmed that the radar data transmission of any optical fiber is interrupted, the detection result of the current optical fiber is interruption of the flow.
10. A CPU-side radar data stream reception exception processing device, characterized in that: Includes fiber optic threads and spelling threads; The optical fiber thread is used to perform error checking on the radar data received from each optical fiber, and transmit the radar data of the optical fiber that passes the error checking to the numbering thread through the queue, and discard the radar data of the optical fiber that fails the error checking; The splicing thread is used to read the verified fiber optic radar data and perform interruption and packet loss detection; when it is determined that the radar data of any optical fiber is interrupted or lost, the reading of the fiber optic radar data is stopped, and the fiber optic radar data is padded with zeros to obtain the usage value of the queue of the interrupted optical fiber; when it is determined that the usage value of the queue is greater than the usage threshold or the idle value is less than the idle threshold, the radar data transmission queue of the current optical fiber is read empty, and the reading of the radar data of the current optical fiber is resumed; the radar data of each optical fiber read is rearranged and spliced into the form of all beam data of a single CPI.
Citation Information
Cited By
Laser radar fault diagnosis method and device, electronic equipment and storage medium
CN120428206A