CN-121996288-A - Data processing method, device, equipment and medium
Abstract
The application discloses a data processing method which comprises the steps of responding to a data processing request, analyzing a predefined binding core configuration file, obtaining a first binding relation between each functional module and a first hardware core, binding execution threads of each functional module to the corresponding first hardware core according to the first binding relation, and transmitting data to be processed to the first hardware core so as to process the data to be processed through the first hardware core. By the method, the core allocation strategy in the binding core configuration file is only required to be modified, so that the system can flexibly adapt to different hardware platforms and application scenes under the conditions of not modifying the source codes of the application programs and not recompiling, the development cost of cross-platform migration is reduced, and the expandability, maintainability and deployment flexibility of the system are obviously improved.
Inventors
- LU XIANYING
- LV WEILONG
- LI XUQIN
- Tan pan
- GAO LAN
- XU KAITING
- YU HONGCHAO
Assignees
- 重庆赛力斯凤凰智创科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260130
Claims (10)
- 1. A data processing method, characterized in that the data processing method comprises: Responding to a data processing request, analyzing a predefined binding core configuration file to obtain a first binding relation, wherein the first binding relation represents the binding relation between each functional module and a first hardware core; Binding the execution threads of each functional module to the corresponding first hardware core according to the first binding relation; And transmitting the data to be processed to the first hardware core so as to process the data to be processed through the first hardware core.
- 2. The data processing method according to claim 1, characterized in that the data processing method further comprises: acquiring a second binding relation between a second hardware core and a composite acceleration operator; And binding the composite acceleration operator with a corresponding second hardware core based on the second binding relation so as to call the second hardware core bound with the composite acceleration operator through the first hardware core to process the data to be processed.
- 3. The data processing method according to claim 2, wherein the method for constructing the composite acceleration operator includes: Abstracting the underlying hardware computing resources to define a vector engine abstract interface and a matrix engine abstract interface; determining a vector engine concrete implementation corresponding to the vector engine abstract interface and a matrix engine concrete implementation corresponding to the matrix engine abstract interface; Constructing at least two common algorithm acceleration operators based on the vector engine concrete implementation and the matrix engine concrete implementation, wherein the common algorithm acceleration operators complete calculation by internally calling the vector engine concrete implementation and the matrix engine concrete implementation; And carrying out pipeline combination on the at least two common algorithm acceleration operators to obtain a composite acceleration operator.
- 4. The data processing method of claim 1, wherein the transmitting the data to be processed to the first hardware core comprises: Invoking a predefined middleware abstraction interface in a middleware layer, routing the data processing request to a middleware adapter class inherited from the middleware abstraction interface; And calling a native communication interface of a target middleware through the middleware adapter class, and transmitting the data to be processed to the first hardware core.
- 5. The data processing method according to claim 1, characterized in that the data processing method further comprises: Responding to a data release request of an application module in an application layer, and executing a data transmission step and a data recording step in parallel through a middleware adapter class; Calling a primary communication interface of a target middleware, and transmitting data to be distributed in real time according to a communication mechanism of the target middleware; the data recording step comprises the steps of calling a middleware package recording tool corresponding to the target middleware, and writing the data to be distributed into a package recording file according to a preset format rule so as to complete data recording.
- 6. The data processing method according to claim 5, characterized in that the data processing method further comprises: reading recorded data from the packet recording file; re-publishing the read recorded data through a publishing interface of a middleware adapter class corresponding to the target middleware in the middleware layer; and receiving and processing the reissued data through a corresponding application module in the application layer.
- 7. The data processing method according to claim 1, characterized in that the data processing method further comprises: classifying the data to be transmitted according to the data structure of the data to be transmitted to obtain a classification result, wherein the data classification result comprises image data, point cloud data and other structural body data; transmitting the data to be transmitted based on the classification result; If the data classification result comprises image data, converting the image data into standardized format data conforming to a preset communication specification through a preset format conversion interface for transmission; if the data classification result comprises the point cloud data, converting the point cloud data into standardized format data conforming to a preset communication specification through a preset format conversion interface for transmission; and if the data classification result is other structural body data, converting the other structural body data into common structural body data, and serializing the common structural body data into a character string format for transmission.
- 8. A data processing apparatus, characterized in that the data processing apparatus comprises: The file analysis module is used for responding to the data processing request, analyzing the predefined binding core configuration file and acquiring the binding relation between each functional module and the first hardware core; The binding module is used for binding the execution threads of each functional module to the corresponding first hardware core according to the binding relation; And the data transmission module is used for transmitting the data to be processed to the first hardware core so as to process the data to be processed through the first hardware core.
- 9. A data processing apparatus, comprising: One or more processors; A memory for storing one or more programs that, when executed by the one or more processors, cause the data processing apparatus to implement the steps of the data processing method of any of claims 1 to 7.
- 10. A computer-readable storage medium, on which a computer program is stored which, when executed by a processor of a computer, causes the computer to perform the steps of the data processing method according to any one of claims 1 to 7.
Description
Data processing method, device, equipment and medium Technical Field The present application relates to the field of data processing technologies, and in particular, to a data processing method, apparatus, device, and medium. Background In the field of intelligent cabin software development, middleware is a core technology for realizing communication and data interaction between modules. There are currently a number of mainstream middleware such as ROS (robot operating system), ROS2, cyberRT, autoSar. ROS is widely tried in module communication scenes such as perception, decision and the like of an intelligent cabin by virtue of rich tool chains and active community support, ROS2 is used as an upgrade version of ROS, is optimized in the aspects of instantaneity, distributed communication and the like, and is more suitable for the requirements of the cabin on real-time data transmission, cyberRT is a high-performance middleware which is designed for the self-driving scene, focuses on the data transmission capability with low delay and high throughput, autoSar series (AutoSarAP, autoSarCp) conforms to the framework standard of an automobile open system, and provides standard support for the fusion of a cabin system and other vehicle-mounted systems. The binding of the hardware core is mostly realized by adopting a hard coding mode, namely, the binding relation between an execution thread and a specific CPU/GPU core is directly solidified in a source code in the development stage of a functional module (such as visual processing and control decision). This implementation results in that the system must be re-adapted and integrated compiled at the code level in the face of a middleware platform change (e.g. from ROS migration to CyberRT) or a hardware platform switch (e.g. from high-pass 8155 chip to MTK8675 chip), which not only brings significant development and maintenance costs, but also severely limits portability and iteration efficiency of the system. Disclosure of Invention In view of the above-mentioned drawbacks of the prior art, the present application provides a data processing method, apparatus, device and medium, so as to solve the above-mentioned technical problems. The application provides a data processing method, which comprises the following steps: Responding to a data processing request, analyzing a predefined binding core configuration file to obtain a first binding relation, wherein the first binding relation represents the binding relation between each functional module and a first hardware core; Binding the execution threads of each functional module to the corresponding first hardware core according to the first binding relation; And transmitting the data to be processed to the first hardware core so as to process the data to be processed through the first hardware core. In an embodiment of the present application, the data processing method further includes: acquiring a second binding relation between a second hardware core and a composite acceleration operator; And binding the composite acceleration operator with a corresponding second hardware core based on the second binding relation so as to call the second hardware core bound with the composite acceleration operator through the first hardware core to process the data to be processed. In an embodiment of the present application, the method for constructing the composite acceleration operator includes: Abstracting the underlying hardware computing resources to define a vector engine abstract interface and a matrix engine abstract interface; determining a vector engine concrete implementation corresponding to the vector engine abstract interface and a matrix engine concrete implementation corresponding to the matrix engine abstract interface; Constructing at least two common algorithm acceleration operators based on the vector engine concrete implementation and the matrix engine concrete implementation, wherein the common algorithm acceleration operators complete calculation by internally calling the vector engine concrete implementation and the matrix engine concrete implementation; And carrying out pipeline combination on the at least two common algorithm acceleration operators to obtain a composite acceleration operator. In an embodiment of the present application, the transmitting the data to be processed to the hardware core includes: Invoking a predefined middleware abstraction interface in a middleware layer, routing the data processing request to a middleware adapter class inherited from the middleware abstraction interface; And calling a native communication interface of a target middleware through the middleware adapter class, and transmitting the data to be processed to the first hardware core. In an embodiment of the present application, the data processing method further includes: Responding to a data release request of an application module in an application layer, and executing a data transmission step and a data recor