Cross-platform communication control method and system for multi-core heterogeneous architecture, and storage medium

By customizing nodes and registering callback functions under the OpenVX architecture, the listening and sending interfaces of ROS nodes are implemented, which solves the problem of cross-platform communication complexity under multi-core heterogeneous architecture, improves communication efficiency, and can be applied to vehicle networking and the Internet of Things.

CN116089106BActive Publication Date: 2026-05-01GUANGZHOU AUTOMOBILE GROUP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU AUTOMOBILE GROUP CO LTD
Filing Date
2021-11-05
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing technologies, cross-platform communication under multi-core heterogeneous architecture is complex and inefficient, especially when robot operating systems and OpenVX software architecture are combined, there is a lack of effective communication mechanisms between different cores.

Method used

By customizing nodes and registering callback functions under the OpenVX software architecture, the dlopen function is used to open the ROS library files, obtain the relevant ROS function handles, and encapsulate the listening and sending interfaces of the ROS node in the callback function to achieve cross-platform data communication.

Benefits of technology

It significantly improves cross-platform communication efficiency under multi-core heterogeneous architecture, effectively solves cross-platform communication problems, and can be applied to vehicle networking and the Internet of Things to achieve a high-efficiency cross-platform and cross-chip communication architecture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116089106B_ABST
    Figure CN116089106B_ABST
Patent Text Reader

Abstract

The application provides a cross-platform communication control method of a multi-core heterogeneous architecture, comprising the following steps: S10, running an application program under an OpenVX software architecture, and executing nodes to be executed in the application program in a predetermined order; at least one custom node is included in the nodes to be executed, and ROS node related information is associated in the custom node; S11, when it is detected that a current execution node is the custom node, a callback function pre-registered in the custom node is called, and data communication between the custom node and the ROS node is realized through the callback function. The application further discloses a corresponding system and a storage medium. Through the application, cross-platform communication under a multi-core heterogeneous architecture can be realized, and the communication efficiency is significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of multi-core heterogeneous architecture technology, and in particular to a cross-platform communication control method, system and storage medium for multi-core heterogeneous architecture. Background Technology

[0002] Currently, many communication architectures are based on cross-core architecture within the platform (i.e., multi-core heterogeneous architecture). In existing technologies, the OpenVX software architecture can be used to solve the problem of data sharing between different cores on the same platform by abstracting the core interface.

[0003] The Robot Operating System (ROS) is a robot software platform that provides operating system-like functionality to heterogeneous computer clusters. It enables data communication between different platforms, but lacks a communication mechanism across different cores.

[0004] In some existing applications, such as connecting cars to the Internet of Things, multiple embedded platforms are often involved. Some use multi-core heterogeneous architectures, while others run ROS. There is a need for cross-platform communication under multi-core heterogeneous architectures. However, in the current technology, it is very complicated and inefficient to achieve cross-platform communication between multi-core heterogeneous architectures. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a cross-platform communication control method, system and storage medium for multi-core heterogeneous architecture, which can realize cross-platform communication under multi-core heterogeneous architecture and significantly improve communication efficiency.

[0006] To address the aforementioned technical problems, one aspect of the present invention provides a cross-platform communication control method for a multi-core heterogeneous architecture, used to implement data communication between an embedded platform employing the OpenVX software framework and another embedded platform with a ROS node; the method includes the following steps:

[0007] Step S10: Run the application under the OpenVX software architecture and execute the nodes to be executed contained in the application in a predetermined order; the nodes to be executed include at least one custom node, and the custom node is associated with ROS node related information.

[0008] Step S11: When the currently executing node is detected to be the custom node, the callback function pre-registered by the custom node is called to realize data communication with the ROS node through the callback function.

[0009] Step S10 further includes:

[0010] Obtain the execution platform allocated to the node to be executed, and call the resources of the execution platform to execute the node to be executed. Here, a node to be executed is pre-allocated an execution platform, and the execution platform corresponds to a computing core in the embedded platform.

[0011] Step S11 further includes:

[0012] Call and execute the callback function pre-registered by the custom node to obtain the ROS-related information, which includes at least the listening and sending interfaces of the ROS node;

[0013] Data communication with the ROS node is achieved through the listening and sending interfaces.

[0014] This further includes:

[0015] A callback function is pre-registered for the custom node, and the dlopen function is used to open the ROS library file to obtain the handle of the relevant ROS function.

[0016] In the callback function, the relevant information of the ROS node is encapsulated into a class based on the obtained function handle, and the listening and sending interface for the ROS node is included as a member function of the class.

[0017] As another aspect of the present invention, a cross-platform communication control system with a multi-core heterogeneous architecture is also provided for realizing data communication between an embedded platform employing the OpenVX software framework and another embedded platform with ROS nodes; the system includes:

[0018] The program execution module is used to run an application (graph) under the OpenVX software architecture and execute the nodes to be executed contained in the application in a predetermined order; the nodes to be executed include at least one custom node, and the custom node is associated with ROS node related information;

[0019] The detection and invocation module, when it detects that the currently executing node is the custom node, calls the callback function pre-registered by the custom node, and realizes data communication with the ROS node through the callback function.

[0020] The program execution module further includes:

[0021] An execution platform determination unit is used to obtain the execution platform assigned to the node to be executed, wherein an execution platform is pre-assigned to a node to be executed, and the execution platform corresponds to a computing core in the embedded platform;

[0022] An execution unit is used to invoke the resources of the execution platform to execute the currently pending node.

[0023] The detection and invocation module further includes:

[0024] The calling unit is used to call and execute the callback function pre-registered by the custom node to obtain the ROS-related information, which includes at least the listening and sending interfaces of the ROS node;

[0025] The communication unit is used to implement data communication with the ROS node based on the listening and sending interfaces obtained by the calling unit.

[0026] This further includes:

[0027] The registration module is used to pre-register a callback function for the custom node, and uses the dlopen function to open the ROS library file and obtain the relevant function handles of ROS.

[0028] An encapsulation module is used in the callback function to encapsulate the ROS node-related information into a class based on the obtained function handle, and to include the listening and sending interfaces for the ROS node as member functions of the class.

[0029] Accordingly, another aspect of the present invention provides a computer storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a computer device, implements the aforementioned method steps.

[0030] Implementing the embodiments of the present invention has the following beneficial effects:

[0031] This invention provides a cross-platform communication control method, system, and storage medium for multi-core heterogeneous architectures. By creating an OpenVX process and using custom graph nodes to associate ROS node information, the method achieves ROS node data listening and sending / receiving through OpenVX callback functions. The method provided by this invention effectively solves the cross-platform communication problem under multi-core heterogeneous architectures by redefining the decoupling of nodes and modules.

[0032] The method provided by this invention has a wide range of applications, such as in vehicle networking. It can provide an efficient, cross-platform, and cross-chip communication architecture for vehicle networking, the Internet of Things, etc., effectively turning the car into a part of the Internet of Things and significantly improving communication efficiency. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, obtaining other drawings based on these drawings without creative effort still falls within the scope of the present invention.

[0034] Figure 1 This is a schematic diagram of the main flow of an embodiment of a cross-platform communication control method for a multi-core heterogeneous architecture provided by the present invention;

[0035] Figure 2 for Figure 1 A schematic diagram illustrating the application environment of the present invention;

[0036] Figure 3 This is a schematic diagram illustrating the process of creating and executing OpenVX programs according to the present invention;

[0037] Figure 4 A schematic diagram of the structure of an embodiment of a cross-platform communication control system with a multi-core heterogeneous architecture provided by the present invention;

[0038] Figure 5 for Figure 4 A schematic diagram of the structure of the program execution module;

[0039] Figure 6 for Figure 4 A schematic diagram of the structure of the detection and calling module. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings.

[0041] like Figure 1 The diagram shown illustrates the main flow of an embodiment of a cross-platform communication control method for a multi-core heterogeneous architecture provided by the present invention; please refer to it in conjunction with... Figures 2 to 3 As shown, in this embodiment, the cross-platform communication control method for multi-core heterogeneous architecture is used to implement data communication between an embedded platform using the OpenVX software framework and another embedded platform with a ROS node; as Figure 2 As shown, an application environment diagram of the present invention is illustrated. The present invention can be applied to, for example... Figure 2The hardware architecture shown includes two embedded platforms with multi-core heterogeneous systems and two embedded platforms with ROS nodes. It is understood that the above quantities are not intended to limit the scope, and other quantities may be used in other embodiments. Generally, the embedded platform with a multi-core heterogeneous system can be an embedded platform with a CPU, DSP, RTOS, etc., containing multiple computing cores; while the embedded platform with ROS nodes can be understood as an embedded platform running ROS. More specifically, in this embodiment, the method includes the following steps:

[0042] Step S10: Run the application under the OpenVX software architecture and execute the nodes to be executed contained in the application in a predetermined order; the nodes to be executed include at least one custom node, and the custom node is associated with ROS node related information.

[0043] In a specific example, step S10 further includes:

[0044] Obtain the execution platform allocated to the node to be executed, and call the resources of the execution platform to execute the node to be executed. Here, a node to be executed is pre-allocated an execution platform, and the execution platform corresponds to a computing core in the embedded platform.

[0045] Step S11: When the currently executing node is detected to be the custom node, the callback function pre-registered by the custom node is called to realize data communication with the ROS node through the callback function.

[0046] In a specific example, step S11 further includes:

[0047] Call and execute the callback function pre-registered by the custom node to obtain the ROS-related information, which includes at least the listening and sending interfaces of the ROS node;

[0048] Data communication with the ROS node is achieved through the listening and sending interfaces.

[0049] It is understood that this invention requires pre-defining custom nodes and pre-registering their callback functions, further including:

[0050] A callback function is pre-registered for the custom node, and the dlopen function is used to open the ROS library file to obtain the handle of the relevant ROS function.

[0051] In the callback function, the relevant information of the ROS node is encapsulated into a class based on the obtained function handle, and the listening and sending interface for the ROS node is included as a member function of the class.

[0052] To understand the method of the present invention, in conjunction with Figure 3 This document describes the entire process of creating and executing an OpenVX program, using examples, and details how to customize nodes and write and register callback functions. It is understood that the lifecycle of an OpenVX process in a multi-core heterogeneous framework depends on the specific execution of OpenVX, and the entire process is as follows:

[0053] Step 1: Create an OpenVX context;

[0054] It is understandable that several supported platforms, such as OpenCL, OpenMP, and ROS, are defined within the OpenVX context.

[0055] Step 2: Create input and output nodes, and create custom nodes;

[0056] The parameters in the custom node include at least: context handle, input parameters, output parameters, etc.

[0057] In one example, custom nodes for a graph can be constructed using the following format:

[0058] vxTestNode(graph,input_rgb_image,output_rgb_image,VX_INTERPOLATION_AREA);

[0059] vxTestNode is a custom node that allows you to specify which cores to run on. For example, vxTestNode can be configured to run on CPU, GPU, DSP, etc. Since the ROS node runs on the CPU, which is the ARM core for embedded devices, we can specify the ARM A core to be called on the custom OpenVX node, and have the ROS node's contents processed on the A core. Here, the ARM A core is... Figure 1 The execution platform mentioned in step S10; in the above formula, VX_INTERPOLATION_AREA selects a specific kernel region.

[0060] Simultaneously create other node content for building the graph;

[0061] Step 3: For custom nodes, you need to write and register their corresponding callback functions;

[0062] Specifically, you first need to define a custom callback function:

[0063] When a user invokes the OpenVX context, it calls the relevant callback function to open the ROS library using dlopen and obtain the handles of the relevant ROS functions.

[0064] Then, write the registration callback function:

[0065] In the registration callback function, the call to ownInitializeKernel(sample / framework / vx_kernel.c) loads all kernel functions implemented based on ROS.

[0066] Finally, the ROS code is implemented in the callback function `vx_kernel_f`. Specifically, the publishing, subscribing, and processing of ROS nodes are handled in the form of classes.

[0067] For example, if you need to implement ROS listening functionality in a callback function, you need to encapsulate the ROS listening functionality into a class; and implement the listening interface in the class's member functions (such as the constructor). In other examples, you can also implement the sending interface in the class's member functions.

[0068] Step 4: Create an image (graph);

[0069] All the created nodes are combined into a graph; and the running model of the OpenVX graph is defined. Generally, it can be set to a pipeline model, so that each complete run of the graph can achieve at least one ROS listening or sending operation.

[0070] Step 5: Verify the graph;

[0071] Specifically, this can be achieved using the following function: vxVerifyGraph(graph);

[0072] Step 6: Run the current graph;

[0073] Specifically, this can be achieved using the following function: vxProcessGraph(graph);

[0074] During this process, the nodes to be executed contained in the application (graph) are executed in a predetermined order (such as a pipeline order);

[0075] When the currently executing node is detected to be the custom node, the callback function pre-registered by the custom node is invoked, and data communication (or listening function) between the custom node and the ROS node is realized through the callback function.

[0076] Step 7: After running all nodes in the current graph, release the occupied resources.

[0077] Specifically, this can be achieved using the following function: vxReleaseContext(&context).

[0078] It is understood that in the method provided by this invention, within the OpenVX framework, a custom node `vxTestNode` is used. The operating environment of this node is specified, such as an ARM core. A callback function for the custom node is registered, and the send / receive interface of the ROS node is encapsulated within the callback function. This allows the ROS node to listen for and send data during each run of the OpenVX Graph. Therefore, the features of OpenVX and ROS can be combined to achieve a cross-platform communication mechanism compatible with multi-core heterogeneous chips.

[0079] like Figure 4 The diagram shown illustrates a structural schematic of an embodiment of a cross-platform communication control system with a multi-core heterogeneous architecture provided by the present invention. (In conjunction with...) Figure 5 and Figure 6 As shown, in this embodiment, the multi-core heterogeneous architecture cross-platform communication control system is used to realize data communication between an embedded platform using the OpenVX software framework and another embedded platform with ROS nodes; the system 1 includes:

[0080] The program execution module 10 is used to run an application (i.e., a graph) under the OpenVX software architecture and execute the nodes to be executed contained in the application in a predetermined order; the nodes to be executed include at least one custom node, and the custom node is associated with ROS node related information.

[0081] When the detection module 11 detects that the currently executing node is the custom node, it calls the callback function pre-registered by the custom node to realize data communication with the ROS node through the callback function.

[0082] The program execution module 10 further includes:

[0083] The execution platform determination unit 100 is used to obtain the execution platform allocated to the node to be executed, wherein a node to be executed is pre-allocated an execution platform, and the execution platform corresponds to a computing core in the embedded platform;

[0084] The execution unit 101 is used to call the execution platform resources to execute the node currently to be executed.

[0085] The detection and invocation module 11 further includes:

[0086] Calling unit 110 is used to call and execute the callback function pre-registered by the custom node to obtain the ROS-related information, which includes at least the listening and sending interfaces of the ROS node;

[0087] The communication unit 111 is used to implement data communication with the ROS node according to the listening and sending interface obtained by the calling unit.

[0088] In a specific example, system 1 further includes:

[0089] Registration module 12 is used to pre-register a callback function for the custom node, and to open the ROS library file using the dlopen function to obtain the relevant function handles of ROS;

[0090] The encapsulation module 13 is used in the callback function to encapsulate the ROS node-related information into a class based on the obtained function handle, and to include the listening and sending interface for the ROS node as a member function of the class.

[0091] For more details, please refer to and combine with the above. Figures 1 to 3 The description of that will not be repeated here.

[0092] Accordingly, in another aspect, the present invention also provides a computer storage medium having a computer program stored thereon, which, when executed by a computer device, implements the aforementioned... Figure 1 The method steps are shown in the diagram. Further details can be found in conjunction with the foregoing. Figures 1 to 3 The description.

[0093] Implementing the embodiments of the present invention has the following beneficial effects:

[0094] This invention provides a cross-platform communication control method, system, and storage medium for multi-core heterogeneous architectures. By creating an OpenVX process and using custom graph nodes to associate ROS node information, the method achieves ROS node data listening and sending / receiving through OpenVX callback functions. The method provided by this invention effectively solves the cross-platform communication problem under multi-core heterogeneous architectures by redefining the decoupling of nodes and modules.

[0095] The method provided by this invention has a wide range of applications, such as in vehicle networking. It can provide an efficient, cross-platform, and cross-chip communication architecture for vehicle networking, the Internet of Things, etc., effectively turning the car into a part of the Internet of Things and significantly improving communication efficiency.

[0096] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0097] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0098] The above description is merely a preferred embodiment of the present invention and should not be construed as limiting the scope of the invention. Therefore, any equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.

Claims

1. A cross-platform communication control method for a multi-core heterogeneous architecture, used to achieve data communication between an embedded platform employing the OpenVX software framework and another embedded platform with a ROS node; characterized in that, The method includes the following steps: Step S10: Run the application under the OpenVX software architecture and execute the nodes to be executed contained in the application in a predetermined order; the nodes to be executed include at least one custom node, and the custom node is associated with ROS node related information. Step S11: When the currently executing node is detected to be the custom node, the callback function pre-registered by the custom node is called to realize data communication with the ROS node through the callback function; Step S11 further includes: Call and execute the custom callback function pre-registered by the node to obtain the relevant information of the ROS node, which includes at least the listening and sending interfaces of the ROS node; Data communication with the ROS node is achieved through the listening and sending interfaces; The method further includes: A callback function is pre-registered for the custom node, and the dlopen function is used to open the ROS library file to obtain the handle of the relevant ROS function. In the callback function, the relevant information of the ROS node is encapsulated into a class based on the obtained function handle, and the listening and sending interface for the ROS node is included as a member function of the class.

2. The method as described in claim 1, characterized in that, Step S10 further includes: Obtain the execution platform allocated to the node to be executed, and call the resources of the execution platform to execute the node to be executed. Here, a node to be executed is pre-allocated an execution platform, and the execution platform corresponds to a computing core in the embedded platform.

3. A cross-platform communication control system with a multi-core heterogeneous architecture, used to realize data communication between an embedded platform using the OpenVX software framework and another embedded platform with ROS nodes; characterized in that, The system includes: The program execution module is used to run applications under the OpenVX software architecture and execute the nodes to be executed contained in the application in a predetermined order; the nodes to be executed include at least one custom node, and the custom node is associated with ROS node related information; The detection and invocation module, when it detects that the currently executing node is the custom node, calls the callback function pre-registered by the custom node, and realizes data communication with the ROS node through the callback function; The detection and invocation module further includes: The calling unit is used to call and execute the custom callback function pre-registered by the node to obtain the relevant information of the ROS node, which includes at least the listening and sending interfaces of the ROS node; A communication unit is used to implement data communication with the ROS node based on the listening and sending interfaces obtained by the calling unit; The system further includes: The registration module is used to pre-register a callback function for the custom node, and uses the dlopen function to open the ROS library file and obtain the relevant function handles of ROS. An encapsulation module is used in the callback function to encapsulate the ROS node-related information into a class based on the obtained function handle, and to include the listening and sending interfaces for the ROS node as member functions of the class.

4. The system as described in claim 3, characterized in that, The program execution module further includes: An execution platform determination unit is used to obtain the execution platform assigned to the node to be executed, wherein an execution platform is pre-assigned to a node to be executed, and the execution platform corresponds to a computing core in the embedded platform; An execution unit is used to invoke the resources of the execution platform to execute the currently pending node.

5. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a computer device, it implements the method steps of any one of claims 1-2.

Citation Information

Patent Citations

  • Method for realizing synchronous communication and asynchronous communication by software

    CN101800695A