Multi-channel data order preserving method, device and equipment based on DPU and storage medium

Through the DPU-based multi-channel data order-preserving method, using sequence-preserving numbers and indicator bit processing, the problem of message out-of-order in complex network processors is solved, efficient reordering and sending of data packets is achieved, and the implementation process is simplified.

CN118631771APending Publication Date: 2024-09-10YUSUR TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410808984.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

In complex network processors, data errors occur due to confusion in the output order during multi-threaded data transmission. Existing technologies solve the message disorder problem by planning storage resources in advance and establishing storage linked lists, but the complexity is high.

Method used

The DPU-based multi-channel data order preserving method is used to obtain the sequence number and data request message, and use the indicator bit to determine whether to send the data packet to ensure the reordering and sending of the data packet.

Benefits of technology

It achieves simple and efficient reordering and sending of messages after they are out of order in complex network processors, reducing implementation complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118631771A
    Figure CN118631771A
Patent Text Reader

Abstract

The embodiment of the invention provides a multi-channel data order preserving method and device based on a DPU, equipment and a storage medium, and the method comprises the steps: obtaining an order preserving number, the order preserving number is associated with a data request message, and the data request message is used for requesting to obtain a first data packet; the first data packet is stored in a first memory, data parameters corresponding to the first data packet are stored in a second memory, and the data parameters comprise indication bits; and judging whether to send the first data packet or not according to the indication of the indication bit. According to the invention, the reordering and sending of the messages can be simply and efficiently realized after the messages are disordered in a complex network processor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of network communication technology, and in particular to a DPU-based multi-channel data order preservation method, device, equipment and storage medium. Background Art

[0002] With the continuous improvement of communication technology, the amount of data has exploded, stimulating the rapid development of storage chips and computer technology. Communication between devices is increasingly tending to develop in the direction of multi-threading, multi-core, and multi-dimensional. In the existing data storage architecture, a multi-threaded approach with multiple inputs and multiple outputs is generally used to solve large traffic transmission, but this solution has inherent defects. When a certain output reads different storage resources in sequence, the return value is out of order, resulting in data errors.

[0003] At present, technical personnel generally plan storage resources in advance and establish storage linked lists to achieve data order preservation. Although this method can solve the problem of message disorder, it is relatively complex in implementation. Summary of the invention

[0004] The embodiment of the present application provides a multi-channel data order preservation method based on DPU, which can solve the problem of message disorder in a complex network processor and simply and efficiently implement the reordering and sending of messages.

[0005] In a first aspect, an embodiment of the present application provides a multi-channel data order preservation method based on a DPU, comprising:

[0006] Obtaining a preservation sequence number, the preservation sequence number being associated with a data request message, the data request message being used to request obtaining a first data packet;

[0007] Storing the first data packet in a first memory, and storing data parameters corresponding to the first data packet in a second memory, wherein the data parameters include an indicator bit;

[0008] Determine whether to send the first data packet according to the indication of the indication bit.

[0009] In a possible implementation, the determining, according to an indication of the indication bit, whether to transmit the first data packet includes:

[0010] When the indication bit indicates 1, obtaining the head and tail addresses of the first data packet, and sending the first data packet stored in the first memory according to the head and tail addresses; or,

[0011] When the indicator bit indicates 0, continue to wait until the indicator bit indicates 1, obtain the head and tail addresses of the first data packet, and send the first data packet stored in the first memory according to the head and tail addresses.

[0012] In a possible implementation, the first memory includes a first storage slice, the first storage slice is used to store data, and after the data on the first storage slice is read, the state of the first storage slice is marked as a writable state.

[0013] In a possible implementation, when the first storage slice is in a state where data cannot be written, back pressure information is sent to a front-level storage space.

[0014] In a possible implementation manner, after reading the first data packet, the parameter storage space corresponding to the first storage slice is refreshed.

[0015] In a second aspect, an embodiment of the present application provides a multi-channel data sequence preservation device based on a DPU, comprising:

[0016] An acquisition module, used for acquiring a preservation sequence number, wherein the preservation sequence number is associated with a data request message, and the data request message is used for requesting to acquire a first data packet;

[0017] A storage module, used to store the first data packet in a first memory, and store data parameters corresponding to the first data packet in a second memory, wherein the data parameters include an indicator bit;

[0018] A sending module is used to determine whether to send the first data packet according to the indication of the indication bit.

[0019] In a possible implementation, the sending module is used to:

[0020] When the indication bit indicates 1, obtaining the head and tail addresses of the first data packet, and sending the first data packet stored in the first memory according to the head and tail addresses; or,

[0021] When the indicator bit indicates 0, continue to wait until the indicator bit indicates 1, obtain the head and tail addresses of the first data packet, and send the first data packet stored in the first memory according to the head and tail addresses.

[0022] In a possible implementation, the first memory includes a first storage slice, the first storage slice is used to store data, and after the data on the first storage slice is read, the state of the first storage slice is marked as a writable state.

[0023] In a possible implementation, when the first storage slice is in a state where data cannot be written, back pressure information is sent to a previous storage space.

[0024] In a possible implementation manner, after reading the first data packet, the parameter storage space corresponding to the first storage slice is refreshed.

[0025] In a third aspect, an embodiment of the present application further provides an electronic device, the electronic device comprising:

[0026] at least one processor;

[0027] and a memory communicatively coupled to the at least one processor;

[0028] Among them, the memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the electronic device to execute a data order preservation method corresponding to any embodiment in the first aspect of the embodiments of the present application.

[0029] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement any data order preservation method as described in the first aspect of the embodiment of the present application.

[0030] In a fifth aspect, the present disclosure further provides a computer program product, which includes computer execution instructions. When the computer execution instructions are executed by a processor, they are used to implement the data order preservation method of any embodiment corresponding to the first aspect of the present disclosure.

[0031] In summary, the method shown in the embodiment of the present application can solve the problem of message disorder in a complex network processor and simply and efficiently implement the reordering and sending of messages. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0034] Figure 1 A schematic diagram of the architecture corresponding to the method of the embodiment of the present application;

[0035] Figure 2 A schematic diagram of a multi-channel data order preservation method based on a DPU is provided for an embodiment of the present application;

[0036] Figure 3 A schematic diagram of a data storage space provided in an embodiment of the present application;

[0037] Figure 4 A schematic diagram of parameter storage provided in an embodiment of the present application;

[0038] Figure 5 An operation flow chart provided for an embodiment of the present application;

[0039] Figure 6 A schematic diagram of a multi-channel data sequence preservation device based on a DPU provided in an embodiment of the present application;

[0040] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.

[0042] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The following will describe the embodiments of the present application in conjunction with the accompanying drawings.

[0043] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0044] In the existing data storage architecture, a multi-threaded approach with multiple inputs and multiple outputs is generally used to solve large-volume transmission. However, this solution has inherent defects. When a certain output reads different storage resources in sequence, the return values ​​are out of order, resulting in data errors.

[0045] At present, technical personnel generally plan storage resources in advance and establish storage linked lists to achieve data order preservation. Although this method can solve the problem of message disorder, it is relatively complex in implementation.

[0046] The embodiment of the present application provides a multi-channel data order preservation method based on DPU, which can solve the problem of message disorder in a complex network processor and simply and efficiently implement the reordering and sending of messages.

[0047] Figure 1 A schematic diagram of the architecture corresponding to the method of the embodiment of the present application is provided. Figure 1 It includes a sequence number generator, a data request module, a data storage manager, a data storage space, a data reading manager, a parameter storage space, a parameter storage manager and a data output module.

[0048] The data request module is used to complete the data request operation, that is, to obtain the data packet by sending a request to the superior storage space.

[0049] The sequence number generator is used to generate the sequence number.

[0050] The data storage manager is used to determine the data request based on the data space, and when there is sufficient data space, send an instruction to the data request module, and the data request module generates a data request based on the instruction.

[0051] The data storage space is used to store the data packets obtained according to the request of the data request module. In the embodiment of the present application, the data storage space can also be referred to as the first memory.

[0052] The parameter storage space is used to store the data parameters corresponding to the data packet and is stored and managed by the parameter storage manager. In the embodiment of the present application, the parameter storage space may also be referred to as a second memory.

[0053] The data reading manager is used to read the data according to the mapping relationship between the storage sequence number and the storage address.

[0054] The data output module outputs and sends data packets after completing data reading.

[0055] Understandably, Figure 1 The described architecture may be developed based on the existing modules of the DPU, or may be a newly developed and expanded module or peripheral module based on the architecture of the DPU, and the embodiments of the present application do not limit this.

[0056] Figure 2 A schematic diagram of a multi-channel data order preservation method based on a DPU is provided for an embodiment of the present application. Figure 2 The method comprises step S201, step S202 and step S203. Each step is described in detail as follows.

[0057] Step S201: Obtain a preservation sequence number, where the preservation sequence number is associated with a data request message, and the data request message is used to request to obtain a first data packet.

[0058] In the embodiment of the present application, the message sequence number is generated cyclically in sequence by the message sequence number generator, the data request module completes the mapping operation between the message sequence number and the data request message, and applies for the first data packet to the external processor.

[0059] In the embodiment of the present application, before the protection sequence number is generated, the embodiment of the present application further includes: completing the power-on initialization of the entire system module and completing the initialization of each storage space, wherein the storage space includes a first storage and a second storage.

[0060] Step S202: store the first data packet in a first memory, and store data parameters corresponding to the first data packet in a second memory, wherein the data parameters include an indicator bit.

[0061] In the embodiment of the present application, after receiving the data request message, the external processor sends the first data packet. After receiving the first data packet, the module stores the first data packet in the first memory. The data parameters corresponding to the first data packet are stored in the second memory.

[0062] It can be understood that in the embodiment of the present application, the first memory is a data storage space, and the second memory is a parameter storage space. Figure 3 and Figure 4 , the data storage space and parameter storage space are explained in detail.

[0063] Figure 3 A schematic diagram of a data storage space provided in an embodiment of the present application. Figure 3 In the , it is proposed to store data in slices, that is, to divide the entire storage space into N storage slices. By dividing the data storage space into multiple data storage slices, the space utilization efficiency can be improved and the data can be prevented from being cyclically overwritten during the data storage process.

[0064] Combine as follows Figure 3 This paper introduces the functions and implementation methods of data storage space.

[0065] (1) The data storage space is divided into N storage slices. The embodiment of the present application takes N=8 as an example for illustrative description.

[0066] (2) At power-on initial state, all spaces are writable.

[0067] (3) The write data address manager writes the first data packet from storage chip 1 to storage chip 8 in sequence.

[0068] (4) During the data writing process, the read data address manager is also outputting data. When the read data manager has completely read the data in a certain storage chip, it marks it as 1, which means it is in a writable state. Otherwise, it marks it as 0, which means it is not in a writable state.

[0069] (5) When the write data address manager encounters a non-writable storage slice, assuming that the status mark 1 and the status mark 2 are in a non-writable state, the write data address manager applies back pressure to the previous data of the storage slice corresponding to the status mark 1 and the status mark 2, that is, the external processor, that is, the source of the data, until it is writable, and then continues to write. In this way, it can prevent new data from overwriting the original data.

[0070] Figure 4 A schematic diagram of parameter storage provided in an embodiment of the present application. Figure 4 In the example, RAM is used to store data packet parameters, where the memory address is the packet sequence number, and the stored data is the first and last addresses of the data storage space corresponding to the data packet. The parameter storage space (second memory) completes parameter regularization and recording according to the sequence number. The data packet parameters are obtained from the parameter memory in sequence, and the data packet is obtained from the storage space according to the parameters, which is easy to operate. Exemplarily, the recorded information includes a valid indication of the storage address, and the first and last addresses of the data packet storage.

[0071] Combine as follows Figure 4 , the function and implementation method of parameter storage space are explained in detail. Including:

[0072] (1) When the first data packet is returned from the external processor, it is written into the data storage space (first memory) in sequence. At this time, the storage head and tail addresses of the data packet are recorded and written into the parameter storage space (second memory). The write address is the report sequence number; and the storage address valid indication is set to 1.

[0073] (2) The output module obtains data from the storage space in sequence, that is, it first obtains the address from the parameter space, and then obtains data from the data storage space. First, it reads data from address 0 (sequence number 0). When the storage address valid indication in the read data is 1, it means that the current data packet has met the output conditions and the data output is completed. At the same time, after the data output is completed, the storage address valid indication is set to 0; when the storage address valid indication in the read data is 0, it means that the data packet has not returned yet, indicating that the current data packet does not meet the output conditions, and continues to wait until the storage address valid indication is 1.

[0074] (3) After the output of the previous packet of data is completed, the address is incremented by 1, that is, the sequence number is changed from 0 to 1, and step (2) is repeated to obtain the stored data.

[0075] Step S203: Determine whether to send the first data packet according to the indication of the indicator bit.

[0076] In a possible implementation, the determining, according to an indication of the indication bit, whether to transmit the first data packet includes:

[0077] When the indication bit indicates 1, obtaining the head and tail addresses of the first data packet, and sending the first data packet stored in the first memory according to the head and tail addresses; or,

[0078] When the indicator bit indicates 0, continue to wait until the indicator bit indicates 1, obtain the head and tail addresses of the first data packet, and send the first data packet stored in the first memory according to the head and tail addresses.

[0079] In a possible implementation, the first memory includes a first storage slice, the first storage slice is used to store data, and after the data on the first storage slice is read, the state of the first storage slice is marked as a writable state.

[0080] In a possible implementation, when the first storage slice is in a state where data cannot be written, back pressure information is sent to a front-level storage space.

[0081] In a possible implementation manner, after reading the first data packet, the parameter storage space corresponding to the first storage slice is refreshed.

[0082] Figure 5 The operation flow chart provided for the embodiment of the present application is as follows: Figure 5 In this paper, the system is explained by taking the message sequence number generation, parameter management, data acquisition, and data output of a frame of data message as an example:

[0083] (1) Power-on initial state, complete the initialization of parameter storage space.

[0084] (2) The report sequence number generator generates the report sequence numbers in a cyclic manner;

[0085] (3) The data request module completes the mapping operation between the report sequence number and the data request, and applies for a data packet from the previous module;

[0086] (4) The external processor returns the data packet, and the data storage space completes the data storage;

[0087] (5) The parameter memory completes parameter regularization and recording according to the returned report sequence number; the recorded information includes a valid indication of the storage address, and the first and last addresses of the data packet storage;

[0088] (6) The data read manager sequentially obtains data packet parameters from the parameter storage space. First, it determines whether the storage address valid indication is 1. If it is 1, it obtains the head and tail addresses, obtains the corresponding data from the data storage space, and sets the storage address valid indication to 0 after completing the data packet output; otherwise, it continues to wait until the storage address valid indication is 1.

[0089] (7) At the same time, determine whether the current storage slice has completely completed the output. If the output is complete, mark the data storage space status as 1, otherwise it is 0;

[0090] (8) When the data storage module stores data, it first determines whether the current storage slice is available. If it is not available, it back-pressures the upstream link.

[0091] In summary, according to the method shown in the embodiment of the present application, it is possible to simply and efficiently implement the reordering and sending of messages after message disorder occurs in a complex network processor.

[0092] Figure 6 A multi-channel data sequence preservation device based on DPU is provided for an embodiment of the present application, including:

[0093] An acquisition module 601 is used to acquire a preservation sequence number, where the preservation sequence number is associated with a data request message, where the data request message is used to request to acquire a first data packet;

[0094] A storage module 602, configured to store the first data packet in a first memory, and store data parameters corresponding to the first data packet in a second memory, wherein the data parameters include an indicator bit;

[0095] The sending module 603 is used to determine whether to send the first data packet according to the indication of the indicator bit.

[0096] In a possible implementation, the sending module 603 is configured to:

[0097] When the indication bit indicates 1, obtaining the head and tail addresses of the first data packet, and sending the first data packet stored in the first memory according to the head and tail addresses; or,

[0098] When the indicator bit indicates 0, continue to wait until the indicator bit indicates 1, obtain the head and tail addresses of the first data packet, and send the first data packet stored in the first memory according to the head and tail addresses.

[0099] In a possible implementation, the first memory includes a first storage slice, the first storage slice is used to store data, and after the data on the first storage slice is read, the state of the first storage slice is marked as a writable state.

[0100] In a possible implementation, when the first storage slice is in a state where data cannot be written, back pressure information is sent to a previous storage space.

[0101] In a possible implementation manner, after reading the first data packet, the parameter storage space corresponding to the first storage slice is refreshed.

[0102] In a possible implementation, the device is used to implement the following Figures 2 to 5 The method of any corresponding embodiment.

[0103] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the electronic device 700 includes: a memory 710 and a processor 720 .

[0104] The memory 710 stores a computer program that can be executed by at least one processor 720. The computer program is executed by at least one processor 720 to enable the electronic device to implement the method provided in any of the above embodiments.

[0105] The memory 710 and the processor 720 may be connected via a bus 730 .

[0106] The relevant instructions can be understood by referring to the relevant descriptions and effects corresponding to the method embodiments, which will not be repeated here.

[0107] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the following Figures 2 to 5 The method of any corresponding embodiment.

[0108] Among them, the computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

[0109] An embodiment of the present application provides a computer program product, which includes computer-executable instructions, which are used to implement the following when the computer-executable instructions are executed by a processor: Figures 2 to 5 The method of any corresponding embodiment.

[0110] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0111] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the disclosure disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope of the present application is indicated by the claims.

[0112] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.

Claims

1. A multi-channel data order preservation method based on DPU, It is characterized in that include: Obtaining a preservation sequence number, the preservation sequence number being associated with a data request message, the data request message being used to request obtaining a first data packet; Storing the first data packet in a first memory, and storing data parameters corresponding to the first data packet in a second memory, wherein the data parameters include an indicator bit; Determine whether to send the first data packet according to the indication of the indication bit.

2. The method according to claim 1, It is characterized in that The step of determining whether to transmit the first data packet according to the indication of the indication bit comprises: When the indication bit indicates 1, obtaining the head and tail addresses of the first data packet, and sending the first data packet stored in the first memory according to the head and tail addresses; or, When the indicator bit indicates 0, continue to wait until the indicator bit indicates 1, obtain the head and tail addresses of the first data packet, and send the first data packet stored in the first memory according to the head and tail addresses.

3. The method according to claim 1 or 2, It is characterized in that The first memory includes a first storage chip, and the first storage chip is used to store data. After the data on the first storage chip is read, the state of the first storage chip is marked as a writable state.

4. The method according to claim 3, It is characterized in that When the first storage slice is in a state where data cannot be written, back pressure information is sent to the front-level storage space.

5. The method according to claim 3 or 4, It is characterized in that After reading the first data packet, the parameter storage space corresponding to the first storage slice is refreshed.

6. A multi-channel data sequence preservation device based on DPU, It is characterized in that include: An acquisition module, used for acquiring a preservation sequence number, wherein the preservation sequence number is associated with a data request message, and the data request message is used for requesting to acquire a first data packet; A storage module, used to store the first data packet in a first memory, and store data parameters corresponding to the first data packet in a second memory, wherein the data parameters include an indicator bit; A sending module is used to determine whether to send the first data packet according to the indication of the indication bit.

7. An electronic device, It is characterized in that include: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the electronic device to perform the method as claimed in any one of claims 1 to 5.

8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 5 when executed by a processor.

9. A computer program product comprising computer executable instructions, It is characterized in that The computer-executable instructions are used to implement the method according to any one of claims 1 to 5 when executed by a processor.

Citation Information

Cited By

  • DPU-based message order-preserving transmission method and device, and network processor

    CN120166081A