Ethernet message integrity verification method
By adding sequence numbers and timestamp data to Ethernet packets and combining them with the gPTP protocol to achieve clock synchronization, the timeout and out-of-order problems of aviation data packet transmission in TSN technology are solved, improving the integrity and determinism of the packets.
Patent Information
- Application Number
- CN202411346423.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-07
AI Technical Summary
Existing TSN technology suffers from timeouts and out-of-order issues during aviation data packet transmission, resulting in incomplete integrity that fails to meet practical application requirements.
By adding sequence number fields and timestamp data to Ethernet packets, integrity verification is performed by controlling the timestamps and sequence number identifiers of the host and receiver. Combined with the gPTP protocol, network-wide clock synchronization is achieved to ensure the correctness of packet order and time.
It improves the integrity of aviation data messages, ensures the determinism of message order and time intervals, and avoids timeout and out-of-order issues.
Smart Images

Figure CN119276560A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of aviation communications and relates to an Ethernet message integrity verification method. Background Art
[0002] Currently, TSN (time-sensitive networking) technology is used in the industrial field for real-time control networks. Its own technical characteristics and market size make it low-cost and powerful (in terms of jitter, latency, etc.) compared to other network technologies.
[0003] For aviation, data integrity requirements are stronger than availability requirements, that is, the certainty of sequence and time must be guaranteed.
[0004] Among them, sequence determinism is to ensure the correctness of the message sequence. For example, for some switch action instructions, their order directly determines the final state of the aircraft. Data messages must be sent and received in order. Reflected in its sequence number, it must fall within the valid time window, neither early (bit error) nor late (timeout); time determinism is to ensure the correctness of the time interval between messages, and to ensure that the delay and jitter of the data message do not exceed the predetermined value (if it exceeds the predetermined value, it is considered to be a timeout message, and the message is lost at this time.).
[0005] TSN provides basic time transmission guarantees, but timeouts and disorder still exist, making the integrity of aviation data messages during transmission fail to meet the requirements of practical applications.
[0006] Therefore, there is an urgent need for an Ethernet message integrity verification method to solve the above technical problems. Summary of the invention
[0007] The purpose of the present invention is to overcome the deficiencies in the prior art and to provide an Ethernet message integrity verification method, which can solve the technical problem in the prior art that the integrity of aviation data messages during transmission does not meet the actual application requirements.
[0008] In order to alleviate the above technical problems, the present invention is implemented by adopting the following technical solutions: In a first aspect, the present invention provides an Ethernet message integrity verification method, which is executed by a control host, wherein the control host includes a message sending end, a message receiving end and a global sending counter, including: Get Ethernet message; Fill in the counter data and current timestamp recorded by the global sending counter in the Ethernet message to obtain a message to be sent; Controlling the message sending end to send the message to be sent to the message receiving end; The counter data and current timestamp of the message to be sent are checked based on the sending timestamp of the received message published by the message receiving end and the global receiving sequence number identifier, and the message to be sent sent by the message sending end is received or discarded according to the checking result.
[0009] Furthermore, the counter data recorded in the global sending counter in the Ethernet message includes: A sequence number is added to the Ethernet message through the global sending counter, the sequence number is cumulatively increased one-to-one according to the number of messages sent, and the counter data includes the cumulatively increased sequence number.
[0010] Further, based on the sending timestamp of the received message published by the message receiving end and the global receiving sequence number identifier, checking the counter data and the current timestamp of the message to be sent, and receiving or discarding the message to be sent sent by the message sending end according to the checking result includes: When T-T0>0, the message is checked to be normal, and the normal message sent by the message sender is received; When T-T0<0, the message is checked as an abnormal message, and the abnormal message sent by the message sender is discarded; When T-T0=0, the message is checked as being sent at the same time. When B+1≤A≤B+5, the message is checked as being normal and the normal message sent by the message sender is received. Otherwise, the message is checked as being abnormal and the abnormal message sent by the message sender is discarded. Among them, B is the global receiving sequence number identifier, A is the counter data in the message, T is the sending timestamp of the received message, and T0 is the current timestamp.
[0011] Furthermore, when the message is normal, let T 0= T, B=A, update the sending timestamp and global receiving sequence number identifier of the received message published by the message receiving end; When the check is for an abnormal message, if the clock synchronization has been completed, set T 0= T, B=A, update the sending timestamp and global receiving sequence number identifier of the received message published by the message receiving end, and discard the message; When checking for abnormal messages, if clock synchronization is not completed, the messages are discarded.
[0012] Furthermore, the clock synchronization of the entire network is achieved through the pre-set gPTP protocol.
[0013] In a second aspect, the present invention provides an Ethernet message integrity verification device, comprising: A message acquisition module, used for acquiring Ethernet messages; A filling module, used to fill in the counter data and current timestamp recorded by the global sending counter in the Ethernet message to obtain a message to be sent; A sending module, used for controlling the message sending end to send the message to be sent to the message receiving end; The verification module is used to verify the counter data and current timestamp of the message to be sent based on the sending timestamp of the received message announced by the message receiving end and the global receiving sequence number identifier, and receive or discard the message to be sent sent by the message sending end according to the verification result.
[0014] In a third aspect, the present invention provides an electronic terminal, comprising a processor and a memory connected to the processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the method described in any one of the first aspects are performed.
[0015] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the steps of any one of the methods described in the first aspect.
[0016] Compared with the prior art, the present invention has the following beneficial effects: The present invention increases the sequence number field in the Ethernet message for judging the sequence of the Ethernet message, increases the time stamp data in the Ethernet message for judging the timeout of the Ethernet message, verifies the sequence integrity and time integrity of the message at the receiving end, and improves the integrity of the message. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A schematic diagram of a flow chart of an Ethernet message integrity verification method provided in Embodiment 1 of the present invention. DETAILED DESCRIPTION
[0018] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0019] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0020] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances. Embodiment 1:
[0021] like Figure 1 As shown, this embodiment provides an Ethernet message integrity verification method, including: Executed by a control host, the control host includes a message sending end, a message receiving end and a global sending counter, including: Step 1: Obtain an Ethernet message, which may be a TSN message; Step 2: Filling in the counter data and current timestamp recorded by the global sending counter in the Ethernet message includes: Adding a sequence number to the Ethernet message through the global sending counter, increasing the sequence number one-to-one cumulatively according to the number of messages sent, the counter data including the cumulatively increased sequence number; obtaining a message to be sent; Step 3: Control the message sending end to send the message to be sent to the message receiving end; Step 4: Based on the sending timestamp of the received message published by the message receiving end and the global receiving sequence number identifier, the counter data and the current timestamp of the message to be sent are checked, and the message to be sent sent by the message sending end is received or discarded according to the check result: When T-T0>0, the message is checked as a normal message, and the normal message sent by the message sender is received; when the message is checked as a normal message, set T 0= T, B=A, update the sending timestamp and global receiving sequence number identifier of the received message published by the message receiving end; When T-T0<0, the message is detected as abnormal. If the clock synchronization has been completed at this time, set T 0= T, B=A, update the sending timestamp and global receiving sequence number identifier of the received message published by the message receiving end, discard the abnormal message sent by the message sending end, and discard the abnormal message sent by the message sending end if the clock synchronization is not completed; When T-T0=0, the message is checked as being sent at the same time. When B+1≤A≤B+5, the message is checked as being a normal message. The normal message sent by the message sender is received. Let T 0= T, B=A, update the sending timestamp and global receiving sequence number of the received message published by the message receiving end, otherwise check it as an abnormal message, and discard the abnormal message sent by the message sending end, wherein otherwise means A is not in the interval range of [B, B+5]; Wherein, B is the global receiving sequence number identifier, A is the counter data, T is the sending timestamp of the received message, and T0 is the current timestamp; The aforementioned updating of the sending timestamp and the global receiving sequence number identifier of the received message published by the message receiving end is to prevent T0 from becoming larger due to the restart of the end system, thereby affecting the inspection of the message.
[0022] Regarding the aforementioned clock synchronization, the whole network clock synchronization can be achieved through the pre-set gPTP protocol. gPTP (IEEE 1588-2008) is a network protocol for precise time synchronization, which allows devices in the network to synchronize their clocks to a common reference clock source. Embodiment 2:
[0023] The present invention provides an Ethernet message integrity verification device, which can execute the Ethernet message integrity verification method disclosed in the first embodiment, and also has the beneficial effects of the method, including: A message acquisition module, used for acquiring Ethernet messages; A filling module, used to fill in the counter data and current timestamp recorded by the global sending counter in the Ethernet message to obtain a message to be sent; A sending module, used for controlling the message sending end to send the message to be sent to the message receiving end; The verification module is used to verify the counter data and current timestamp of the message to be sent based on the sending timestamp of the received message announced by the message receiving end and the global receiving sequence number identifier, and receive or discard the message to be sent sent by the message sending end according to the verification result. Embodiment three:
[0024] An embodiment of the present invention further provides an electronic terminal, including a processor and a storage medium; The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the method described in embodiment 1.
[0025] Embodiment 4: The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in Embodiment 1 are implemented.
[0026] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. An Ethernet message integrity check method, executed by a control host, wherein the control host includes a message sending end, a message receiving end and a global sending counter, characterized in that: include: Get Ethernet message; Fill in the counter data and current timestamp recorded by the global sending counter in the Ethernet message to obtain a message to be sent; Controlling the message sending end to send the message to be sent to the message receiving end; The counter data and current timestamp of the message to be sent are checked based on the sending timestamp of the received message published by the message receiving end and the global receiving sequence number identifier, and the message to be sent sent by the message sending end is received or discarded according to the checking result.
2. The Ethernet message integrity verification method according to claim 1, characterized in that: The counter data filled in the global sending counter record in the Ethernet message includes: A sequence number is added to the Ethernet message through the global sending counter, the sequence number is cumulatively increased one-to-one according to the number of messages sent, and the counter data includes the cumulatively increased sequence number.
3. The Ethernet message integrity verification method according to claim 1, characterized in that: Checking the counter data and the current timestamp of the message to be sent based on the sending timestamp of the received message published by the message receiving end and the global receiving sequence number identifier, and receiving or discarding the message to be sent sent by the message sending end according to the checking result includes: When T-T0>0, the message is checked to be normal, and the normal message sent by the message sender is received; When T-T0<0, the message is checked as an abnormal message, and the abnormal message sent by the message sender is discarded; When T-T0=0, the message is checked as sent at the same time. When B+1≤A≤B+5, the message is checked as normal message sent at the same time, and the normal message sent by the message sender is received. Otherwise, the message is checked as abnormal message sent at the same time, and the abnormal message sent by the message sender is discarded. Among them, B is the global receiving sequence number identifier, A is the counter data in the message, T is the sending timestamp of the received message, and T0 is the current timestamp.
4. The Ethernet message integrity verification method according to claim 3, characterized in that: include: When the message is normal, let T 0= T, B=A, update the sending timestamp and global receiving sequence number identifier of the received message published by the message receiving end; When the check is for an abnormal message, if the clock synchronization has been completed, set T 0= T, B=A, update the sending timestamp and global receiving sequence number identifier of the received message published by the message receiving end, and discard the message; When checking for abnormal messages, if clock synchronization is not completed, the messages are discarded.
5. The Ethernet message integrity verification method according to claim 4, characterized in that: The clock synchronization of all terminals in the entire network is achieved through the pre-set gPTP protocol.
6. An Ethernet message integrity check device, characterized in that: A message acquisition module, used for acquiring Ethernet messages; A filling module, used to fill in the counter data and current timestamp recorded by the global sending counter in the Ethernet message to obtain a message to be sent; A sending module, used for controlling the message sending end to send the message to be sent to the message receiving end; The verification module is used to verify the counter data and current timestamp of the message to be sent based on the sending timestamp of the received message announced by the message receiving end and the global receiving sequence number identifier, and receive or discard the message to be sent sent by the message sending end according to the verification result.
7. An electronic terminal, characterized in that: The method comprises a processor and a memory connected to the processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 5 are performed.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.