A Bus Message Parsing Method Based on Snail Algorithm

By using a bus message parsing method based on the snail algorithm, the problems of data packet loss and network congestion in marine gas turbine systems were solved, enabling real-time sharing and integrity of measurement point data, and ensuring communication reliability and rapid response.

CN116847002BActive Publication Date: 2026-05-26HARBIN ENG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HARBIN ENG UNIV
Filing Date
2023-07-10
Publication Date
2026-05-26

Smart Images

  • Figure CN116847002B_ABST
    Figure CN116847002B_ABST
Patent Text Reader

Abstract

This invention relates to the transmission and parsing of measurement point information in a marine gas turbine health management network, and more specifically, to a bus message parsing method based on a snail algorithm. The method includes the following steps: S1: frame information preprocessing; S2: measurement point information encryption processing; S3: received message classification processing; S4: message parsing. The frame information preprocessing involves processing the measurement point information to be sent according to the bus format based on bus data requirements. The measurement point information encryption processing involves converting the 8-byte frame information, composed of a single measurement point number and measurement point data, from a floating-point number to a hexadecimal number to form a frame message. This method enables real-time sharing of measurement point data in a marine gas turbine health management system network. Furthermore, due to the characteristics of the algorithm, it ensures the integrity and periodicity of message parsing and achieves bus software-level debouncing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the transmission and parsing of measurement point information in a marine gas turbine health management network, and more specifically, to a bus message parsing method based on the snail algorithm. Background Technology

[0002] With the development of automation levels in gas turbines, the application of complex communication systems interconnected between various devices is also constantly increasing. In particular, real-time data from marine gas turbine operations needs to be transmitted efficiently and quickly to the central control system for monitoring the turbine's operating status. Currently, Ethernet technology is used for data communication between devices within the ship's system. Ethernet communication has advantages such as high economy, low cost, high application efficiency, short transition time, and mature solutions, and is also suitable for rapid response to large amounts of data. However, in actual use, problems such as data packet loss and network congestion are prone to occur. If communication problems occur during ship operation, it is highly likely to affect the crew's ability to react correctly. Therefore, in ship communication, a communication method that can periodically send and receive large amounts of data, ensure data integrity, and has a fast response speed is particularly important.

[0003] The quality of communication methods for marine gas turbine equipment depends not only on the choice of hardware but also on the message generation and parsing process; both are crucial. Employing a bus protocol to transmit data from marine gas turbine measurement points and providing an independent algorithm for message parsing improves message parsing speed and integrity, fully leveraging the convenience offered by the bus protocol. Summary of the Invention

[0004] The purpose of this invention is to provide a bus message parsing method based on the snail algorithm, which can realize real-time sharing of measurement point data in the marine gas turbine health management system network. At the same time, due to the characteristics of the algorithm, the integrity and periodicity of message parsing can be guaranteed, and bus software-level debouncing can be achieved.

[0005] The objective of this invention is achieved through the following technical solution:

[0006] A bus message parsing method based on the snail algorithm, the method includes the following steps:

[0007] S1: Frame information preprocessing;

[0008] S2: Encryption processing of measurement point information;

[0009] S3: Received message classification and processing;

[0010] S4: Message parsing;

[0011] The frame information preprocessing involves processing the measurement point information to be sent according to the bus format based on the bus data requirements.

[0012] The frame information preprocessing includes the processing of measurement point numbers and measurement point data. The measurement point number consists of 4 bytes of hexadecimal numbers, and the measurement point data occupies 4 bytes of space. The individual measurement point number and measurement point data are combined into 8 bytes of frame information.

[0013] The measurement point number includes information about the device where the measurement point is located, the type of measurement point, and the sequence of measurement points.

[0014] The encryption process for the measurement point information involves converting the 8-byte frame information, which is formed by merging the individual measurement point number and measurement point data, from a floating-point number into a hexadecimal number to create a frame message.

[0015] The encryption processing of the measurement point information includes measurement point encryption and message parsing. Both measurement point encryption and message parsing involve the application of exponent. The exponent is the precision of the measurement point data. The measurement point data is converted from floating point numbers to integers and from integers to floating point numbers through multiplication and division to the power of exponent 10, that is, the encryption and decryption of the data.

[0016] The received message classification and processing includes frame ID setting, measurement point period discrimination, and device software-level anti-shake.

[0017] The ID setting includes the frame ID incrementing from 1 sequentially within a transmission cycle; the measurement point cycle discrimination includes the temporary storage of the received frame ID for comparison with the next frame ID to determine whether all measurement points in a cycle have been completely received; the device software-level anti-shake includes the discarding of the frame information if the current received ID is less than or equal to the next frame ID when comparing the received frame ID with the next frame ID.

[0018] The received message classification process involves receiving messages via the bus, comparing the frame ID with the previous frame ID to determine whether the current frame information is in the same transmission period as the previous frame, and periodically classifying the received messages.

[0019] The received message classification and parsing process includes the snail algorithm.

[0020] The beneficial effects of this invention are as follows:

[0021] 1. By encrypting, transmitting, and parsing the measurement data of the ship's gas turbine system, the periodic sharing of measurement data in the equipment network is achieved;

[0022] Second, a bus parsing algorithm was established, which uses a biomimetic model to complete the periodic isolation of messages, ensuring that the measurement point data maintains integrity during the cyclic transmission process, and eliminating message transmission problems caused by unknown factors at the algorithm level.

[0023] Third, the names and information of the measurement points are encrypted to prevent the leakage of important information during transmission;

[0024] Fourth, the bus transmission enables long-distance and high-speed information transmission, ensuring the integrity of the measurement point information;

[0025] Fifth, the application of the snail algorithm solves the problem of periodic isolation of measurement point messages and provides a certain degree of resistance to unknown errors in the message transmission process. Attached Figure Description

[0026] The present invention will now be described in further detail with reference to the accompanying drawings and specific implementation methods.

[0027] Figure 1 This is a schematic diagram of the bus message parsing method based on the snail algorithm of the present invention;

[0028] Figure 2 This is a schematic diagram of the bytes occupied by the measurement point ID in this invention;

[0029] Figure 3 This is a schematic diagram showing the bytes occupied by the communication data in this invention;

[0030] Figure 4 This is a data processing flowchart of the present invention;

[0031] Figure 5 This is a schematic diagram illustrating the error handling method for received messages according to the present invention;

[0032] Figure 6 This is a schematic diagram of the biomimetic well-wall climbing process of the present invention;

[0033] Figure 7 This is a schematic diagram of the core of the snail algorithm of this invention. Detailed Implementation

[0034] The technical solution of this invention will be fully described below with reference to an example of this invention. This example is a basic application of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0035] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the following description is provided in conjunction with the accompanying drawings. Figures 1 to 7 The present invention will be further described in detail with reference to specific embodiments;

[0036] This invention provides a bus message parsing method based on the snail algorithm, such as... Figure 1 As shown, the method includes the following steps: S1: frame information preprocessing; S2: measurement point information encryption processing; S3: received message classification processing; S4: message parsing;

[0037] The frame information preprocessing involves each device containing multiple measurement points. A single measurement point name is replaced by a measurement point ID, which is a 4-byte hexadecimal number (8 hexadecimal digits). The first digit is the start bit, fixed at 1; the second and third digits are device bits, ranging from 1H to FFH to represent different devices, up to a maximum of 255 devices; the fourth digit is the type bit, representing the ID type, generally divided into analog and digital signals (5 for analog and 2 for digital); the fifth, sixth, and seventh digits are the sequence bits, representing different measurement points within a single device, up to a maximum of 4095 measurement points; and the eighth digit is the end bit, fixed at 0, serving as the isolation point between the ID byte and the data byte. A frame consists of a measurement point ID in the first four bytes and a data byte in the last four bytes, containing the real-time data for that measurement point.

[0038] The frame information preprocessing involves processing the measurement point information to be sent according to the bus format based on the bus data requirements. A single data frame transmitted via the bus includes ID, TimeStamp, TimeFlag, SendType, RemoteFlag, ExternFlag, Data, and Reserved. ID is the message frame ID. TimeStamp is the time stamp when the information frame is received, starting from controller initialization, in microseconds. TimeFlag indicates whether a time stamp is used; a value of 1 indicates TimeStamp is valid. TimeFlag and TimeStamp are only meaningful when this frame is a receive frame. SendType indicates the frame type: =0 for normal transmission, =1 for single transmission (no automatic retransmission), =2 for self-transmission and self-reception (used to test card damage), =3 for single self-transmission and self-reception (only sent once, used for self-testing), and is only meaningful when this frame is a send frame. RemoteFlag indicates whether it is a remote frame: =0 for a data frame, =1 for a remote frame. ExternFlag indicates whether it is an extended frame. =0 indicates a standard frame (11-bit frame ID), and =1 indicates an extended frame (29-bit frame ID). DataLen is the data length DLC (<==8), which is the length of Data. Data is the data in the message, and its space is constrained by DataLen. Reserved means it is reserved by the system.

[0039] The aforementioned measurement point encryption addresses the issue that traditional data communication typically involves directly converting raw data into hexadecimal numbers for transmission. For high-precision decimal numbers, converting them to hexadecimal results in a large number of bytes being used, and the data is prone to inaccuracies. Therefore, by introducing an exponent during the data processing stage, multi-precision floating-point numbers are converted into decimal integers, and then decimal integers are converted into hexadecimal numbers for transmission. By agreeing on the same measurement point exponent between the communicating parties beforehand, the compilation and decoding of measurement point data can be efficiently completed, while ensuring data accuracy.

[0040] like Figure 2As shown, each device contains multiple measurement points. The name of a single measurement point is replaced by a measurement point ID, which is a 4-byte hexadecimal number (8 hexadecimal digits). The first digit is the start digit, fixed at 1; the second and third digits are device bits, from 1H to FFH representing different devices, with a maximum of 255 devices; the fourth digit is the type digit, representing the ID type, generally divided into analog and digital signals, with 5 for analog and 2 for digital; the fifth, sixth, and seventh digits are the sequence digits, representing different measurement points within a single device, with a maximum of 4095 measurement points; the eighth digit is the end digit, fixed at 0, serving as the isolation point between the ID byte and the data byte; the communication data occupies 4 bytes, with the data occupying the last few bits, padded with leading zeros according to the number of integer data bits, until a total of 8 bits are reached.

[0041] like Figure 3 The first four bytes of a message frame are the measurement point ID, and the last four bytes are data bytes, containing the real-time data of that measurement point;

[0042] In gas turbine monitoring, the accuracy of measurement data is crucial. However, traditional data communication typically involves directly converting raw data into hexadecimal numbers for transmission. For high-precision decimal numbers, converting to hexadecimal results in a large number of bytes and increases the risk of data inaccuracies. Therefore, introducing an exponent during data processing converts multi-precision floating-point numbers into decimal integers, and then converts these decimal integers into hexadecimal numbers for transmission. By agreeing on the same exponent for each measurement point beforehand, the compilation and decoding of measurement data can be efficiently completed while ensuring data accuracy. The data processing flow is as follows: Figure 4 As shown;

[0043] The snail algorithm parses messages by simulating a snail climbing upwards in a well. Imagine a snail at the bottom of a dry well trying to escape. During its climb, it may slip down a distance due to exhaustion or other factors (in bus communication, this could be due to transmission jitter or software delays causing data to accumulate beyond the hardware cache). However, the effective distance it travels when it finally emerges from the well is equal to the well's height. Therefore, during message parsing, data that has slipped down is considered invalid, and only data with increasing message IDs is considered valid. Applying this process to message parsing and classification is the essence of the snail algorithm.

[0044] The received message classification and processing includes the core content of the snail algorithm. Due to the independence of bus messages, the message measurement points need to be periodically isolated during continuous message transmission and reception. That is, it is necessary to find the start and end points of a message within a cycle in continuous message transmission and reception to ensure that a complete set of measurement points is received within a cycle. Traditional message processing achieves this by limiting the cycle length, receiving the number of measurement points of the specified length sent by the sender to achieve complete cycle measurement point reception. This method is simple and effective, but in practice, slight jitter between the measurement point data generation time and the message transmission time can easily cause the bus to send multiple frames of the same data within a predetermined time. In this case, using the length-limited cycle method will not only cause the loss of measurement points within this cycle but also disrupt all measurement points in subsequent cycles. Within a cycle, the frame ID is set to increment from 1 frame by frame. During parsing, the incrementing frame ID indicates that the current frame information and the previous frame information are still within the same cycle, which is equivalent to a snail climbing up a well wall. If the current frame ID is reset, it indicates the end of this cycle and the reception of the next cycle's frame information begins. This process is analogous to a snail climbing up one dry well only to fall into another. When the frame ID is less than or equal to the previous frame ID, it means that the message sending end is not generating the message in time, causing a frame of data to be sent multiple times. Therefore, this frame information is directly discarded to ensure the integrity of the measurement points within the cycle and not affect the next cycle. This process is analogous to a snail slipping or resting while climbing the well wall.

[0045] A loop receiving mechanism based on the programming language is established. The received message's frame ID is first temporarily stored in a register for comparison with the next frame ID. Figure 7 As shown, when the frame ID is reset, it indicates the end of a cycle. The measurement points of this cycle are then parsed, and the measurement points of the next cycle are received. When the frame ID is greater than the previous frame ID, it means that the message is normal and is in the same cycle as the previous frame information. The frame information is stored in the queue to wait for the cycle to end before the next step of parsing. When the frame ID is less than or equal to the previous frame ID, it means that due to an unknown error, the message jitters. The device reads the value in the internal register, i.e., the historical data, and sends it. At this time, the data is invalid and is directly deleted.

[0046] The snail algorithm parsing process involves generating all measurement points within a monitoring cycle during message generation. The message frame ID starts from 1 and increments sequentially. After all measurement point messages are generated, the next cycle begins, generating new measurement point information messages. At the receiving end, the communication program starts the monitoring cycle. After receiving the first frame message within a monitoring cycle, the frame message ID is stored in the ID register (the ID register is initially set to 0). The frame ID is compared with the value in the ID register. If the frame ID is greater than the value in the ID register, it means that this frame information contains useful values. This frame information is parsed and stored in a queue, awaiting display and storage in the database. If the frame ID is greater than or equal to the value in the ID register, the frame information has already been parsed and does not need to be parsed again; it is discarded, and the next frame information is received. When the ID returns to 1, this monitoring cycle ends, all measurement points in this cycle are parsed, and the next monitoring cycle begins.

[0047] The following examples illustrate the specific implementation of this method;

[0048] For example, a measurement point that needs to communicate needs to send data 10 times over a period of time. The data is {0.174, 0.25, 0.312, 0.398, 0.521, 0.645, 0.772, 0.847, 0.942, 1.223}, and the exponent n of this measurement point is 3. First, the frame information is preprocessed by substituting the data xi into the following formula:

[0049]

[0050] Then process the intermediate parameters from the previous step. The intermediate parameters are converted to hexadecimal numbers, and the preprocessed data is finally obtained as {AE, FA, 138, 18E, 209, 285, 304, 34F, 3AE, 4C7}.

[0051] According to the above rules, the frame messages are {[10150010000000AE], [10150020000000FA], [1015003000000138], [101500400000018E], [1015005000000209], [1015006000000285], [1015007000000304], [101500800000034F], [10150090000003AE], [101500A0000004C7]};

[0052] The client receives the above messages in sequence. Ideally, the client will receive all 10 messages. However, in actual applications, unexpected events such as hardware jitter or software inadequate processing may occur, causing the client to receive the same message repeatedly after receiving a message. For example, the client receives the following data.

[0053] {[10150010000000AE],[10150020000000FA],[1015003000000138],[101500400000018E],[1015005000000209],[10150060 00000285], [1015005000000209], [1015007000000304], [101500800000034F], [10150090000003AE], [101500A0000004C7]};

[0054] After receiving the sixth data, the program receives the fifth data that has already been received. At this point, the program will recognize the downward movement, identify this data as invalid data and discard it, and save the normal data with the ascending sequence number to the queue. This ensures that the data is correct and that the number of data within the cycle is determined, so that the communication cycle will not deviate.

[0055] In this example, the host computer uses programming software to build a mathematical model and processes the measurement point information into a message format for periodic transmission.

[0056] In this example, the lower-level machine continuously receives data transmitted from the upper-level machine. It first stores the data in a queue to prevent loss, and then reads the data one by one from the queue and uses the snail algorithm to make judgments.

[0057] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A bus message parsing method based on the snail algorithm, characterized in that: The method includes the following steps: S1: Frame information preprocessing; the frame information preprocessing is to process the measurement point information to be sent according to the bus format based on the bus data requirements; S2: Encryption processing of measurement point information; The encryption process for the measurement point information includes measurement point encryption, which involves the application of exponent. The exponent is the precision of the measurement point data. The measurement point data is converted from floating-point numbers to integers and from integers to floating-point numbers through multiplication and division by powers of 10, which is the encryption of the data. The encryption process for the measurement point information involves converting the 8-byte frame information, which is formed by merging the individual measurement point number and measurement point data, from a floating-point number into a hexadecimal number to create a frame message. S3: Received message classification and processing; The received message classification and processing includes frame ID setting, measurement point period discrimination, and device software-level anti-shake. The ID is set to be the frame ID, which increments from 1 sequentially within a transmission cycle; the measurement point cycle determination includes the temporary storage of the received frame ID for comparison with the next frame ID to determine whether all measurement points of a cycle have been received; if the current frame ID is reset, it indicates that the cycle has ended and the reception of the next cycle frame information begins. The device software-level image stabilization includes comparing the received frame ID with the previous frame ID. If the current received ID is less than or equal to the next frame ID, the frame information is discarded. S4: Message parsing; The message parsing includes the snail algorithm; The system establishes a cyclic reception mechanism based on measurement points using a programming language. Upon receiving a message, the frame ID is temporarily stored in a register for comparison with the next frame ID. When the frame ID is reset, it indicates the end of a cycle. The system then begins parsing the measurement points for that cycle and starts receiving measurement points for the next cycle. When the frame ID is greater than the previous frame ID, it indicates the message is normal and in the same cycle as the previous frame. This frame is then stored in a queue to await the end of the cycle for further parsing. When the frame ID is less than or equal to the previous frame ID, it indicates message jitter due to an unknown error. The device reads the value from its internal register (historical data) and sends it. This data is invalid and is directly deleted.

2. The bus message parsing method based on the snail algorithm according to claim 1, characterized in that: The frame information preprocessing includes the processing of measurement point numbers and measurement point data. The measurement point number consists of 4 bytes of hexadecimal numbers, and the measurement point data occupies 4 bytes of space. The individual measurement point number and measurement point data are combined into 8 bytes of frame information.

3. The bus message parsing method based on the snail algorithm according to claim 1, characterized in that: The measurement point number includes information about the device where the measurement point is located, the measurement point type, and the measurement point sequence.

4. The bus message parsing method based on the snail algorithm according to claim 1, characterized in that: The received message classification process involves receiving messages via the bus, comparing the frame ID with the previous frame ID to determine whether the current frame information is in the same transmission period as the previous frame, and then periodically classifying the received messages.