Data packet processing method and data packet processing device
By judging the packet type in the multi-core chip and performing appropriate error correction processing, the problem of low packet transmission efficiency in the multi-core architecture is solved, and the packet processing efficiency and computing performance are improved.
Patent Information
- Application Number
- CN202111234375.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-22
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2041-10-22
AI Technical Summary
The existing multi-core architecture has problems such as low encoding efficiency and poor data transmission performance in data packet transmission, especially when it is difficult to effectively avoid transmission errors during cross-domain packet transmission.
By judging the type of data packet to be transmitted in the computing core of the multi-core chip, and performing different processing according to the type, including error correction encoding and decoding of cross-domain packets, and using parallel processing to improve the overall encoding and decoding efficiency of data packets.
The packet processing efficiency and the computing performance of the multi-core chip are improved, and the packet queueing in the encoding and decoding devices is avoided, which enhances the accuracy and efficiency of packet transmission.
Smart Images

Figure CN113918487B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a data packet processing method, a data packet processing device, an electronic device, and a computer-readable medium. Background Art
[0002] Many-core architecture is a parallel processing architecture widely used to execute neural network models. In the many-core architecture, each computing core can complete a certain computing function. A certain number of computing cores are connected through a certain topological structure to form a chip. A certain number of chips are connected through a certain topological structure to form a chip array board (card). By analogy, a larger-scale system can be expanded. The data packet transmission of many-core chips includes two forms. One is that the data packet is transmitted between multiple computing cores contained in the many-core chip itself. This data packet can usually be called a local packet. The other is that the data packet is transmitted between multiple boards or multiple many-core chips. This data packet can usually be called a cross-domain packet. For the transmission of cross-domain packets, in order to avoid transmission errors, the cross-domain packets need to be error-corrected before being transmitted. Error correction coding sets redundant bits (error correction codes) in the data packet so that the receiver can correct the transmission errors that may exist in the data packet according to the error correction code.
[0003] In the related art, after the computing core generates a data packet, it directly sends the data packet out. This data packet processing method has the problems of low coding efficiency of the data packet and poor data transmission performance of the multi-core chip. Summary of the invention
[0004] The present disclosure provides a data packet processing method, a data packet processing device, an electronic device and a computer-readable medium.
[0005] In a first aspect, the present disclosure provides a data packet processing method, which is applied to a computing core of a many-core chip, and the method includes:
[0006] Determining the type of the data packet to be transmitted according to the destination address information of the data packet to be transmitted;
[0007] The data packet to be transmitted is processed according to the type of the data packet to be transmitted.
[0008] In a second aspect, the present disclosure further provides a data packet processing method, which is applied to a computing core of a many-core chip, and the method includes:
[0009] Receive data packets;
[0010] Determining whether the data packet is a local data packet or a cross-domain data packet;
[0011] In response to determining that the data packet is a cross-domain data packet, the data packet is decoded and error corrected to obtain original data to be processed.
[0012] In a third aspect, the present disclosure further provides a data packet processing method, which is applied to a multi-core chip, and the method includes:
[0013] Receive a data packet to be decoded, where the data packet to be decoded is an encoded cross-domain data packet;
[0014] The header of the data packet to be decoded is decoded and error corrected in a preset second decoding mode to obtain address information; the address information includes: a destination computing core address;
[0015] According to the destination computing core address, the data packet to be decoded is sent to the destination computing core, 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 processed.
[0016] In a fourth aspect, the present disclosure further provides a data packet processing device, including:
[0017] A determination module, used to determine the type of the data packet to be transmitted according to the destination address information of the data packet to be transmitted;
[0018] The processing module is used to process the data packet to be transmitted according to the type of the data packet to be transmitted.
[0019] In a fifth aspect, the present disclosure further provides a data packet processing device, including:
[0020] A first receiving module, used for receiving a data packet;
[0021] A judging module, used for judging whether the data packet is a local data packet or a cross-domain data packet;
[0022] The first decoding module is used for decoding and correcting the packet body of the data packet in response to the judgment module determining that the data packet is a cross-domain data packet, so as to obtain the original data to be processed.
[0023] In a sixth aspect, the present disclosure further provides a data packet processing device, including:
[0024] A second receiving module is used to receive a data packet to be decoded, where the data packet to be decoded is an encoded cross-domain data packet;
[0025] A second decoding module is used to decode and correct errors of the header of the data packet to be decoded in a preset second decoding mode to obtain address information; the address information includes: a destination computing core address;
[0026] The sending module is used to send the data packet to be decoded to the destination computing core according to the address of the destination computing core, 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 processed.
[0027] In a seventh aspect, the present disclosure further provides an electronic device, including:
[0028] at least one processor; and
[0029] a memory communicatively connected to the at least one processor; wherein,
[0030] 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 so that the at least one processor can execute the data packet processing method described in the first aspect of the present disclosure, or execute the data packet processing method described in the second aspect of the present disclosure, or execute the data packet processing method described in the third aspect of the present disclosure.
[0031] In an eighth aspect, the present disclosure further provides 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 processing method described in the first aspect of the present disclosure, or implements the data packet processing method described in the second aspect of the present disclosure, or implements the data packet processing method described in the third aspect of the present disclosure.
[0032] The data packet processing method, data packet processing device, electronic device and computer-readable medium provided by the present disclosure, before transmitting the data packet, the source computing core determines the type of the data packet to be transmitted, and performs different processing on the data packet to be transmitted according to the type of the data packet to be transmitted, thereby improving the processing efficiency of the data packet. In particular, when it is determined that the data packet to be transmitted is a cross-domain packet, the source computing core performs error correction coding on the data packet to be transmitted; after receiving the data packet, the receiving computing core determines the type of the data packet, and in particular, when it is determined that the received data packet is a cross-domain packet, the receiving computing core performs error correction decoding (packet body error correction decoding) on the data packet to obtain the original data to be processed. The present disclosure avoids the data packets queuing in the data encoding device and data decoding device of the multi-core chip for encoding and decoding, and improves the overall encoding and decoding efficiency of the data packet by using each computing core to perform packet body encoding and decoding on the corresponding data packets in parallel, thereby improving the data packet processing efficiency and the computing performance of the multi-core chip.
[0033] 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
[0034] 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 the accompanying drawings:
[0035] Figure 1 A flowchart of a data packet processing method provided by an embodiment of the present disclosure;
[0036] Figure 2 This is a flowchart of a specific implementation of step S101 in the embodiment of the present disclosure;
[0037] Figure 3 This is a flowchart of a specific implementation of step S102 in the embodiment of the present disclosure;
[0038] Figure 4 A flowchart of another data packet processing method provided by an embodiment of the present disclosure;
[0039] Figure 5 A flowchart of another data packet processing method provided by an embodiment of the present disclosure;
[0040] Figure 6 A flowchart of another data packet processing method provided by an embodiment of the present disclosure;
[0041] Figure 7 A block diagram of a data packet processing device provided in an embodiment of the present disclosure;
[0042] Figure 8 A block diagram of another data packet processing device provided by an embodiment of the present disclosure;
[0043] Fig. 9 A block diagram of the composition of another data packet processing device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0044] 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.
[0045] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.
[0046] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0047] 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.
[0048] 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.
[0049] Figure 1 A flowchart of a data packet processing method provided in an embodiment of the present disclosure.
[0050] The data packet processing method provided by the embodiment of the present disclosure uses the source computing core in the many-core chip as the execution subject. The source computing core refers to the computing core that generates the data packet to be transmitted. The source computing core can be any computing core in the many-core chip.
[0051] Reference Figure 1 The data packet processing method provided by the embodiment of the present disclosure includes:
[0052] Step S101: Determine the type of the data packet to be transmitted according to the destination address information of the data packet to be transmitted.
[0053] After generating computing data, the source computing core generates a data packet to be transmitted, which includes a packet header and a packet body. The packet header includes at least the destination address information, and in some embodiments may also include information such as the length of the data to be processed. The packet body includes the data to be processed, for example, the data to be processed includes image processing data or voice processing data.
[0054] After generating a data packet to be transmitted, the source computing core determines the type of the data packet to be transmitted according to the destination address information of the data packet to be transmitted. In the disclosed embodiment, the types of data packets to be transmitted include local data packets to be transmitted and cross-domain data packets to be transmitted, and the cross-domain data packets to be transmitted further include: cross-chip data packets to be transmitted and cross-board data packets to be transmitted, wherein the cross-board data packets to be transmitted refer to data packets to be transmitted between different boards, and the cross-chip data packets to be transmitted refer to data packets to be transmitted between different multi-core chips in the same board.
[0055] Specifically, Figure 2 This is a flowchart of a specific implementation of step S101 in the embodiment of the present disclosure, referring to Figure 2 In some embodiments, step S101 specifically includes:
[0056] Step S1011: determine whether the board address corresponding to itself is the same as the board address of the destination board included in the header of the data packet to be transmitted.
[0057] The destination address information of the data packet to be transmitted includes the board address of the destination board to which the destination computing core to which the data packet to be transmitted belongs. The type of the data packet to be transmitted can be determined by comparing the board address of the board to which the source computing core belongs with the board address of the destination board to which the destination computing core belongs.
[0058] Specifically, in step S1011, if it is determined that the board address corresponding to itself is different from the board address included in the header of the data packet to be transmitted, step S1012 is executed to determine that the data packet to be transmitted is a cross-board data packet to be transmitted; if it is determined that the board address corresponding to itself is the same as the board address included in the header of the data packet to be transmitted, step S1013 is executed for further judgment.
[0059] Step S1012: Determine whether the data packet to be transmitted is a cross-board data packet to be transmitted.
[0060] Step S1013: determine whether the multi-core chip address corresponding to itself is the same as the destination multi-core chip address included in the packet header of the data packet to be transmitted.
[0061] When the board address corresponding to the source computing core itself is the same as the board address contained in the header of the data packet to be transmitted, it can be determined that the data packet to be transmitted belongs to the same chip array board. At this time, the type of the data packet to be transmitted can be determined by further judging the many-core chip to which the source computing core belongs and the destination many-core chip.
[0062] Specifically, in step S1013, the destination address information of the data packet to be transmitted also includes the destination many-core chip address, which refers to the address of the many-core chip to which the data packet to be transmitted is ultimately delivered. The source computing core compares the address of its own many-core chip with the destination many-core chip address. If the comparison shows that the many-core chip address corresponding to itself is the same as the destination many-core chip address included in the header of the data packet to be transmitted, step S1014 is executed to determine that the data packet to be transmitted is a local data packet to be transmitted; if the comparison shows that the many-core chip address corresponding to itself is different from the destination many-core chip address included in the header of the data packet to be transmitted, step S1015 is executed to determine that the data packet to be transmitted is a cross-chip data packet to be transmitted.
[0063] Step S1014: Determine that the data packet to be transmitted is a local data packet to be transmitted.
[0064] Step S1015: Determine whether the data packet to be transmitted is a cross-slice data packet to be transmitted.
[0065] Step S102: Process the data packet to be transmitted according to the type of the data packet to be transmitted.
[0066] In the embodiment of the present disclosure, different processing is performed on the data packets to be transmitted based on different types of the data packets to be transmitted.
[0067] Figure 3 FIG. 1 is a flowchart of a specific implementation of step S102 in the embodiment of the present disclosure. Figure 3 In this embodiment, step S102 specifically includes:
[0068] Step S102a: in response to determining that the data packet to be transmitted is a local data packet to be transmitted, the data packet to be transmitted is sent to the destination computing core according to the destination computing core address included in the packet header of the data packet to be transmitted.
[0069] When the source computing core determines that the data packet to be transmitted is a local data packet to be transmitted, the source computing core directly sends the data packet to be transmitted to the destination computing core in the multi-core chip where it is located, so that the destination computing core can perform relevant calculations based on the data to be processed contained in the data packet to be transmitted.
[0070] Specifically, the many-core chip includes a network on chip (NOC), and the source computing core can send the data packet to be transmitted to the destination computing core of the many-core chip through the network on chip of the many-core chip.
[0071] Step S102b: in response to determining that the type of the data packet to be transmitted is a cross-domain data packet to be transmitted, encoding the data packet to be transmitted, and sending the encoded data packet to be transmitted to the corresponding next node.
[0072] In the embodiment of the present disclosure, when the source computing core determines that the data packet to be transmitted is a cross-domain data packet to be transmitted, the source computing core encodes the data packet to be transmitted and sends the encoded data packet to be transmitted to the next node, where the next node is determined based on different scenarios and may be the next many-core chip, the next board, or the data encoding device of the chip where the source computing core is located.
[0073] Specifically, the source computing core uses redundant coding, also known as error correction coding, to encode the data packets to be transmitted. Error correction coding is a type of channel coding. It generates redundant codes (error correction codes) using original data based on preset coding rules, and adds the error correction codes to the original data. After receiving the encoded data, the receiver uses the error correction code to check the received data to determine whether a transmission error has occurred during the channel transmission process. If the data is found to have a transmission error, the data is corrected to restore the original data.
[0074] Preferably, in the embodiment of the present disclosure, in the process of error correction coding of the data packets to be transmitted, the number of bits of the error correction code can be set based on the channel quality. Specifically, when the channel quality is high, the data packets to be transmitted may have fewer transmission errors. In this case, an error correction code with fewer redundant bits can be set, and the error correction code with fewer redundant bits is sufficient to complete error correction; and when the channel quality is poor, the data packets to be transmitted may have more transmission errors. In this case, an error correction code with more redundant bits can be set to correct more transmission errors that may occur.
[0075] In step S102b, the encoding of the data packet to be transmitted is performed based on the type of the data packet to be transmitted.
[0076] Specifically, in some embodiments, when the cross-domain data packet to be transmitted is a cross-chip data packet to be transmitted, step S102b specifically includes: performing redundant encoding on the data packet to be transmitted, and sending the encoded data packet to be transmitted to the next many-core chip.
[0077] In this embodiment, the data packets to be transmitted are transmitted only between different many-core chips, and after the source computing core completes the redundant encoding of the data packets to be transmitted, the encoded data packets to be transmitted are sent to the next many-core chip. Specifically, the source computing core can send the encoded data packets to be transmitted to the data transmission device of the many-core chip where it is located, and the data transmission device sends the error-corrected encoded data packets to be transmitted to the next many-core chip.
[0078] It should be noted that the next many-core chip can be a destination many-core chip or a transit chip. The transit chip refers to a many-core chip located between the source many-core chip and the destination many-core chip in the transmission path of the data packet to be transmitted and used to transmit the data packet to be transmitted.
[0079] In other embodiments, when the cross-domain data packet to be transmitted is a cross-board data packet to be transmitted, step S102b specifically includes: performing super-redundant encoding on the data packet to be transmitted, and sending the encoded data packet to be transmitted to the next board.
[0080] In this embodiment, the data packets to be transmitted are transmitted between different boards, and the transmission environment is more complex than that of the data packets to be transmitted across chips. Therefore, super-redundant encoding is performed on the data packets to be transmitted. It should be noted that super-redundant encoding is a coding method with higher redundancy than redundant coding, but both belong to error correction coding.
[0081] In the embodiments of the present disclosure, the source computing core may encode the data packet to be transmitted in different ways.
[0082] Specifically, in some embodiments, the source computing core may only encode the body of the data packet to be transmitted, while the data encoding device contained in the chip where the source computing core is located encodes the header of the data packet to be transmitted. Correspondingly, in this embodiment, step S102b may specifically include:
[0083] Step S1: Encode the body of a data packet to be transmitted in a first encoding manner to obtain a first data packet.
[0084] Step S2: Send the first data packet to the data encoding device of the multi-core chip where the first data packet is located, so that the data encoding device can use the second encoding method to perform header encoding on the header of the first data packet.
[0085] In other embodiments, the source computing core may encode both the header and the body of the data packet to be transmitted.
[0086] In the embodiment of the present disclosure, when encoding the packet header and the packet body of the data packet to be transmitted, an encoding method can be selected as needed.
[0087] Specifically, in some embodiments, the same encoding method can be used to encode the header and body of the data packet to be transmitted, and when the amount of data contained in the body of the data packet to be transmitted is small, preferably, the same encoding method is selected as a simple and efficient encoding method, thereby improving the encoding and decoding efficiency of the data packet.
[0088] In other embodiments, considering that the information contained in the packet body (data to be processed) is usually more complex than the information contained in the packet header (address information and data length), different encoding methods are used for the packet header and the packet body. Specifically, the packet body of the data packet to be transmitted is encoded using a first encoding method, and the packet header of the data packet to be transmitted is encoded using a second encoding method. The first encoding method has a higher complexity than the second encoding method. Preferably, the first encoding method is 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 packet to be transmitted is made stronger, thereby ensuring the transmission accuracy of the data packet to be transmitted; at the same time, by making the second encoding method corresponding to the packet header encoding simple and efficient, the rate of the packet header encoding is improved, thereby further improving the overall encoding efficiency of the data packet.
[0089] In the disclosed embodiment, the body of the encoded data packet to be transmitted includes: data to be processed and a first error correction code; the header of the encoded data packet to be transmitted includes: header information and a second error correction code.
[0090] In the data packet processing method provided by the embodiment of the present disclosure, the source computing core determines the type of the data packet to be transmitted before transmitting the data packet, and performs different processing on the data packet to be transmitted according to the type of the data packet to be transmitted, thereby improving the processing efficiency of the data packet. In particular, the present disclosure can improve the overall coding efficiency of the data packet by using each computing core to encode the packet body of each corresponding data packet in parallel, thereby improving the data packet processing efficiency and computing performance of the multi-core chip.
[0091] Figure 4 A flowchart of another data packet processing method provided by an embodiment of the present disclosure.
[0092] The data packet processing method provided by the embodiment of the present disclosure uses a receiving computing core as the execution subject. The receiving computing core refers to the destination computing core of the data packet to be transmitted. The receiving computing core can be any computing core located on the same many-core chip as the source computing core, or any computing core located on a different many-core chip from the source computing core.
[0093] Reference Figure 4 The data packet processing method provided by the embodiment of the present disclosure includes:
[0094] Step S201, receiving a data packet.
[0095] Step S202: Determine whether the data packet is a local data packet or a cross-domain data packet.
[0096] In practical applications, the data packets received by the receiving computing core can be divided into multiple types. In the embodiment of the present disclosure, one type of data packet received by the receiving computing core is a data packet sent by a source computing core in the many-core chip where the receiving computing core is located, which is called a local data packet. Another type of data packet received by the receiving computing core is a data packet sent by other many-core chips other than the many-core chip where the receiving computing core is located (which is on the same board as the many-core chip where the receiving computing core is located, or is on a different board from the many-core chip where the receiving computing core is located), which is called a cross-domain data packet. When the other many-core chip is on the same board as the many-core chip where the receiving computing core is located, the cross-domain data packet is a cross-chip data packet, and when the other many-core chip is on a different board from the many-core chip where the receiving computing core is located, the cross-domain data packet is a cross-board data packet.
[0097] Specifically, in step S202, in response to determining that the data packet is a cross-domain data packet, the following step S203 is executed to decode the data packet; in response to determining that the data packet is a local data packet, the following step S204 is executed to directly process the data packet.
[0098] Step S203: Decode and correct errors in the packet body of the data packet to obtain original data to be processed.
[0099] In the embodiment of the present disclosure, when it is determined that a data packet is a cross-domain data packet, the data packet is an encoded data packet, that is, both the header and the body of the data packet have been error correction encoded. It should be noted that in the embodiment of the present disclosure, when the receiving computing core receives a cross-domain data packet, the header of the cross-domain data packet has been decoded in the data decoding device of the multi-core chip where the receiving computing core is located, so the receiving computing core only needs to decode the body of the data packet.
[0100] Specifically, the receiving 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, and uses the error correction code to verify and correct the packet body based on the decoding method agreed with the source many-core chip (the many-core chip that sent the data packet) to obtain the original data to be processed.
[0101] After obtaining the original data to be processed, the receiving computing core performs relevant computing processing according to the data to be processed, such as membrane potential integral operation, etc.
[0102] Step S204: Obtain the data to be processed from the packet body of the data packet, and process the data to be processed.
[0103] The data to be processed is directly extracted from the body of the data packet, and relevant calculations are performed based on the data to be processed, such as membrane potential integration operations.
[0104] The data packet processing method provided by the embodiment of the present disclosure, after receiving the data packet, the receiving computing core determines whether the type of the received data packet is a local data packet or a cross-domain data packet. When it is determined that the received data packet is a cross-domain data packet, the receiving computing core performs error correction decoding (packet body error correction decoding) on the data packet to be transmitted to obtain the original data to be processed, thereby avoiding the data packets from being queued for decoding in the data decoding device of the many-core chip. The present disclosure improves the overall decoding efficiency of the data packets by utilizing each computing core to perform packet body decoding on the corresponding data packets in parallel, thereby improving the data packet processing efficiency and enhancing the computing performance of the many-core chip.
[0105] Figure 5 A flowchart of another data packet processing method provided in an embodiment of the present disclosure.
[0106] The data packet processing method provided by the embodiment of the present disclosure uses a receiving many-core chip as an execution subject, and the receiving many-core chip refers to any many-core chip that receives the data packet.
[0107] Reference Figure 5 The data packet processing method provided by the embodiment of the present disclosure includes:
[0108] Step S301: receiving a data packet to be decoded, where the data packet to be decoded is an encoded cross-domain data packet.
[0109] In the present disclosure, since the local data packet is directly sent from the source computing core to the destination computing core, and the source computing core and the destination computing core are in the same many-core chip, and the cross-domain data packet is sent from the source many-core chip to the destination many-core chip, when the receiving many-core chip receives the data packet, the type of the data packet is a cross-domain data packet. That is, in step S301, receiving the data packet to be decoded includes: receiving the data packet to be decoded transmitted by other many-core chips.
[0110] Step S302: decoding and correcting the header of the data packet to be decoded in a preset second decoding mode to obtain address information; the address information includes: a destination computing core address.
[0111] 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 encoded data packet to be transmitted 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.
[0112] Specifically, after receiving the data packet to be decoded, the receiving many-core chip extracts an error correction code (corresponding to the second error correction code in the above embodiment) from the header of the data packet to be decoded, and uses the error correction code 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 sends the data packet to be decoded) to obtain the correct address information, which includes the address of the destination computing core.
[0113] Step S303: Send the data packet to be decoded to the destination computing core 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 processed.
[0114] After determining the correct destination computing core address, the receiving multi-core chip sends the data packet to be decoded to the destination computing core. After receiving the data packet to be decoded, the destination computing core decodes the packet body. Please refer to step S203 in the above embodiment for details, which will not be repeated here.
[0115] The data packet processing method provided by the embodiment of the present disclosure is that after the many-core chip receives the cross-domain data packet, it decodes and corrects the packet header of the cross-domain data packet to obtain the correct destination computing core address, and then sends the cross-domain data packet to the destination computing core according to the destination computing core address, and determines whether the received data packet is a local data packet or a cross-domain data packet. When it is determined that the received data packet is a cross-domain data packet, the receiving computing core performs error correction coding (packet body error correction coding) on the data packet to be transmitted to obtain the original data to be processed, thereby avoiding the data packets from being queued for decoding in the data decoding device of the many-core chip. The present disclosure improves the overall decoding 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 many-core chip.
[0116] In practical applications, in addition to being sent directly from a source many-core chip to a destination many-core chip, a data packet may also be forwarded by multiple levels of forwarding chips to reach the destination many-core chip. Figure 6 A flowchart of another data packet processing method provided by an embodiment of the present disclosure. In this embodiment, a data packet may be forwarded by multiple forwarding chips to reach a destination multi-core chip. Figure 6 In addition to steps S301 to S303 in the previous embodiment, the data packet processing method provided in the embodiment of the present disclosure further includes steps S302' and S304. Only steps S302' and S304 are described below.
[0117] Specifically, in the embodiment of the present disclosure, the address information also includes: the target many-core chip address. Before step S303, it also includes:
[0118] Step S302': determine whether the address of the own many-core chip is the same as the address of the target many-core chip.
[0119] After receiving the data packet, the receiving many-core chip determines whether the address of its own many-core chip is the same as the address of the destination many-core chip. If they are the same, it is determined that it is the destination many-core chip of the received data packet, and step S303 is executed to send the data packet to be decoded to the destination computing core; if they are different, it is determined that it is not the destination many-core chip of the received data packet, but only a transit chip, and step S304 is executed to determine the next many-core chip to forward the data packet to be decoded.
[0120] Step S304: determine the next many-core chip, and send the data packet to be decoded to the next many-core chip.
[0121] In a possible implementation, the many-core chip can determine the many-core chip corresponding to the next hop of the data packet to be decoded based on a dynamic decision-making method. Specifically, in this implementation, step S304 specifically includes: according to the address of the destination many-core chip, based on a preset path determination algorithm, calculating the target address corresponding to the next many-core chip, and sending the data packet to be decoded to the determined next many-core chip according to the target address.
[0122] In this embodiment, the many-core chip 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 specifically limit the path determination algorithm. All path determination algorithms that can determine the next many-core chip to transit the decoded data packet belong to the protection scope of the present disclosure.
[0123] In another possible implementation, the many-core chip can be implemented based on static planning when determining the many-core chip corresponding to the next hop of the data packet to be decoded, that is, the next many-core chip. Specifically, in this embodiment, the address information also includes: routing information, which includes information (address information) of each transfer chip that the data packet to be decoded must pass through when it is transmitted from the source many-core chip to the destination many-core chip. In this implementation, step S304 specifically includes: determining the target address corresponding to the next many-core chip according to the routing information, and sending the data packet to be decoded to the determined next many-core chip according to the target address.
[0124] In this embodiment, the many-core chip determines the target address corresponding to the next many-core chip to which the data packet to be decoded will flow from the source many-core chip by reading the routing information in the packet header of the data packet to be decoded, and then transmits the data packet to be decoded to the next many-core chip corresponding to the target address according to the target address.
[0125] Figure 7 A block diagram of a data packet processing device provided in an embodiment of the present disclosure.
[0126] Reference Figure 7 The data packet processing device provided in the embodiment of the present disclosure includes a determination module 11 and a processing module 12.
[0127] The determination module 11 is used to determine the type of the data packet to be transmitted according to the destination address information of the data packet to be transmitted; and the processing module 12 is used to process the data packet to be transmitted according to the type of the data packet to be transmitted.
[0128] The data packet processing device provided in the embodiment of the present disclosure is used to implement the data packet processing method in the embodiment of the present disclosure with the source computing core as the execution subject. For the specific functional modules included in the data packet processing device and the interaction between the functional modules, please refer to the description of the corresponding method steps in the above embodiment, which will not be repeated here.
[0129] Figure 8 A block diagram of another data packet processing device provided in an embodiment of the present disclosure.
[0130] Reference Figure 8 The embodiment of the present disclosure provides a data packet processing device including a first receiving module 21, a judging module 22 and a first decoding module 23.
[0131] Among them, the first receiving module 21 is used to receive data packets; the judgment module 22 is used to judge whether the data packet is a local data packet or a cross-domain data packet; the first decoding module 23 is used to respond to the judgment module 22 determining that the data packet is a cross-domain data packet, and use a preset first decoding method to decode and correct the packet body of the data packet to obtain the original data to be processed.
[0132] The data packet processing device provided in the embodiment of the present disclosure is used to implement the data packet processing method in the present disclosure with the receiving computing core as the execution subject. For the specific functional modules included in the data packet processing device and the interaction between the functional modules, please refer to the description of the corresponding method steps in the above embodiment, which will not be repeated here.
[0133] The present disclosure also provides a computing core, including the Figure 7 The data packet processing device shown, and / or Figure 8 The data packet processing device shown.
[0134] Fig. 9 A block diagram of the composition of another data packet processing device provided in an embodiment of the present disclosure.
[0135] Reference Fig. 9The data packet processing device provided in the embodiment of the present disclosure includes: a second receiving module 31, a second decoding module 32 and a sending module 33.
[0136] Among them, the second receiving module 31 is used to receive the data packet to be decoded, which is the encoded cross-domain data packet; the second decoding module 32 is used to decode and correct the header of the data packet to be decoded in a preset second decoding method to obtain address information; the address information includes: the address of the destination computing core; the sending module 33 is used to send the data packet to be decoded to the destination computing core according to the address of the destination computing core, so that the destination computing core can decode and correct the body of the data packet to be decoded in a preset first decoding method to obtain the original data to be processed.
[0137] The data packet processing device provided in the embodiment of the present disclosure is used to implement the data packet processing method in the present disclosure with the receiving multi-core chip as the execution subject. For the specific functional modules included in the data packet processing device and the interaction between the functional modules, please refer to the description of the corresponding method steps in the above embodiment, which will not be repeated here.
[0138] The present disclosure also provides a multi-core chip, including multiple computing cores and Figure 8 The data packet processing device shown.
[0139] The embodiment of the present disclosure also provides a many-core chip, including multiple computing cores, at least one computing core adopts the computing core provided by the embodiment of the present disclosure.
[0140] The present disclosure also provides an electronic device, including: at least one processor; and
[0141] A memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor can execute the data packet processing method disclosed herein with a source computing core as an execution subject, or the data packet processing method disclosed herein with a receiving computing core as an execution subject, or the data packet processing method disclosed herein with a receiving many-core chip as an execution subject.
[0142] An embodiment of the present disclosure also provides a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the data packet processing method of the present disclosure with a source computing core as an execution subject, or the data packet processing method of the present disclosure with a receiving computing core as an execution subject, or the data packet processing method of the present disclosure with a receiving multi-core chip as an execution subject.
[0143] 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.
[0144] 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 processing method, applied to a computing core of a many-core chip, the method comprising: Determine the type of the data packet to be transmitted according to the destination address information of the data packet to be transmitted, wherein the type of the data packet to be transmitted includes a local data packet to be transmitted and a cross-domain data packet to be transmitted; Processing the data packet to be transmitted according to the type of the data packet to be transmitted; The processing of the data packet to be transmitted according to the type of the data packet to be transmitted includes: In response to determining that the type of the data packet to be transmitted is a cross-domain data packet to be transmitted, encoding the data packet to be transmitted, and sending the encoded data packet to be transmitted to the corresponding next node; In response to determining that the data packet to be transmitted is a local data packet to be transmitted, sending the data packet to be transmitted to a destination computing core according to a destination computing core address included in a packet header of the data packet to be transmitted; The step of encoding the data packet to be transmitted and sending the encoded data packet to be transmitted to the corresponding next node includes: Encoding the body of the data packet to be transmitted using a first encoding method to obtain a first data packet; The first data packet is sent to a data encoding device of the multi-core chip where the first data packet is located, so that the data encoding device can use a second encoding method to perform header encoding on the header of the first data packet.
2. The data packet processing method according to claim 1, wherein: The cross-domain data packet to be transmitted is a cross-slice data packet to be transmitted, and encoding the data packet to be transmitted and sending the encoded data packet to be transmitted to the corresponding next node includes: Redundancy encoding is performed on the data packet to be transmitted, and the encoded data packet to be transmitted is sent to the next many-core chip.
3. The data packet processing method according to claim 1, wherein: The cross-domain data packet to be transmitted is a cross-board data packet to be transmitted, and encoding the data packet to be transmitted and sending the encoded data packet to be transmitted to the corresponding next node includes: The data packet to be transmitted is subjected to super-redundancy encoding, and the encoded data packet to be transmitted is sent to the next board.
4. The data packet processing method according to claim 1, wherein: The processing of the data packet to be transmitted includes: Encoding the packet body of the data packet to be transmitted by using a first encoding method; The header of the data packet to be transmitted is encoded using a second encoding method.
5. The data packet processing method according to claim 1 or 4, wherein: The first encoding method includes a super redundant encoding method; the second encoding method includes a PCIe encoding method.
6. The data packet processing method according to claim 1, wherein: The destination address information includes: a board address of a destination board; The step of determining the type of the data packet to be transmitted according to the destination address information of the data packet to be transmitted comprises: Determine whether the board address corresponding to itself is the same as the board address of the destination board included in the packet header of the data packet to be transmitted; If the board address corresponding to itself is different from the board address of the destination board included in the header of the data packet to be transmitted, it is determined that the data packet to be transmitted is an inter-board data packet to be transmitted.
7. The data packet processing method according to claim 6, wherein: The destination address information also includes: the destination many-core chip address; After determining whether the board address corresponding to itself is the same as the board address of the destination board included in the header of the data packet to be transmitted, the method further includes: If the board address corresponding to itself is the same as the board address of the destination board included in the header of the data packet to be transmitted, then determining whether the many-core chip address corresponding to itself is the same as the destination many-core chip address included in the header of the data packet to be transmitted; If the multi-core chip address corresponding to itself is the same as the destination multi-core chip address included in the packet header of the data packet to be transmitted, then determining that the data packet to be transmitted is a local data packet to be transmitted; If the multi-core chip address corresponding to itself is different from the destination multi-core chip address included in the packet header of the data packet to be transmitted, it is determined that the data packet to be transmitted is a cross-chip data packet to be transmitted.
8. A data packet processing method, applied to a computing core of a many-core chip, the method comprising: Receive data packets; Determining whether the data packet is a local data packet or a cross-domain data packet; In response to determining that the data packet is a cross-domain data packet, performing packet body decoding and error correction on the data packet to obtain original data to be processed, wherein the packet header of the cross-domain data packet has been decoded in the data decoding device of the many-core chip; In response to determining that the data packet is a local data packet, to-be-processed data is obtained from a packet body of the data packet, and the to-be-processed data is processed.
9. A data packet processing method, applied to a many-core chip, the method comprising: Receive a data packet to be decoded, where the data packet to be decoded is an encoded cross-domain data packet; Performing packet header decoding and error correction on the packet header of the to-be-decoded data packet in a preset second decoding mode to obtain address information; The address information includes: the destination computing core address; According to the destination computing core address, the data packet to be decoded is sent to the destination computing core, so that the destination computing core decodes and corrects the packet body of the data packet to be decoded in a preset first decoding mode to obtain the original data to be processed; The address information also includes: the target many-core chip address; Before sending the to-be-decoded data packet to the destination computing core 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 to-be-decoded data packet to the destination computing core according to the destination computing core address includes: When it is determined that 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 data packet to be decoded is sent to the target computing core according to the address of the target computing core; 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 device is located is different from the address of the target many-core chip, the next many-core chip is determined, and the data packet to be decoded is sent to the next many-core chip.
10. A data packet processing device, comprising: A determination module, used to determine the type of the data packet to be transmitted according to the destination address information of the data packet to be transmitted, wherein the type of the data packet to be transmitted includes a local data packet to be transmitted and a cross-domain data packet to be transmitted; A processing module, used for processing the data packet to be transmitted according to the type of the data packet to be transmitted; The processing module is specifically used to, in response to determining that the type of the data packet to be transmitted is a cross-domain data packet to be transmitted, encode the packet body of the data packet to be transmitted using a first encoding method to obtain a first data packet, and send the first data packet to a data encoding device of the many-core chip where the first data packet is located, so that the data encoding device uses a second encoding method to encode the header of the first data packet; in response to determining that the data packet to be transmitted is a local data packet to be transmitted, send the data packet to be transmitted to the destination computing core according to the destination computing core address contained in the header of the data packet to be transmitted.
11. A data packet processing device, comprising: A first receiving module, used for receiving a data packet; A judging module, used for judging whether the data packet received by the first receiving module is a local data packet or a cross-domain data packet; a first decoding module, configured to decode and correct errors in a packet body of the packet in response to the judgment module determining that the packet is a cross-domain packet, so as to obtain original data to be processed, wherein a packet header of the cross-domain packet has been decoded in a data decoding device of the many-core chip; In response to determining that the data packet is a local data packet, to-be-processed data is obtained from a packet body of the data packet, and the to-be-processed data is processed.
12. A data packet processing device, comprising: A second receiving module is used to receive a data packet to be decoded, where the data packet to be decoded is an encoded cross-domain data packet; A second decoding module, used for decoding and correcting the header of the data packet to be decoded in a preset second decoding mode to obtain address information; The address information includes: the destination computing core address; the address information also includes: the destination multi-core chip address; A first processing module, configured to determine whether the address of the many-core chip where the processor is located is the same as the address of the target many-core chip; A sending module, used for sending the data packet to be decoded to the destination computing core according to the address of the destination computing core, 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 processed; The sending module is specifically configured to send the to-be-decoded data packet to the destination computing core according to the destination computing core address when it is determined that the address of the many-core chip where the sending module is located is the same as the address of the destination many-core chip; The second processing module is used to determine the next many-core chip when it is determined that the address of the many-core chip where the second processing module is located is different from the address of the target many-core chip, and send the data packet to be decoded to the next many-core chip.
13. 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 processing method described in any one of claims 1 to 7, or execute the data packet processing method described in claim 8, or execute the data packet processing method described in claim 9.
14. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, it implements the data packet processing method according to any one of claims 1 to 7, or the data packet processing method according to claim 8, or the data packet processing method according to claim 9.
