An Airborne FC Message Transmission Method Based on Publish-Subscribe
By adopting an airborne FC message transmission method based on publish-subscribe, and utilizing publish and subscribe tables in a client and server model, the high cost and resource consumption problems of airborne FC message transmission systems when system requirements change are solved, and a low maintenance cost and flexible network platform are achieved.
Patent Information
- Application Number
- CN202411810134.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-12-10
AI Technical Summary
Existing airborne FC message transmission systems are costly and time-consuming to modify when system requirements change, and they also consume a lot of storage space and time resources during operation.
An airborne FC message transmission method based on publish-subscribe is adopted. A publish table and a subscribe table are established through a client and server model. The terminal initiates requests as a client and the switch processes the requests as a server, thereby realizing the process of publishing, subscribing, sending and receiving messages.
It reduces the impact and maintenance costs of system message planning changes, reduces the consumption of storage space and time resources, and provides a flexible network platform.
Smart Images

Figure CN119728624B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of airborne computer network communication technology, and in particular to an airborne FC message transmission method based on publish-subscribe. Background Technology
[0002] Airborne FC message transmission relies on pre-defined configuration data, which defines the network topology and message planning of the FC network. The network topology determines the connection relationships between network terminals and switches, while the message planning determines the correspondence between messages and FC terminals. Each terminal's corresponding computing device contains several application function modules, and each application function module uses several messages for cross-terminal communication. This correspondence determines the message communication table for each terminal and the forwarding table for the switch. The terminal's message communication table and the switch's forwarding table constitute the configuration data of the FC network system.
[0003] The foundation for the coordinated operation of an FC communication network is that the switches and terminals use unified configuration data; that is, the message communication tables used by the terminals and the forwarding tables used by the switches can correspond to each other. Figure 1 As shown.
[0004] Before the system can run, the system plan (network topology and message plan) must be converted into configuration data used by terminals and switches and stored in the non-volatile memory of the terminals and switches. Upon system startup, the terminals must read and parse the configuration data from the non-volatile memory, converting it into a send communication table and a receive communication table, which are then temporarily stored in memory for message communication. The send communication table contains message identifiers and target port identifiers for messages that need to be sent (FC), and the receive communication table contains message identifiers for messages that need to be received (FC). The switches must also read and parse the configuration data from the non-volatile memory, converting it into a forwarding table, which is then temporarily stored in memory.
[0005] The FC message transmission system described above, which relies on pre-defined configuration data, is simple to design and easy to implement, and has strong stability and determinism. However, when faced with task systems that require increasingly frequent changes to system plans, the FC message transmission system has the following shortcomings:
[0006] 1. The system operation relies on pre-defined configuration data. Once the system requirements change, such as adding or reducing communication messages or changing the source or destination terminals of messages, the configuration data needs to be regenerated and stored in the non-volatile memory of all terminals and switches in the FC network. The change is costly, has a long cycle, and has a wide impact.
[0007] 2. For systems that need to switch message plans during operation, the transmission system that uses pre-planned and defined configuration data needs to store several configuration data in non-volatile memory for system switching. This will greatly occupy the storage space of the terminal device, and the switching configuration data needs to be read from the peripheral device and run on the host, which will affect the real-time performance of the switching message plan. Summary of the Invention
[0008] In view of this, embodiments of this application provide an airborne FC message transmission method based on publish-subscribe, offering an alternative implementation approach to airborne FC message transmission besides relying on pre-planned system configuration data. This solves the problems of high cost of system message planning changes, high time resource consumption during system runtime message planning space switching, and high time resource consumption in the prior art.
[0009] This application provides an airborne FC message transmission method based on publish-subscribe, the method comprising:
[0010] A publish table and a subscribe table are established based on a client and server model. The terminal, as a client, initiates publish and subscribe requests to the server based on network management messages. The switch, as a server, processes the publish and subscribe requests and responds based on network management messages. The process includes: publishing messages based on the publish table, subscribing to messages based on the subscribe table, sending messages based on the publish table, and receiving messages based on the subscribe table.
[0011] According to a specific implementation of an embodiment of this application, the publishing table describes the published message identifier and the publishing destination Bitmap, and the subscription table describes the subscribed message identifier and the subscriber.
[0012] According to a specific implementation of an embodiment of this application, the publishing table includes a global publishing table and a local publishing table. The local publishing table is a subset of the global publishing table, and one local publishing table corresponds to one terminal. The global publishing table is stored on the switch, and all messages published by terminals in the network are arranged in ascending order of terminal number in the global publishing table. The global publishing table is used by the switch to locate the publisher of a message when a message is subscribed to, and to notify the publisher of the new subscriber's location information. The local publishing tables are stored on the corresponding terminals, and each local publishing table stores a set of messages published by the terminal itself.
[0013] According to a specific implementation of an embodiment of this application, the subscription table includes a global subscription table and a local subscription table. The local subscription table is a subset of the global subscription table, and one local subscription table corresponds to one terminal. The global subscription table is stored on the switch, and all messages subscribed to by terminals in the network are arranged in ascending order of terminal number in the global subscription table. The global subscription table is used by the switch to locate the set of subscribers of a message when a message is published, and to notify the publisher of all location information of the set of subscribers of the message. The local subscription table is stored on the terminal, and the local subscription table stores the set of messages subscribed to by the terminal itself.
[0014] According to a specific implementation of an embodiment of this application, the publishing destination Bitmap describes the location information of the message subscriber. It is implemented through a Bitmap data structure, using a bitmap to represent each terminal on the network. When the value of a certain bit is 1, it indicates that the terminal corresponding to that bit has subscribed to the current message. When the value of a certain bit is 0, it indicates that the terminal corresponding to that bit has not subscribed to the current message.
[0015] According to a specific implementation of an embodiment of this application, the message identifier is described by an unsigned integer variable, ranging from 0x0 to 0xFFFFFFFF. The message identifier is globally unique in the network, and each message can only be published by a single publisher and subscribed to by multiple subscribers.
[0016] According to a specific implementation of an embodiment of this application, the message publishing process based on the publishing table includes:
[0017] Step 101: Terminal X begins the request-response process;
[0018] Step 102: Terminal X updates the local partial publication table, the content of which is the set of messages to be published P{M1,M2,……,M} i ,……,M N}, where M i M is the message identifier, N is the number of messages published in a single instance, and M is not present in the local publication table. i Then M i Insert the data sequentially into the local publication table; otherwise, skip the update and proceed to step 103.
[0019] Step 103: Terminal X sends a publish request to the switch, the content of which is the set of messages to be published, P{M1,M2,……,M}. i ,……,M N Proceed to step 104;
[0020] Step 104: Terminal X waits to receive a response from the switch. If the response is received successfully, proceed to step 105; otherwise, the publishing process ends.
[0021] Step 105: The switch checks whether M already exists in the publication table corresponding to terminal X in the global publication table. i , if not, the switch inserts M i sequentially into the publication table corresponding to terminal X and proceeds to step 106; if it exists, directly proceed to step 106;
[0022] Step 106: The switch sequentially searches in the global subscription table for the set of terminals subscribing to the subscription message M i . If the set is not empty, proceed to step 107; otherwise, proceed to step 108;
[0023] Step 107: The switch forms a Bitmap from the set of terminals subscribing to the subscription message M i and updates the publication destination Bitmap in the global publication table according to the terminal set Bitmap.
[0024] Step 108: If i < N, then i = i + 1 and proceed to step 105; otherwise, proceed to step 109;
[0025] Step 109: The switch sends a publication update response to terminal X and notifies terminal X of the terminal set Bitmap corresponding to the publication message set P{M1, M2, ……, M i , ……, M N}.
[0026] Step 1010: Terminal X updates the publication destination Bitmap in the local publication table according to the terminal set Bitmap.
[0027] Step 1011: The publication process ends.
[0028] According to a specific implementation manner of an embodiment of the present application, the message subscription process based on the subscription table includes:
[0029] Step 201: Terminal Y starts the subscription request response process;
[0030] Step 202: Terminal Y updates its local subscription table with the content being the set of messages to be subscribed S{M1, M2, ……, M j , ……, M P}(where M j is the message identification number and P is the number of single subscription messages). If M j does not exist in the local subscription table, then insert M j sequentially into the local subscription table; otherwise, skip the update and proceed to step 203;
[0031] Step 203: Terminal Y sends a subscription request to the switch with the content being the set of messages to be subscribed S{M1, M2, ……, M j, ……, M P}, go to step 204;
[0032] Step 204: Terminal Y waits to receive the switch reply. If the reply is successfully received, go to step 205; if the waiting times out, end the subscription process;
[0033] Step 205: The switch checks whether M already exists in the subscription table corresponding to terminal Y in the global subscription table. If it does not exist, the switch inserts M j sequentially into the subscription table corresponding to terminal Y and goes to step 206; if it exists, directly go to step 206; j
[0034] Step 206: The switch sequentially searches for terminal A that publishes message M in the global publication table. If the terminal exists, go to step 207; otherwise, go to step 2010; j
[0035] Step 207: The switch forms the location information of terminal Y into a Bitmap and updates the publication destination Bitmap in the local publication table corresponding to terminal A in the global publication table;
[0036] Step 208: The switch sends a subscription update response to terminal A and notifies terminal A of the terminal set Bitmap;
[0037] Step 209: Terminal A updates the publication destination Bitmap in the local publication table according to the terminal Bitmap;
[0038] Step 2010: If j < P, then j = j + 1, go to step 205; otherwise, go to step 2011;
[0039] Step 2011: The subscription process ends.<Step 304: Traverse the corresponding publishing destination Bitmap from least significant bit to most significant bit, and combine all terminals corresponding to bits set to 1 into a terminal set {D1, D2, ..., D...} i ,……,D Q}, where D i Q represents the device identifier, and Q represents the number of subscribed devices.
[0045] Step 305: Send the data to D1, D2, ..., D respectively. Q Send message M i ;
[0046] Step 306: Message sending process ends.
[0047] According to a specific implementation of an embodiment of this application, the message receiving process based on the subscription table includes:
[0048] Step 401: Terminal Y receives message data on the FC link and parses the message identifier M. j ;
[0049] Step 402: Terminal Y queries the local partial subscription table to see if M exists. j If the message exists, proceed to step 403; otherwise, discard the message and proceed to step 404.
[0050] Step 403: Terminal Y sends message M j Submitted to the data reader;
[0051] Step 404: Message receiving process ends.
[0052] Beneficial effects:
[0053] The airborne FC message transmission method based on publish-subscribe in this application embodiment has the following advantages:
[0054] Low maintenance costs. When the system message planning changes, only the application function modules of the relevant terminals are affected, not all terminals on the network. This reduces the impact of message planning changes, lowers maintenance costs, and provides the system with a flexible network platform.
[0055] Low resource consumption. The system can dynamically switch message plans during runtime via message publish / subscribe. Since it does not involve data access and storage between the host and peripherals, it significantly reduces the consumption of space and time resources, providing a feasible basis for switching message plans at runtime. Attached Figure Description
[0056] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0057] Figure 1 A schematic diagram illustrating message configuration in the prior art;
[0058] Figure 2 This is a publication representation of an airborne FC message transmission method based on publish-subscribe according to an embodiment of the present invention;
[0059] Figure 3 This is a subscription representation intent of an airborne FC message transmission method based on publish-subscribe according to an embodiment of the present invention;
[0060] Figure 4 This is a schematic diagram of the message publishing process of an airborne FC message transmission method based on publish-subscribe according to an embodiment of the present invention;
[0061] Figure 5 This is a schematic diagram of the message subscription process in an airborne FC message transmission method based on publish-subscribe according to an embodiment of the present invention;
[0062] Figure 6 This is a schematic diagram of the message sending process of an airborne FC message transmission method based on publish-subscribe according to an embodiment of the present invention;
[0063] Figure 7 This is a schematic diagram of the message receiving process of an airborne FC message transmission method based on publish-subscribe according to an embodiment of the present invention. Detailed Implementation
[0064] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0065] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. This application 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 this application. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0066] 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 application, 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.
[0067] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. The illustrations only show the components related to this application and are not drawn according to the number, shape and size of the components in actual implementation. In 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.
[0068] 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 the described aspects can be practiced without these specific details.
[0069] This application provides a feasible airborne FC message transmission method based on publish-subscribe, offering an alternative implementation approach to airborne FC message transmission besides relying on pre-planned system configuration data. It solves the problems of high cost of system message planning changes, high time resource consumption during system runtime message planning switching, etc., in existing technologies. The following refers to... Figures 2 to 7 The airborne FC message transmission method based on publish-subscribe provided in the embodiments of this application will be described in detail.
[0070] In one embodiment, the publish-subscribe-based airborne FC messaging method includes the following steps:
[0071] A publish table and a subscribe table are established based on a client and server model. The terminal, as a client, initiates publish and subscribe requests to the server based on network management messages. The switch, as a server, processes the publish and subscribe requests and responds based on network management messages. The process includes: publishing messages based on the publish table, subscribing to messages based on the subscribe table, sending messages based on the publish table, and receiving messages based on the subscribe table.
[0072] Specifically, FC message publishing and subscription can occur at any time. The FC network automatically establishes logical connections between publishers and subscribers for each FC message, and these connections are built on a publish / subscribe relationship table. The publish / subscribe relationship is established based on a client / server model. The terminal, as a client, initiates publish / subscribe requests to the network server based on network management messages, and the switch, as a network server, processes the requests and replies with responses based on network management messages.
[0073] The method in this embodiment has the following advantages: Low maintenance cost: When the system message planning changes, only the application function modules of the relevant terminals are involved, not all terminals on the network, reducing the scope of impact of message planning changes, lowering maintenance costs, and providing a flexible network platform for the system. Low resource consumption: During system operation, message planning can be freely switched through dynamic message publishing and subscription. Since it does not involve data access and storage between the host and peripherals, the consumption of space and time resources is greatly reduced, providing a feasible solution for switching message planning during runtime.
[0074] In one embodiment, the publishing table describes the published message identifier and the publishing destination Bitmap, and the subscription table describes the subscribed message identifier and the subscriber.
[0075] Specifically, refer to Figure 2 The publishing table includes a global publishing table and a local publishing table. The local publishing table is a subset of the global publishing table, and one local publishing table corresponds to one terminal. The global publishing table is stored on the switch, and all messages published by terminals in the network are arranged in ascending order of terminal number in the global publishing table, such as... Figure 2 Each terminal in the system corresponds to a publishing table for that terminal, arranged in ascending order of terminal number. The global publishing table is used by the switch to locate the publisher of a message when it is subscribed to, and to notify the publisher of the new subscriber's location information. The local publishing tables are stored on the corresponding terminals, and each local publishing table stores a set of messages published by the terminal itself, such as... Figure 2 Each local release table contains multiple release tables for that terminal. Each release table for that terminal contains information such as message ID (message identifier), release destination Bitmap, and message description.
[0076] The global and local publication tables are created in the host memory after the switch and terminal are powered on, respectively, and disappear after power-off. The host memory initially contains empty tables, which are updated by the publish / subscribe process.
[0077] Furthermore, refer to Figure 3The subscription table includes a global subscription table and a local subscription table. The local subscription table is a subset of the global subscription table, and one local subscription table corresponds to one terminal. The global subscription table is stored on the switch, and all subscribed messages of terminals in the network are arranged in ascending order of terminal number in the global subscription table, such as... Figure 3 Each terminal in the system corresponds to a subscription table for that terminal, arranged in ascending order of terminal number. The global subscription table is used by the switch to locate the set of subscribers for a message when it is published, and to notify the publisher of the complete location information of the subscriber set. The local subscription table is stored on the terminal, and stores the set of messages subscribed to by the terminal itself, such as... Figure 3 Each local subscription table contains multiple subscription tables for that terminal, and each subscription table for that terminal contains information such as message ID (message identifier) and message description.
[0078] The global subscription table and the local subscription table are created in the host memory after the switch and terminal are powered on, respectively, and disappear after power-off. The host memory is initially empty and is updated by the publish-subscribe process.
[0079] In practice, the client / server model interaction process includes: The terminal initiates a publish request to the network server. The switch, acting as the server, processes the request and replies to the terminal with the destination Bitmap corresponding to the published message set as a publish update response, updating the terminal's local publish table. The terminal also initiates a subscription request to the network server. The switch, acting as the server, processes the request, adds the subscribing terminal to the global subscription table, and replies to the message publisher with the destination Bitmap corresponding to the subscribed message as a subscription update response, updating the terminal's local publish table.
[0080] In one embodiment, the publishing destination Bitmap describes the location information of the message subscribers. This is implemented using a Bitmap data structure, where each terminal on the network is represented by a bitmap. For example, bits 0 to 31 represent terminals 1 to 32. When a bit is 1, it indicates that the corresponding terminal has subscribed to the current message; when a bit is 0, it indicates that the corresponding terminal has not subscribed to the current message.
[0081] Furthermore, the message identifier is described by an unsigned integer variable, ranging from 0x0 to 0xFFFFFFFF. The message identifier is globally unique in the network, and each message can only be published by a single publisher and subscribed to by multiple subscribers.
[0082] In practical implementation, this application uses the designed publish and subscribe tables to implement message publishing and subscription. For any FC (Fulfilled Message) message published by a publisher, the client records it in its local publish table and then notifies the server to refresh the global publish table. When a message is subscribed to by one or more subscribers, the server establishes a publish-subscribe relationship table and notifies the message publisher to add the relevant subscribers to the message's subscriber list. For any FC message subscribed to by a subscriber, the client records it in its local subscribe table and then notifies the server to refresh the global subscribe table. If the server detects that a newly subscribed message already has a corresponding publisher, it notifies the publisher to add the new subscriber to the subscriber list.
[0083] In simple terms, the FC messaging system includes the message sending process of the publisher and the message receiving process of the subscriber.
[0084] The basic process for a publisher to send a message is as follows:
[0085] 1. The publisher creates data to be sent and determines the message identifier;
[0086] 2. The publisher checks if the message identifier exists in the local publication table;
[0087] 3. The publisher checks if the message has any subscribers;
[0088] 4. Send messages to all subscribers.
[0089] The basic message receiving process for subscribers is as follows:
[0090] 1. Subscribers receive data;
[0091] 2. The subscriber checks if the message identifier exists in the local subscription table;
[0092] 3. Submit messages to the upper-layer application.
[0093] The following provides a detailed description of the message publishing process, message subscription process, message sending process, and message receiving process.
[0094] In one embodiment, refer to Figure 4 The message publishing process based on the publishing table includes:
[0095] Step 101: Terminal X begins the request-response process;
[0096] Step 102: Terminal X updates the local partial publication table, the content of which is the set of messages to be published P{M1,M2,……,M} i ,……,M N}, where M i M is the message identifier, N is the number of messages published in a single instance, and M is not present in the local publication table.i , then insert M i sequentially into the local publication table; otherwise, skip the update; go to step 103;
[0097] Step 103: Terminal X sends a publication request to the switch, with the content being the set of messages to be published P{M1, M2, ……, M i , ……, M N} and go to step 104;
[0098] Step 104: Terminal X waits to receive the switch's response. If the response is received successfully, go to step 105; if the waiting times out, end the publication process;
[0099] Step 105: The switch checks the publication table corresponding to Terminal X in the global publication table to see if M i already exists. If it does not exist, the switch inserts M i sequentially into the publication table corresponding to Terminal X and go to step 106; if it exists, directly go to step 106;
[0100] Step 106: The switch sequentially searches in the global subscription table for the set of terminals subscribing to the subscription message M i . If the set is not empty, go to step 107; otherwise, go to step 108;
[0101] Step 107: The switch forms a Bitmap from the set of terminals subscribing to the subscription message M i and updates the publication destination Bitmap in the global publication table according to the terminal set Bitmap;
[0102] Step 108: If i < N, then i = i + 1 and go to step 105; otherwise, go to step 109;
[0103] Step 109: The switch sends a publication update response to Terminal X, notifying Terminal X of the terminal set Bitmap corresponding to the set of publication messages P{M1, M2, ……, M i , ……, M N};
[0104] Step 1010: Terminal X updates the publication destination Bitmap in the local publication table according to the terminal set Bitmap;
[0105] Step 1011: The publication process ends.
[0106] Furthermore, referring to Figure 5 , the message subscription process based on the subscription table includes:
[0107] Step 201: Terminal Y starts the subscription request response process;
[0108] Step 202: The terminal Y updates the local partial subscription table, the content of which is the set of messages to be subscribed S{M1, M2, ……, M j , ……, M P}(where M j is the message identification number, and P is the number of messages subscribed at one time). If M j does not exist in the partial subscription table, then insert M j into the partial subscription table in sequence; otherwise, skip the update; go to Step 203;
[0109] Step 203: The terminal Y sends a subscription request to the switch, the content of which is the set of messages to be subscribed S{M1, M2, ……, M j , ……, M P}, and go to Step 204;
[0110] Step 204: The terminal Y waits to receive the response from the switch. If the response is received successfully, go to Step 205; if the waiting times out, end the subscription process;
[0111] Step 205: The switch checks the subscription table corresponding to the terminal Y in the global subscription table to see if M j already exists. If it does not exist, the switch inserts M j into the subscription table corresponding to the terminal Y in sequence and go to Step 206. If it exists, directly go to Step 206;
[0112] Step 206: The switch sequentially searches for the terminal A that publishes the message M j in the global publication table. If the terminal exists, go to Step 207; otherwise, go to Step 2010;
[0113] Step 207: The switch forms the location information of the terminal Y into a Bitmap and updates the publication destination Bitmap in the local publication table corresponding to the terminal A in the global publication table;
[0114] Step 208: The switch sends a subscription update response to the terminal A and notifies the terminal A of the terminal set Bitmap;
[0115] Step 209: The terminal A updates the publication destination Bitmap in the local publication table according to the terminal Bitmap;
[0116] Step 2010: If j < P, then j = j + 1, and go to Step 205; otherwise, go to Step 2011;
[0117] Step 2011: The subscription process ends.
[0118] Further, referring to Figure 6 , the process of message sending based on the publication table includes:
[0119] Step 301: Terminal X creates data to be sent and determines the message identifier M to be sent. i ;
[0120] Step 302: Terminal X queries the local partial publication table to see if M exists. i If it exists, proceed to step 303; otherwise, the transmission failed, proceed to step 306.
[0121] Step 303: Query M in the partial publication table i Check if the corresponding destination Bitmap is empty. If it is not empty, proceed to step 304; otherwise, the sending fails and proceed to step 306.
[0122] Step 304: Traverse the corresponding publishing destination Bitmap from least significant bit to most significant bit, and combine all terminals corresponding to bits set to 1 into a terminal set {D1, D2, ..., D...} i ,……,D Q}, where D i Q represents the device identifier, and Q represents the number of subscribed devices.
[0123] Step 305: Send the data to D1, D2, ..., D respectively. Q Send message M i ;
[0124] Step 306: Message sending process ends.
[0125] Furthermore, refer to Figure 7 The message receiving process based on the subscription table includes:
[0126] Step 401: Terminal Y receives message data on the FC link and parses the message identifier M. j ;
[0127] Step 402: Terminal Y queries the local partial subscription table to see if M exists. j If the message exists, proceed to step 403; otherwise, discard the message and proceed to step 404.
[0128] Step 403: Terminal Y sends message M j Submitted to the data reader;
[0129] Step 404: Message receiving process ends.
[0130] The embodiments provided by this invention, based on a client / server model, involve a terminal initiating a message publish / subscribe process with the switch, establishing a local publish / subscribe table for the terminal and a global publish / subscribe table for the switch. The switch then initiates a publish / subscribe update response process to the terminal, updating the local publish / subscribe table. This enables message transmission between terminals based on the local publish / subscribe table.
[0131] This invention addresses the problem of high costs associated with message planning changes and the high resource consumption of switching message planning space and time during system runtime, thereby reducing maintenance costs. It provides a flexible network platform for the system and offers a feasible solution for switching message planning during runtime.
[0132] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A publish-subscribe-based airborne FC message transmission method, characterized in that, The method includes: Establishing a publication table and a subscription table based on the client-server model. The publication table describes the published message identifier and the publication destination Bitmap, and the subscription table describes the subscribed message identifier and the subscriber. The publication table includes a global publication table and a local publication table. The local publication table is a subset of the global publication table, and one local publication table corresponds to one terminal. The global publication table is stored on the switch. All the published messages of the terminals in the network are arranged in ascending order of the terminal numbers in the global publication table. The global publication table is used to locate the publisher of a message when the message is subscribed and notify the publisher of the location information of the new subscribers. The local publication table is stored on the corresponding terminal respectively, and the local publication table stores the set of messages published by the terminal itself. The subscription table includes a global subscription table and a local subscription table. The local subscription table is a subset of the global subscription table, and one local subscription table corresponds to one terminal. The global subscription table is stored on the switch. All the subscribed messages of the terminals in the network are arranged in ascending order of the terminal numbers in the global subscription table. The global subscription table is used to locate the set of subscribers of a message when the message is published and notify the publisher of all the location information of the set of subscribers of the message. The local subscription table is stored on the terminal, and the local subscription table stores the set of messages subscribed by the terminal itself. The publication destination Bitmap describes the location information of the message subscribers, which is implemented through the Bitmap data structure. Each terminal on the network is represented by a bit in the bitmap. When the value of a certain bit is 1, it means that the terminal corresponding to this bit has subscribed to the current message. When the value of a certain bit is 0, it means that the terminal corresponding to this bit has not subscribed to the current message. The terminal, as a client,发起 a publication request and a subscription request to the server based on the network management message. The switch, as the server, processes the publication request and the subscription request and回复 a response based on the network management message, including: a message publication process based on the publication table, a message subscription process based on the subscription table, a message sending process based on the publication table, and a message receiving process based on the subscription table.
2. The airborne FC message transmission method based on publish-subscribe according to claim 1, characterized in that, The message identifier is described by an unsigned integer variable, ranging from 0x0 to 0xFFFFFFFF. The message identifier in the network is globally unique. Each message can only be published by a single publisher and subscribed by multiple subscribers.
3. The airborne FC message transmission method based on publish-subscribe according to claim 1, characterized in that, The message publication process based on the publication table includes: Step 101: Terminal X starts the publication request response process. Step 102: Terminal X updates the local partial publication table, the content of which is the set of messages to be published P{M1,M2,……,M} i ,……,M N }, where M i M is the message identifier, N is the number of messages published in a single instance, and M is not present in the local publication table. i Then M i Insert the data sequentially into the local publication table; otherwise, skip the update and proceed to step 103. Step 103: Terminal X sends a publish request to the switch, the content of which is the set of messages to be published, P{M1,M2,……,M}. i ,……,M N Proceed to step 104; Step 104: Terminal X waits to receive the switch response. If successfully received, go to Step 105; if the waiting times out, end the publication process. Step 105: The switch checks whether the distribution table corresponding to terminal X in the global distribution table already contains M. i If it does not exist, the switch will M i Insert sequentially into the publishing table corresponding to terminal X, then proceed to step 106; if it exists, proceed directly to step 106. Step 106: The switch sequentially searches for the subscribed message M in the global subscription table. i If the set of terminals is not empty, proceed to step 107; otherwise, proceed to step 108. Step 107: The switch will subscribe to message M i The terminal set forms a Bitmap, and the destination Bitmap in the global publishing table is updated based on the terminal set Bitmap; Step 108: If i < N, then i = i + 1, go to Step 105; otherwise, go to Step 109. Step 109: The switch sends a publish update response to terminal X, publishing the message set P{M1,M2,……,M}. i ,……,M N The corresponding terminal set Bitmap notifies terminal X; Step 1010: Terminal X updates the publication destination Bitmap in the local publication table according to the terminal set Bitmap. Step 1011: The publication process ends.
4. The airborne FC message transmission method based on publish-subscribe according to claim 3, characterized in that, The message subscription process based on the subscription table includes: Step 201: The terminal Y starts the subscription request response process; Step 202: Terminal Y updates its local partial subscription table, the content of which is the set of messages to be subscribed to S{M1,M2,……,M j ,……,M P }, where M j M is the message identifier, P is the number of messages subscribed in a single subscription, and M is not present in the local subscription table. j Then M j Insert the data sequentially into the local subscription table; otherwise, skip the update and proceed to step 203. Step 203: Terminal Y sends a subscription request to the switch, the content of which is the set of messages to be subscribed to S{M1,M2,……,M j ,……,M P Proceed to step 204; Step 204: The terminal Y waits to receive the switch response. If the reception is successful, go to Step 205; if the waiting times out, end the subscription process; Step 205: The switch checks whether the subscription table corresponding to terminal Y in the global subscription table already contains M. j If it does not exist, the switch will M j Insert sequentially into the subscription table corresponding to terminal Y, then proceed to step 206. If the table exists, proceed directly to step 206. Step 206: The switch sequentially searches the global publishing table for published message M. j If terminal A exists, proceed to step 207; otherwise, proceed to step 2010. Step 207: The switch forms a Bitmap of the location information of the terminal Y and updates the published destination Bitmap in the local publication table corresponding to the terminal A in the global publication table; Step 208: The switch sends a subscription update response to the terminal A and notifies the terminal A of the terminal set Bitmap; Step 209: The terminal A updates the published destination Bitmap in the local publication table according to the terminal Bitmap; Step 2010: If j < P, then j = j + 1, go to Step 205; otherwise, go to Step 2011; Step 2011: The subscription process ends.
5. The airborne FC message transmission method based on publish-subscribe according to claim 4, characterized in that, The message sending process based on the publication table includes: Step 301: Terminal X creates data to be sent and determines the message identifier M to be sent. i ; Step 302: Terminal X queries the local partial publication table to see if M exists. i If it exists, proceed to step 303; otherwise, the transmission failed, proceed to step 306. Step 303: Query M in the partial publication table i Check if the corresponding destination Bitmap is empty. If it is not empty, proceed to step 304; otherwise, the sending fails and proceed to step 306. Step 304: Traverse the corresponding publishing destination Bitmap from least significant bit to most significant bit, and combine all terminals corresponding to bits set to 1 into a terminal set {D1, D2, ..., D...} i ,……,D Q }, where D i Q represents the device identifier, and Q represents the number of subscribed devices. Step 305: Send the data to D1, D2, ..., D respectively. Q Send message M i ; Step 306: The message sending process ends.
6. The airborne FC message transmission method based on publish-subscribe according to claim 5, characterized in that, The message receiving process based on the subscription table includes: Step 401: Terminal Y receives message data on the FC link and parses the message identifier M. j ; Step 402: Terminal Y queries the local partial subscription table to see if M exists. j If the message exists, proceed to step 403; otherwise, discard the message and proceed to step 404. Step 403: Terminal Y sends message M j Submitted to the data reader; Step 404: The message receiving process ends.
Citation Information
Patent Citations
Data distribution service software based on FC-AE bus
CN111371596A
FC message multicast method for multi-partition application
CN117579541A