Data packet encoding method, data packet decoding method and device

By encoding and decoding the data packet body in parallel on the many-core chip, the problem of low cross-slice packet encoding and decoding efficiency in the existing technology is solved, the overall encoding efficiency of the data packet is improved, and the computing performance of the many-core chip is improved. .

CN113965294BActive Publication Date: 2024-10-01LYNXI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111235041.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-22
Publication Date
2024-10-01
Estimated Expiration
2041-10-22

AI Technical Summary

Technical Problem

The encoding, decoding and error correction efficiency of cross-slice packets in the existing technology is too low, affecting the computing performance of many-core chips.

Method used

A data packet encoding method and a data packet decoding method are provided. The computing core is used to perform error correction encoding and decoding on the packet body of the data packet in parallel. The data packet encoding device and the decoding device only encode and decode the packet header, avoiding the need for the packet header and the packet. The encoding and decoding of entities are queued to improve the overall encoding and decoding efficiency.

Benefits of technology

Through parallel encoding and decoding, the encoding efficiency of data packets is improved, and the computing performance of many-core chips is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113965294B_ABST
    Figure CN113965294B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data packet encoding method, which includes: receiving a first data packet sent by a computing core on a current many-core chip, the first data packet being a data packet obtained after the computing core encodes the body of an original data packet in a first encoding manner; and encoding a header of the first data packet in a second error correction encoding manner to obtain a second data packet.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a data packet encoding method, a data packet decoding method, a data packet encoding device, a data packet decoding device, a multi-core chip, an electronic device, and a computer-readable medium. Background Art

[0002] There are two forms of data packet transmission in many-core chips. One is that data packets are transmitted between multiple computing cores contained in the many-core chip itself. This type of data packet can usually be called a local packet. The other is that data packets are transmitted between multiple cascaded many-core chips. This type of data packet can usually be called a cross-chip packet. For the transmission of cross-chip packets, in order to avoid transmission errors, the cross-chip packets need to be encoded before being transmitted. The encoding sets redundant bits (error correction codes) in the data packets so that the receiver can correct the transmission errors that may exist in the data packets according to the error correction codes. In the related art, the encoding, decoding and error correction efficiency of cross-chip packets is too low, which affects the computing performance of many-core chips. Summary of the invention

[0003] The present disclosure provides a data packet encoding method, a data packet decoding method, a data packet encoding device, a data packet decoding device, a multi-core chip, an electronic device, and a computer-readable medium.

[0004] In a first aspect, the present disclosure provides a data packet encoding method, the data packet encoding method comprising:

[0005] Receive at least one first data packet sent by at least one computing core on the current many-core chip, where each of the first data packets is a data packet obtained by encoding a packet body of a corresponding original data packet by the corresponding computing core in a first encoding manner;

[0006] The header of each of the first data packets is respectively encoded in a second encoding manner to obtain at least one second data packet.

[0007] In a second aspect, the present disclosure provides a data packet decoding method, comprising:

[0008] Performing header decoding and error correction on the header of each of the received at least one data packet to be decoded in a preset second decoding mode to obtain address information corresponding to each of the data packets to be decoded; the address information includes: a destination computing core address;

[0009] According to the destination computing core address, the corresponding data packet to be decoded is sent to the destination computing core corresponding to the destination computing core address, so that the destination computing core can decode and correct the packet body of the data packet to be decoded in a preset first decoding method to obtain the original data to be transmitted.

[0010] In a third aspect, the present disclosure provides a data packet encoding device, comprising:

[0011] A first receiving module is used to receive at least one first data packet sent by at least one computing core on the current many-core chip, where each first data packet is obtained by encoding the body of the corresponding original data packet by the corresponding computing core in a first encoding manner;

[0012] The encoding module is used to encode the header of each of the first data packets in a second encoding manner to obtain at least one second data packet.

[0013] In a fourth aspect, the present disclosure further provides a data packet decoding device, comprising:

[0014] A second receiving module, configured to receive at least one data packet to be decoded sent by other many-core chips;

[0015] A decoding module, configured to perform header decoding and error correction on a header of each of the received at least one data packet to be decoded in a preset second decoding mode, so as to obtain address information corresponding to each of the data packets to be decoded; the address information includes: a destination computing core address;

[0016] A sending module is used to send the corresponding data packet to be decoded to the destination computing core corresponding to the destination computing core address according to the destination computing core address, so that the destination computing core can decode and correct the packet body of the data packet to be decoded in a preset first decoding method to obtain the original data to be transmitted.

[0017] In a fifth aspect, the present disclosure further provides a many-core chip, comprising: a plurality of computing cores, a data packet encoding device, and a data packet decoding device;

[0018] The computing core is used to encode the body of the original data packet in a first encoding manner to obtain a first data packet, and send the first data packet to the data packet encoding device; and to decode and correct errors in the body of the data packet to be decoded sent by the data packet decoding device in a preset first decoding manner to obtain the original data to be transmitted.

[0019] The data packet encoding device includes the data packet encoding device provided in the third aspect of the present disclosure, and the data packet decoding device includes the data packet decoding device provided in the fourth aspect of the present disclosure.

[0020] In a sixth aspect, the present disclosure provides an electronic device, comprising: a plurality of processing cores; and an on-chip network configured to exchange data between the plurality of processing cores and external data; wherein one or more instructions are stored in one or more of the processing cores, and one or more of the instructions are executed by one or more of the processing cores, so that one or more of the processing cores can execute the above-mentioned data packet encoding method, or execute the above-mentioned data packet decoding method.

[0021] In a seventh aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, wherein the computer program implements the above-mentioned data packet encoding method, or implements the above-mentioned data packet decoding method when executed by a processing core.

[0022] The data packet encoding method, data packet decoding method, data packet encoding device, data packet decoding device, many-core chip, electronic device and computer-readable medium provided by the present disclosure utilize computing cores to perform error correction encoding and decoding on the packet body of a data packet transmitted across chips, while the data packet encoding device and data packet decoding device of the many-core chip only encode and decode the packet header of the data packet. Compared with the prior art, this avoids the queuing of data packets in the data packet encoding device and data packet decoding device to encode and decode the packet header and packet body. The present disclosure improves the overall encoding and decoding efficiency of the data packet by utilizing each computing core to encode and decode the packet body of each corresponding data packet in parallel, thereby improving the computing performance of the many-core chip.

[0023] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings, in which:

[0025] Figure 1 A flowchart of a data packet encoding method provided by an embodiment of the present disclosure;

[0026] Figure 2 A flowchart of another data packet encoding method provided by an embodiment of the present disclosure;

[0027] Figure 3 This is a flowchart of a specific implementation of step S103 in the embodiment of the present disclosure;

[0028] Figure 4is a flowchart of another specific implementation of step S103 in the embodiment of the present disclosure;

[0029] Figure 5 A flowchart of another data packet encoding method provided by an embodiment of the present disclosure;

[0030] Figure 6 A flowchart of a data packet decoding method provided by an embodiment of the present disclosure;

[0031] Figure 7 A flowchart of another data packet decoding method provided by an embodiment of the present disclosure;

[0032] Figure 8 A flowchart of another data packet decoding method provided by an embodiment of the present disclosure;

[0033] Fig. 9 A block diagram of a data packet encoding device provided in an embodiment of the present disclosure;

[0034] Fig.10 A block diagram of a data packet decoding device provided in an embodiment of the present disclosure;

[0035] Fig.11 A block diagram of a multi-core chip provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0036] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0037] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0038] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0039] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "including" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0040] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.

[0041] In the related art, the encoding and decoding of each cross-chip packet is uniformly performed by the encoding module and decoding module preset in the chip, that is, each computing core of the source chip sends the cross-chip packet to the encoding module of the source chip for uniform encoding. After receiving the encoded cross-chip packets, the destination chip centrally decodes and corrects the cross-chip packets in the decoding module, and then sends the decoded and corrected data packets to its corresponding computing core. This data packet encoding and decoding method results in too low efficiency in encoding, decoding and error correction of data packets, which in turn affects the computing performance of the multi-core chip.

[0042] The data packet encoding method and data packet decoding method provided by the present invention can be implemented based on a data packet encoding device and a data packet decoding device respectively. The data packet encoding device and the data packet decoding device can be arranged in a multi-core chip and are independent of each computing core in the multi-core chip.

[0043] The data packet encoding method and data packet decoding method provided by the embodiments of the present disclosure are described below respectively.

[0044] Figure 1 A flowchart of a data packet encoding method provided in an embodiment of the present disclosure.

[0045] Reference Figure 1 The present disclosure provides a data packet encoding method, the data packet encoding method comprising:

[0046] Step S101, receiving at least one first data packet sent by at least one computing core on the current many-core chip, each of the first data packets being a data packet obtained by encoding the body of a corresponding original data packet by a corresponding computing core in a first encoding manner.

[0047] After the computing core in the current many-core chip generates computing data, when the computing data needs to be transmitted across chips, the computing core generates an original data packet based on the computing data. The original data packet includes a packet header and a packet body. The packet header includes at least address information, and in some embodiments may also include information such as the length of the data to be transmitted, and the packet body includes at least the data to be transmitted.

[0048] After generating the original data packet, the computing core encodes the packet body of the original data packet in a first encoding manner to obtain a first data packet.

[0049] Specifically, in the embodiments of the present disclosure, error correction coding is used to encode the data packet (including packet body encoding and subsequent header encoding). The error correction coding generates redundant bits (error correction code) using the original data based on a preset encoding rule, and adds the error correction code to the original data. After receiving the encoded data, the receiver uses the error correction code and verifies the encoded data based on the corresponding encoding rule. If it is verified that there is a transmission error in the data, the data is corrected based on the encoding rule to restore the original data.

[0050] Preferably, in the embodiment of the present disclosure, in the process of error correction encoding the packet header and the packet body, the number of bits of the error correction code can be set based on the channel quality. Specifically, when the channel quality is high, fewer transmission errors may occur in the data packets to be transmitted. In this case, an error correction code with fewer bits can be set, and the error correction code with fewer bits is sufficient to complete error correction; and when the channel quality is poor, more transmission errors may occur in the data packets to be transmitted. In this case, an error correction code with more bits can be set to correct more transmission errors that may occur.

[0051] The first data packet is a data packet obtained by encoding the packet body of the original data packet. Therefore, the information contained in the packet header of the first data packet is the same as the information contained in the packet header of the original data packet, and the packet body of the first data packet includes: data to be transmitted and a first error correction code, and the first error correction code is obtained by the computing core after encoding the data to be transmitted in a first encoding method.

[0052] In addition, it should be noted that, since each computing core in the many-core chip can process data in parallel, in the embodiment of the present disclosure, at the same time, multiple computing cores in the current many-core chip can perform packet body encoding on the original data packets generated by each of them in parallel to generate multiple first data packets. In step S101, at least one first data packet sent by one or more computing cores on the current many-core chip can be received.

[0053] Step S102: encode the header of each first data packet in a second encoding manner to obtain at least one second data packet.

[0054] After receiving at least one first data packet, the data packet encoding device encodes the header of each first data packet in a second encoding manner to obtain at least one second data packet. At this time, the header of the second data packet includes: address information and a second error correction code, and the second error correction code is obtained by the data packet encoding device encoding the information contained in the header in the second encoding manner; the body of the second data packet includes: a data packet to be transmitted and a first error correction code.

[0055] It should be noted that in the embodiments of the present disclosure, the first encoding method and the second encoding method are not limitative descriptions of the present disclosure, but are merely descriptive words set for the convenience of description. In actual applications, the first encoding method may be the same as or different from the second encoding method.

[0056] The data packet encoding method provided in the embodiment of the present disclosure utilizes computing cores to perform error correction encoding on the packet body of a data packet transmitted across chips, while the data packet encoding device of the many-core chip only encodes the packet header of the data packet. Compared with the prior art, this avoids the queuing of data packets to encode the packet header and packet body in the data packet encoding device. The present disclosure improves the coding efficiency of the data packet by utilizing each computing core to encode the packet body of each corresponding data packet in parallel, thereby improving the computing performance of the many-core chip.

[0057] Based on the above embodiments, in practical applications, since the information contained in the packet body (data to be transmitted) is usually more complex than the information contained in the packet header (address information and data length), preferably, the first encoding method used in the packet body encoding has a higher complexity than the second encoding method used in the packet header encoding. Specifically, in some embodiments, the first encoding method includes a complex super-redundant encoding method, and the second encoding method adopts a simple and efficient encoding method, such as a PCIe encoding method. By making the first encoding method corresponding to the packet body encoding have a higher complexity, the error correction capability of the data to be transmitted is made stronger, thereby ensuring the transmission accuracy of the data to be transmitted; at the same time, by making the second encoding method corresponding to the packet header encoding simple and efficient, the rate at which the data packet encoding device performs header encoding on each received first data packet is increased, thereby further improving the overall encoding efficiency of the data packet.

[0058] Figure 2 A flowchart of another data packet encoding method provided by an embodiment of the present disclosure.

[0059] Reference Figure 2 In addition to steps S101 and S102 in the above embodiments, the embodiment of the present disclosure also includes step S103. Only step S103 will be described below.

[0060] Step S103: Send each second data packet to the corresponding next many-core chip according to the address information.

[0061] In the disclosed embodiment, after step S102, that is, the data packet encoding device encodes the header of the first data packet in a second encoding manner, and after obtaining the second data packet, the data packet encoding device sends the second data packet to the next many-core chip according to the address information in the header to realize the transmission of the data packet.

[0062] In practical applications, the data packets that need to be transmitted across chips can be transmitted directly or through transit. The direct transmission method means that the data packets that need to be transmitted across chips are directly transmitted from the source many-core chip to the destination many-core chip, and the transit transmission method means that the data packets that need to be transmitted across chips are sent from the source many-core chip and then forwarded by one or more levels of transit chips before reaching the destination many-core chip.

[0063] Specifically, when the data packet is transmitted directly, the next many-core chip is the destination many-core chip. At this time, the address information includes the destination many-core chip address and the destination computing core address. Step S103 may specifically include: the data packet encoding device transmits the second data packet to the many-core chip corresponding to the destination many-core chip address according to the destination many-core chip address.

[0064] When the data packet is transmitted by transit, the next many-core chip is the transit chip, and the transmission of the second data packet between the source many-core chip and the destination many-core chip requires a pre-determined routing address. At this time, step S103 can be implemented based on two different methods.

[0065] As a feasible implementation method, the determination of the routing address can be achieved by static planning. Specifically, in this embodiment, the address information also includes: routing information, which includes information about each transit chip that the second data packet must pass through when transmitting from the source many-core chip to the destination many-core chip (such as chip address, chip location, etc.). Figure 3 This is a flowchart of a specific implementation of step S103 in the embodiment of the present disclosure, referring to Figure 3 , at this time step S103 specifically includes:

[0066] Step S31a: for each second data packet, determine the target address corresponding to the next many-core chip corresponding to the second data packet according to the routing information.

[0067] Step S32a: according to the target address, send the second data packet to the next many-core chip corresponding to the second data packet.

[0068] In the disclosed embodiment, the data packet encoding device determines the target address corresponding to the next many-core chip to which the second data packet is about to flow from the current source many-core chip by reading the routing information in the header of each second data packet, and then transmits the second data packet to the corresponding next many-core chip according to the target address.

[0069] As another feasible implementation, the determination of the routing address may be implemented in a dynamic decision-making manner. Specifically, in this embodiment, the address information includes: a destination address; the destination address refers to an address corresponding to the destination many-core chip. Figure 3 FIG. 1 is a flowchart of another specific implementation of step S103 in the embodiment of the present disclosure. Figure 4 , at this time step S103 specifically includes:

[0070] Step S31b: for each second data packet, according to the destination address, based on a preset path determination algorithm, calculate the target address of the next many-core chip corresponding to the second data packet.

[0071] Step S32b: according to the target address, send the second data packet to the next many-core chip corresponding to the second data packet.

[0072] In the embodiment of the present disclosure, the data packet encoding device can determine the next many-core chip based on a preset path determination algorithm. Specifically, the preset path determination algorithm can be calculated based on indicators such as the computing power and communication volume of each many-core chip, and the currently relatively idle many-core chip is determined as the transfer chip. The embodiment of the present disclosure does not specifically limit the path determination algorithm, and all path determination algorithms that can determine the next many-core chip to transfer the second data packet belong to the protection scope of the present disclosure.

[0073] Figure 5 A flowchart of another data packet encoding method provided by an embodiment of the present disclosure.

[0074] Reference Figure 5 In addition to steps S101 to S103 in the above embodiments, the embodiment of the present disclosure also includes steps S1 and S2. Only steps S1 and S2 are described below.

[0075] In the embodiment of the present disclosure, before step S103, the following steps are also included:

[0076] Step S1, cache the second data packet corresponding to each computing core.

[0077] Step S2: Detect whether the number of cached second data packets reaches a preset threshold.

[0078] In the disclosed embodiment, in order to further reduce the communication overhead of the many-core chip, the generated second data packet may be cached first and then transmitted.

[0079] Specifically, after the first data packet generated by each computing core of the many-core chip is encoded in the data packet encoding device to generate the second data packet, the data packet encoding device does not transmit the second data packet for the time being, but temporarily stores it. Then, the data packet encoding device can detect whether the number of cached second data packets reaches a preset threshold at a preset time interval. When it is detected that the number of cached second data packets reaches the preset threshold, it means that the data packet encoding device has met the conditions for transmitting the data packet, and step S103 is executed at this time; when it is detected that the number of cached second data packets does not reach the preset threshold, it returns to execute step S101 to continue receiving the first data packet.

[0080] It should be noted that, in the embodiment of the present disclosure, step S103 specifically includes: sending each cached second data packet to the corresponding next many-core chip according to the address information.

[0081] Specifically, the next many-core chips corresponding to the cached multiple second data packets may be completely different or partially different. Therefore, when sending the cached multiple second data packets, the next many-core chip corresponding to the second data packet can be determined according to the header information of each second data packet.

[0082] The disclosed embodiment reduces the communication overhead of the many-core chip and further improves the communication performance of the many-core chip by first caching the second data packets corresponding to each computing core in the many-core chip and then transmitting them after a certain number of second data packets are cached.

[0083] Figure 6 A flowchart of a data packet decoding method provided in an embodiment of the present disclosure.

[0084] Reference Figure 6 The present disclosure provides a data packet decoding method, comprising:

[0085] Step S201: decoding and correcting the header of each of the at least one received data packet to be decoded in a preset second decoding mode to obtain address information corresponding to each data packet to be decoded, wherein the address information includes: a destination computing core address.

[0086] Corresponding to the data packet encoding method in the above-mentioned embodiment, in the embodiment of the present disclosure, the data packet to be decoded corresponds to the second data packet in the above-mentioned embodiment, that is, the data packet obtained after encoding both the header and the body of the original data packet; the preset second decoding method corresponds to the second encoding method in the above-mentioned embodiment, that is, the second decoding method and the second encoding method have the same encoding rules.

[0087] Specifically, after receiving the second data packet, an error correction code (corresponding to the second error correction code in the above embodiment) is extracted from the header of the second data packet, and the error correction code is used to verify and correct the header information based on the second decoding method agreed upon with the source many-core chip (the many-core chip that sent the second data packet) to obtain the correct address information, which includes the address of the destination computing core.

[0088] Step S202: according to the destination computing core address, the corresponding data packet to be decoded is sent to the destination computing core corresponding to the destination computing core address, so that the destination computing core can decode and correct the packet body of the data packet to be decoded in a preset first decoding mode to obtain the original data to be transmitted.

[0089] Similarly, the preset first decoding method corresponds to the first encoding method in the above embodiment. Specifically, after receiving the data packet to be decoded, the destination computing core extracts the error correction code (corresponding to the first error correction code in the above embodiment) from the packet body of the data packet to be decoded, and uses the error correction code to verify and correct the packet body based on the first decoding method agreed with the source multi-core chip (the multi-core chip that sends the second data packet) to obtain the original data to be transmitted.

[0090] The data packet decoding method provided by the embodiment of the present disclosure utilizes the computing core to perform error correction decoding on the packet body of the data packet transmitted across chips, while the data packet decoding device of the multi-core chip only decodes the packet header of the data packet, thereby avoiding the data packets being queued up in the data packet decoding device to perform decoding on the packet header and the packet body. The present disclosure improves the coding efficiency of the data packet by utilizing each computing core to decode the packet body of each corresponding data packet in parallel, thereby improving the computing performance of the multi-core chip.

[0091] In practical applications, in addition to being sent directly from the source many-core chip to the destination many-core chip, the second data packet may also be forwarded by multiple levels of forwarding chips to reach the destination many-core chip. Figure 7 A flowchart of another data packet decoding method provided by an embodiment of the present disclosure. In this embodiment, the second data packet may need to be forwarded by one or more forwarding chips before reaching the destination multi-core chip. Figure 7 In the embodiment of the present disclosure, the address information also includes: the target multi-core chip address. Before step S202, it also includes:

[0092] Step S201 ′: determine whether the address of the own many-core chip is the same as the address of the target many-core chip.

[0093] Specifically, when it is determined that the address of its own many-core chip is the same as the address of the destination many-core chip, step S202 is executed to send the second data packet directly to the destination computing core in the destination many-core chip; and when it is determined that the address of its own many-core chip is different from the address of the destination many-core chip, it is determined that itself is a forwarding chip, and at this time it is necessary to further determine the next many-core chip to which the second data packet is to be sent in the next hop.

[0094] Continue to refer to Figure 7 In a possible implementation manner, the data packet decoding device may determine the next hop node of the second data packet, that is, the next many-core chip, based on a dynamic decision-making method. Specifically, in this implementation manner, the step of determining the next many-core chip to which the second data packet is to be sent includes:

[0095] Step S203a: According to the address of the target many-core chip, a target address corresponding to the next many-core chip is calculated based on a preset path determination algorithm.

[0096] Step S204a: according to the target address, send the corresponding data packet to be decoded to the determined next many-core chip.

[0097] In this embodiment, the data packet decoding device can determine the next many-core chip based on a preset path determination algorithm. Specifically, the preset path determination algorithm can be calculated based on indicators such as the computing power and communication volume of each many-core chip, and the currently relatively idle many-core chip is determined as the transit chip. The embodiment of the present disclosure does not make specific limitations on the path determination algorithm. All path determination algorithms that can determine the next many-core chip to transit the second data packet belong to the protection scope of the present disclosure.

[0098] Figure 8 A flowchart of another data packet decoding method provided by an embodiment of the present disclosure. Figure 8 In another possible implementation, the data packet decoding device may determine the next many-core chip to which the second data packet is to be sent based on a static planning method. Specifically, in this embodiment, the address information also includes: routing information, which includes information about each transfer chip that the second data packet must pass through when it is transmitted from the source many-core chip to the destination many-core chip (such as chip address, chip position, etc.). In this implementation, the step of determining the next many-core chip to which the second data packet is to be sent includes:

[0099] Step S203b: Determine the target address corresponding to the next many-core chip according to the routing information.

[0100] Step S204b: according to the target address, send the corresponding data packet to be decoded to the determined next many-core chip.

[0101] In this embodiment, the data packet decoding device determines the target address corresponding to the next many-core chip to which the second data packet will flow from the current source many-core chip by reading the routing information in the header of the second data packet, and then transmits the second data packet according to the target address.

[0102] In the above step S202, when it is determined that the address of the own many-core chip is different from the address of the target many-core chip, steps S203a to S204a are executed, or steps S203b to S204b are executed.

[0103] Fig. 9 A block diagram of a data packet encoding device provided in an embodiment of the present disclosure.

[0104] Reference Fig. 9The data packet encoding device provided by the embodiment of the present disclosure includes: a first receiving module 11 and an encoding module 12; wherein the first receiving module 11 is used to receive at least one first data packet sent by at least one computing core on the current many-core chip, and each of the first data packets is obtained by the corresponding computing core encoding the packet body of the corresponding original data packet in a first encoding manner; the encoding module 12 is used to encode the packet header of each first data packet in a second encoding manner to obtain at least one second data packet.

[0105] The data packet encoding device provided in the embodiment of the present disclosure is used to implement the data packet encoding method provided in the above embodiment of the present disclosure. For the specific functional modules included in the data packet encoding device and the interaction between the functional modules, please refer to the description of the method steps corresponding to the above data packet encoding method, which will not be repeated here.

[0106] Fig.10 A block diagram of another data packet decoding device provided in an embodiment of the present disclosure.

[0107] Reference Fig.10 , the data packet decoding device includes: a second receiving module 21, a decoding module 22 and a sending module 23. Among them, the second receiving module 21 is used to receive at least one data packet to be decoded sent by other multi-core chips; the decoding module 22 is used to decode and correct the header of each data packet to be decoded in the at least one received data packet to be decoded in a preset second decoding mode, so as to obtain the address information corresponding to each data packet to be decoded; the address information includes: the destination computing core address; the sending module 23 is used to send the corresponding data packet to be decoded to the destination computing core corresponding to the destination computing core address according to the destination computing core address, so that the destination computing core can decode and correct the packet body of the data packet to be decoded in a preset first decoding mode to obtain the original data to be transmitted.

[0108] The data packet decoding device provided in the embodiment of the present disclosure is used to implement the data packet decoding method provided in the above embodiment of the present disclosure. For the specific functional modules included in the data packet decoding device and the interaction between the functional modules, please refer to the description of the method steps corresponding to the above data packet decoding method, which will not be repeated here.

[0109] It should be noted that, in practical applications, the data packet encoding device and the data packet decoding device can be integrated into one to form a data transmission device, and the data transmission device can have both a data packet encoding function and a data packet decoding function. Fig. 9 The data packet encoding device and Fig.10 The data transmission device composed of the data packet decoding device shown also belongs to the protection scope of the present disclosure.

[0110] Fig.11A block diagram of a multi-core chip provided in an embodiment of the present disclosure.

[0111] Reference Fig.11 The multi-core chip provided by the embodiment of the present disclosure includes: a plurality of computing cores 1, a data packet encoding device 2 and a data packet decoding device 3; the computing core 1 is used to encode the body of the original data packet in a first encoding mode to obtain a first data packet, and send the first data packet to the data packet encoding device 2; and is used to decode and correct the body of the data packet to be decoded sent by the data packet decoding device 3 in a preset first decoding mode to obtain the original data to be transmitted. The data packet encoding device 2 includes the present disclosure Fig. 9 The data packet encoding device shown in the figure encodes the data packet using the data packet encoding method provided in the embodiment of the present disclosure, and the data packet decoding device 3 includes the data packet encoding method provided in the embodiment of the present disclosure. Fig.10 The data packet decoding device shown in the figure decodes the data packet using the data packet decoding method provided in the embodiment of the present disclosure.

[0112] An embodiment of the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data packet encoding method provided by the embodiment of the present disclosure, or execute the data packet decoding method provided by the embodiment of the present disclosure.

[0113] An embodiment of the present disclosure further provides a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the data packet encoding method provided by the present disclosure, or implements the data packet decoding method provided by the present disclosure.

[0114] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0115] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A data packet encoding method, comprising: Receive at least one first data packet sent by at least one computing core on the current many-core chip, where each of the first data packets is a data packet obtained by encoding the body of a corresponding original data packet by the corresponding computing core in a first encoding manner; the original data packet is a data packet transmitted across chips; The data packet encoding device on the current many-core chip respectively encodes the header of each of the first data packets in a second encoding manner to obtain at least one second data packet; The plurality of computing cores perform packet body encoding on the original data packet generated by each computing core in parallel to generate a plurality of the first data packets.

2. The data packet encoding method according to claim 1, wherein: The first encoding method includes: a super redundant encoding method; the second encoding method includes: a PCIe encoding method.

3. The data packet encoding method according to claim 1, wherein: The header of the original data packet includes: address information; the body of the original data packet includes: Data to be transmitted; The header of the first data packet includes: the address information; the body of the first data packet includes: the data to be transmitted and the first error correction code; The header of the second data packet includes: the address information and the second error correction code; the body of the second data packet includes: the data to be transmitted and the first error correction code.

4. The data packet encoding method according to claim 1, wherein: The header of the second data packet includes: address information; After encoding the header of each of the first data packets in the second encoding mode to obtain at least one second data packet, the method further includes: Each of the second data packets is sent to a corresponding next many-core chip according to the address information.

5. The data packet encoding method according to claim 4, wherein: The address information includes: routing information; The step of sending each of the second data packets to the corresponding next many-core chip according to the address information includes: For each of the second data packets, determining, according to the routing information, a target address corresponding to the next many-core chip corresponding to the second data packet; According to the target address, the second data packet is sent to the next many-core chip corresponding to the second data packet.

6. The data packet encoding method according to claim 4, wherein: The address information includes: a destination address; The step of sending each of the second data packets to the corresponding next many-core chip according to the address information includes: For each of the second data packets, according to the destination address, a target address corresponding to the next many-core chip corresponding to the second data packet is calculated based on a preset path determination algorithm; According to the target address, the second data packet is sent to the next many-core chip corresponding to the second data packet.

7. The data packet encoding method according to claim 4, wherein: Before sending each of the second data packets to the corresponding next many-core chip, the method further includes: caching the second data packet corresponding to each computing core; Detecting whether the number of cached second data packets reaches a preset threshold; The sending each of the second data packets to the corresponding next many-core chip includes: In response to detecting that the number of cached second data packets reaches a preset threshold, each cached second data packet is sent to a corresponding next many-core chip.

8. A data packet decoding method, comprising: The destination many-core chip performs packet header decoding and error correction on a packet header of each of the received at least one packet to be decoded in a preset second decoding mode to obtain address information corresponding to each of the received packets to be decoded; The address information includes: the destination computing core address; the original data packet is a data packet transmitted across slices; According to the destination computing core address, the corresponding data packet to be decoded is sent to the destination computing core corresponding to the destination computing core address, so that the destination computing core performs packet body decoding and error correction on the packet body of the data packet to be decoded in a preset first decoding mode to obtain the original data to be transmitted; The packet body of the data packet to be decoded is a plurality of first data packets generated by performing packet body encoding on original data packets generated by each of the computing cores in parallel by the plurality of computing cores.

9. The data packet decoding method according to claim 8, wherein: The address information also includes: the target many-core chip address; Before sending the corresponding to-be-decoded data packet to the destination computing core corresponding to the destination computing core address according to the destination computing core address, the method further includes: Determine whether the address of the many-core chip where the chip is located is the same as the address of the target many-core chip; The step of sending the corresponding to-be-decoded data packet to a destination computing core corresponding to the destination computing core address according to the destination computing core address includes: When it is determined that the address of the multi-core chip where the processor is located is the same as the address of the destination multi-core chip, the corresponding data packet to be decoded is sent to the destination computing core corresponding to the destination computing core address according to the destination computing core address.

10. The data packet decoding method according to claim 9, wherein: After determining whether the address of the multi-core chip where the chip is located is the same as the address of the target multi-core chip, the method further includes: When it is determined that the address of the many-core chip where the chip is located is different from the address of the target many-core chip, a target address corresponding to the next many-core chip is calculated based on the address of the target many-core chip and a preset path determination algorithm; According to the target address, the corresponding data packet to be decoded is sent to the determined next many-core chip.

11. The data packet decoding method according to claim 9, wherein: The address information also includes: routing information; After determining whether the address of the multi-core chip where the chip is located is the same as the address of the target multi-core chip, the method further includes: When it is determined that the address of the many-core chip where the chip is located is different from the address of the target many-core chip, determining the target address corresponding to the next many-core chip according to the routing information; According to the target address, the corresponding data packet to be decoded is sent to the determined next many-core chip.

12. A data packet encoding device, comprising: A first receiving module is used to receive at least one first data packet sent by at least one computing core on the current many-core chip, each of the first data packets is obtained by encoding the packet body of the corresponding original data packet by the corresponding computing core in a first encoding manner; the original data packet is a data packet transmitted across chips; An encoding module, used for the data packet encoding device on the current many-core chip to respectively encode the header of each of the first data packets in a second encoding manner to obtain at least one second data packet; The plurality of computing cores perform packet body encoding on the original data packet generated by each computing core in parallel to generate a plurality of the first data packets.

13. A data packet decoding device, comprising: A second receiving module, configured for the destination many-core chip to receive at least one data packet to be decoded sent by other many-core chips; A decoding module, configured to perform packet header decoding and error correction on a packet header of each of the received at least one packet to be decoded in a preset second decoding mode, so as to obtain address information corresponding to each of the received packets to be decoded; The address information includes: the destination computing core address; the original data packet is a data packet transmitted across slices; A sending module, configured to send the corresponding data packet to be decoded to a destination computing core corresponding to the destination computing core address according to the destination computing core address, so that the destination computing core can decode and correct the packet body of the data packet to be decoded in a preset first decoding mode to obtain the original data to be transmitted; The packet body of the data packet to be decoded is a plurality of first data packets generated by performing packet body encoding on original data packets generated by each of the computing cores in parallel by the plurality of computing cores.

14. A many-core chip, comprising: A plurality of computing cores, a data packet encoding device and a data packet decoding device; The computing core is used to encode the packet body of the original data packet in a first encoding mode to obtain a first data packet, and send the first data packet to the data packet encoding device; and for performing packet body decoding and error correction on the packet body of the data packet to be decoded sent by the data packet decoding device in a preset first decoding mode to obtain the original data to be transmitted; The data packet encoding device includes the data packet encoding device described in claim 12, and the data packet decoding device includes the data packet decoding device described in claim 13.

15. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data packet encoding method described in any one of claims 1-7, or execute the data packet decoding method described in any one of claims 8-11.

16. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the computer program implements the data packet encoding method according to any one of claims 1 to 7, or implements the data packet decoding method according to any one of claims 8 to 11.