Message processing methods, systems, devices, and readable storage media

By processing one data segment at a time in each clock cycle and utilizing buffers and caches, the problem of high logic complexity at high port rates is solved, achieving stable data transmission and adapting to different rate requirements.

CN123074993APending Publication Date: 2026-11-10SUZHOU CENTEC COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611306115.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-26
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

At high port rates, existing technologies require multiple calculations of the inter-packet gap (IPG) within a single clock cycle, which increases the complexity of logic processing, makes timing convergence difficult, and makes it hard to adapt to the needs of different port rates.

Method used

The method of processing one data segment per clock cycle is adopted. By inserting preambles and inter-packet gaps, combined with data management of buffers and caches, the data is ensured to be sent stably over multiple clock cycles.

Benefits of technology

It simplifies the logic processing, avoids multiple IPG calculations, reduces logic complexity, improves timing convergence capability, and adapts to the needs of different port rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123074993A_ABST
    Figure CN123074993A_ABST
Patent Text Reader

Abstract

This invention provides a message processing method, system, device, and readable storage medium. The method includes: receiving messages sent by the system side and determining a data segment to be processed from the unprocessed data of the current message based on the byte order of each message; preprocessing one of the data segments to be processed within one clock cycle to generate a corresponding target data segment; transferring the data of the target data segment within the interface bit width range to a buffer to await downstream scheduling; and temporarily storing the data of the target data segment exceeding the interface bit width range in a cache. Compared with existing technologies, this invention fundamentally avoids the logical overhead of repeatedly calculating the IPG for multiple message boundaries within a single cycle. Simultaneously, it solves the problem of data residue across clock cycles through a temporary storage mechanism, simplifying the data integrity maintenance logic of downstream modules.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of network communication technology, and specifically relates to a message processing method, system, device, and readable storage medium. Background Technology

[0002] As Ethernet port speeds increase from 100G to 400G and 800G, with limited increases in clock frequency, the data bit width that the MII interface needs to transmit per clock cycle is constantly increasing. In this context, a single clock cycle may contain data from multiple data packets simultaneously. When multiple packets arrive within a clock cycle, the sender needs to calculate not only the IPG after the first packet's EOP and before the second packet's SOP, but also the IPG after the second packet's EOP and before the third packet's SOP, and insert a preamble before the SOP of each packet.

[0003] The above processing method requires multiple calculations of the IPG insertion count within a single clock cycle, significantly increasing the complexity of the logic processing. As port speeds further increase, even more IPG (inter-packet gap) calculations may be needed within a single clock cycle, greatly increasing the logic complexity. Furthermore, the complex logic processing is not conducive to timing convergence, increasing the difficulty of chip design, and existing solutions exhibit poor inheritance across different port speeds, making it difficult to smoothly adapt to the application requirements of higher port speeds.

[0004] Therefore, in order to address the above-mentioned technical problems, it is necessary to provide a message processing method, system, device, and readable storage medium.

[0005] The information disclosed in this background section is intended only to enhance the understanding of the overall background of the invention and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention

[0006] The purpose of this invention is to provide a message processing method, system, device, and readable storage medium that can solve the technical problems of complex IPG calculations and difficult logical design.

[0007] To achieve the above objectives, the technical solution provided by the present invention is as follows:

[0008] In a first aspect, the present invention provides a message processing method, comprising:

[0009] The system receives messages from the receiving system and determines the data segment to be processed from the unprocessed data of the current message based on the byte order of each message.

[0010] Within one clock cycle, a data segment to be processed is preprocessed to generate a corresponding target data segment;

[0011] Data within the interface bit width range of the target data segment is moved to a buffer to await downstream scheduling, while data exceeding the interface bit width range of the target data segment is temporarily stored in a cache.

[0012] In one or more embodiments of the present invention, preprocessing of one of the data segments to be processed includes:

[0013] If the data segment to be processed contains a message start flag, then a preset preamble is inserted before the start flag;

[0014] If the data segment to be processed contains a message end marker, then a packet gap is inserted after the message end marker.

[0015] In one or more embodiments of the present invention, the method further includes:

[0016] If the data segment to be processed contains neither a message start flag nor a message end flag, then the data segment to be processed is determined as the target data segment.

[0017] In one or more embodiments of the present invention, data of the target data segment located within the interface bit width range is moved to a buffer to await downstream scheduling, and data of the target data segment exceeding the interface bit width range is temporarily stored in a cache, including:

[0018] Determine the free space size of the buffer and read the remaining temporarily stored data from the cache;

[0019] If the amount of remaining data is less than the size of the free space, then the remaining data is moved to the buffer, and the data in the target data segment that is within the interface bit width range is moved to the buffer;

[0020] If the amount of remaining data is greater than or equal to the size of the free space, then an amount of data in the remaining data equal to the size of the free space is moved to the buffer;

[0021] The data in the target data segment that has not been moved to the buffer is temporarily stored in the cache.

[0022] In one or more embodiments of the present invention, the method further includes:

[0023] When the remaining storage space of the cache is less than or equal to a preset threshold, a backpressure signal is sent to stop receiving messages sent by the system side; and

[0024] When the remaining storage space of the cache changes from less than or equal to a preset threshold to greater than the preset threshold, the reverse pressure signal is withdrawn, and the reception of messages sent by the system side is resumed.

[0025] In one or more embodiments of the present invention, determining the data segment to be processed from the unprocessed data of the current message in each clock cycle includes:

[0026] Determine the maximum data length that can be processed in the current clock cycle and the total length of unprocessed data in the current message;

[0027] If the total length of the unprocessed data is greater than the maximum data length, then starting from the beginning of the unprocessed data, data with a length equal to the maximum data length is determined as the data segment to be processed;

[0028] If the total length of the unprocessed data is less than or equal to the maximum data length, then all the data of the unprocessed data is determined as the data segment to be processed.

[0029] In one or more embodiments of the present invention, the method further includes:

[0030] When the amount of data cached in the buffer reaches a preset scheduling threshold, downstream devices are allowed to read data from the buffer.

[0031] When the amount of data cached in the buffer is lower than the preset scheduling threshold, downstream devices are prohibited from reading data from the buffer.

[0032] In a second aspect, the present invention provides a message processing system, comprising:

[0033] The determination module is used to receive messages sent by the system side and determine the data segment to be processed from the unprocessed data of the current message based on the byte order of each message;

[0034] The processing module is used to preprocess one of the data segments to be processed within one clock cycle to generate the corresponding target data segment;

[0035] The scheduling module is used to move the data of the target data segment within the interface bit width range to the buffer to wait for downstream scheduling, and to temporarily store the data of the target data segment exceeding the interface bit width range in the cache.

[0036] Thirdly, the present invention provides an electronic device comprising:

[0037] At least one processor; and

[0038] A memory that stores instructions, which, when executed by the at least one processor, cause the at least one processor to perform the message processing method.

[0039] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the message processing method described above.

[0040] Compared with the prior art, the message processing method provided by the present invention preprocesses only one data segment to be processed in each clock cycle, and the data segment is determined from the unprocessed data of the current message based on the message byte order. Therefore, each clock cycle faces at most one message boundary, and the IPG only needs to be calculated once at the end of the message, which fundamentally avoids the logical overhead of having to calculate the IPG multiple times when facing multiple message boundaries in a single cycle.

[0041] Based on this, data within the interface bit width range is moved to the buffer, and data exceeding the interface bit width range is temporarily stored in the cache. This solves the problem of data residue across clock cycles through the temporary storage mechanism. Long messages can be sent to the downstream gradually over multiple clock cycles through alternating operations of moving and temporary storage, without the need for additional message segmentation at the downstream interface, which simplifies the downstream module's logic for maintaining data integrity. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 This is a flowchart of a message processing method in one embodiment of the present invention;

[0044] Figure 2 This is a structural block diagram of a message processing system according to another embodiment of the present invention;

[0045] Figure 3 This is a structural block diagram of an electronic device according to one embodiment of the present invention;

[0046] Figure 4 This is a schematic diagram of message preprocessing in one embodiment of the present invention;

[0047] Figure 5 This is a schematic diagram of message preprocessing in another embodiment of the present invention;

[0048] Figure 6This is a schematic diagram of message preprocessing in another embodiment of the present invention;

[0049] Figure 7 This is a schematic diagram of the cache transfer process in one embodiment of the present invention. Detailed Implementation

[0050] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.

[0051] Unless otherwise expressly stated, throughout the specification and claims, the term "comprising" or its variations such as "including" or "comprises" shall be understood to include the stated elements or components without excluding other elements or other components.

[0052] Existing solutions face an inherent contradiction when processing packets in high-bit-width scenarios: the problem worsens dramatically with increasing port speed. When multiple data packets need to be accommodated in each clock cycle, the solution must repeatedly calculate the inter-packet gap based on the frequency of packet boundary occurrences. Each increase in port speed directly increases the number of packets that may occur simultaneously in a single clock cycle, thus increasing the frequency of inter-packet gap calculations within a single cycle. This significantly increases the complexity of the logic implementation, ultimately severely limiting the chip's timing convergence capability and making it difficult for the solution to smoothly adapt to higher-speed ports through simple parameter adjustments.

[0053] Based on a thorough analysis of this technical bottleneck, the inventors of this invention realized that the root of the problem lies not in the calculation method of the packet gap itself, but in the fact that existing solutions force the simultaneous handling of multiple packet boundaries within a single clock cycle. Continuing down this path, any local optimization cannot fundamentally reverse the divergent trend of logical complexity. Therefore, this invention changes the processing granularity from parallel processing of multiple packets within a cycle to serialized processing of single packet boundaries within a cycle.

[0054] Specifically, each clock cycle extracts only one data segment to be processed from the unprocessed data of the current message for preprocessing, thereby ensuring that at most one message boundary needs to be dealt with in any clock cycle. The calculation of the inter-packet gap is thus compressed to be performed only once at the end of the message, completely eliminating the burden of multiple calculations of IPG caused by multi-boundary concurrency.

[0055] Meanwhile, instead of simply pushing the processed data directly downstream, this invention introduces a two-level data management mechanism that combines sequential splicing and temporary storage. This alternating approach of data transfer and temporary storage solves the problem of data residue across clock cycles, allowing long messages of any length to be sent downstream gradually at a stable pace over multiple clock cycles, thus relieving the downstream interface of the burden of additional segmentation processing.

[0056] Please refer to Figure 1 The diagram shown is a flowchart illustrating message processing according to an embodiment of the present invention. The message processing method specifically includes the following steps:

[0057] S101: Receive the messages sent by the system side and determine the data segment to be processed from the unprocessed data of the current message based on the byte order of each message;

[0058] In this step, the messages sent by the system arrive at the processing module in the form of a data stream. The processing module processes each message sequentially according to its byte order. In one embodiment, for the message currently being processed, the processing module's clock starts processing based on the starting position of the unprocessed data; simultaneously, it records the total amount of unprocessed data in the current message. Based on this, the processing module determines the data segment to be processed from the unprocessed data of the current message in each clock cycle.

[0059] It is understood that the maximum data length that can be processed in the current clock cycle can be determined by the data transmission width between the system side and the downstream interface. For example, when the downstream interface is a 128-byte wide MII interface, the maximum data length that can be processed per clock cycle is 128 bytes. It should be noted that this maximum data length can be configured according to the actual interface width in different application scenarios, and this invention does not impose specific limitations on it.

[0060] In one exemplary embodiment, determining the data segment to be processed may first require determining the maximum data length that can be processed in the current clock cycle and the total length of unprocessed data in the current message;

[0061] If the total length of unprocessed data exceeds the maximum data length, then data of the maximum length is designated as the data segment to be processed, starting from the beginning of the unprocessed data. In this case, the current clock cycle cannot process all the remaining data of the message, so only the first part of the message is acquired as the data segment to be processed. The remaining data of the message is retained in the unprocessed data of the current message, waiting for processing to continue in the next clock cycle.

[0062] If the total length of unprocessed data is less than or equal to the maximum data length, then all of the unprocessed data is designated as the data segment to be processed. In this case, the remaining data of the current message can be processed within the current clock cycle, so there is no need to truncate the message. After processing, the length of the unprocessed data in the message is reduced to zero, and the processing module then begins processing the next message.

[0063] For example, suppose the maximum data length that can be processed in the current clock cycle is 128 bytes. If the total length of the current message is 256 bytes and has not yet been processed, then the total length of the unprocessed data is 256 bytes, which is greater than 128 bytes. In this case, 128 bytes are obtained from the beginning of the unprocessed data as the data segment to be processed, and the remaining 128 bytes are reserved for the next clock cycle to be obtained.

[0064] For example, if the total length of the current message is 64 bytes and has not yet been processed, then the total length of the unprocessed data is 64 bytes, which is less than 128 bytes. In this case, all 64 bytes are determined as the data segment to be processed, and the current message is completely acquired within the current clock cycle.

[0065] By employing the above method, based on the message byte order and the processing capacity of the current clock cycle, one data segment to be processed is determined from the current message within each clock cycle. This data segment belongs to the same data message and its length does not exceed the maximum data length that can be processed in the current clock cycle. This ensures that at most one message data segment is processed each clock cycle, avoiding the problem of multiple messages being intertwined and requiring the simultaneous processing of multiple message boundaries during subsequent processing.

[0066] S102: Within one clock cycle, preprocess one of the data segments to be processed to generate the corresponding target data segment;

[0067] In this step, the processing module preprocesses the identified data segments to be processed. Since only one data segment is processed per clock cycle, and this data segment belongs to the same data packet, the preprocessing process only needs to focus on the current data segment's own flag information and does not need to consider the existence of other packets within the same clock cycle.

[0068] In one embodiment, the processing module can detect whether the data segment to be processed contains a start-of-message (SOP) and an end-of-message (EOP), and perform corresponding preprocessing operations based on the detection results.

[0069] Specifically, if the data segment to be processed contains a message start flag, a preset preamble is inserted before the start flag. This is typically done during the first clock cycle of the current message processing, i.e., when the current data segment is at the beginning of the message. The preamble is used to provide bit synchronization and frame delimitation information to the receiving end before physical layer transmission.

[0070] If the data segment to be processed contains a message end marker, an IPG (Inter-packet Gap) is inserted after the message end marker. This typically occurs during the last clock cycle of message processing, i.e., when the current data segment is at the end of the message. The IPG is used to separate two adjacent Ethernet frames, ensuring that the receiving end can correctly distinguish between different messages. The length of the IPG is dynamically variable. In Ethernet transmission, to ensure that the average IPG length between messages is a fixed value, its length calculation can be associated with the message end marker (EOP). This embodiment of the invention does not specifically limit this.

[0071] The calculation is based on the processing capacity of the current clock cycle and the timing requirements of the media-independent interface, and this embodiment of the invention does not impose specific limitations on this.

[0072] It should be noted that if the data segment to be processed contains both SOP and EOP, meaning the message length is short and can be fully acquired within one clock cycle, then the preamble is inserted before the SOP, and a subsequent IPG insertion operation is also required after the EOP. (Refer to...) Figure 4 As shown, all preprocessing of the message is completed within one clock cycle.

[0073] Furthermore, if the data segment to be processed contains neither a Start of Message (SOP) nor an End of Message (EOP), then the current data segment to be processed is located in the middle of the message. In this case, the data segment to be processed only contains the middle data of the message and does not involve the message boundary. The processing module does not insert a preamble or an IPG for this data segment; that is, it directly passes the data segment to be processed through, and this data segment can be output as the target data segment.

[0074] For example, assuming the current message length is 256 bytes, the maximum data length that can be processed in the current clock cycle is 128 bytes. In the first clock cycle, refer to... Figure 5 As shown, the determined data segment to be processed is the first 128 bytes of the message. This data segment contains the SOP but not the EOP. According to the above rules, the processing module inserts an 8-byte preamble before the SOP of this data segment, without inserting an IPG. The length of the preprocessed target data segment is 136 bytes. In the second clock cycle, refer to... Figure 6 As shown, the data segment to be processed determined in step S101 is the remaining 128 bytes of the message. This data segment contains an EOP but not a SOP. According to the above rules, the processing module inserts a 12-byte IPG after the EOP of this data segment, without inserting a preamble. The length of the preprocessed target data segment is 140 bytes.

[0075] S103: Move the data of the target data segment within the interface bit width range to the buffer to wait for downstream scheduling, and temporarily store the data of the target data segment exceeding the interface bit width range in the cache.

[0076] In one implementation, the processing module acquires data of length equal to the interface bit width, starting from the beginning of the target data segment within the current clock cycle, and moves this data to a buffer. If the total length of the target data segment is greater than the interface bit width, the remaining data exceeding the interface bit width is temporarily stored in a cache, awaiting further processing in subsequent clock cycles.

[0077] It should be noted that the data transfer and temporary storage operations are not performed in isolation, but rather in conjunction with any temporary data that may exist in the cache. When the processing module performs a data transfer operation in each clock cycle, it first processes the remaining data temporarily stored in the cache from previous cycles, and then processes the data in the target data segment of the current clock cycle that is within the interface bit width range. Specifically, the processing module first obtains the current free space size of the buffer and reads the remaining data temporarily stored in the cache from the previous clock cycle.

[0078] If the amount of remaining data is less than the free space of the buffer, it indicates that the buffer has enough space to accommodate the remaining data in the cache. At this point, the processing module moves all the remaining data in the cache to the buffer, and then continues to move data within the interface width range of the target data segment within the current clock cycle to the buffer until the amount of data in the buffer reaches the preset scheduling threshold or all data within the interface width range of the target data segment has been moved. If, during this process, the buffer has not reached the preset scheduling threshold after all data within the interface width range of the target data segment has been moved, the buffer waits for the data to arrive in the next clock cycle before continuing to fill it.

[0079] If the amount of remaining data is greater than or equal to the size of the buffer's free space, it indicates that the buffer's free space is insufficient to accommodate all the remaining data in the cache. In this case, the processing module only moves the amount of remaining data in the cache that is equal to the size of the free space to the buffer. The remaining data in the cache that exceeds the size of the free space continues to be temporarily stored in the cache, waiting for the buffer to release space in the next clock cycle before it can continue to be moved. In this situation, data within the interface bit width range of the target data segment in the current clock cycle cannot be temporarily moved to the buffer, and the processing module temporarily stores this data in the cache.

[0080] If the buffer does not contain any remaining data temporarily stored in the previous clock cycle, the processing module directly retrieves the data within the interface width range from the target data segment of the current clock cycle and moves it. If the amount of data within the interface width range in the target data segment is less than or equal to the free space size of the buffer, then all of that data is moved to the buffer; if the amount of data within the interface width range in the target data segment is greater than the free space size of the buffer, then only the amount of data equal to the free space size is moved to the buffer, and the remaining data is temporarily stored in the buffer.

[0081] For example, refer to Figure 7 As shown, assuming the interface width is 128 bytes and the buffered data width is 148 bytes, taking a message length of 256 bytes as an example, after preprocessing, the target data segment length generated in the first clock cycle is 136 bytes, and the target data segment length generated in the second clock cycle is 140 bytes.

[0082] In the first clock cycle, the processing module fetches 128 bytes from the beginning of the target data segment and moves them to the buffer, while the remaining 8 bytes are temporarily stored in the cache. In the second clock cycle, the processing module reads the remaining 8 bytes of data temporarily stored in the previous clock cycle from the cache. At this time, the buffer is in an idle state with 128 bytes of free space. The amount of data remaining (8 bytes) is less than the size of the free space (128 bytes), so the processing module moves these 8 bytes to the buffer. Then, it fetches 120 bytes from the subsequent data of the target data segment and moves them to the buffer. At this point, the amount of data in the buffer reaches 128 bytes, and the remaining 20 bytes are temporarily stored in the cache.

[0083] Optionally, in one embodiment, the processing module can also monitor the storage status of the cache. When the remaining storage space of the cache is less than or equal to a preset threshold, it indicates that the cache is about to or has already become unable to accommodate new data. The processing module sends a backpressure signal to the upstream system side and stops receiving new data packets to prevent data loss. When data in the cache is moved to the buffer, the storage space occupied by the moved data in the cache is released, and the remaining storage space of the cache increases. When the remaining storage space of the cache is greater than the preset threshold, the processing module cancels the backpressure signal and resumes receiving data packets sent by the upstream system side.

[0084] In another embodiment, the processing module can also manage downstream scheduling operations on the buffer side. To ensure the continuity and stability of downstream data reception and avoid data interruptions, the processing module only allows downstream data to be read from the buffer when the amount of data buffered in the buffer reaches a preset scheduling threshold. When the amount of data buffered in the buffer is lower than the preset scheduling threshold, the processing module prohibits downstream data reading until the amount of data buffered in the buffer reaches the preset scheduling threshold again.

[0085] Please refer to Figure 2 As shown, based on the same inventive concept as the aforementioned message processing method, one embodiment of the present invention provides a message processing system 200, including: a determination module 201, a processing module 202, and a scheduling module 203.

[0086] Specifically, the determining module 201 is used to receive messages sent by the system side and determine the data segment to be processed from the unprocessed data of the current message based on the byte order of each message;

[0087] The processing module 202 is used to preprocess one of the data segments to be processed within one clock cycle to generate the corresponding target data segment;

[0088] The scheduling module 203 is used to move the data of the target data segment within the interface bit width range to the buffer to wait for downstream scheduling, and to temporarily store the data of the target data segment exceeding the interface bit width range in the cache.

[0089] Please refer to Figure 3 As shown, embodiments of the present invention also provide an electronic device 300, which includes at least one processor 301, a memory 302 (e.g., non-volatile memory), a main memory 303, and a communication interface 304, and the at least one processor 301, memory 302, main memory 303, and communication interface 304 are connected together via an internal bus 305. The at least one processor 301 is used to invoke at least one program instruction stored or encoded in the memory 302, so that the at least one processor 301 performs various operations and functions of the message processing methods described in the various embodiments of this specification.

[0090] In the embodiments of this specification, the electronic device 300 may include, but is not limited to: personal computer, server computer, workstation, desktop computer, laptop computer, notebook computer, mobile electronic device, smartphone, tablet computer, cellular phone, personal digital assistant (PDA), handheld device, messaging device, wearable electronic device, consumer electronic device, etc.

[0091] This invention also provides a computer-readable medium carrying computer-executable instructions. When executed by a processor, these instructions can be used to implement various operations and functions of the message processing methods described in the various embodiments of this specification.

[0092] The computer-readable medium in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0093] In this invention, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.

[0094] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0095] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus, systems, and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0096] The foregoing description of specific exemplary embodiments of the invention is for illustrative and explanatory purposes. These descriptions are not intended to limit the invention to the precise forms disclosed, and it will be apparent that many changes and variations can be made in accordance with the foregoing teachings. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application, thereby enabling those skilled in the art to implement and utilize various different exemplary embodiments of the invention, as well as various different choices and variations. The scope of the invention is intended to be defined by the claims and their equivalents.

[0097] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0098] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A message processing method, characterized in that, include: The system receives messages from the receiving system and determines the data segment to be processed from the unprocessed data of the current message based on the byte order of each message. Within one clock cycle, a data segment to be processed is preprocessed to generate a corresponding target data segment; Data within the interface bit width range of the target data segment is moved to a buffer to await downstream scheduling, while data exceeding the interface bit width range of the target data segment is temporarily stored in a cache.

2. The message processing method according to claim 1, characterized in that, Preprocessing one of the data segments to be processed includes: If the data segment to be processed contains a message start flag, then a preset preamble is inserted before the start flag; If the data segment to be processed contains a message end marker, then a packet gap is inserted after the message end marker.

3. The message processing method according to claim 2, characterized in that, The method further includes: If the data segment to be processed contains neither a message start flag nor a message end flag, then the data segment to be processed is determined as the target data segment.

4. The message processing method according to claim 1, characterized in that, Data within the interface bit width range of the target data segment is moved to a buffer to await downstream scheduling, and data exceeding the interface bit width range of the target data segment is temporarily stored in a cache, including: Determine the free space size of the buffer and read the remaining temporarily stored data from the cache; If the amount of remaining data is less than the size of the free space, then the remaining data is moved to the buffer, and the data in the target data segment that is within the interface bit width range is moved to the buffer; If the amount of remaining data is greater than or equal to the size of the free space, then an amount of data in the remaining data equal to the size of the free space is moved to the buffer; The data in the target data segment that has not been moved to the buffer is temporarily stored in the cache.

5. The message processing method according to claim 1, characterized in that, The method further includes: When the remaining storage space of the cache is less than or equal to a preset threshold, a backpressure signal is sent to stop receiving messages sent by the system side; and When the remaining storage space of the cache changes from less than or equal to a preset threshold to greater than the preset threshold, the reverse pressure signal is withdrawn, and the reception of messages sent by the system side is resumed.

6. The message processing method according to claim 1, characterized in that, The step of determining the data segment to be processed from the unprocessed data of the current message includes: Determine the maximum data length that can be processed in the current clock cycle and the total length of unprocessed data in the current message; If the total length of the unprocessed data is greater than the maximum data length, then starting from the beginning of the unprocessed data, data with a length equal to the maximum data length is determined as the data segment to be processed; If the total length of the unprocessed data is less than or equal to the maximum data length, then all the data of the unprocessed data is determined as the data segment to be processed.

7. The message processing method according to claim 1, characterized in that, The method further includes: When the amount of data cached in the buffer reaches a preset scheduling threshold, downstream devices are allowed to read data from the buffer. When the amount of data cached in the buffer is lower than the preset scheduling threshold, downstream devices are prohibited from reading data from the buffer.

8. A message processing system, characterized in that, include: The determination module is used to receive messages sent by the system side and determine the data segment to be processed from the unprocessed data of the current message based on the byte order of each message; The processing module is used to preprocess one of the data segments to be processed within one clock cycle to generate the corresponding target data segment; The scheduling module is used to move the data of the target data segment within the interface bit width range to the buffer to wait for downstream scheduling, and to temporarily store the data of the target data segment exceeding the interface bit width range in the cache.

9. An electronic device, characterized in that, include: At least one processor; as well as A memory that stores instructions, which, when executed by the at least one processor, cause the at least one processor to perform the message processing method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the message processing method according to any one of claims 1-7.