Methods, apparatus, devices and storage media for inter-core interaction in multi-core systems

By dividing shared resources into multiple interaction channel groups in a multi-core system, the problem of low efficiency during inter-core interaction is solved, and efficient multi-core thread processing is achieved.

CN114461408BActive Publication Date: 2025-10-28QKM TECH (DONG GUAN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111623908.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2025-10-28
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

In multi-core operating systems, the use of shared memory during inter-core interaction leads to low thread execution efficiency, especially when using mutex locks, which presents an efficiency bottleneck.

Method used

Shared resources are divided into multiple interaction channel groups, with each thread corresponding to one interaction channel. Data interaction is performed through listening to the channel group, avoiding the use of mutex locks.

Benefits of technology

It simplifies the operation of critical resources in multi-core systems, improves the execution efficiency of threads across multiple cores, and achieves efficient multi-threaded processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114461408B_ABST
    Figure CN114461408B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, device, and storage medium for inter-core interaction in a multi-core system, relating to, but not limited to, the field of computer technology. The method includes: a first core determining an interaction channel group corresponding to a destination core based on a destination core for first interaction data to be transmitted; the destination core being one of at least one second core, with each second core corresponding to a specific interaction channel group; selecting a first interaction channel from a plurality of second interaction channels in the interaction channel group based on the interaction type of the first interaction data; and sending the first interaction data to the first interaction channel, so that the destination core obtains the first interaction data by listening to the interaction channel group. The apparatus, device, and storage medium are applied to the above interaction method. Embodiments of this application can simplify inter-core interaction operations and thus improve the execution efficiency of threads between multiple cores.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this application relate to, but are not limited to, the field of computer technology, and particularly to a method, apparatus, device, and storage medium for inter-core interaction in a multi-core system. Background Technology

[0002] Currently, inter-core interaction in multi-core operating systems is typically implemented through shared memory. Therefore, the system maintains a shared memory space to achieve memory sharing. This space is a critical resource, and thus, a mutex lock is usually used to protect it. When a processor core attempts to interact with another processor core or several processor cores (called the source processor core), and the interacting processor cores (called the destination processor core), the source processor core must first acquire the mutex lock, then write the data into the shared memory. After the data is written, the mutex lock may be released to respond to the next request for operation on the critical resource; or it may hold the mutex lock throughout the entire interaction. In multi-core interaction, this operation leads to low thread execution efficiency. Summary of the Invention

[0003] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.

[0004] This invention provides a method, apparatus, device, and storage medium for inter-core interaction in a multi-core system, which simplifies the interaction between multiple cores and improves the execution efficiency of threads between multiple cores.

[0005] In a first aspect, embodiments of the present invention provide an inter-core interaction method for a multi-core system, applied to a first kernel, wherein the first kernel is communicatively connected to at least one second kernel, the method comprising:

[0006] Based on the destination kernel of the first interactive data to be transmitted, determine the interactive channel group corresponding to the destination kernel; the destination kernel is one of the at least one second kernel, and the second kernel corresponds one-to-one with the interactive channel group.

[0007] Based on the interaction type of the first interaction data, a first interaction channel is selected from multiple second interaction channels in the interaction channel group;

[0008] The first interactive data is sent to the first interactive channel so that the target kernel can obtain the first interactive data by listening to the interactive channel group.

[0009] Secondly, embodiments of this application also provide an inter-core interaction method for a multi-core system, applied to a second kernel, wherein the second kernel is communicatively connected to a first kernel, and the method further includes:

[0010] Based on the interruption mechanism, the interaction channel group is traversed to obtain the first interaction data from the first interaction channel.

[0011] Thirdly, embodiments of the present invention also provide a multi-core device, including:

[0012] The determining module is used to determine the interaction channel group corresponding to the destination kernel based on the destination kernel of the first interaction data to be transmitted;

[0013] The selection module is used to select a first interaction channel from multiple second interaction channels in the interaction channel group according to the interaction type of the first interaction data.

[0014] An interaction module is used to send the first interaction data to the first interaction channel, so that the target kernel can obtain the first interaction data by listening to the interaction channel group.

[0015] Fourthly, embodiments of the present invention also provide a multi-core device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program as described in any one of the first aspects of the inter-core interaction method of the multi-core system and / or the inter-core interaction method of the multi-core system described in the second aspect.

[0016] Fifthly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions, the computer-executable instructions being used to execute the inter-core interaction method of the multi-core system described in any one of the first aspects and / or the inter-core interaction method of the multi-core system described in the second aspect.

[0017] According to the above embodiments of the application, at least the following beneficial effects are achieved: By dividing the shared resources between the first kernel and the second kernel into multiple second interaction channels, an interaction channel group corresponding one-to-one with the second kernel is obtained. A corresponding first interaction channel is determined based on the first interaction data, thereby interacting with the target kernel through the first interaction channel. At this time, for the target kernel, since each second interaction channel in the corresponding interaction channel group does not affect the others, each thread can be processed through one second interaction channel without considering the impact on other threads. Therefore, compared with the traditional method of using mutex locks for critical resource management, the embodiments of this application can simplify the reading and operation of various types of critical resources under multi-threaded conditions, thereby improving the execution efficiency of threads between multi-cores.

[0018] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description

[0019] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.

[0020] Figure 1 This is a schematic diagram of the first kernel module in an embodiment of this application;

[0021] Figure 2 This is a flowchart of an inter-core interaction method applied to a multi-core system with a first kernel, according to an embodiment of this application;

[0022] Figure 3 This is a schematic diagram of the topology of a multi-core system according to an embodiment of this application;

[0023] Figure 4 This is a flowchart of an embodiment of the present application of an inter-core interaction method applied to a multi-core system with a second kernel. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0025] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0026] Currently, inter-core interaction in multi-core operating systems is typically implemented through shared memory. Therefore, the system maintains a shared memory space for memory sharing, and this space is a critical resource, thus typically protected by a mutex lock. Assuming a processor core attempts to interact with another processor core or several processor cores (referred to as the source processor core), and the interacting processor core is referred to as the destination processor core), the source processor core must first acquire the mutex lock, then write data into the shared memory. After the data is written, the mutex lock may be released to respond to the next request for operation on the critical resource; or it may hold the mutex lock throughout the entire interaction process. In multi-core interaction, this operation leads to low thread execution efficiency. Therefore, this application proposes an inter-core interaction method, apparatus, device, and storage medium for multi-core systems, which simplifies the interaction operations between multi-cores and thus improves the execution efficiency of threads between multi-cores.

[0027] It should be noted that a multi-core system includes multiple first cores, and each first core can communicate and interact with multiple second cores. For example, if one of the first cores is a robot controller and the second cores are robot actuators, then each first core can control each second core through the inter-core interaction methods, devices, equipment, and storage media of the multi-core system.

[0028] For example, refer to Figure 1 In the illustrated embodiment, the first kernel includes a determining module 100, a selecting module 200, and an interaction module 300. The determining module 100 is used to determine an interaction channel group corresponding to the destination kernel based on the destination kernel of the first interaction data to be transmitted; the selecting module 200 is used to select a first interaction channel from multiple second interaction channels in the interaction channel group based on the interaction type of the first interaction data; the interaction module 300 is used to send the first interaction data to the first interaction channel so that the destination kernel can obtain the first interaction data by listening to the interaction channel group.

[0029] It should be noted that the interaction type can be file processing, cached data processing, event triggering, or heartbeat detection, thus enabling efficient multi-threaded interaction between the first kernel and the second kernel from multiple dimensions.

[0030] It should be noted that by setting up multiple second interactive channels in each interactive channel group, the second interactive channels can be isolated from each other. Therefore, when transmitting data to one of the second interactive channels, there is no need to worry about the impact of other second interactive channels.

[0031] It will be understood by those skilled in the art that Figure 1 The topology shown does not constitute a limitation on the embodiments of this application and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0032] On the other hand, various embodiments of the inter-core interaction method for the multi-core system proposed in this application are presented.

[0033] The method of the embodiments of this application will be further described below with reference to the accompanying drawings. (Refer to...) Figure 2 This application proposes an inter-core interaction method for a multi-core system, applied to a first kernel, which is communicatively connected to at least one second kernel. The method includes:

[0034] Step S100: Determine the interaction channel group corresponding to the destination kernel based on the destination kernel of the first interaction data to be transmitted; the destination kernel is one of at least one second kernel, and the second kernel corresponds one-to-one with the interaction channel group.

[0035] It should be noted that the interaction channel group consists of multiple second interaction channels. These multiple second interaction channels are used to divide critical resources through software, so that each thread is aware that it has exclusive access to a CPU.

[0036] Step S200: Select the first interaction channel from multiple second interaction channels in the interaction channel group according to the interaction type of the first interaction data.

[0037] It should be noted that there can be multiple destination kernels or only one at the same time. It should also be noted that the first interaction data can be one or more; for example, multiple different types of first interaction data can be generated simultaneously for the same destination kernel. Similarly, first interaction data for multiple different destination kernels can be generated. No specific restrictions are imposed here.

[0038] Step S300: Send the first interactive data to the first interactive channel so that the target kernel can obtain the first interactive data by listening to the interactive channel group.

[0039] It should be noted that, for the target kernel, the polling mechanism is used to monitor the interaction channels, which simplifies the processing of the interaction channel group.

[0040] Therefore, by dividing the shared resources between the first and second kernels into multiple second interaction channels, a group of interaction channels corresponding one-to-one with the second kernel is obtained. A corresponding first interaction channel is determined based on the first interaction data, and interaction with the target kernel is achieved through the first interaction channel. At this point, for the target kernel, since each second interaction channel in the corresponding interaction channel group does not affect others, each thread can be processed through one second interaction channel without considering the impact on other threads. Therefore, compared to the traditional method of using mutex locks for critical resource management, the embodiments of this application simplify the reading and operation of various types of critical resources under multi-threaded conditions, thereby improving the execution efficiency of threads across multiple cores.

[0041] Understandably, there are multiple sets of first-interaction data.

[0042] It should be noted that by supporting multiple initial data interactions simultaneously, efficient interaction between multi-core processors can be achieved, as shown in the reference. Figure 3 In the embodiment shown, taking the first core as the controller as an example, each second core corresponds to a driver. At this time, multiple drivers A, B, C, D, E, controller F, and host computer form an inter-core interaction of a multi-core system. At this time, the host computer can generate multiple control commands to control the second core, and the first interaction channel group between the controller and each driver is used for interactive transmission, thereby realizing efficient control of multiple drivers.

[0043] Understandably, the first interaction data is obtained by parsing at least one operation instruction sent to the interaction component.

[0044] It should be noted that in some embodiments, the first interactive data is obtained by parsing instructions issued by the interactive component, in order to achieve efficient processing of human control instructions. For example, if the interactive component is the host computer of the robot, the first core is the controller, and each second core corresponds to a driver, then multiple drivers can be controlled by the controller through instructions issued to the host computer.

[0045] It should be noted that the first interaction data can also be the interaction data generated between the second kernel and the first kernel. The first interaction data can also be generated by the first kernel based on its registered events or set periods.

[0046] Understandably, the inter-core interaction method applied to the first kernel multi-core system further includes: receiving at least one file read instruction corresponding to the first interaction data from the file service interaction channel; the file service interaction channel is the first interaction channel; reading the first data obtained from the first interaction data according to the file read instruction; wherein the first interaction data consists of at least one first data; and sending the first data through the file service interaction channel respectively.

[0047] It should be noted that by setting up a file service interaction channel and isolating file read operations, the efficiency of file reading can be improved.

[0048] Understandably, the inter-core interaction method applied to the first kernel multi-core system also includes: receiving at least one file write instruction from the file service interaction channel; wherein the file write instruction is used to request that the second data in the file write instruction be written into the file data of the first kernel; and writing the second data into the file data according to the file write instruction.

[0049] It should be noted that by setting up a file service interaction channel to isolate file write operations, file write efficiency can be improved. In this case, both file reading and writing can be processed exclusively through a second interaction channel. Other data processing will not be affected by file read / write operations, thereby improving the overall processing efficiency of multiple systems.

[0050] Understandably, there are multiple file write commands corresponding to the file data. According to the file write commands, the second data is written into the file data, including: assembling the second data in each file write command to obtain the third data; and writing the valid third data into the file data.

[0051] It should be noted that dividing long files into packets for writing can improve file operation efficiency. It should also be noted that in some embodiments, when reading long first interaction data, it can also be divided into packets and reassembled at the corresponding first interaction channel, thereby improving the efficiency of file read operations.

[0052] Understandably, step S300, sending the first interactive data to the first interactive channel so that the target kernel can obtain the first interactive data by listening to the interactive channel group, includes: temporarily storing the first interactive data in a ring buffer channel so that the target kernel can asynchronously read the first interactive data from the ring buffer channel, wherein the first interactive channel is a ring buffer channel.

[0053] It should be noted that by temporarily storing the first interactive data in a circular buffer channel, the sharing and processing of cached data becomes simpler.

[0054] Understandably, the inter-core interaction method applied to a first-core multi-core system also includes: real-time detection of the buffer balance of the ring buffer channel; and sending an early warning event when the buffer balance is less than a preset threshold value.

[0055] It should be noted that multiple threshold values ​​can be set, such as half of the total buffer capacity of the ring buffer channel, or the total buffer capacity of the ring buffer channel.

[0056] Understandably, step S300, sending the first interactive data to the first interactive channel so that the target kernel can obtain the first interactive data by listening to the interactive channel group, includes: sending the first interactive data to the event management interactive channel so that the target kernel can respond to the corresponding event operation based on the first interactive data it has listened to; wherein, the first interactive channel is the event management interactive channel.

[0057] It should be noted that the event management interaction channel is used to transmit data in response to registered events.

[0058] Understandably, sending the first interaction data to the first interaction channel so that the target kernel can obtain the first interaction data by listening to the interaction channel group includes: sending the first interaction data to the connection component interaction channel so that the target kernel can determine the execution function in a preset mapping table based on the first interaction data, wherein the first interaction channel is the connection component interaction channel and the first interaction data is the execution instruction.

[0059] It should be noted that by establishing the relationship between execution instructions and mapping tables, the control between the first kernel and the second kernel can be simplified. For example, the first kernel sends a signal indicating Robot.on 1. After receiving Robot.on 1, the second kernel determines the function corresponding to Robot.on 1 as setRobotOn() according to the mapping table. The function parameter is 1, so it will execute the operation of setRobotOn(1).

[0060] Understandably, the first interaction data is a heartbeat message; step S300, sending the first interaction data to the first interaction channel so that the target kernel can obtain the first interaction data by listening to the interaction channel group, includes: sending the heartbeat message to the exception handling interaction channel; wherein, the exception handling interaction channel is the first interaction channel; receiving the response message of the heartbeat message from the exception handling interaction channel; and determining the running status of the target kernel based on the response message.

[0061] By monitoring the second kernel in real time, its operating status can be determined, ensuring normal communication between the first and second kernels.

[0062] Understandably, before selecting the first interaction channel, the method also includes: obtaining preset configuration information; wherein the configuration information comes from a preset configuration file; and creating an interaction channel group based on the configuration information.

[0063] It should be noted that by loading the configuration information of the interaction channel group through the configuration information, the interaction channel group can be dynamically created.

[0064] Understandably, step S300, sending the first interactive data to the first interactive channel, includes: sending the first interactive data to the first buffer queue corresponding to the first interactive channel; and based on the interrupt mechanism, traversing the second buffer queue corresponding to each second interactive channel in the interactive channel group.

[0065] By setting up a first buffer queue, threads operating on the first interaction channel can be released earlier, thereby improving the processing efficiency of multi-threaded processing and enabling asynchronous processing of the interaction channel group.

[0066] It should be noted that each interaction channel group includes at least one of the following: file service interaction channel, ring buffer channel, exception handling interaction channel, connection component interaction channel, and event management interaction channel. Each of these channels has its own corresponding interaction type. The first interaction channel is determined by matching its interaction type with the interaction type of the first interaction data.

[0067] Understandably, referring to Figure 4 This application also proposes an inter-core interaction method for a multi-core system with a second kernel and a communication connection between the second kernel and the first kernel. The method includes: step S400, based on an interrupt mechanism, traversing the interaction channel group to obtain first interaction data from the first interaction channel.

[0068] This application also proposes a multi-core device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it executes an inter-core interaction method applied to a first core and / or applied to a second core of a multi-core system.

[0069] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0070] It should be noted that the network device in this embodiment can be applied as follows: Figure 1 The network architecture of the illustrated embodiment is a multi-core device. The network device in this embodiment and such Figure 2 The methods for inter-core interaction in the multi-core system shown have the same inventive concept, and therefore these embodiments have the same implementation principle and technical effect, which will not be described in detail here.

[0071] The non-transitory software program and instructions required to implement the information processing method of the above embodiments are stored in memory. When executed by a processor, the information processing method of the above embodiments is executed, for example, the method described above. Figure 2 or Figure 4 The corresponding methods and steps.

[0072] It can be understood that the present invention also provides a computer-readable storage medium storing computer-executable instructions for executing an inter-core interaction method applied to a first kernel and / or applied to a second kernel in a multi-core system.

[0073] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0074] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. A method for inter-core interaction in a multi-core system, applied to a first kernel, wherein the first kernel is communicatively connected to at least one second kernel, characterized in that, The method includes: Based on the destination kernel of the first interactive data to be transmitted, an interactive channel group corresponding to the destination kernel is determined; the destination kernel is one of the at least one second kernel, and the second kernel corresponds one-to-one with the interactive channel group; each interactive channel group is provided with multiple second interactive channels, and each second interactive channel in the same interactive channel group is isolated from each other and the interactive types of the first interactive data allowed to be transmitted are different; the multiple second interactive channels in the same interactive channel group include a file service interactive channel, a ring buffer channel, an event management interactive channel, a connection component interactive pipeline, and an exception handling interactive channel; Based on the interaction type of the first interaction data, a first interaction channel is selected from multiple second interaction channels in the interaction channel group; The first interactive data is sent to the first interactive channel so that the target kernel can obtain the first interactive data by listening to the interactive channel group; The first kernel is the robot's controller, and the target kernel is the robot's actuator.

2. The method according to claim 1, characterized in that, The first interactive data setting has multiple parameters.

3. The method according to claim 1, characterized in that, The first interactive data is obtained by parsing at least one operation instruction sent to the interactive component.

4. The method according to claim 1, characterized in that, The method further includes: Receive at least one file read instruction from the file service interaction channel that corresponds to the first interaction data; the file service interaction channel is the first interaction channel. First data is read from the first interactive data according to the file read instruction; wherein the first interactive data consists of at least one piece of first data; The first data is sent out through the file service interaction channel.

5. The method according to claim 4, characterized in that, The method further includes: Receive at least one file write instruction from the file service interaction channel; wherein the file write instruction is used to request that the second data in the file write instruction be written into the file data of the first kernel; According to the file write instruction, the second data is written into the file data.

6. The method according to claim 5, characterized in that, There are multiple file write instructions corresponding to the file data, and the step of writing the second data into the file data according to the file write instructions includes: The second data in each of the file write instructions is packaged together to obtain the third data; Write the verified third data into the file data.

7. The method according to any one of claims 1 to 6, characterized in that, The step of sending the first interaction data to the first interaction channel, so that the target kernel obtains the first interaction data by listening to the interaction channel group, includes: The first interaction data is temporarily stored in a circular buffer channel so that the target kernel can asynchronously read the first interaction data from the circular buffer channel, wherein the first interaction channel is a circular buffer channel.

8. The method according to claim 7, characterized in that, The method further includes: Real-time monitoring of the buffer capacity of the annular buffer channel; When the remaining buffer capacity is less than a preset threshold, an early warning event is sent.

9. The method according to any one of claims 1 to 6, characterized in that, The step of sending the first interaction data to the first interaction channel, so that the target kernel obtains the first interaction data by listening to the interaction channel group, includes: The first interaction data is sent to the event management interaction channel so that the target kernel can respond to the corresponding event operation based on the first interaction data it has listened to; wherein, the first interaction channel is the event management interaction channel.

10. The method according to any one of claims 1 to 6, characterized in that, The step of sending the first interaction data to the first interaction channel, so that the target kernel obtains the first interaction data by listening to the interaction channel group, includes: The first interactive data is sent to the connection component interaction channel so that the target kernel determines the execution function in a preset mapping table based on the first interactive data, wherein the first interactive channel is the connection component interaction channel and the first interactive data is an execution instruction.

11. The method according to any one of claims 1 to 6, characterized in that, The first interaction data is a heartbeat message; the step of sending the first interaction data to the first interaction channel, so that the target kernel obtains the first interaction data by listening to the interaction channel group, includes: The heartbeat message is sent to the exception handling interaction channel; wherein, the exception handling interaction channel is the first interaction channel; Receive a response message from the heartbeat message in the exception handling interaction channel; The running status of the target kernel is determined based on the response message.

12. The method according to claim 1, characterized in that, Before selecting the first interaction channel, the method further includes: Obtain preset configuration information; wherein the configuration information comes from a preset configuration file; The interaction channel group is created based on the configuration information.

13. The method according to claim 1, characterized in that, Sending the first interactive data to the first interactive channel includes: Send the first interactive data to the first buffer queue corresponding to the first interactive channel; Based on the interrupt mechanism, the second buffer queue corresponding to each second interaction channel in the interaction channel group is traversed.

14. A method for inter-core interaction in a multi-core system, applied to a second kernel, wherein the second kernel is communicatively connected to a first kernel, characterized in that, The method includes: Based on the interrupt mechanism, the interaction channel group corresponding to the second kernel is traversed to obtain the first interaction data from the first interaction channel. The interaction channel group includes multiple second interaction channels. Each second interaction channel within the same interaction channel group is isolated from the others, and the interaction types of the first interaction data it is allowed to transmit are different. The multiple second interaction channels within the same interaction channel group include a file service interaction channel, a ring buffer channel, an event management interaction channel, a connection component interaction pipeline, and an exception handling interaction channel. The first kernel is the robot's controller, and the first interaction channel is the interaction channel selected by the first kernel from the multiple second interaction channels in the interaction channel group based on the interaction type of the first interaction data. The second kernel is the robot's actuator.

15. A multi-core device, characterized in that, include: The determining module is used to determine the interaction channel group corresponding to the destination kernel based on the destination kernel of the first interaction data to be transmitted in the first kernel; The interaction channel group is configured with multiple second interaction channels. Each second interaction channel in the same interaction channel group is isolated from each other and the interaction types of the first interaction data that are allowed to be transmitted are different. The interaction types of the second interaction channels in the same interaction channel group are different and isolated from each other. The selection module is used by the first kernel to select a first interaction channel from multiple second interaction channels in the interaction channel group according to the interaction type of the first interaction data. The interaction type of the first interactive data is one of file processing, cached data processing, event triggering, or heartbeat detection; An interaction module is used for the first kernel to send the first interaction data to the first interaction channel, so that the destination kernel can obtain the first interaction data by listening to the interaction channel group; The first kernel is the robot's controller, and the target kernel is the robot's driver.

16. A multi-core device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program as an inter-core interaction method for a multi-core system as described in any one of claims 1 to 13 or as described in claim 14.

17. A computer-readable storage medium, characterized in that, The system stores computer-executable instructions for performing an inter-core interaction method for a multi-core system as described in at least any one of claims 1 to 13, or an inter-core interaction method for a multi-core system as described in claim 14.

Citation Information

Patent Citations

  • Inter-core interaction method of multi-core system

    CN108228524A

  • Inter-core communication method and device based on virtual data bus

    CN112463715A