[go: up one dir, main page]

CN117561706A - A method and device for processing data packets - Google Patents

A method and device for processing data packets Download PDF

Info

Publication number
CN117561706A
CN117561706A CN202180099446.2A CN202180099446A CN117561706A CN 117561706 A CN117561706 A CN 117561706A CN 202180099446 A CN202180099446 A CN 202180099446A CN 117561706 A CN117561706 A CN 117561706A
Authority
CN
China
Prior art keywords
data segment
data
received data
data packets
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202180099446.2A
Other languages
Chinese (zh)
Inventor
王心力
涂志国
翟记业
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN117561706A publication Critical patent/CN117561706A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/43Assembling or disassembling of packets, e.g. segmentation and reassembly [SAR]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A method and apparatus for processing data packets by demodulating a plurality of received data packets through a modem, dividing the plurality of received data packets into at least one data segment, each of the at least one data segment corresponding to an application, each data segment including a data segment header, the data segment header identifying the application. The application processor comprises a plurality of cores and is used for analyzing at least one data segment to obtain a data segment header, and transmitting one or more received data packets in each data segment to the core corresponding to the application program according to the data segment header.

Description

Method and equipment for processing data packet Technical Field
Embodiments of the present application relate to the field of communications technologies, and in particular, to a method and an apparatus for processing a data packet.
Background
With the vigorous development of the fifth generation mobile communication technology (5th generation mobile communication technology,5G), the downlink rate of the wireless air interface side can reach 10Gbps or more, so that the terminal side needs to have faster transceiving capability and stronger processing capability.
The terminal side comprises an application processor for processing the data packet received by the terminal. At present, an application processor can support multi-core operation, but in the scene of packet reception, the application processor processes a data packet by a single core, so that the situation that the load of one core is too high and the load of the other cores is lower can occur, and the capability of the application processor for processing the data packet is reduced.
Disclosure of Invention
The embodiment of the application provides a method and equipment for processing a data packet, which are applied to electronic equipment, and can reasonably balance the loads of a plurality of cores of an application processor when the electronic equipment carries out packet grouping and receiving, so that the capability of the electronic equipment for processing the data packet is improved.
In order to achieve the above purpose, the embodiment of the application adopts the following technical scheme:
in a first aspect, an embodiment of the present application provides an electronic device, including a modem configured to demodulate a plurality of received data packets, divide the plurality of received data packets into at least one data segment, each data segment in the at least one data segment corresponds to an application program, and each data segment includes a data segment header, where the data segment header is configured to identify the application program; the application processor comprises a plurality of cores, and is used for analyzing at least one data segment to obtain a data segment header, and transmitting one or more received data packets in each data segment to the core corresponding to the application program according to the data segment header.
Therefore, the electronic device provided by the embodiment of the application can divide the plurality of received data packets into at least one data segment by changing the packet format, so that one or more received data packets included in each data segment correspond to the same application program, and the data segment header is used for identifying the application program, so that extra processing expenditure can not be introduced when the data segments are analyzed, and the application program corresponding to one or more received data packets included in each data segment can be conveniently and directly determined. In addition, the application processor of the electronic device includes a plurality of cores, and the application processor is capable of transmitting one or more received data packets in each data segment to a core corresponding to the application program according to the data segment header obtained by parsing the data segment, so that the application program is run on the core to process the one or more received data packets. Therefore, the processing can be performed through the plurality of received data packets through the plurality of cores, compared with the processing of the plurality of data packets through the single core in the prior art, the processing capacity of the electronic equipment is reduced, the load of the plurality of cores of the electronic equipment can be reasonably balanced, and the technical effect of the capacity of the electronic equipment for processing the data packets is improved.
In one possible design, the application processor is specifically configured to: analyzing at least one data segment on the network card layer to obtain a data segment header, and determining an application program according to the data segment header; transmitting one or more received data packets from the network card layer to the protocol stack layer; analyzing one or more received data packets on a protocol stack layer to obtain analyzed data; and transmitting the parsed data to a core corresponding to the application program. Therefore, the electronic device provided by the embodiment of the application program can determine the application program corresponding to the data segment on the network card layer according to the data segment head obtained by analyzing the data segment, compared with the prior art, the application program corresponding to the received data packets can be determined by analyzing the L3/L4 of the data packets on the network card layer to shunt the data packets, so that extra consumption is introduced. And the electronic device provided by the embodiment of the invention can analyze one or more received data packets on a protocol stack layer to obtain data in each data segment, and transmit the analyzed data to the core corresponding to the application program, so that the application program is operated on the core to process the one or more received data packets, namely, the one or more received data packets in the data segment are processed on the core corresponding to the application program corresponding to each data segment, so that the received data packets in different data segments are operated on the cores corresponding to different application programs, thereby reasonably balancing the loads of a plurality of cores of the electronic device and improving the capability of the electronic device for processing the data packets.
In one possible design, the modem is specifically configured to: and determining a data segment corresponding to each received data packet according to the quintuple information of each received data packet in the plurality of received data packets so as to pack one or more received data packet groups in each data segment. Therefore, the electronic device provided by the embodiment of the application can determine the data segment corresponding to each received data packet according to the five-tuple information of each received data packet in the plurality of received data packets by changing the packet format, and packet one or more received data packets with the same five-tuple information in the same data segment, so that extra processing expenditure can not be introduced when analyzing the data segment, and the application program corresponding to one or more received data packets in each data segment can be conveniently and directly determined.
In a second aspect, an embodiment of the present application provides a modem apparatus, including: a demodulation module for demodulating a plurality of received data packets; the system comprises a packet grouping module, a packet generation module and a packet generation module, wherein the packet grouping module is used for dividing a plurality of received data packets into at least one data segment, each data segment in the at least one data segment corresponds to an application program, and each data segment comprises a data segment head which is used for identifying the application program; and the sending module is used for sending at least one data segment to the application processing device, and one or more received data packets in each data segment are used for being transmitted to a core corresponding to the application program.
Therefore, in the modem device provided by the embodiment of the application, the plurality of received data packets can be divided into at least one data segment by changing the packet format, so that one or more received data packets included in each data segment correspond to the same application program, and the data segment header is used for identifying the application program, so that extra processing expenditure can not be introduced when the data segments are analyzed, and the application program corresponding to one or more received data packets included in each data segment can be conveniently and directly determined.
In one possible design, the packetization module is specifically configured to: and determining a data segment corresponding to each received data packet according to the quintuple information of each received data packet in the plurality of received data packets so as to pack one or more received data packet groups in each data segment. Therefore, the modem device provided by the embodiment of the application can determine the data segment corresponding to each received data packet according to the five-tuple information of each received data packet in the plurality of received data packets by changing the packet format, and packet the one or more received data packets with the same five-tuple information in the same data segment, so that no extra processing overhead is introduced when analyzing the data segment, and the application program corresponding to the one or more received data packets in each data segment can be conveniently and directly determined.
In a third aspect, an embodiment of the present application provides an application processing apparatus, including a plurality of cores, including: the device comprises a receiving module, a data processing module and a data processing module, wherein the receiving module is used for receiving at least one data segment from the modem device, each data segment in the at least one data segment corresponds to one application program, and each data segment comprises a data segment head which is used for identifying the application program; the analysis module is used for analyzing at least one data segment to obtain a data segment head; and the scheduling module is used for transmitting one or more received data packets in each data segment to a core corresponding to the application program according to the data segment header.
Therefore, the application processing device provided by the embodiment of the application processing device comprises a plurality of cores, and the application processing device can transmit one or more received data packets in each data segment to the core corresponding to the application program according to the data segment header obtained by analyzing the data segment, so that the application program is run on the core to process the one or more received data packets. Therefore, the processing can be performed through the plurality of received data packets through the plurality of cores, compared with the processing of the plurality of data packets through the single core in the prior art, the processing capacity of the electronic equipment is reduced, the load of the plurality of cores of the electronic equipment can be reasonably balanced, and the technical effect of the capacity of the electronic equipment for processing the data packets is improved.
In one possible design, the parsing module is specifically configured to: analyzing at least one data segment on the network card layer to obtain a data segment header, and determining an application program according to the data segment header; transmitting one or more received data packets from the network card layer to the protocol stack layer; analyzing one or more received data packets on a protocol stack layer to obtain analyzed data; the scheduling module is specifically configured to transmit the parsed data to a core corresponding to the application program. Therefore, the application processing device provided by the embodiment of the application processing device can determine the application program corresponding to the data segment on the network card layer according to the data segment head obtained by analyzing the data segment, and compared with the prior art, the application processing device provided by the embodiment of the application processing device for analyzing the data segment on the network card layer by dividing the plurality of data packets by the L3/L4 of analyzing the plurality of data packets on the network card layer, which leads to the introduction of additional consumption. And the application processing device provided by the embodiment of the invention can analyze one or more received data packets on a protocol stack layer to obtain data in each data segment, and transmit the analyzed data to the core corresponding to the application program, so that the application program is operated on the core to process the one or more received data packets, namely, the one or more received data packets in the data segment are processed on the core corresponding to the application program corresponding to each data segment, so that the received data packets in different data segments are operated on the cores corresponding to different application programs, thereby reasonably balancing the loads of a plurality of cores of the electronic equipment and improving the capability of the electronic equipment for processing the data packets.
In a fourth aspect, embodiments of the present application provide a method for processing a data packet, where the method is applied to an electronic device, and the electronic device includes a plurality of cores, and the method includes: demodulating a plurality of received data packets, dividing the plurality of received data packets into at least one data segment, wherein each data segment in the at least one data segment corresponds to an application program, and each data segment comprises a data segment header which is used for identifying the application program; and analyzing at least one data segment to obtain a data segment header, and transmitting one or more received data packets in each data segment to a core corresponding to the application program according to the data segment header. The advantages achieved by the fourth aspect may be seen in the advantages of the first aspect.
In one possible design, parsing at least one data segment to obtain a data segment header, and transmitting one or more received data packets in each data segment to a core corresponding to an application according to the data segment header specifically includes: analyzing at least one data segment on the network card layer to obtain a data segment header, and determining an application program according to the data segment header; transmitting one or more received data packets from the network card layer to the protocol stack layer; analyzing one or more received data packets on a protocol stack layer to obtain analyzed data; and transmitting the parsed data to a core corresponding to the application program.
In one possible design, demodulating the plurality of received data packets, dividing the plurality of received data packets into at least one data segment specifically includes: and determining a data segment corresponding to each received data packet according to the quintuple information of each received data packet in the plurality of received data packets so as to pack one or more received data packet groups in each data segment.
In a fifth aspect, a computer readable storage medium comprises computer instructions which, when run on a computer or processor, cause the computer or processor to perform any one of the possible design methods of the fourth aspect and the fourth aspect described above.
The corresponding advantageous effects of the other aspects mentioned above may be referred to as descriptions about the advantageous effects of the first aspect, and are not repeated here.
Drawings
FIG. 1 is a flow chart of a process for processing a data packet;
FIG. 2 is a flow chart of processing a data packet;
fig. 3 is an application scenario schematic diagram of a method for processing a data packet according to an embodiment of the present application;
fig. 4 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
fig. 5 is a flowchart of a method for processing a data packet according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a packet format according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of a packet format according to an embodiment of the present application;
fig. 8 is a flowchart of a method for processing a data packet according to an embodiment of the present application;
FIG. 9 is a schematic diagram of the structural components of a device according to an embodiment of the present disclosure;
FIG. 10 is a schematic diagram of the structural components of a device according to an embodiment of the present disclosure;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For ease of understanding, a description of some of the concepts related to the embodiments of the present application are given by way of example for reference. The following is shown:
data packet (packet): is a data unit in a transmission control protocol/internet protocol (transmission control protocol/internet protocol, TCP/IP) protocol communication transmission. The data packet includes a physical layer, a link layer, a transmission control protocol (transmission control protocol, TCP) layer, and an internet protocol (internet protocol, IP) layer, which correspond to layer 1, layer 2, layer 3 (layer 3, L3), and layer 4 (layer 4, L4) of the data packet, respectively. Each layer appends a header to the data in the packet, which header contains the necessary information for that layer. The header of the TCP layer of the data packet comprises a source port and a destination port of the data packet, and the header of the IP layer of the data packet comprises a source IP address, a destination IP address and a protocol number of the data packet. In the embodiment of the application, the L3/L4 of the data packet is the TCP/IP layer of the data packet. Resolving the header of the L3/L4 of the data packet can be understood as resolving the header of the TCP/IP layer of the data packet, so as to obtain the source IP address, destination IP address, protocol number, source port and destination port of the data packet, and thus obtain the quintuple information of the data packet.
Quintuple information: the five-tuple information in the embodiment of the application corresponds to the same data flow by all the same data packets.
And (3) packaging: the modem of the terminal needs to receive a plurality of data packets from the air interface side and send the data packets to the application processor for processing, and the data packets are grouped into one data packet to be sent in a grouping way, so that the transmission rate can be improved.
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, "/" means or is meant unless otherwise indicated, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone.
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
Currently, in the case of packet reception, the process of processing a data packet at the terminal side is shown in fig. 1, and the terminal side includes a modem and an application processor. The modem is used for receiving the data packet and sending the data packet to the application processor, and the application processor is used for processing the data packet, and specifically comprises the following steps:
step 1, the modem receives a plurality of data packets from an air interface side.
And 2, the modem packs the plurality of data packets according to the receiving sequence from the air interface side.
Step 2 can be understood as that the modem groups a plurality of data packets into one large data packet (i.e., the grouped data packets) in the order of reception from the air interface side.
And 3, the modem sends the packetized data packet to the application processor through a universal serial bus (universal serial bus, USB).
And 4, the application processor receives the data packets after grouping on the hardware adaptation layer, and transmits the data packets after grouping to the network card layer of the application processor.
Among them, an application processor can be understood as a central processing unit (central processing unit, CPU). The application processor comprises a hardware adaptation layer, a network card layer, a protocol stack layer and an application layer. The header of each layer in the data packet has independent software to parse, wherein the hardware adaptation layer and the network card layer can be understood as software for parsing the header of the data packet link layer, the protocol stack layer in the application processor can be understood as a software collection for parsing the header of the data packet TCP layer and the header of the IP layer, and the application layer comprises one or more application programs. The application processor may run different software on different layers to perform different actions. For example, the application processor is mainly responsible for transmitting the received data packets after grouping to the network card layer on the hardware adaptation layer.
Specifically, in step 4, the application processor dispatches the packetized data packet to a core (i.e., a single core) of the application processor on the hardware adaptation layer, and the packetized data packet is transmitted to the network card layer of the application processor through the single core.
And 5, unpacking the packed data packets on the network card layer by the application processor to obtain a plurality of data packets.
After receiving the data packets after grouping, the application processor can unpack the data packets after grouping into a package format on the network card layer to obtain a plurality of data packets. It is also understood that one large packet (i.e., a packetized packet) is unpacked into a plurality of packets.
Specifically, in step 5, the application processor unpacks the data packets after the unpacking through the single check on the network card layer to obtain a plurality of data packets.
And 6, the application processor transmits the data packets to a protocol stack layer of the application processor on the network card layer.
Specifically, in step 6, the application processor dispatches the multiple data packets obtained after unpacking to a single core on the network card layer to transmit to the protocol stack layer.
Therefore, when the downlink rate of the air interface side is too high, and the modem receives more data packets from the air interface side, the application processor unpacks the packets and transmits a plurality of data packets on the network card layer through a single core, which can cause a larger load born by the single core, and further cause a decrease in the speed of processing the data packets by the application processor, namely a decrease in the processing capacity of the terminal side.
And 7, the application processor decodes the data packets on the protocol stack layer to obtain a plurality of user data in the data packets, and copies the user data to a core corresponding to the application program.
After receiving a plurality of data packets on a protocol stack layer, an application processor can parse the data packets to obtain a plurality of user data in the data packets, which can be understood as analyzing each data packet in the data packets layer by layer to obtain the user data in each data packet.
Specifically, in step 7, the application processor decodes the data packets through the single check multiple data packets on the protocol stack layer to obtain multiple user data in the multiple data packets, and schedules the multiple user data to the single core and copies the multiple user data to the core corresponding to the application program.
Therefore, when the number of user data obtained by the packet disassembly is large, the application processor decodes the packet by checking a plurality of packets through a single core on the protocol stack layer and copies the user data in the packet to the core corresponding to the application program, which results in a large load borne by the single core and further results in a decrease in the processing capacity of the terminal side.
It can be seen that, in the process of processing the data packet at the terminal side, the processes of unpacking, unpacking the data packet and copying the user data to the core corresponding to the application program by the application processor in steps 5 to 7 are processes with larger load occupation in the process of processing the data packet by the application processor. However, in the above-mentioned packet-collecting scenario, the terminal side only processes the data packet through a single core, so that the situation that the load of one core of the application processor is too high and the load of the other cores is low or in an idle state occurs, and the processing time and the processing speed of processing the data packet through a single core are long, so that the processing capability of the terminal side is reduced.
Therefore, in order to process the data packets through the multiple cores and balance the loads borne by the multiple cores, a scheme is proposed in which the application processor unpacks the packets on the network card layer and then parses the headers of the L3/L4 of the multiple data packets, that is, the headers of the TCP/IP layers of the multiple data packets. As shown in fig. 2, this scheme can be understood as replacing the above-mentioned steps 5 to 7 with steps 5 '-7', the remaining steps 1 to 4 are unchanged, and the steps 5 '-7' are as follows:
and 5', unpacking the packed data packets on the network card layer by using the processor to obtain a plurality of data packets, and analyzing the heads of L3/L4 of the plurality of data packets.
The five-tuple information of the data packet can be obtained by analyzing the head of the L3/L4 of the data packet, and the data stream to which the data packet belongs can be determined according to the five-tuple information of the data packet. The same data stream is initiated by the same application program, and the same application program can initiate a plurality of different data streams, or it can be understood that the same data stream corresponds to the same application program, and a plurality of different data streams can correspond to the same application program. The application processor can analyze the heads of the L3/L4 of the data packets on the network card layer to distinguish the data packets according to the data flow, namely, the data packets are split.
Specifically, in step 5', the application processor unpacks the data packets after unpacking through a single core on the network card layer to obtain a plurality of data packets, and then analyzes the heads of the L3/L4 of the plurality of data packets through the single core.
And 6', the application processor transmits a plurality of data packets to a protocol stack layer of the application processor on the network card layer.
The protocol stack layer that transmits the plurality of data packets to the application processor can be understood as: according to the result of the splitting of the plurality of data packets in the step 5 ', the data packets belonging to the same data stream are scheduled to the same core and transmitted to the protocol stack layer of the application processor, namely, the application processor in the step 6' schedules the plurality of data packets obtained after the splitting of the packets on the network card layer to the plurality of cores and transmits to the protocol stack layer.
And 7', the application processor unpacks the data packets on the protocol stack layer to obtain a plurality of user data in the data packets, and copies the user data to a core corresponding to the application program.
Specifically, in step 7', the application processor decodes the data packet by checking the plurality of data packets on the protocol stack layer to obtain a plurality of user data in the plurality of data packets, and schedules the plurality of user data to the plurality of cores to copy to the cores corresponding to the application program. It is also understood that a plurality of user data obtained by parsing a plurality of packets belonging to the same data stream are scheduled to the same core and copied to the core corresponding to the application corresponding to the data stream.
After the steps 5-7 are replaced by the steps 5 '-7', the application processor can process the data packet through a plurality of cores, so that the load born by a single core is reduced. However, the application processor adds an additional processing procedure on the network card layer, that is, the application processor adds a processing procedure of analyzing the header of the L3/L4 of the plurality of data packets on the network card layer, and the application processor still can analyze the data packets according to the original processing flow on the protocol stack layer. This approach therefore causes additional consumption by the application processor, introducing additional processing overhead.
Accordingly, the present application proposes a method of processing data packets, which may be applied to an electronic device. In view of the problem that in the prior art, under a packet-collecting scene, a single core processes a data packet, which results in the reduction of the capability of an application processor to process the data packet, the application divides a plurality of received data packets into at least one data segment, each data segment corresponds to an application program, each data segment comprises a data segment header, and one or more received data packets in each data segment are transmitted to a core corresponding to the application program according to the data segment header, thereby reasonably balancing the load born by a plurality of cores of the application processor, avoiding the situation that one core bears higher load and other cores bear lower load or are in an idle state, and improving the capability of the electronic equipment to process the data packet.
As shown in fig. 3, the method for processing a data packet according to the embodiment of the present application may be applied to a scenario of packet reception, where the scenario includes an electronic device and an external device, and the electronic device may be, for example, a chip, a mobile terminal, a tablet computer, a notebook computer, a personal computer (personal computer, PC), etc., and the external device may be, for example, a server, etc. The electronic device and the external device can communicate with each other, for example, data packets can be mutually transmitted, the external device is used for sending a plurality of receiving data packets to the electronic device, and the electronic device is used for receiving and processing the plurality of receiving data packets sent by the external device. Communication between the electronic device and the external device may pass through one or more intermediate nodes, such as a base station, a wireless router, a wired router, a gateway or relay node, etc.
In one example, as shown in fig. 4, a schematic diagram of a hardware structure of an electronic device, which may be a chip, is shown, and the chip is shown as chip 400 in fig. 4. Chip 400 may include a processor 401, memory 402, chip interface 403, and the like.
It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the chip 400. In other embodiments of the present application, chip 400 may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 401 may include one or more processing units for processing a plurality of received data packets received from the chip interface 403, for example, packetizing the plurality of received data packets, depacketizing the plurality of packetized data packets, depacketizing the plurality of received data packets, scheduling the plurality of received data packets, and the like. The different processing units may be separate components or may be integrated in one or more processors. For example, the processor 401 may include a graphics processor (graphics processing unit, GPU), a central processor (central processing unit, CPU), and/or a neural network processor (neural network processing unit, NPU), etc. In the present embodiment, the processor 401 includes a modem 4011 and an application processor 4012.
Among other things, modem 4011 may be used to receive and process received data packets. In this embodiment, the modem 4011 may be configured to parse the headers of L3/L4 of the plurality of received data packets to obtain five-tuple information of the plurality of received data packets, identify data flows corresponding to the plurality of received data packets, and divide one or more received data packets corresponding to a same data flow into a same data segment for grouping. It is understood that a data segment corresponds to a data stream, i.e. one or more received data packets in a data segment correspond to an application to which the same data stream corresponds, whereas a data stream is initiated by an application, and thus a data stream may also be understood to correspond to an application. The modem 4011 is further configured to send out the packetized data packets.
The application processor 4012 may be operable to receive and process received data packets. In this embodiment of the present application, the application processor 4012 may be configured to unpack the packed data packet to obtain at least one data segment, and transmit one or more received data packets in each data segment to a core corresponding to the application program.
Memory 402 may be used to store one or more computer programs, including instructions. The processor 401 may cause the chip 400 to execute the method of processing a data packet or the like provided in the embodiment of the present application by executing the above-described instructions stored in the memory 402. Memory 402 may include a code storage area and a data storage area. Wherein the data storage area may store data created during use of the chip 400, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as one or more disk storage units, flash memory units, universal flash memory (universal flash storage, UFS), and the like. In embodiments of the present application, memory 402 may be used to store one or more application programs.
The chip interface 403 may include one or more chip interfaces, and the chip interface 403 may be, for example, an interface for external communication by the modem 4011 in the processor 401, an antenna or ethernet interface, or the like. The chip interface 403 is used to communicate with external devices of the chip, for example, with a server.
In the method for processing data packets provided by the present application, the electronic device is taken as an example of a chip, and in the process of packaging and receiving packets by the chip, a plurality of received data packets are divided into at least one data segment, each data segment corresponds to an application program, each data segment comprises a data segment header, and a process of transmitting one or more received data packets in each data segment to a core corresponding to the application program according to the data segment header is described.
As shown in fig. 5, an embodiment of the present application provides a method for processing a data packet, where the method is applied to an electronic device, and the electronic device includes a plurality of cores, and takes the electronic device as a chip 400 for example, the method includes:
step 501, demodulating a plurality of received data packets, and dividing the plurality of received data packets into at least one data segment.
The plurality of received data packets may be understood as a plurality of data packets received by the electronic device from an external device, for example, a plurality of data packets received from a server, and the plurality of received data packets may be from different servers, and the plurality of received data packets may be, for example, a plurality of ethernet data packets. Each of the plurality of received data packets has a corresponding data stream, and the corresponding data stream of each of the plurality of received data packets may be the same or different. The data flow is initiated by an application program, one application program can initiate a plurality of data flows, and it can be understood that the same application program can initiate a plurality of different data flows, namely a plurality of data flows with different quintuple information. One data stream corresponds to one application, and it is understood that each received data packet has a corresponding application.
Dividing the plurality of received data packets into at least one data segment according to the data stream, specifically dividing one or more received data packets corresponding to the same data stream in the plurality of received data packets into the same data segment, can be understood as that one data stream corresponds to one data segment. Each data segment in the at least one data segment corresponds to an application program, it may be understood that one data segment corresponds to an application program, and a plurality of data segments may correspond to the same application program, that is, a plurality of data streams corresponding to the plurality of data segments are initiated by the same application program.
Each of the at least one data segment includes a data segment header for identifying an application, e.g., the data segment header includes data stream Identification (ID) information for indicating the application to which the data segment corresponds, which may be understood as indicating the application to which one or more received data packets divided into the data segment correspond.
In an exemplary embodiment, after receiving a plurality of received data packets, the electronic device demodulates the plurality of received data packets, identifies data streams corresponding to the plurality of received data packets, i.e., divides the plurality of received data packets into a plurality of data segments, and divides one or more received data packets belonging to a same data stream into a plurality of data segments. As shown in fig. 6, taking a plurality of received data packets as a received data packet 0, a received data packet 1 and a received data packet 2 as an example, after demodulating the received data packet 0, the received data packet 1 and the received data packet 2, the electronic device identifies a first data stream corresponding to the received data packet 2, and a second data stream corresponding to the received data packet 0 and the received data packet 1. The electronic device individually packages the received data packet 2 in a first data segment, and the first data segment includes a data segment header 0 for identifying a first application program corresponding to the first data segment. The electronic device packs the received data packet 0 and the received data packet 1 together in the second data segment according to the received sequence, and the second data segment includes a data segment header 1 for identifying a second application program corresponding to the second data segment. The first application program and the second application program may be the same application program or different application programs.
Specifically, the step 501 may be performed by a modem in the electronic device, for example, may be performed by the modem 4011 in fig. 4.
In some alternative embodiments, step 501 specifically includes:
and 5011, determining a data segment corresponding to each received data packet according to five-tuple information of each received data packet in the plurality of received data packets, so as to pack one or more received data packet groups in each data segment.
In step 501, the demodulation of the plurality of received data packets may be, for example, parsing the header of the L3/L4 of the plurality of received data packets to obtain quintuple information of each received data packet. The data packets with the identical quintuple information correspond to the same data stream, i.e. the data packets with the identical quintuple information can be divided into the same data segment and correspond to the same application program. It can be understood that the process of parsing the header of the L3/L4 of the plurality of data packets on the network card layer by the application processor in the prior art step 5' is performed by the modem 4011 of the present application, and the modem 4011 of the present application has the capability of parsing the header of the L3/L4 of the plurality of received data packets to obtain five-tuple information of each received data packet. Illustratively, the modem 4011 of the application includes a hardware accelerator, and the modem 4011 performs the step of parsing the header of the L3/L4 of the plurality of received data packets to obtain five-tuple information of each received data packet through the hardware accelerator. After obtaining the quintuple information of each received data packet, the modem 4011 can package one or more received data packets with the same quintuple information in the same data segment, which can also be performed by a hardware accelerator in the modem 4011.
The electronic device determines a data segment corresponding to each received data packet according to the five-tuple information of each received data packet after obtaining the five-tuple information of each received data packet, and packages one or more received data packets with the same five-tuple information in the same data segment.
As shown in fig. 6, the electronic device packages one or more received data packet groups with the same quintuple information in the same data segment in the order in which the plurality of received data packets are received. The plurality of received data packets after grouping include a grouping header, a data segment header of each data segment, and one or more received data packets in each data segment. The packet header is used for storing description information of a plurality of received data packets after the whole packet is formed, the data segment header of each data segment is used for identifying a data stream corresponding to the data segment, namely, an application program corresponding to the data segment, and one or more received data packets in each data segment are one or more received data packets corresponding to the same data stream, namely, one or more received data packets corresponding to the application program identified by the data segment header.
Taking a universal serial bus (universal serial bus, USB) network control model (network control model, NCM) packet format as an example, the plurality of received packets after being packetized are as shown in fig. 7, and include an NCM header, a plurality of NCM packet pointers (NDPs), and a plurality of received packets.
The NCM header may be understood as a packet header, and is used to store description information of a plurality of received data packets after being packetized. The NCM header includes information such as an NCM transport header (NCM transfer header, NTH), a length (NCM header), and a pointer (NDP). The NTH is a packet identifier, used for storing a fixed string application specific integrated circuit (application specific integrated circuit, ASIC) code, and the length (NCM header) is used for describing the length of the entire NCM header, and the pointer (NDP) is used for pointing to the position of the first NDP in the plurality of received data packets after the packet is assembled, which can be understood as being capable of indexing to the first NDP header after parsing into the pointer (NDP).
The plurality of NDPs may be understood as a plurality of data segments, and currently, in the NCM packet format specified by the USB communication device class (communication device class, CDC), the partitioning rule of each NDP is not specified.
As shown in fig. 7, the plurality of NDPs includes NDP0 and NDP1, and NDP0 includes a received data packet 2, and NDP1 includes a received data packet 0 and a received data packet 1. NDP0 includes information such as NDP0 header, length (NDP 0), pointer (next NDP), pointer (received packet 2), and length (received packet 2). The NDP0 header may be understood as a data segment header. Currently, in the NCM packet format of the USB CDC specification, the NDP header defaults to store the "ncmx" string ASIC code value, and in this embodiment, the NDP header is optimized to store information for identifying the application program. It should be understood that, when the NDP0 header is used to indicate information of an application program corresponding to the NDP0, for example, store the data stream ID information, and exemplarily put the data stream ID information into the NDP0 header, a fixed character may be placed in the first 16 bits (bits), and the data stream ID information is placed in the last 16 bits, which is not limited in this application. Length (NDP 0) is used to describe the length of the entire NDP0, a pointer (next NDP) is used to point to the location of the next NDP, a pointer (received packet 2) is used to point to the location of the received packet 2, and length (received packet 2) is used to describe the length of the received packet 2.
The format of NDP1 is similar to that of NDP0, and NDP1 includes information such as NDP1 header, length (NDP 1), pointer (next NDP), pointer (received packet 0), length (received packet 0), pointer (received packet 1), and length (received packet 1). The data stream ID information stored in the NDP1 header is different from the data stream ID information stored in the NDP0 header, which may be understood that NDP1 and NDP0 correspond to different applications, the length (NDP 1) is used to describe the length of the entire NDP1, the pointer (next NDP) is used to point to the position of the next NDP, when NDP1 is the last NDP, it may be understood that when the current data segment is the last data segment, the pointer (next NDP) =null, the pointer (received data packet 0) is used to point to the position of the received data packet 0, the length (received data packet 0) is used to describe the length of the received data packet 0, the pointer (received data, 1) is used to point to the position of the received data packet 1, and the length (received data packet 1) is used to describe the length of the received data packet 1.
The plurality of received data packets may be, for example, a plurality of ethernet data packets, and according to the quintuple information of each received data packet, one or more received data packets with the same quintuple information are grouped into the same data segment according to the grouping format of fig. 6 or fig. 7.
In the NCM group packet format of the CDC protocol specification illustrated in fig. 7, the NDP includes one or more received data packets, which may be understood as including pointer information of the one or more received data packets, where the one or more received data packets are indexed by the pointer information of the one or more received data packets. For example, the received data packet 1 is indexed to the position of the received data packet 1 by pointer (received data packet 1) information in the NDP1, and the NDP1 does not directly include the received data packet 1, but includes pointer (received data packet 1) information indicating the position of the received data packet 1, that is, it may be indicated that the NDP1 includes the received data packet 1. Accordingly, the packet format proposed in the embodiment of the present application may also be a manually defined packet format, where each data segment directly includes one or more received data packets, where the one or more data packets correspond to the same data stream, i.e. to the same application.
Step 502, at least one data segment is parsed to obtain a data segment header, and one or more received data packets in each data segment are transmitted to a core corresponding to an application program according to the data segment header.
The parsing of the at least one data segment may be understood as that the electronic device unpacks the multiple received data packets after the unpacking to obtain a data segment header included in each data segment of the at least one data segment and one or more received data packets in each data segment.
An electronic device comprises a plurality of cores, it being understood that an application processor in the electronic device comprises a plurality of cores, and an application program corresponds to one core, it being understood that an application program runs on one core. And according to the data segment header of each data segment obtained by analyzing at least one data segment, wherein the data stream ID information included in the data segment header can identify the application program corresponding to the data segment. Transmitting one or more received data packets in each data segment to the core corresponding to the application corresponding to the data segment may be understood as scheduling the one or more received data packets to run on the core corresponding to the application corresponding to the data segment.
The electronic device may, for example, unpack the packed multiple received data packets to obtain a data segment header of each data segment and one or more received data packets in each data segment, and transmit, according to an application program identified by the data segment header of each data segment, one or more received data packets in each data segment to a core corresponding to the corresponding application program, and run the application program on the core to process the one or more received data packets. Referring to the grouped multiple received data packets shown in fig. 6, the electronic device unpacks the grouped multiple received data packets to obtain information such as a data segment header 0, a received data packet 2, a data segment header 1, a received data packet 0, and a received data packet 1. The electronic device transmits the received data packet 2 to the core corresponding to the first application program identified by the data segment header 0 according to the data segment header 0, and operates the first application program on the core corresponding to the first application program so as to process the received data packet 2. The electronic device transmits the received data packet 0 and the received data packet 1 to a core corresponding to the second application program identified by the data segment header 1 according to the data segment header 1, and runs the second application program on the core corresponding to the second application program so as to process the received data packet 0 and the received data packet 1.
Specifically, the step 502 may be performed by an application processor in the electronic device, for example, may be performed by the application processor 4012 in fig. 4.
In some alternative embodiments, the application processor includes a hardware adaptation layer, a network card layer, a protocol stack layer, and an application layer. The header of each layer in the data packet is provided with independent software for analysis, wherein the hardware adaptation layer and the network card layer can be understood as software for analyzing the header of the data packet link layer, the protocol stack layer in the application processor can be understood as a software collection for analyzing the header of the data packet TCP layer and the header of the IP layer, the application layer comprises one or more application programs, one application program runs on one core, and the hardware adaptation layer, the network card layer and the protocol stack layer support multi-core operation. Step 502 specifically includes:
and 5021, analyzing at least one data segment on the network card layer to obtain a data segment header, and determining an application program according to the data segment header.
After receiving the multiple received data packets after the grouping, the electronic device transmits the multiple received data packets after the grouping to the network card layer on the hardware adaptation layer. The electronic equipment unpacks the plurality of packed received data packets on the network card layer to obtain the data segment header of each data segment, and determines the application program corresponding to each data segment according to the application program identified by the data segment header.
Step 5022, transmitting one or more received data packets from the network card layer to the protocol stack layer.
The electronic device transmits one or more received data packets corresponding to the same application program to the protocol stack layer, which can be understood that the electronic device schedules one or more received data packets corresponding to the same application program to the same core for transmission to the protocol stack layer, that is, the electronic device schedules one or more received data packets corresponding to different application programs in a plurality of received data packets to different cores for transmission to the protocol stack layer.
The electronic device transmits one or more received data packets in each data segment to the protocol stack layer through different upload queues, illustratively, on the network card layer according to the application program of the data segment header identification of each data segment. Wherein one or more received data packets in the same data segment are transmitted in the same upload queue.
And 5023, analyzing one or more received data packets on the protocol stack layer to obtain analyzed data.
The electronic equipment analyzes the received data packets layer by layer on a protocol stack layer to obtain analyzed data, and one or more pieces of data in the same data segment correspond to the same application program.
Step 5024, the parsed data is transmitted to the core corresponding to the application program.
The electronic device transmits the parsed data to a core corresponding to an application corresponding to the parsed data, that is, the parsed data is transmitted to a core corresponding to an application corresponding to a data segment corresponding to the parsed data. It may be understood that one or more received data packets corresponding to the same data segment in the plurality of received data packets correspond to the same application program, one application program corresponds to one core, and data obtained by parsing the one or more received data packets corresponding to the same data segment is scheduled to the core corresponding to the corresponding application program.
Therefore, the method for processing the data packet provided in the embodiment of the application can be applied to an electronic device, such as a chip, when a packet-packing process is performed, by dividing a plurality of received data packets into at least one data segment, each data segment corresponds to an application program, a data segment header of each data segment is used for identifying a packet-packing format of the application program, and when the packet is unpacked, one or more received data packets in each data segment are transmitted to a core corresponding to the application program corresponding to the data segment. Compared with the prior art, each data segment in the packet format is not standardized, and a plurality of data packets are processed through a single check, so that the load born by a single core is larger, and the processing capacity of the electronic equipment is reduced.
As shown in fig. 8, the electronic device includes a modem for receiving and processing a plurality of received data packets from an air interface side, and an application processor for receiving and processing a plurality of received data packets from the modem, the application processor including a plurality of cores, the application processor including a hardware adaptation layer, a network card layer, a protocol stack layer, and an application layer including one or more programs, and specifically includes the steps of:
and a step a, the modem receives a plurality of data packets from the air interface side.
Illustratively, the modem may receive multiple data packets sent by the server from the air interface side.
Step b, the modem demodulates a plurality of received data packets.
Step b may be referred to the description of step 501 above, which is not repeated here.
Step c, the modem divides the plurality of received data packets into at least one data segment.
Each data segment in the at least one data segment corresponds to an application program, and each data segment comprises a data segment header, and the data segment header is used for identifying the application program. Step c may be referred to the description of step 501 above, which is not repeated here.
The step c specifically includes a step c1 of determining a data segment corresponding to each received data packet according to five-tuple information of each received data packet in the plurality of received data packets, so as to pack one or more received data packet groups in each data segment. Step c1 may be described in reference to step 5011 above, which is not repeated here.
The modem may include, for example, a hardware accelerator, and the above-mentioned processes of step b and step c may be specifically performed by the hardware accelerator, that is, the hardware accelerator may split and group the received multiple received data packets.
Step d, the modem sends at least one data segment to the application processor.
Wherein one or more of the received data packets in each data segment are for transmission to a core corresponding to the application. The modem may send the at least one data segment to the application processor by wired or wireless means, e.g. the modem may send the at least one data segment to the application processor by USB.
And e, the application processor receives at least one data segment from the modem.
The application processor receives at least one data segment on the hardware adaptation layer and transmits the at least one data segment to the network card layer of the application processor.
And f, analyzing at least one data segment by the application processor to obtain a data segment head.
Step f may be referred to the description of step 502 above, which is not repeated here.
The step f specifically comprises the following steps: and f1, analyzing at least one data segment on the network card layer to obtain a data segment header, and determining an application program according to the data segment header.
And f2, transmitting one or more received data packets from the network card layer to the protocol stack layer.
Step f3, analyzing one or more received data packets on the protocol stack layer to obtain analyzed data;
and f4, transmitting the parsed data to a core corresponding to the application program.
Step f 1-step f4 may be referred to the description of steps 5021-5024 above, which are not repeated here.
And g, the application processor transmits one or more received data packets in each data segment to a core corresponding to the application program according to the data segment header.
Step g may be referred to the description of step 502 above, which is not repeated here.
Therefore, the method for processing the data packet provided by the embodiment of the application can be applied to electronic equipment, the electronic equipment comprises a modem and an application processor, when a packet-packing process is carried out, the modem divides a plurality of received data packets into at least one data segment, each data segment corresponds to one application program, the data segment header of each data segment is used for identifying the packet-packing format of the application program, and when the packet is unpacked, the application processor transmits one or more received data packets in each data segment to a core corresponding to the application program corresponding to the data segment. Compared with the prior art, the method has the advantages that extra consumption is introduced at the application processor side, so that the processing capacity of the electronic equipment is reduced, the packet format is changed, the plurality of received data packets are checked through the plurality of cores to be processed, the extra consumption is not introduced at the application processor side, the load of the plurality of cores of the electronic equipment is reasonably balanced, and the technical effect of the capacity of the electronic equipment for processing the data packets is improved.
It will be appreciated that, in order to achieve the above-mentioned functions, the electronic device includes corresponding hardware structures and/or software modules for performing the respective functions. Those of skill in the art will readily appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application, but such implementation is not to be considered as beyond the scope of the embodiments of the present application.
The embodiment of the application may divide the functional modules of the electronic device according to the method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
In the case of dividing the respective functional modules with the respective functions, fig. 9 shows a schematic diagram of one possible composition of the modem apparatus 900 related to the above embodiment, and the modem apparatus 900 may be a modem related to the above embodiment, as shown in fig. 9, the modem apparatus 900 may include: a demodulation module 901, a packetizing module 902 and a transmitting module 903.
Wherein the demodulation module 901 may be used to support the modem 900 to perform steps 501 and b, etc., described above, and/or other processes for the techniques described herein.
The packetizing module 902 may be used to support the modem 900 to perform the steps 501, 5011, c1, etc., described above, and/or other processes for the techniques described herein.
The transmitting module 903 may be used to support the modem 900 to perform step d, etc., described above, and/or other processes for the techniques described herein.
It should be noted that, all relevant contents of each step related to the above method embodiment may be cited to the functional description of the corresponding functional module, which is not described herein.
The modem 900 provided in this embodiment is configured to perform the method for processing a data packet, so that the same effects as those of the implementation method can be achieved.
In the case of dividing the respective functional modules with the respective functions, fig. 10 shows a schematic diagram of one possible composition of the application processing apparatus 1000 involved in the above-described embodiment, the application processing apparatus 1000 may be an application processor involved in the above-described embodiment, and as shown in fig. 10, the application processing apparatus 1000 may include: a receiving module 1001, a parsing module 1002 and a scheduling module 1003.
Wherein the receiving module 1001 may be for supporting the application processing apparatus 1000 to perform step e, etc. described above, and/or for other processes of the techniques described herein.
The parsing module 1002 may be used to support the application processing apparatus 1000 to perform the steps 502, 5021, 5022, 5023, f1, f2, f3, etc., described above, and/or other processes for the techniques described herein.
The scheduling module 1003 may be used to support the application processing apparatus 1000 to perform step 502, step 5024, step f4, step g, etc., described above, and/or other processes for the techniques described herein.
It should be noted that, all relevant contents of each step related to the above method embodiment may be cited to the functional description of the corresponding functional module, which is not described herein.
The application processing apparatus 1000 provided in this embodiment is configured to perform the method for processing a data packet, so that the same effects as those of the implementation method can be achieved.
In the case of using an integrated unit, as shown in fig. 11, an embodiment of the present application discloses an electronic device 1100, where the electronic device 1100 may be the chip 400 in the above embodiment. The electronic device 1100 may include a processing module, a storage module, and a communication module. The processing module may be configured to control and manage the actions of the electronic device 1100, for example, may be configured to support the electronic device 1100 to perform the steps performed by the demodulation module 901, the packet module 902, the sending module 903, the receiving module 1001, the parsing module 1002, and the scheduling module 1003. The memory module may be used to support the electronic device 1100 in storing program code, data, and the like. The communication module may be used to support communication of the electronic device 1100 with other devices, for example, may be used to support the electronic device 1100 to perform step a above.
Of course, the unit modules in the above-described electronic device 1100 include, but are not limited to, the above-described processing module, memory module, and communication module.
Wherein the processing module may be a processor or a controller. Which may implement or perform the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. A processor may also be a combination that performs computing functions, e.g., including one or more microprocessors, digital signal processing (digital signal processing, DSP) and microprocessor combinations, and the like. The memory module may be a memory. The communication module may specifically be a device that interacts with other external devices.
For example, the processing module may be a processor 401, the storage module may be a memory 402, and the communication module may be a chip interface 403. The electronic device 1100 provided by the embodiment of the present application may be the chip 400 shown in fig. 4. The processor 401, the memory 402, the chip interface 403, etc. may be connected together, for example, by a bus.
Embodiments of the present application also provide an electronic device including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, the one or more memories being configured to store computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform the related method steps described above to implement the method of processing data packets in the above-described embodiments.
Embodiments of the present application also provide a computer readable storage medium having stored therein computer program code which, when executed on a computer or processor, causes the computer or processor to perform the method of processing data packets in the above embodiments.
The electronic device and the computer storage medium provided in this embodiment are used to execute the corresponding methods provided above, so that the beneficial effects that can be achieved by the electronic device and the computer storage medium can refer to the beneficial effects in the corresponding methods provided above, and are not described herein.
It will be appreciated by those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes or substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

  1. An electronic device, the electronic device comprising:
    a modem for demodulating a plurality of received data packets, dividing the plurality of received data packets into at least one data segment, each of the at least one data segment corresponding to an application, each of the at least one data segment including a data segment header for identifying the application;
    the application processor comprises a plurality of cores, and is used for analyzing the at least one data segment to obtain the data segment header, and transmitting one or more received data packets in each data segment to the core corresponding to the application program according to the data segment header.
  2. The electronic device of claim 1, wherein the application processor is specifically configured to:
    Analyzing the at least one data segment on a network card layer to obtain a data segment header, and determining the application program according to the data segment header;
    transmitting the one or more received data packets from the network card layer to a protocol stack layer;
    analyzing the one or more received data packets on the protocol stack layer to obtain analyzed data;
    and transmitting the parsed data to the core corresponding to the application program.
  3. The electronic device according to claim 1 or 2, characterized in that the modem is specifically adapted to:
    and determining a data segment corresponding to each received data packet according to the five-tuple information of each received data packet in the plurality of received data packets so as to pack the one or more received data packet groups in each data segment.
  4. A modem apparatus, the modem apparatus comprising:
    a demodulation module for demodulating a plurality of received data packets;
    a packet grouping module, configured to divide the plurality of received data packets into at least one data segment, where each data segment in the at least one data segment corresponds to an application program, and each data segment includes a data segment header, where the data segment header is used to identify the application program;
    And the sending module is used for sending the at least one data segment to the application processing device, and one or more received data packets in each data segment are used for being transmitted to a core corresponding to the application program.
  5. The modem apparatus of claim 4, wherein the packetization module is specifically configured to:
    and determining a data segment corresponding to each received data packet according to the five-tuple information of each received data packet in the plurality of received data packets so as to pack the one or more received data packet groups in each data segment.
  6. An application processing apparatus comprising a plurality of cores, the application processing apparatus comprising:
    a receiving module, configured to receive at least one data segment from a modem device, where each data segment in the at least one data segment corresponds to an application program, and each data segment includes a data segment header, where the data segment header is used to identify the application program;
    the analyzing module is used for analyzing the at least one data segment to obtain the data segment head;
    and the scheduling module is used for transmitting one or more received data packets in each data segment to a core corresponding to the application program according to the data segment header.
  7. The application processing device according to claim 6, wherein the parsing module is specifically configured to:
    analyzing the at least one data segment on a network card layer to obtain a data segment header, and determining the application program according to the data segment header;
    transmitting the one or more received data packets from the network card layer to a protocol stack layer;
    analyzing the one or more received data packets on the protocol stack layer to obtain analyzed data;
    the scheduling module is specifically configured to transmit the parsed data to the core corresponding to the application program.
  8. A method of processing a data packet, the method being applied to an electronic device, the electronic device comprising a plurality of cores, the method comprising:
    demodulating a plurality of received data packets, dividing the plurality of received data packets into at least one data segment, wherein each data segment in the at least one data segment corresponds to an application program, each data segment comprises a data segment header, and the data segment header is used for identifying the application program;
    and analyzing the at least one data segment to obtain the data segment header, and transmitting one or more received data packets in each data segment to a core corresponding to the application program according to the data segment header.
  9. The method of claim 8, wherein parsing the at least one data segment to obtain the data segment header, and transmitting the one or more received data packets in each data segment to the core corresponding to the application according to the data segment header specifically comprises:
    analyzing the at least one data segment on a network card layer to obtain a data segment header, and determining the application program according to the data segment header;
    transmitting the one or more received data packets from the network card layer to a protocol stack layer;
    analyzing the one or more received data packets on the protocol stack layer to obtain analyzed data;
    and transmitting the parsed data to the core corresponding to the application program.
  10. The method according to claim 8 or 9, wherein demodulating the plurality of received data packets, dividing the plurality of received data packets into at least one data segment, comprises:
    and determining a data segment corresponding to each received data packet according to the five-tuple information of each received data packet in the plurality of received data packets so as to pack the one or more received data packet groups in each data segment.
  11. A computer readable storage medium comprising computer instructions which, when run on a computer or processor, cause the computer or processor to perform the method of any of the preceding claims 8-10.
CN202180099446.2A 2021-11-22 2021-11-22 A method and device for processing data packets Pending CN117561706A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/132095 WO2023087306A1 (en) 2021-11-22 2021-11-22 Method and device for processing data packets

Publications (1)

Publication Number Publication Date
CN117561706A true CN117561706A (en) 2024-02-13

Family

ID=86396065

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202180099446.2A Pending CN117561706A (en) 2021-11-22 2021-11-22 A method and device for processing data packets

Country Status (2)

Country Link
CN (1) CN117561706A (en)
WO (1) WO2023087306A1 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080130680A1 (en) * 2006-12-05 2008-06-05 Electronics And Telecommunications Research Institute Apparatus and method for receiving upstream data packet
EP2176773B1 (en) * 2007-07-09 2015-09-02 Hewlett-Packard Development Company, L. P. Data packet processing method for a multi core processor
CN110650168B (en) * 2018-06-27 2021-09-14 华为技术有限公司 Communication method and device thereof
KR102604290B1 (en) * 2018-07-13 2023-11-20 삼성전자주식회사 Apparatus and method for processing data packet of eletronic device
CN110968415B (en) * 2018-09-29 2022-08-05 Oppo广东移动通信有限公司 Scheduling method and device of multi-core processor and terminal
KR102780108B1 (en) * 2019-11-18 2025-03-12 삼성전자주식회사 Electronic device for controlling delivery of packet and operating method thereof

Also Published As

Publication number Publication date
WO2023087306A1 (en) 2023-05-25

Similar Documents

Publication Publication Date Title
CN114189571B (en) Apparatus and method for implementing accelerated network packet processing
CN104579695B (en) A kind of data forwarding device and method
TWI392288B (en) System and method for multicore communication processing
CN110661725A (en) Techniques for reordering network packets on egress
CN112243046B (en) Communication method and network card
CN106209506A (en) A kind of virtualization deep-packet detection flow analysis method and system
CN105975433B (en) A kind of message processing method and device
US9910687B2 (en) Data flow affinity for heterogenous virtual machines
CN101902395A (en) The system and method for the resource on the management host
WO2018004953A1 (en) Technologies for scalable packet reception and transmission
US20170187587A1 (en) Technologies for inline network traffic performance tracing
CN114885045B (en) Method and device for saving DMA channel resources in high-speed intelligent network card/DPU
CN117560433A (en) DPU (digital versatile unit) middle report Wen Zhuaifa order preserving method and device, electronic equipment and storage medium
CN117041370A (en) Communication method and system
CN102238064B (en) Data transmission method, device and system
CN114363432A (en) Method, device and storage medium for obtaining message header information and generating message
US10554513B2 (en) Technologies for filtering network packets on ingress
CN117561706A (en) A method and device for processing data packets
EP4203432A1 (en) Multi-stream scheduling for time sensitive networking
CN112804027A (en) Data packet generation method and device and data reading method and device
CN117793016A (en) Datagram transmission method and device, electronic equipment and storage medium
CN116405420A (en) Network tester, network testing system and network testing method
CN113098780A (en) Message processing method of virtual network, electronic device and storage medium
CN116095015B (en) Electronic sentinel data transmission efficiency improving method, device, equipment and storage medium
CN111193574B (en) Data transmission method and data transmission system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination