CN115225586A - Data packet transmitting method, device, equipment and computer readable storage medium - Google Patents

Data packet transmitting method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN115225586A
CN115225586A CN202210831632.7A CN202210831632A CN115225586A CN 115225586 A CN115225586 A CN 115225586A CN 202210831632 A CN202210831632 A CN 202210831632A CN 115225586 A CN115225586 A CN 115225586A
Authority
CN
China
Prior art keywords
data packet
target
item information
attribute item
target data
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.)
Granted
Application number
CN202210831632.7A
Other languages
Chinese (zh)
Other versions
CN115225586B (en
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.)
Yusur Technology Co ltd
Original Assignee
Yusur Technology 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 Yusur Technology Co ltd filed Critical Yusur Technology Co ltd
Priority to CN202210831632.7A priority Critical patent/CN115225586B/en
Publication of CN115225586A publication Critical patent/CN115225586A/en
Application granted granted Critical
Publication of CN115225586B publication Critical patent/CN115225586B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control

Landscapes

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

Abstract

The invention relates to a data packet sending method, a device, equipment and a computer readable storage medium, which are characterized in that after a target description identifier included in scheduling information is obtained according to the scheduling information, attribute item information when a data packet processing node processes a data packet is obtained from a pre-established corresponding relation between the description identifier and the attribute item information based on the target description identifier, so that the data packet processing node only needs to process the target data packet according to the attribute item information and does not need to extract the attribute item information from all data packet information, the processing efficiency of the data packet processing node on the target data packet is improved, and the sending efficiency of the data packet to a next processing node is further improved.

Description

Data packet sending method, device, equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of communications, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for sending a data packet.
Background
In general, in packet transmission, after a processing node finishes processing a packet, the processing node sends the packet to a next processing node, and the next processing node processes the packet.
When each processing node processes a data packet, for example, protocol identification, protocol parsing, fragmentation reassembly, stream restoration, and the like, a large amount of data packet information is generated, for example, the data packet information includes attribute item information such as a data packet storage address and a transmission port related to processing the data packet, and the data packet information also includes information such as log data unrelated to processing the data packet.
Because the data packet information is complicated, the time consumption for creating and modifying the data packet information is long, the occupied resources are more, the processing efficiency of the data packet processing node in the data packet processing process is low, and the sending efficiency of the data packet at the node is low.
Disclosure of Invention
To solve the technical problem or at least partially solve the technical problem, the present disclosure provides a data packet transmission method, apparatus, device and computer-readable storage medium.
In a first aspect, an embodiment of the present disclosure provides a data packet information processing method, including:
acquiring a scheduling message, wherein the scheduling message comprises a target description identifier, and the target description identifier is used for describing a group of attribute item information of a target data packet to be sent;
based on the target description identification, acquiring attribute item information of the target data packet from a corresponding relation between the pre-established description identification and the attribute item information, wherein the attribute item information comprises: a packet storage address and a transmit port;
acquiring a target data packet based on the data packet storage address;
and transmitting the target data packet based on the transmitting port.
In a second aspect, an embodiment of the present disclosure provides a data packet sending apparatus, including: the first acquisition module is used for acquiring a scheduling message, wherein the scheduling message comprises a target description identifier, and the target description identifier is used for describing a group of attribute item information of a target data packet to be sent;
a second obtaining module, configured to obtain attribute item information of the target data packet from a pre-established correspondence between the description identifier and the attribute item information based on the target description identifier, where the attribute item information includes: a packet storage address and a transmit port;
the third acquisition module is used for acquiring a target data packet based on the data packet storage address;
and the sending module is used for sending the target data packet based on the sending port.
In a third aspect, an embodiment of the disclosure provides a data packet sending device, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method as in the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the method of the first aspect.
In at least one embodiment provided by the present disclosure, after a target description identifier included in scheduling information is obtained according to the scheduling information, attribute item information when a data packet processing node processes a data packet is obtained from a pre-established correspondence between the description identifier and the attribute item information based on the target description identifier, so that the data packet processing node only needs to process the target data packet according to the attribute item information, and does not need to extract the attribute item information from all data packet information, thereby improving the processing efficiency of the data packet processing node on the target data packet, and further improving the sending efficiency of the data packet to a next processing node.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the embodiments or technical solutions in the prior art description will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a schematic flowchart of a method for sending a data packet according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of another data packet transmission method according to the embodiment of the present disclosure;
fig. 3 is a schematic diagram of a correspondence between pre-generated description identifiers and object description identifiers and attribute information of an object data packet according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a data packet sending apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a data packet sending device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more complete and thorough understanding of the present disclosure. It should be understood that the drawings and the embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Generally, when each processing node processes a packet, for example, protocol identification, protocol parsing, fragmentation and reassembly, and stream restoration, a large amount of packet information is generated, for example, the packet information includes attribute item information such as a packet storage address and a transmission port related to processing the packet, and the packet information further includes information such as log data that is not related to processing the packet.
Because the data packet information is complicated, the time consumption for creating and modifying the data packet information is long, the occupied resources are more, the processing efficiency of the data packet processing node in the data packet processing process is low, and the sending efficiency of the data packet at the node is low.
In view of the foregoing problems, embodiments of the present disclosure provide a data packet sending method, apparatus, device, and computer-readable storage medium. The following first describes the packet transmission method with reference to a specific embodiment.
In the disclosed embodiment, the packet transmission method may be performed by a packet transmission apparatus. The data packet sending device may be an electronic device or a server. The electronic devices may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), wearable devices, and the like, and fixed terminals such as digital TVs, desktop computers, smart home devices, and the like. The server can be an independent server or a cluster of a plurality of servers, and can comprise a server built in the local and a server erected in the cloud.
Fig. 1 is a schematic flow chart of a data packet sending method according to an embodiment of the present disclosure.
As shown in fig. 1, the method for sending data packets mainly includes the following steps:
s110, obtaining a scheduling message, wherein the scheduling message comprises a target description identifier, and the target description identifier is used for describing a group of attribute item information of a target data packet to be sent.
In the embodiment of the present disclosure, the attribute item information may be understood as data information related to processing of the target data packet by the data packet processing node.
Furthermore, the target description identifier can be understood as a unique identifier of a set of attribute item information of the target data packet to be sent. The unique identifier may be an identifier formed by combining numbers, letters or alphanumerics, and the format of the unique identifier is not limited in the embodiment of the disclosure.
The scheduling information may be understood as information generated after determining a target data packet to be transmitted.
For example, when there are a plurality of data packets to be transmitted, the plurality of data packets are transmitted in a certain order, and therefore, it is necessary to determine a destination data packet to be transmitted each time. Wherein, the sequence may be a first-in first-out sequence or a random sequence, and the like, and the embodiments of the disclosure are not limited thereto
After the target data packet to be sent is determined, because the sending of the data packet is time-consuming, the direct sending often reaches a processing bottleneck, and pressure is generated on a sending main body, therefore, in the embodiment of the present disclosure, the attribute item information of the data packet to be sent is generated into scheduling information, and the scheduling information is cached by a specific sequence storage structure, and includes a target description identifier.
In the embodiment of the present disclosure, the scheduling information may be generated by:
storing all description identifications included in the corresponding relation between the pre-established description identifications and the attribute item information into a description identification queue according to the sequence; and scheduling based on the description identification queue to generate a scheduling message.
S120, based on the target description identifier, obtaining attribute item information of the target data packet from the corresponding relation between the pre-established description identifier and the attribute item information, wherein the attribute item information comprises: the packet stores the address and the transmit port.
In the embodiment of the present disclosure, a corresponding relationship between the description identifier and the attribute item information is pre-established, and when there is scheduling information, according to a target description identifier included in the scheduling information, attribute item information corresponding to the target description identifier is queried from the pre-established corresponding relationship between the description identifier and the attribute item information.
The data packet storage address is an address for storing a target data packet, and the data packet storage address may be a local physical address or a network address, which is not limited in this embodiment. The sending port may be a port for sending out a target data packet, may be a local physical port, or may be a virtual port, which is not limited in this embodiment.
In the embodiment of the present disclosure, since the target packet is to be sent, further, the attribute item information in the embodiment of the present disclosure includes the packet storage address and the attribute item information related to the sending port and the sending process.
In other embodiments, the protocol analysis processing and the like may be performed on the target packet, and further, in other embodiments, the attribute item information may further include information such as a packet length and an offset length, and attribute item information related to the protocol analysis processing and the like, such as a packet storage address and a transmission port.
It should be noted that, in some embodiments, when the target packet is sent, other attribute item information, such as queue information, may also be included, which is not limited in this disclosure.
And S130, acquiring a target data packet based on the data packet storage address.
In an embodiment of the present disclosure, obtaining a target data packet based on a data packet storage address includes: and acquiring the target data packet from the data packet cache region based on the data packet storage address.
The data packet buffer may be a local storage space or a remote storage space, which is not limited in this embodiment.
It can be understood that, in the embodiment of the present disclosure, the target data packet to be sent needs to be stored in the data packet buffer in advance.
And S140, transmitting the target data packet based on the transmitting port.
In the embodiment of the present disclosure, after the target data packet to be sent is obtained from the data packet buffer, the target data packet to be sent is sent to the port for output according to the sending port.
Therefore, according to the embodiment of the disclosure, after the target description identifier included in the scheduling information is obtained according to the scheduling information, the attribute item information when the data packet processing node processes the data packet is obtained from the pre-established corresponding relationship between the description identifier and the attribute item information based on the target description identifier, so that the data packet processing node only needs to process the target data packet according to the attribute item information, and does not need to extract the attribute item information from all data packet information, thereby improving the processing efficiency of the data packet processing node on the target data packet, and further improving the sending efficiency of the data packet to the next processing node.
Fig. 2 is a schematic flowchart of another method for sending a data packet according to an embodiment of the present disclosure. Fig. 3 is a schematic diagram of correspondence between a pre-generated description identifier and a target description identifier and attribute information of a target data packet according to an embodiment of the present disclosure, and the data packet sending method shown in fig. 2 is described below with reference to fig. 3.
As shown in fig. 2, the packet sending method includes the following steps:
s210, processing the target data packet based on a preset group of attribute items to obtain corresponding attribute item information, and storing the target data packet in a data packet cache region.
In the embodiment of the present disclosure, an attribute item is preset, and the attribute item may be understood as a data field name required when the packet processing node processes the target packet.
According to the attribute items, the attribute item information corresponding to the attribute items can be extracted from the target data packet. And all information of the target data packet is stored in the data packet buffer area.
And S220, acquiring attribute item information of the target data packet.
S230, acquiring an unused target description identifier from a pre-generated description identifier set; and associating the target description identification with the attribute item information of the target data packet and recording the target description identification in the corresponding relation.
In the embodiment of the present disclosure, a plurality of description identifiers are generated in advance, and the plurality of description identifiers form a description identifier set. With each description identifying a state that may be marked as used or not.
For example, when each description identifier is generated, the state of each description identifier is marked as unused. And after the description identifier is associated with the attribute item information of the target data packet, marking the state of the description identifier as used.
Furthermore, in the embodiment of the present disclosure, after the attribute item information of the target data packet is obtained, whether there is an unused description identifier may be determined according to a state of whether the description identifier is used.
If the attribute item information of the target data packet exists, acquiring any one of the description identifiers with an unused state, taking the description identifier as a target description identifier, associating the target description identifier with the attribute item information of the target data packet, recording the corresponding relationship, and recording the corresponding relationship into a storage space. The storage may be a memory, a data table, or the like, which is not limited in this disclosure.
It should be noted that, in other embodiments, it is also possible to not mark the state of whether each description identifier is used, but to generate a plurality of description identifiers in advance, for example, the pre-generated target identifier in fig. 3. And when the description identifier is associated with the attribute item information of the target data packet, directly taking the description identifier out of the description identifier set as a target description identifier, namely deleting the identifier in the description identifier set, and recording the association relationship between the target description identifier and the attribute item information of the target data packet.
Specifically, after the attribute item information of the target data packet is obtained, whether the description identifier set has a remaining description identifier may be determined. If so, the unused description identifier is considered to be present. Then a description identification is randomly acquired or a description identification is taken out according to the sequence of the description identifications, namely the taken-out description identification is taken as a target description identification, and the incidence relation between the target description identification and the attribute item information of the target data packet is recorded. For example, the fetch description shown in FIG. 3 identifies and records.
The established corresponding relationship between the target description identifier and the attribute item information of the target data packet is the corresponding relationship between the target description identifier and the attribute item information of the target data packet shown in fig. 3.
It should be noted that, in the embodiment of the present disclosure, a plurality of description identifiers are generated in advance, and the plurality of description identifiers form a description identifier set. Meanwhile, each description identifier can be marked as the used state or not as an example, and the introduction of the subsequent steps is carried out.
S240, modifying the state of the target description identifier from unused to used.
In the embodiment of the present disclosure, after the corresponding relationship between the target description identifier and the attribute item information of the target data packet is recorded, the state of the target description identifier is changed to be used.
S250, obtaining a scheduling message, wherein the scheduling message comprises a target description identifier.
In the embodiment of the present disclosure, the step is the same as the step S110, and is not described herein again.
S260, acquiring attribute item information of the target data packet from the corresponding relation between the pre-established description identifier and the attribute item information based on the target description identifier, wherein the attribute item information comprises: the packet stores the address and the transmit port.
In the embodiment of the present disclosure, the step is the same as the step S120, and is not described herein again.
S270, obtaining the target data packet from the data packet cache region based on the data packet storage address.
In the embodiment of the present disclosure, since the target data packet is stored in the data buffer in step S210, the target data packet corresponding to the data packet storage address can be found in the data buffer according to the data packet storage address.
And S280, transmitting the target data packet based on the transmitting port.
In the embodiment of the present disclosure, the step is the same as the step S140, and is not described herein again.
And S290, modifying the state of the target description identifier from used to unused.
In the embodiment of the disclosure, after the target data packet is sent, the state of the target description identifier is modified to be unused, so that the target description identifier can be reused.
In other embodiments, the target description identifier may be recycled and added to the description identifier set after the target data packet is sent, so that the target description identifier may be reused, i.e. the recycling description identifier shown in fig. 3.
As can be seen, in the embodiment of the present disclosure, after a target data packet is processed based on a group of attribute items, attribute item information of the target data packet to be sent may be obtained, then a target descriptor is determined from a description identifier set, and a correspondence between a target description identifier and the attribute item information of the target data packet is recorded, so that according to the target description identifier, attribute item information of the target data packet to be sent may be determined, and the target data packet is sent. The data packet processing node only needs to process the target data packet according to the attribute item information and does not need to extract the attribute item information from all data packet information, so that the processing efficiency of the data packet processing node on the target data packet is improved, and the sending efficiency of the data packet processing node on the next processing node is improved.
In addition, according to the embodiment of the disclosure, after the target data packet is sent, the state of the target description identifier is modified to be unused, so that the target description identifier can be reused, the times of generating the target description identifier and the number of the target description identifier are reduced, and resource waste is avoided.
Fig. 4 is a schematic structural diagram of a data packet sending apparatus according to an embodiment of the present disclosure. The packet sending apparatus provided in the embodiment of the present disclosure may perform the processing procedure provided in the embodiment of the packet sending method, as shown in fig. 4, the packet sending apparatus 400 includes:
a first obtaining module 410, configured to obtain a scheduling message, where the scheduling message includes a target description identifier, and the target description identifier is used to describe a set of attribute item information of a target data packet to be sent.
A second obtaining module 420, configured to obtain, based on the target description identifier, attribute item information of the target data packet from a pre-established correspondence between the description identifier and the attribute item information, where the attribute item information includes: the packet stores the address and the transmit port.
A third obtaining module 430, configured to obtain a target data packet based on the data packet storage address;
a sending module 440, configured to send the destination data packet based on the sending port.
Optionally, before the first obtaining module 410 is configured to obtain the scheduling message, the data packet sending apparatus 400 further includes a fourth obtaining module, a fifth obtaining module, and an association module,
and the fourth acquisition module is used for acquiring the attribute item information of the target data packet.
A fifth obtaining module, configured to obtain an unused target description identifier from a pre-generated description identifier set.
And the association module is used for associating the target description identifier with the attribute item information of the target data packet and recording the attribute item information into the corresponding relation.
Optionally, before the fourth obtaining module is configured to obtain the attribute item information of the target data packet, the data packet sending apparatus 400 further includes a processing module, configured to process the target data packet based on a preset group of attribute items, obtain corresponding attribute item information, and store the target data packet in the data packet cache region;
a third obtaining module 430, configured to, when obtaining the target data packet based on the data packet storage address, specifically: and acquiring the target data packet from the data packet cache region based on the data packet storage address.
Optionally, the associating module is configured to associate the target description identifier with the attribute item information of the target data packet, and record the associated attribute item information into the corresponding relationship, and then the data packet sending apparatus 400 further includes a first modifying module, configured to modify the state of the target description identifier from unused to used;
the packet sending apparatus 400 further comprises a second modification module for modifying the status of the destination description identifier from used to unused after the sending module 440 sends the destination packet.
Optionally, the first obtaining module 410 is configured to obtain a scheduling message, where the scheduling message includes a target description identifier, and before the target description identifier is used to describe a set of attribute item information of a target data packet to be sent, the data packet sending apparatus 400 further includes a storage module and a generating module, where the storage module is configured to store, in the description identifier queue, each description identifier included in a correspondence between a pre-established description identifier and attribute item information according to a sequence; the generation module is used for scheduling based on the description identification queue and generating a scheduling message.
The data packet sending apparatus 400 in the embodiment shown in fig. 4 can be used to implement the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, and are not described herein again.
Fig. 5 is a schematic structural diagram of a data packet sending device according to an embodiment of the present disclosure. Referring now specifically to fig. 5, a schematic diagram of a data packet sending device 50 suitable for implementing the embodiments of the present disclosure is shown.
The packet transmitting device 50 in the embodiment of the present disclosure may be an electronic device or a server. The electronic devices include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), wearable devices, and the like, and fixed terminals such as digital TVs, desktop computers, smart home devices, and the like. The server can be an independent server or a cluster of a plurality of servers, and can comprise a server built in the local and a server built in the cloud.
It should be noted that the packet sending device 50 shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of the embodiments of the present disclosure.
As shown in fig. 5, the packet transmission apparatus 50 may include a processing device (e.g., a central processing unit, a graphic processor, etc.) 51 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 52 or a program loaded from a storage device 58 into a Random Access Memory (RAM) 53. In the RAM 53, various programs and data necessary for the operation of the packet transmission device 50 are also stored. The processing device 51, the ROM 52, and the RAM 53 are connected to each other via a bus 54. An input/output (I/O) interface 55 is also connected to bus 54.
Generally, the following devices may be connected to the I/O interface 55: input devices 56 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 55 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, etc.; storage devices 58 including, for example, magnetic tape, hard disk, etc.; and a communication device 59. The communication means 59 may allow the packet transmission device 50 to perform wireless or wired communication with other devices to exchange data. While fig. 5 illustrates the packet transmitting apparatus 50 as having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be alternatively implemented or provided.
The embodiment of the present disclosure also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the processor is enabled to implement the data packet transmission method in the above embodiment.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 59, or installed from the storage means 58, or installed from the ROM 52. The computer program, when executed by the processing device 51, performs the above-described functions defined in the packet transmission method of the embodiment of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP, and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be one contained in the packet transmission apparatus; or may exist separately without being assembled into the packet transmitting apparatus.
The above-mentioned computer-readable medium carries one or more programs which, when executed by the packet transmission device, cause the packet transmission device to execute:
acquiring a scheduling message, wherein the scheduling message comprises a target description identifier, and the target description identifier is used for describing a group of attribute item information of a target data packet to be sent; based on the target description identification, acquiring attribute item information of the target data packet from a corresponding relation between the pre-established description identification and the attribute item information, wherein the attribute item information comprises: a packet storage address and a transmit port; acquiring a target data packet based on the data packet storage address; and transmitting the target data packet based on the transmitting port.
In embodiments of the present disclosure, computer program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A method for transmitting a data packet, the method comprising:
acquiring a scheduling message, wherein the scheduling message comprises a target description identifier, and the target description identifier is used for describing a group of attribute item information of a target data packet to be sent;
based on the target description identifier, obtaining attribute item information of the target data packet from a pre-established corresponding relation between the description identifier and the attribute item information, wherein the attribute item information comprises: a packet storage address and a transmit port;
acquiring the target data packet based on the data packet storage address;
and transmitting the target data packet based on the transmitting port.
2. The method of claim 1, wherein prior to obtaining the scheduling message, the method further comprises:
acquiring attribute item information of the target data packet;
acquiring an unused target description identifier from a pre-generated description identifier set;
and associating the target description identification with the attribute item information of the target data packet and recording the attribute item information into the corresponding relation.
3. The method according to claim 2, wherein before the obtaining of the attribute item information of the target data packet, the method further comprises:
processing the target data packet based on a preset group of attribute items to obtain corresponding attribute item information, and storing the target data packet in a data packet cache region;
the obtaining the target data packet based on the data packet storage address comprises: and acquiring the target data packet from the data packet cache region based on the data packet storage address.
4. The method of claim 2, wherein after the recording into the correspondence, the method further comprises:
changing the state of the target description identifier from unused to used;
after the target data packet is sent based on the sending port, the method further comprises:
and modifying the state of the target description identification from used to unused.
5. The method of claim 1, wherein prior to obtaining the scheduling message, the method further comprises:
storing all description identifications included in the corresponding relation between the pre-established description identifications and the attribute item information into a description identification queue according to the sequence;
and scheduling based on the description identification queue to generate a scheduling message.
6. A packet transmission apparatus, comprising:
a first obtaining module, configured to obtain a scheduling message, where the scheduling message includes a target description identifier, and the target description identifier is used to describe a set of attribute item information of a target data packet to be sent;
a second obtaining module, configured to obtain attribute item information of the target data packet from a pre-established correspondence between the description identifier and the attribute item information based on the target description identifier, where the attribute item information includes: a packet storage address and a transmit port;
a third obtaining module, configured to obtain the target data packet based on the data packet storage address;
and the sending module is used for sending the target data packet based on the sending port.
7. The apparatus of claim 6, wherein before the first obtaining module obtains the scheduling message, the apparatus further comprises:
the fourth acquisition module is used for acquiring the attribute item information of the target data packet;
a fifth obtaining module, configured to obtain an unused target description identifier from a pre-generated description identifier set;
and the association module is used for associating the target description identifier with the attribute item information of the target data packet and recording the attribute item information into the corresponding relation.
8. The apparatus according to claim 7, wherein before the fourth obtaining module is configured to obtain the attribute item information of the target data packet, the apparatus further comprises:
the processing module is used for processing the target data packet based on a preset group of attribute items to obtain corresponding attribute item information and storing the target data packet in a data packet cache region;
the third obtaining module, configured to, when obtaining the target data packet based on the data packet storage address, specifically: and acquiring the target data packet from the data packet cache region based on the data packet storage address.
9. A packet transmission apparatus, comprising:
a processor;
a memory for storing executable instructions;
wherein the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the data packet transmission method according to any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, causes the processor to implement the method for transmitting a data packet according to any one of claims 1 to 5.
CN202210831632.7A 2022-07-14 2022-07-14 Data packet transmitting method, device, equipment and computer readable storage medium Active CN115225586B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210831632.7A CN115225586B (en) 2022-07-14 2022-07-14 Data packet transmitting method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210831632.7A CN115225586B (en) 2022-07-14 2022-07-14 Data packet transmitting method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN115225586A true CN115225586A (en) 2022-10-21
CN115225586B CN115225586B (en) 2024-04-26

Family

ID=83611944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210831632.7A Active CN115225586B (en) 2022-07-14 2022-07-14 Data packet transmitting method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115225586B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002247086A (en) * 2001-02-14 2002-08-30 Nec Corp Router, its packet switching method and packet switching program
CN104065588A (en) * 2013-03-21 2014-09-24 中兴通讯股份有限公司 Device for scheduling and buffering data packets and method thereof
CN104734993A (en) * 2013-12-24 2015-06-24 杭州华为数字技术有限公司 Data distribution method and distributor
CN104883302A (en) * 2015-03-18 2015-09-02 华为技术有限公司 Method, device and system for forwarding data packet
CN107995116A (en) * 2017-11-30 2018-05-04 新华三技术有限公司 File transmitting method and communication equipment
CN110177046A (en) * 2019-04-18 2019-08-27 中国人民解放军战略支援部队信息工程大学 Secure exchange chip, implementation method and the network switching equipment based on mimicry thought
CN111786900A (en) * 2020-06-15 2020-10-16 北京交通大学 Time queue-based temporal sensing flow shaper
CN112039796A (en) * 2020-08-28 2020-12-04 北京字节跳动网络技术有限公司 Data packet transmission method and device, storage medium and electronic equipment
CN113779021A (en) * 2021-02-03 2021-12-10 西安京迅递供应链科技有限公司 Data processing method, device, computer system and readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002247086A (en) * 2001-02-14 2002-08-30 Nec Corp Router, its packet switching method and packet switching program
CN104065588A (en) * 2013-03-21 2014-09-24 中兴通讯股份有限公司 Device for scheduling and buffering data packets and method thereof
CN104734993A (en) * 2013-12-24 2015-06-24 杭州华为数字技术有限公司 Data distribution method and distributor
CN104883302A (en) * 2015-03-18 2015-09-02 华为技术有限公司 Method, device and system for forwarding data packet
CN107995116A (en) * 2017-11-30 2018-05-04 新华三技术有限公司 File transmitting method and communication equipment
CN110177046A (en) * 2019-04-18 2019-08-27 中国人民解放军战略支援部队信息工程大学 Secure exchange chip, implementation method and the network switching equipment based on mimicry thought
CN111786900A (en) * 2020-06-15 2020-10-16 北京交通大学 Time queue-based temporal sensing flow shaper
CN112039796A (en) * 2020-08-28 2020-12-04 北京字节跳动网络技术有限公司 Data packet transmission method and device, storage medium and electronic equipment
CN113779021A (en) * 2021-02-03 2021-12-10 西安京迅递供应链科技有限公司 Data processing method, device, computer system and readable storage medium

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
ANTOINE KAUFMANN ET AL.: "High performance packet processing with FlexNIC", ASPLOS, pages 44 - 48 *
CPP加油站: "DPDK收发流程分析", Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/497232818> *
何玲玲等: "基于TMS320C6678的双网卡研究与驱动实现", 计算机系统应用, pages 3 *
杨惠等: "多核网络分组处理系统的数据分段卸载发送机制", 国防科技大学学报 *
黄建华等: "《ARM Cortex嵌入式系统开发教程》", 31 December 2012, pages: 198 *

Also Published As

Publication number Publication date
CN115225586B (en) 2024-04-26

Similar Documents

Publication Publication Date Title
CN111581563A (en) Page response method and device, storage medium and electronic equipment
CN111221638B (en) Concurrent task scheduling processing method, device, equipment and medium
CN110545472B (en) Video data processing method and device, electronic equipment and computer readable medium
CN108595483B (en) Data processing method and related device
CN112015816A (en) Data synchronization method, device, medium and electronic equipment
CN110781373B (en) List updating method and device, readable medium and electronic equipment
CN110489474B (en) Data processing method, device, medium and electronic equipment
CN111163336B (en) Video resource pushing method and device, electronic equipment and computer readable medium
CN114979241A (en) Communication method, communication apparatus, storage medium, and electronic device
CN115237589A (en) SR-IOV-based virtualization method, device and equipment
CN110910469A (en) Method, device, medium and electronic equipment for drawing handwriting
CN113391860A (en) Service request processing method and device, electronic equipment and computer storage medium
CN115225586B (en) Data packet transmitting method, device, equipment and computer readable storage medium
CN111262907A (en) Service instance access method and device and electronic equipment
CN114780263A (en) Service calling method, device, equipment and storage medium
CN115134254A (en) Network simulation method, device, equipment and storage medium
CN112163176A (en) Data storage method and device, electronic equipment and computer readable medium
CN116431523B (en) Test data management method, device, equipment and storage medium
CN111258670B (en) Method and device for managing component data, electronic equipment and storage medium
CN113157365B (en) Program running method, program running device, electronic equipment and computer readable medium
CN117675720B (en) Message transmission method and device, electronic equipment and storage medium
CN110716885B (en) Data management method and device, electronic equipment and storage medium
CN112311833B (en) Data updating method and device
CN111294321B (en) Information processing method and device
CN111309549B (en) Monitoring method, monitoring system, readable medium and electronic equipment

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
GR01 Patent grant
GR01 Patent grant