Radar data processing method, system, equipment and medium
By encapsulating the radar algorithm into a dynamic library and utilizing a multi-threaded processing framework, parallel acceleration of radar data processing is achieved, solving the problem of inefficiency of traditional serial processing, and significantly improving processing efficiency and real-timeness.
Patent Information
- Application Number
- CN202411653919.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-11
AI Technical Summary
Traditional radar signal processing algorithms are mostly performed serially, which leads to low processing efficiency when facing a large amount of data, making it difficult to meet the needs of real-time processing.
By encapsulating the radar algorithm into an independent dynamic library and utilizing a multi-threaded integrated processing framework, target threads are allocated to each target dynamic library based on priority, parallel acceleration processing is achieved.
It significantly improves the efficiency and real-time performance of radar data processing, makes full use of the CPU's parallel computing capabilities, and optimizes the use of system resources.
Smart Images

Figure CN119596240A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a radar data processing method, system, device and medium. Background Art
[0002] With the continuous advancement of radar technology and the increasing expansion of its application fields, the amount of data generated by radar systems is becoming increasingly large. This places higher demands on the speed and efficiency of data processing. Traditional radar signal processing algorithms are mostly executed serially, and the processing speed is restricted by the computing power of the CPU (Central Processing Unit) and single-threaded task scheduling, resulting in low processing efficiency when facing large amounts of data, resulting in the failure to fully realize the potential for performance optimization and difficulty in meeting the needs of real-time processing. Summary of the invention
[0003] In view of this, an object of the present invention is to provide a radar data processing method, system, device and medium, which can significantly improve the efficiency and real-time performance of radar data processing.
[0004] In a first aspect, the present invention provides a radar data processing method, which is applied to a radar data processing system, wherein a plurality of single radar algorithms are configured in the radar data processing system, and each single radar algorithm is encapsulated as an independent dynamic library, and the method comprises:
[0005] receiving at least one radar data processing task, the radar data processing task corresponding to a single radar algorithm or multiple radar algorithms;
[0006] Based on a single radar algorithm or multiple radar algorithms corresponding to the radar data processing task, determine a target dynamic library corresponding to the radar data processing task and a priority of the target dynamic library;
[0007] Calling a multi-threaded integrated processing framework to allocate a target thread to each target dynamic library corresponding to the radar data processing task based on the priority through the multi-threaded integrated processing framework;
[0008] The target thread is started to call the corresponding target dynamic library in the started target thread, and the radar data to be processed is accelerated through the target dynamic library to obtain the processing result corresponding to the radar data processing task.
[0009] In one embodiment, the multi-threaded integrated processing framework adopts the design pattern of task queue cache and work pool;
[0010] The task queue cache is used to: store radar data to be processed, where the radar data to be processed includes radar base data corresponding to the radar data processing task, and / or product data output by the target dynamic library;
[0011] The work pool is used to allocate target threads to each target dynamic library corresponding to the radar data processing task based on priority.
[0012] In one implementation, starting a target thread to call a corresponding target dynamic library in the started target thread, accelerating processing of radar data to be processed by the target dynamic library, and obtaining a processing result corresponding to the radar data processing task, including:
[0013] Start the target thread corresponding to the current priority level, so as to call the corresponding target dynamic library in the started target thread, and accelerate the processing of the radar data to be processed by the target dynamic library to obtain product data, which is stored in the task queue cache or saved in the form of a file;
[0014] Continue to start the target thread corresponding to the next priority until the corresponding target dynamic library is called in the target thread corresponding to the optimal first-level priority, and the radar data to be processed is accelerated through the target dynamic library to obtain the processing result corresponding to the radar data processing task.
[0015] In one implementation, the corresponding target dynamic library is called in the started target thread, and the radar data to be processed is accelerated by the target dynamic library to obtain product data, including:
[0016] Based on the header file of the target dynamic library, the corresponding target dynamic library is called in the started target thread, and the radar data to be processed is processed through the target dynamic library. The parallel computing function of the integrated performance primitive library is used to accelerate the processing process of the target dynamic library to obtain product data.
[0017] In one embodiment, the method further comprises:
[0018] If the target dynamic library fails to execute, its corresponding target thread is started again after a preset time period is reached, so as to call the failed target dynamic library again in the started target thread.
[0019] In one embodiment, the method further comprises:
[0020] Monitoring the radar data processing task to obtain performance data, where the performance data is used to describe the completion time and / or failure rate of the radar data processing task;
[0021] Adaptively adjust the number of threads in the worker pool within the multi-threaded integrated processing framework based on performance data.
[0022] In one embodiment, the method further comprises:
[0023] Monitor the threads started by the multi-threaded integrated processing framework to obtain the thread idle status;
[0024] The number of threads in the work pool within the multi-threaded integrated processing framework is adaptively adjusted based on the thread idle situation.
[0025] In a second aspect, the present invention further provides a radar data processing system, wherein a plurality of single radar algorithms are configured in the radar data processing system, each of which is encapsulated as an independent dynamic library, and the system comprises:
[0026] A task receiving module, used for receiving at least one radar data processing task, where the radar data processing task corresponds to a single radar algorithm or multiple radar algorithms;
[0027] A dynamic library and priority determination module, used to determine the target dynamic library and the priority of the target dynamic library corresponding to the radar data processing task based on the single radar algorithm or multiple radar algorithms corresponding to the radar data processing task;
[0028] A thread allocation module is used to call a multi-threaded integrated processing framework to allocate a target thread to each target dynamic library corresponding to the radar data processing task based on the priority through the multi-threaded integrated processing framework;
[0029] The parallel acceleration processing module is used to start the target thread to call its corresponding target dynamic library in the started target thread, and accelerate the processing of the radar data to be processed through the target dynamic library to obtain the processing result corresponding to the radar data processing task.
[0030] In a third aspect, the present invention further provides an electronic device, comprising a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement any one of the methods provided in the first aspect.
[0031] In a fourth aspect, the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement any one of the methods provided in the first aspect.
[0032] The present invention provides a radar data processing method, system, device and medium, wherein a plurality of single radar algorithms are configured in the radar data processing system, and each single radar algorithm is encapsulated as an independent dynamic library. If at least one radar data processing task is received, and the radar data processing task corresponds to a single radar algorithm or multiple radar algorithms, the target dynamic library corresponding to the radar data processing task and the priority of the target dynamic library are determined based on the single radar algorithm or multiple radar algorithms corresponding to the radar data processing task; then the multi-threaded integrated processing framework is called to allocate a target thread to each target dynamic library corresponding to the radar data processing task based on the priority through the multi-threaded integrated processing framework; finally, the target thread is started to call its corresponding target dynamic library in the started target thread, and the radar data to be processed is accelerated through the target dynamic library to obtain the processing result corresponding to the radar data processing task. The above method comprehensively utilizes the parallel computing capability of the CPU, allocates a target thread to each target dynamic library corresponding to the radar data processing task through the multi-threaded integrated processing framework, so as to accelerate the processing of the radar data to be processed by using the target dynamic library in a multi-threaded environment, realize the corresponding data processing flow, and obtain the processing result corresponding to the radar data processing task, thereby significantly improving the efficiency and real-time performance of radar data processing.
[0033] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0034] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 A schematic diagram of a flow chart of a radar data processing method provided by an embodiment of the present invention;
[0037] Figure 2 A schematic flow chart of a radar data processing method for obtaining radar short-term products provided by an embodiment of the present invention;
[0038] Figure 3A schematic diagram of the structure of a radar data processing system provided by an embodiment of the present invention;
[0039] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described in combination with the embodiments below. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] At present, in the process of processing multiple radar data, the existing technology often lacks an effective framework to manage concurrent task scheduling and resource allocation, resulting in the failure to fully realize the potential of performance optimization. Based on this, the present invention implements a radar data processing method, system, device and medium, which can significantly improve the efficiency and real-time performance of radar data processing.
[0042] To facilitate understanding of this embodiment, a radar data processing method disclosed in an embodiment of the present invention is first described in detail. The method is applied to a radar data processing system. The radar data processing system is configured with multiple single radar algorithms, each of which is encapsulated as an independent dynamic library. Figure 1 The flowchart of a radar data processing method shown in FIG. 1 mainly includes the following steps S102 to S108:
[0043] Step S102, receiving at least one radar data processing task.
[0044] Among them, the radar data processing task corresponds to a single radar algorithm or multiple radar algorithms, and the multiple radar networking algorithm is composed of n single radar algorithms and radar networking algorithms. The radar networking algorithm is to combine multiple radar data, which is generally called networking in meteorology. The specific operation involves the calculation of overlapping areas and the connection of non-overlapping areas. In one embodiment, the radar data processing task needs to call one or more radar algorithms (that is, a single radar algorithm or multiple radar algorithms). The mapping relationship between the radar data processing task and the radar algorithm it calls can be pre-configured. Since each radar algorithm is encapsulated as an independent dynamic library, the header file of the dynamic library is introduced. When the radar data processing task is received, the corresponding header file identifier can be determined based on the mapping relationship to call the dynamic library corresponding to the radar algorithm.
[0045] Step S104, based on the single radar algorithm or multiple radar algorithms corresponding to the radar data processing task, determining the target dynamic library corresponding to the radar data processing task and the priority of the target dynamic library.
[0046] Among them, the target dynamic library is the dynamic library that needs to be called to execute the radar data processing task, and the priority is used to characterize the order in which the target dynamic library is called. In one example, the priority is usually single radar algorithm>radar networking algorithm>other multiple radar algorithms. Therefore, when receiving the single radar algorithm or multiple radar algorithms corresponding to the radar data processing task, the priority of the target dynamic library corresponding to each radar algorithm called by the radar data processing task is determined.
[0047] Step S106 , calling the multi-thread integrated processing framework to allocate a target thread to each target dynamic library corresponding to the radar data processing task based on the priority through the multi-thread integrated processing framework.
[0048] In one example, the multi-threaded integrated processing framework is called as a base class, and the framework interface functions are defined. By calling these interfaces, the multi-threaded integrated processing framework can automatically allocate threads or processes to each target dynamic library.
[0049] Step S108, starting the target thread to call its corresponding target dynamic library in the started target thread, accelerating the processing of the radar data to be processed through the target dynamic library, and obtaining the processing result corresponding to the radar data processing task.
[0050] The radar data to be processed includes radar base data corresponding to the radar data processing task, and / or product data output by the target dynamic library. In one example, the threads can be started in sequence according to the aforementioned priorities. For example, the target thread corresponding to the current priority is started, and the corresponding target dynamic library is called in the target thread, and the radar data to be processed is processed using the target dynamic library. At the same time, the integrated performance primitive (IPP, Intel Performance Primitives) library is used to accelerate the processing process to obtain product data, which can be stored in a multi-threaded integrated processing framework or saved in a file format; continue to call the target thread corresponding to the next priority, and repeat the above process until the processing result corresponding to the radar data processing task is obtained.
[0051] The radar data processing method provided by the embodiment of the present invention comprehensively utilizes the parallel computing capability of the CPU, and allocates a target thread to each target dynamic library corresponding to the radar data processing task through a multi-threaded integrated processing framework, so as to accelerate the processing of the radar data to be processed by using the target dynamic library in a multi-threaded environment, implement the corresponding data processing flow, and obtain the processing result corresponding to the radar data processing task, thereby significantly improving the efficiency and real-time performance of radar data processing.
[0052] In one implementation, the dynamic library needs to be pre-packaged: each radar algorithm is packaged as an independent dynamic library, the header file of the dynamic library is introduced, and the execution of the radar algorithm is implemented by calling these dynamic library functions.
[0053] In the specific implementation, a single radar algorithm is used as an algorithm module, and each algorithm module is compiled into a dynamic link library (.so) using the GNU compiler (GCC). Each algorithm module needs to correspond to an independent function, such as quality control, coordinate conversion, radar basic application product calculation, short-term product calculation, etc. At the same time, each algorithm module must have a clear input and output interface to ensure that they can work independently and exchange data with other algorithm modules.
[0054] Furthermore, the process of using the GNU compiler (GCC) to compile each algorithm module into a dynamic link library (.so) is as follows: Use the GNU compiler (GCC) to compile each algorithm module, establish a dynamic link library, and define its interface, including interface functions, classes, data structures, etc., for other programs to call. Among them, the interface function is a series of standardized operations, including initialization, execution, data transfer and cleanup operations, ensuring that the interface function has consistency and clear documentation, including function parameters, return values and possible error codes. It mainly includes the following processes:
[0055] (1) Write the algorithm module code: Write the source code file (.c file) of each algorithm module. Each algorithm module should contain a set of functions, which will serve as the interface functions of the dynamic link library.
[0056] (2) Write header file: Create a header file (.h file) for each algorithm module to define interface functions, classes or data structures.
[0057] (3) Compile into a dynamic link library: Use GCC to compile the source code file and compile it into a dynamic link library (.so file).
[0058] (4) Define consistent and documented interface functions: Ensure that interface functions have consistent and clear documentation. Detailed descriptions of function parameters, return values, and possible error codes can be provided in header files or separate documentation files.
[0059] (5) Other programs call dynamic link libraries: Other programs can call interface functions by linking to dynamic link libraries.
[0060] The specific examples of the above process are as follows:
[0061] Source code module1.c:
[0062]
[0063]
[0064] Dynamic library compilation command:
[0065] gcc -fPIC -c module.co module.o
[0066] gcc-shared-o module.so module.o
[0067] Furthermore, a corresponding header file is provided for the aforementioned dynamic link library, all public functions and data structures therein are declared, and the dynamic library is called through the header file.
[0068] The following are some examples:
[0069]
[0070] module1.h is the header file of the dynamic link library. In the above calling code, the header file is called through include, and the required function is called in the main function.
[0071] The embodiment of the present invention can ensure the independence of radar algorithms by encapsulating each radar algorithm as a dynamic library, so that various radar algorithms can be flexibly implemented, including adding and deleting a radar algorithm, so that the entire system can better adapt to different project requirements.
[0072] On this basis, after receiving the radar data processing task and determining the target dynamic library corresponding to the radar data processing task and the priority of the target dynamic library, the multi-threaded integrated processing framework can be called to allocate a target thread to each target dynamic library corresponding to the radar data processing task based on the priority through the multi-threaded integrated processing framework.
[0073] In an embodiment of the present invention, a multi-threaded integrated processing framework is called as a base class, and a framework interface function is defined. By calling these interfaces, the framework can automatically allocate threads or processes, thereby realizing parallel accelerated processing of multiple radar data. In a specific implementation, based on the multi-threaded / process integrated processing framework, a set of standardized framework interface functions are defined. For multiple radar data processing tasks, by calling its interface, the framework automatically allocates threads or processes, thereby realizing parallel acceleration of radar data processing, and by calling the framework interface, the execution algorithm can be selected. Among them, the interface functions of the framework include but are not limited to task submission, status query and result recovery functions. Users can submit radar data processing tasks that need to be processed by calling these interfaces. The framework automatically and dynamically allocates threads or processes according to the availability of system resources, thereby realizing parallelization of data processing.
[0074] The embodiment of the present invention provides an automatic dynamic allocation strategy: (1) Load balancing: Task allocation is performed based on the current load of each thread or process to ensure balanced utilization of resources. (2) Batch processing: For tasks of similar types, multiple threads or processes can be started in batches for processing to reduce the overhead of context switching. (3) Dynamic expansion: During the peak period of tasks, the number of threads or processes can be temporarily increased. When the number of tasks decreases, the redundant threads or processes are automatically recycled.
[0075] In the process of calling the multi-threaded integrated framework to process multiple radar data, the multi-threaded integrated processing framework adopts the design mode of task queue cache and work pool; the task queue cache is used to store the radar data to be processed, including radar base data and product data; the work pool is used to maintain a certain number of threads or processes to ensure the rational use of resources, and allocate target threads to each target dynamic library corresponding to the radar data processing task based on priority. This design enables the system to automatically adjust the concurrent processing capacity according to the load, and maintain stable and efficient processing performance under high load conditions.
[0076] Based on this, an embodiment of the present invention provides a specific implementation method of starting a target thread to call its corresponding target dynamic library in the started target thread, accelerating the processing of radar data to be processed through the target dynamic library, and obtaining the processing result corresponding to the radar data processing task, including:
[0077] (1) starting a target thread corresponding to the current priority level, calling a target dynamic library corresponding to the started target thread, accelerating the processing of radar data to be processed by the target dynamic library to obtain product data, and storing the product data in a task queue cache or in a file form;
[0078] In one implementation, the process of calling the corresponding target dynamic library in the started target thread and accelerating the processing of the radar data to be processed by the target dynamic library to obtain product data is as follows: based on the header file of the target dynamic library, calling the corresponding target dynamic library in the started target thread, processing the radar data to be processed by the target dynamic library, and accelerating the processing process of the target dynamic library by using the parallel computing function of the integrated performance primitive library to obtain product data. The embodiment of the present invention uses the parallel computing function of the IPP library to call the radar data processing and analysis algorithm in the dynamic library for accelerated processing.
[0079] (ii) Continue to start the target thread corresponding to the next priority until the target dynamic library corresponding to the optimal first-level priority is called, and the radar data to be processed is accelerated through the target dynamic library to obtain the processing result corresponding to the radar data processing task. In the specific implementation, after parallel acceleration of multiple radars, the processing results of each radar are integrated to form a unified data set, and the result is saved as a file in netCDF, DAT or other formats.
[0080] In an embodiment of the present invention, priorities of different types of tasks are defined. For example, base data analysis has a higher processing priority than radar basic application product production, and scheduling is performed according to the priority. The system load is monitored, and if the load is too high, the processing rate of low-priority tasks is reduced, or the processing is postponed.
[0081] The embodiments of the present invention use multi-threading and multi-process technology to perform data parallel processing, which has become an effective means to improve computing efficiency. By encapsulating the radar processing algorithm as a dynamic library, it can be easily called by different programs and achieve flexibility. In addition, the multi-core parallel computing function of the CPU enables multiple data processing tasks to be assigned to different cores for simultaneous execution, thereby significantly accelerating the data processing process.
[0082] For ease of understanding, the present invention provides a specific application example. Figure 2 The flowchart of a radar data processing method for obtaining radar short-term products shown in FIG. 1 includes the following steps S202 to S208:
[0083] Step S202, read the radar base data for analysis, use the parallel computing function in the IPP library, call the dynamic library corresponding to the radar quality control algorithm, accelerate the radar data analysis process, and obtain radar analysis quality control data. Among them, the radar analysis quality control product is the basic reflectivity, radial velocity, velocity spectrum width, differential reflectivity, differential phase constant and other polarization quantities in the polar coordinate system.
[0084] Step S204, using the parallel computing function in the IPP library, calling the dynamic library corresponding to the coordinate conversion, accelerating the conversion process from polar coordinates to rectangular coordinates, and obtaining the data after the coordinate conversion.
[0085] Step S206, using the parallel computing function in the IPP library, by calling the dynamic library corresponding to the radar basic product calculation, the calculation process of the radar basic product is accelerated, and the radar basic application product is calculated. Among them, the radar basic application product is the combined reflectivity, echo top height, vertical liquid water content, etc. in the rectangular coordinate system.
[0086] Step S208, using the parallel computing function in the IPP library, calling the dynamic library corresponding to the short-term product calculation algorithm, accelerating the short-term product calculation process, and outputting radar short-term products. Among them, radar short-term products are radar weather identification, forecasting and warning products in a rectangular coordinate system, including echo extrapolation, quantitative precipitation extrapolation, phase state identification, thunderstorm identification and forecasting, hail identification and forecasting and other products.
[0087] In one example, the processing result is saved as a file in a netCDF, json or other specified format.
[0088] Optionally, radar quality control data can be saved in memory or output to a file. If saved in memory, it is represented by a structure or class. If output to a file, it is saved in netCDF format. Optionally, radar basic application products and radar short-term products are output to files and stored in netCDF or json format.
[0089] Specifically, the embodiment of the present invention further provides a specific calculation process of the above steps S202 to S208:
[0090] (1) Analysis and quality control: Read radar basic data from the database. These data usually include reflectivity, radial velocity, spectral width, etc. Analyze the read basic data, extract meaningful information (for example, reflectivity, velocity, etc.), call the radar quality control (QC) algorithm, perform preliminary screening and correction on the data, and remove noise and outliers.
[0091] Assume that the libqc.so dynamic library provides the qc_process function, which inputs the original data and outputs the data after quality control. The sample code is:
[0092]
[0093]
[0094]
[0095] (2) Coordinate conversion: Convert the radar polar coordinate file into rectangular coordinate or longitude and latitude coordinate format, and use Intel's IPP library (Intel Performance Primitives) to accelerate the conversion process.
[0096] Assume that the Polar2Cart.so dynamic library provides the convert_polar_to_cartesian function, which inputs polar coordinate data and outputs longitude and latitude coordinate data. The sample code is:
[0097]
[0098]
[0099]
[0100] (3) Radar basic application products and short-term product calculations: Based on the radar data after coordinate conversion, call the radar basic application product calculation function and short-term product calculation function, and use the IPP library to accelerate the calculation process. The implementation method is the same as the coordinate conversion process: first load the dynamic library of the corresponding function, then integrate the multi-threaded parallel computing work into the calculation process, and finally call the integrated function to implement the calculation process. The sample code of the radar basic application product is as follows.
[0101] Assume that the BasicPhysical.so dynamic library provides the calc_basic_physical function, inputs the radar data of longitude and latitude coordinates, and outputs the radar basic application product data. The sample code is:
[0102]
[0103]
[0104]
[0105] The calculation of short-term products is similar to the calculation of basic application products above, just replace it with the corresponding dynamic library.
[0106] Furthermore, in addition to the aforementioned task priority management function, the multi-threaded integrated processing framework also has the functions of dynamically adjusting the work pool size, monitoring and scope, failure recovery and retry, and resource recycling.
[0107] Dynamically adjust the size of the work pool: Dynamically adjust the number of threads or processes based on the current task queue length and system resource usage (such as CPU, memory).
[0108] Monitoring and scope: Monitor the radar data processing task to obtain performance data, which is used to describe the completion time and / or failure rate of the radar data processing task; adaptively adjust the number of threads in the work pool within the multi-threaded integrated processing framework based on the performance data. The embodiment of the present invention can introduce a monitoring module to monitor the CPU, memory and I / O load of the system in real time, and feed back to the scheduling algorithm, and adaptively adjust the scheduling strategy of subsequent tasks and the size of the work pool according to the feedback performance data (such as task completion time, failure rate, etc.).
[0109] Failure recovery and retry: If the target dynamic library fails to execute, its corresponding target thread will be started again after a preset time, so as to call the failed target dynamic library again in the started target thread. The embodiment of the present invention implements a task retry mechanism, records failed tasks, and automatically retries after a certain period of time, or selects different strategies according to the failure type; monitors the system status, avoids retrying when the system load is high, and delays retrying instead until the resource situation improves.
[0110] Resource recycling: Monitor the threads started by the multi-threaded integrated processing framework to obtain the thread idle status; adaptively adjust the number of threads in the work pool within the multi-threaded integrated processing framework based on the thread idle status. The embodiment of the present invention establishes a "quiet time" mechanism. If a thread has no tasks to process within a certain period of time, it will be recycled to save resources, and the number of idle threads in the work pool will be updated.
[0111] In summary, the embodiment of the present invention encapsulates the radar processing algorithm as a dynamic library, utilizes the CPU parallel computing function to accelerate the processing algorithm of a single radar, and applies the multi-threaded / process integrated processing framework to the parallel processing of multiple radar data. In this way, the embodiment of the present invention can significantly improve the processing speed of radar data, optimize the use of system resources, and adapt to processing tasks of different scales and complexities. In addition, the system of the embodiment of the present invention has good scalability, and users can customize the processing logic according to actual application requirements, thereby realizing flexible replacement and optimization of the algorithm. The implementation of this method and system not only improves the efficiency of radar data processing, but also further promotes the application value of radar signal processing in real time and accuracy.
[0112] Based on the above embodiments, the present invention provides a radar data processing system. The radar data processing system is configured with multiple single radar algorithms, each of which is encapsulated as an independent dynamic library. Figure 3 The structure diagram of a radar data processing system shown in FIG. 1 mainly includes the following parts:
[0113] A task receiving module 302 is used to receive at least one radar data processing task, where the radar data processing task corresponds to a single radar algorithm or multiple radar algorithms;
[0114] The dynamic library and priority determination module 304 is used to determine the target dynamic library and the priority of the target dynamic library corresponding to the radar data processing task based on the single radar algorithm or multiple radar algorithms corresponding to the radar data processing task;
[0115] The thread allocation module 306 is used to call the multi-thread integrated processing framework to allocate a target thread to each target dynamic library corresponding to the radar data processing task based on the priority through the multi-thread integrated processing framework;
[0116] The parallel acceleration processing module 308 is used to start the target thread to call its corresponding target dynamic library in the started target thread, and accelerate the processing of the radar data to be processed through the target dynamic library to obtain the processing result corresponding to the radar data processing task.
[0117] The radar data processing system provided by the embodiment of the present invention comprehensively utilizes the parallel computing capability of the CPU, and allocates a target thread to each target dynamic library corresponding to the radar data processing task through a multi-threaded integrated processing framework, so as to accelerate the processing of the radar data to be processed by using the target dynamic library in a multi-threaded environment, implement the corresponding data processing flow, and obtain the processing result corresponding to the radar data processing task, thereby significantly improving the efficiency and real-time performance of radar data processing.
[0118] In one embodiment, the multi-threaded integrated processing framework adopts the design pattern of task queue cache and work pool;
[0119] The task queue cache is used to: store radar data to be processed, where the radar data to be processed includes radar base data corresponding to the radar data processing task, and / or product data output by the target dynamic library;
[0120] The work pool is used to allocate target threads to each target dynamic library corresponding to the radar data processing task based on priority.
[0121] In one implementation, the parallel acceleration processing module 308 is specifically used to:
[0122] Start the target thread corresponding to the current priority level, so as to call the corresponding target dynamic library in the started target thread, and accelerate the processing of the radar data to be processed by the target dynamic library to obtain product data, which is stored in the task queue cache or saved in the form of a file;
[0123] Continue to start the target thread corresponding to the next priority until the corresponding target dynamic library is called in the target thread corresponding to the optimal first-level priority, and the radar data to be processed is accelerated through the target dynamic library to obtain the processing result corresponding to the radar data processing task.
[0124] In one implementation, the parallel acceleration processing module 308 is specifically used to:
[0125] Based on the header file of the target dynamic library, the corresponding target dynamic library is called in the started target thread, and the radar data to be processed is processed through the target dynamic library. The parallel computing function of the integrated performance primitive library is used to accelerate the processing process of the target dynamic library to obtain product data.
[0126] In one embodiment, a failure monitoring module is further included, which is used to:
[0127] If the target dynamic library fails to execute, its corresponding target thread is started again after a preset time period is reached, so as to call the failed target dynamic library again in the started target thread.
[0128] In one embodiment, a performance monitoring module is further included, which is used to:
[0129] Monitoring the radar data processing task to obtain performance data, where the performance data is used to describe the completion time and / or failure rate of the radar data processing task;
[0130] Adaptively adjust the number of threads in the worker pool within the multi-threaded integrated processing framework based on performance data.
[0131] In one embodiment, a thread monitoring module is also included, which is used to:
[0132] Monitor the threads started by the multi-threaded integrated processing framework to obtain the thread idle status;
[0133] The number of threads in the work pool within the multi-threaded integrated processing framework is adaptively adjusted based on the thread idle situation.
[0134] The implementation principle and technical effects of the system provided in the embodiment of the present invention are the same as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the system embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0135] An embodiment of the present invention provides an electronic device. Specifically, the electronic device includes a processor and a storage device. The storage device stores a computer program, and when the computer program is executed by the processor, it executes the method described in any one of the above-mentioned implementation methods.
[0136] Figure 4 A structural diagram of an electronic device provided in an embodiment of the present invention, the electronic device 100 includes: a processor 40, a memory 41, a bus 42 and a communication interface 43, wherein the processor 40, the communication interface 43 and the memory 41 are connected via the bus 42; the processor 40 is used to execute an executable module stored in the memory 41, such as a computer program.
[0137] The memory 41 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 43 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0138] The bus 42 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0139] Among them, the memory 41 is used to store programs, and the processor 40 executes the program after receiving the execution instruction. The method executed by the device for flow process definition disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 40 or implemented by the processor 40.
[0140] The processor 40 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 40. The above processor 40 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor to execute, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 41, and the processor 40 reads the information in the memory 41 and completes the steps of the above method in combination with its hardware.
[0141] The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be referred to the previous method embodiments, which will not be repeated here.
[0142] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0143] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A radar data processing method, characterized in that: The method is applied to a radar data processing system, wherein a plurality of single radar algorithms are configured in the radar data processing system, and each of the single radar algorithms is encapsulated as an independent dynamic library. The method comprises: receiving at least one radar data processing task, wherein the radar data processing task corresponds to a single radar algorithm or multiple radar algorithms; Determine a target dynamic library corresponding to the radar data processing task and a priority of the target dynamic library based on the single radar algorithm or the multiple radar algorithms corresponding to the radar data processing task; Calling a multi-threaded integrated processing framework to allocate a target thread to each of the target dynamic libraries corresponding to the radar data processing task based on the priority through the multi-threaded integrated processing framework; The target thread is started to call the corresponding target dynamic library in the started target thread, and the radar data to be processed is accelerated through the target dynamic library to obtain the processing result corresponding to the radar data processing task.
2. The radar data processing method according to claim 1, characterized in that: The multi-threaded integrated processing framework adopts the design mode of task queue cache and work pool; The task queue cache is used to: store radar data to be processed, wherein the radar data to be processed includes radar base data corresponding to the radar data processing task and / or product data output by the target dynamic library; The work pool is used to allocate a target thread to each target dynamic library corresponding to the radar data processing task based on the priority.
3. The radar data processing method according to claim 2, characterized in that: The target thread is started to call the corresponding target dynamic library in the started target thread, and the radar data to be processed is accelerated by the target dynamic library to obtain the processing result corresponding to the radar data processing task, including: Start the target thread corresponding to the current priority level, so as to call the corresponding target dynamic library in the started target thread, and accelerate the processing of the radar data to be processed by the target dynamic library to obtain product data, and the product data is stored in the task queue cache or saved in the form of a file; Continue to start the target thread corresponding to the next priority until the corresponding target dynamic library is called in the target thread corresponding to the optimal first-level priority, and the radar data to be processed is accelerated through the target dynamic library to obtain the processing result corresponding to the radar data processing task.
4. The radar data processing method according to claim 3, characterized in that: The corresponding target dynamic library is called in the started target thread, and the radar data to be processed is accelerated by the target dynamic library to obtain product data, including: Based on the header file of the target dynamic library, the corresponding target dynamic library is called in the started target thread, the radar data to be processed is processed by the target dynamic library, and the processing process of the target dynamic library is accelerated by using the parallel computing function of the integrated performance primitive library to obtain product data.
5. The radar data processing method according to claim 1, characterized in that: The method further comprises: If the target dynamic library fails to execute, the corresponding target thread is started again after a preset time period is reached, so as to call the target dynamic library that failed to execute again in the started target thread.
6. The radar data processing method according to claim 1, characterized in that: The method further comprises: Monitoring the radar data processing task to obtain performance data, where the performance data is used to describe the completion time and / or failure rate of the radar data processing task; The number of threads in the working pool within the multi-threaded integrated processing framework is adaptively adjusted based on the performance data.
7. The radar data processing method according to claim 1, characterized in that: The method further comprises: Monitor the threads started by the multi-threaded integrated processing framework to obtain thread idle status; The number of threads in the working pool within the multi-threaded integrated processing framework is adaptively adjusted based on the thread idle status.
8. A radar data processing system, characterized in that: The radar data processing system is configured with a plurality of single radar algorithms, each of which is encapsulated as an independent dynamic library. The system includes: A task receiving module, used for receiving at least one radar data processing task, wherein the radar data processing task corresponds to a single radar algorithm or multiple radar algorithms; A dynamic library and priority determination module, used to determine the target dynamic library corresponding to the radar data processing task and the priority of the target dynamic library based on the single radar algorithm or the multiple radar algorithms corresponding to the radar data processing task; A thread allocation module, used for calling a multi-thread integrated processing framework to allocate a target thread to each of the target dynamic libraries corresponding to the radar data processing task based on the priority through the multi-thread integrated processing framework; The parallel acceleration processing module is used to start the target thread to call the corresponding target dynamic library in the started target thread, and accelerate the processing of the radar data to be processed through the target dynamic library to obtain the processing result corresponding to the radar data processing task.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method according to any one of claims 1 to 7.