Communication method based on CAN bus publishing and subscribing in avionics system
By introducing a communication agent node into the avionics system, the message subscription and publishing on the CAN bus are managed in a unified manner, which solves the problem of low efficiency in traditional CAN bus communication, realizes efficient publish/subscribe communication, and improves the scalability and maintainability of the system.
Patent Information
- Application Number
- CN202511992305.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-14
AI Technical Summary
Traditional CAN bus communication does not support publish/subscribe communication mechanisms in avionics systems, resulting in low message communication efficiency, especially in high real-time and high-load scenarios where message conflicts and network congestion are prone to occur.
A communication proxy node is introduced to uniformly manage message subscription, publishing, and routing. Publish/subscribe communication is realized through a topic-ID mapping table. The communication proxy node converts the messages into standard CAN protocol frames and broadcasts them. Subscribers and publishers are decoupled, and dynamic node joining and leaving are supported.
It improves the scalability and maintainability of avionics systems, enables efficient asynchronous communication and flexible message distribution, and meets the requirements of real-time performance and reliability.
Smart Images

Figure CN121864523A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of airborne embedded computers, and particularly relates to a CAN bus-based publish-subscribe communication method within an avionics system. Background Technology
[0002] With the development of aerospace technology, modern avionics systems require efficient communication and data exchange among various subsystems. The Controller Area Network (CAN) bus, with its high reliability, real-time performance, and interference resistance, has been widely used in avionics equipment. The CAN bus is a multi-master bus that supports a distributed network architecture, meeting the real-time, reliability, and flexibility requirements of avionics systems.
[0003] Traditional CAN bus communication is based on a point-to-point mode. As avionics systems become more complex and the number of subsystems increases, point-to-point communication can easily lead to message conflicts and network congestion in high-real-time and high-load scenarios when multiple nodes need to exchange data. To solve this problem, modern distributed systems widely adopt the publish / subscribe communication mode. Although this mode can achieve efficient asynchronous communication and support flexible message distribution strategies by decoupling message publishers and subscribers, the traditional CAN bus protocol does not directly support publish and subscribe communication mechanisms in avionics systems, resulting in low efficiency of message communication in avionics systems.
[0004] In view of this, the present invention is hereby proposed. Summary of the Invention
[0005] The present invention provides a CAN bus-based publish-subscribe communication method for avionics systems, solving the technical problem of low efficiency in existing avionics system message communication and realizing real-time communication functionality via the CAN bus. The technical solution of this invention has many beneficial effects, as described below: A CAN bus-based publish / subscribe communication method for avionics systems, applicable to message communication in airborne avionics systems, comprising: An avionics system network based on a CAN bus includes a communication agent node and at least one application node. The communication agent node is connected to each application node via the CAN bus, which has multiple nodes.
[0006] Compared with the prior art, the technical solution provided by the present invention has the following beneficial effects: Combining the hardware advantages of the CAN bus with the flexibility of the publish / subscribe mode, a publish / subscribe communication model is constructed on the physical foundation of the CAN bus. By introducing a communication agent node to uniformly manage message subscription, publishing, and routing, the communication agent maintains a globally unified topic-message ID mapping table. Publisher nodes publish messages according to topics, which are then converted into standard CAN protocol frame format and broadcast by the communication agent node. Subscribers subscribe to the required topics from the communication agent node, which filters and forwards relevant information. This achieves decoupling between the two communicating parties, supports dynamic node addition and removal, improves system scalability and maintainability, and is suitable for modular avionics systems with high real-time and reliability requirements. Attached Figure Description
[0007] 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, other drawings can be obtained based on these drawings without creative effort.
[0008] Figure 1 A diagram illustrating the publish and subscribe communication between the nodes of the system. Detailed Implementation
[0009] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0010] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this invention, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.
[0011] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. The drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0012] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that aspects can be practiced without these specific details. To enable those skilled in the art to better understand the invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of that feature. In the description of the invention, unless otherwise stated, "a plurality of" means two or more.
[0013] like Figure 1 The illustrated avionics system employs a CAN bus-based publish / subscribe communication method, applicable to message communication in airborne avionics systems. This communication method includes... This avionics system network is based on a CAN bus and includes one communication proxy node and at least one application node. The communication proxy node is connected to each application node via the CAN bus, which has multiple nodes. The core idea is to use one of these nodes as a communication proxy node, capable of transmitting messages using a publish / subscribe communication mechanism, accepting subscription information from subscribers and publishing information from publishers.
[0014] In one embodiment, the communication agent node is connected to each application node via a CAN bus, including... Step 1: Pre-set a "topic-ID" mapping table according to the type of communication topic of the avionics system. During the initialization of the avionics system, the communication agent node loads and maintains a topic-ID mapping table applicable to the whole system. The topic-ID mapping table can record the correspondence between each communication topic and a unique CAN bus identifier, that is, one communication topic corresponds to one CAN bus ID number. Step 2: Subscription registration, where each application node includes a subscriber application node and a publisher application node. At least one subscriber application node sends a subscription request message to the communication proxy node. The subscription request message contains one or more topics that need to be subscribed to. Step 3: Subscription relationship update. The communication proxy node receives and processes subscription request messages and updates the subscription relationship list of the communication proxy node. The subscription relationship list can record the corresponding relationship between the subscriber application nodes for each topic. Step 4: Message publishing. When the CAN bus idle publisher application node obtains the right to use the CAN bus, the publisher application node generates application data and specifies the target topic, generates a publishing request message based on the target topic, and sends the publishing request message to the communication agent node. Step 5: Message routing and distribution. The communication agent node receives the publish request information and broadcasts it via the CAN bus.
[0015] In one embodiment, broadcasting via the CAN bus includes... Step 3.1: Parse the publishing request information and obtain the target topic and corresponding application data; Step 3.2: Query the topic-ID mapping table and obtain the target CAN identifier corresponding to the topic; Step 3.3: Encapsulate the application data into a standard data frame conforming to the CAN bus protocol, and update the identifier field of the standard data frame to the target CAN identifier; Step 3.4: Broadcast standard data frames via the CAN bus; Step 3.5: Message reception. When the subscriber application node is listening to the CAN bus, if the CAN identifier matches the CAN identifier corresponding to the subscription request message, it receives the CAN identifier and parses the data frame to obtain the application data corresponding to the CAN identifier.
[0016] Furthermore, the topic-ID mapping table can support dynamic updates, wherein, When the avionics system has new communication topic requirements, the communication agent node receives the configuration instructions sent by the avionics system and dynamically adds, modifies or deletes the mapping relationship between topics and CAN identifiers in the topic-ID mapping table.
[0017] In summary, by introducing communication proxy nodes to uniformly manage message subscription, publishing, and routing, publishers and subscribers are completely unaware of each other's existence and only interact with the proxy, achieving high decoupling. At the same time, the nodes are easy to manage and expand. When it is necessary to add new topics or modify subscription relationships, the configuration is updated only at the proxy node, without modifying the software of other nodes.
[0018] For example Step 1: System initialization.
[0019] Step 1: Refer to Table 1, which shows the list of predefined topics and their corresponding CAN IDs loaded by the communication agent node.
[0020] Table 1 Topic-ID Mapping Table
[0021] Step 2: Configure the CAN controller's baud rate, operating mode, and filter rules, and enable CAN receive interrupt to ensure real-time data frame reception.
[0022] Step 2: Subscription Registration Step 1: The application node sets the subscription message. See Table 2. Table 2 shows that application node 0x01 needs to subscribe to two topics: "Temperature Sensor" and "Humidity Sensor". "00" indicates that these two topics have not been successfully subscribed to yet.
[0023] Table 2 Information on Topics to be Subscribed
[0024] Step 2: The application node sends a subscription request message to the communication proxy node.
[0025] Step 3: Subscription relationship update, Referring to Table 3, after receiving subscription requests from each application node, the communication proxy node updates the subscription relationship list. Table 3 Subscription Relationship Table
[0026] Step 4: Message Release Step 1: After each publisher node generates data as shown in Table 4, construct the publish request message; Table 4 Request Message
[0027] Step 2: The publisher node will send the request message to the communication broker node.
[0028] Step 5: Message Routing and Distribution Step 1: The communication proxy node parses the published request message and extracts the target topic and data.
[0029] Step 2: Query the CAN ID corresponding to the topic.
[0030] Step 3: Encapsulate the data into CAN data frames (CAN 2.0A / B format).
[0031] Step 4: Broadcast the encapsulated CAN data frame via the CAN bus to ensure that all nodes subscribed to the topic can receive it.
[0032] Step 6: Message reception, where, Step 1: Configure the CAN controller's filter to only receive CAN IDs corresponding to the subscribed topics.
[0033] Step 2: Extract the data field of the CAN data frame, parse it into application data, and verify the integrity of the data.
[0034] Step 3: Trigger the user-defined callback function to process the received data.
[0035] Step 4, refer to Table 5, update the subscription topic information of the subscriber application node, modify the subscribed topic identifier, and the successful subscription identifier is "01", which means that the topic has been successfully subscribed by the current application node.
[0036] Table 5 Subscription Topic Information
[0037] By employing a communication agent to maintain a globally unified topic-message ID mapping table, publisher nodes publish messages based on topics, the communication agent nodes convert these messages into standard CAN protocol frame formats and broadcast them, subscribers subscribe to the required topics from the communication agent nodes, and the communication agent filters and forwards relevant information. This approach enables decoupling between the communicating parties, supports the dynamic addition and removal of nodes, and improves the system's scalability and maintainability.
[0038] The product provided by this invention has been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the core ideas of this invention. It should be noted that those skilled in the art can make various improvements and modifications to the invention without departing from the principles of the invention, and these improvements and modifications also fall within the protection scope of the invention claims.
Claims
1. A CAN bus-based publish-subscribe communication method for avionics systems, applicable to message communication in airborne avionics systems, characterized in that, The communication method includes, An avionics system network based on a CAN bus includes a communication agent node and at least one application node. The communication agent node is connected to each application node via the CAN bus, which has multiple nodes.
2. The communication method according to claim 1, characterized in that, The communication proxy node is connected to each application node via a CAN bus. Step 1: Pre-set a topic-ID mapping table according to the type of communication topic of the avionics system. During the initialization of the avionics system, the communication agent node loads and maintains a topic-ID mapping table applicable to the whole system. The topic-ID mapping table can record the correspondence between each communication topic and a unique CAN bus identifier. Step 2: Subscription registration, wherein each application node includes a subscriber application node and a publisher application node, and at least one subscriber application node sends a subscription request message to the communication proxy node, the subscription request message containing one or more topics to be subscribed to; Step 3: Subscription relationship update. The communication proxy node receives and processes the subscription request message and updates the subscription relationship list of the communication proxy node. The subscription relationship list can record the corresponding relationship of the subscriber application nodes for each topic. Step 4: Message publishing. When the CAN bus idle publisher application node obtains the right to use the CAN bus, the publisher application node generates application data and specifies the target topic. Generate a publish request message based on the target topic, and send the publish request message to the communication proxy node; Step 5: The communication proxy node receives the broadcast request information and broadcasts it via the CAN bus.
3. The communication method according to claim 2, characterized in that, Broadcasting via the CAN bus includes... Step 3.1: Parse the publishing request information and obtain the target topic and corresponding application data; Step 3.2: Query the topic-ID mapping table and obtain the target CAN identifier corresponding to the topic; Step 3.3: Encapsulate the application data into a standard data frame conforming to the CAN bus protocol, and update the identifier field of the standard data frame to the target CAN identifier; Step 3.4: Broadcast the standard data frame via the CAN bus; Step 3.5: Message reception, wherein when the subscriber application node is listening to the CAN bus, when the CAN identifier matches the CAN identifier corresponding to the subscription request message, it receives the CAN identifier and parses out the data frame to obtain the application data corresponding to the CAN identifier.
4. The publish-subscribe communication method according to claim 1, characterized in that, The topic-ID mapping table can support dynamic updates, wherein... When the avionics system has new communication topic requirements, the communication agent node receives configuration instructions sent by the avionics system and dynamically adds, modifies, or deletes the mapping relationship between topics and CAN identifiers in the topic-ID mapping table.
5. The publish-subscribe communication method according to claim 1, characterized in that, The CAN bus has multiple nodes.