WO2023010731A1 - Data information processing method and server - Google Patents

Data information processing method and server Download PDF

Info

Publication number
WO2023010731A1
WO2023010731A1 PCT/CN2021/135684 CN2021135684W WO2023010731A1 WO 2023010731 A1 WO2023010731 A1 WO 2023010731A1 CN 2021135684 W CN2021135684 W CN 2021135684W WO 2023010731 A1 WO2023010731 A1 WO 2023010731A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
vni
segment
reserved
data segment
Prior art date
Application number
PCT/CN2021/135684
Other languages
French (fr)
Chinese (zh)
Inventor
吴情彪
叶志钢
Original Assignee
武汉绿色网络信息服务有限责任公司
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 武汉绿色网络信息服务有限责任公司 filed Critical 武汉绿色网络信息服务有限责任公司
Publication of WO2023010731A1 publication Critical patent/WO2023010731A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/72Admission control; Resource allocation using reservation actions during connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/72Admission control; Resource allocation using reservation actions during connection setup
    • H04L47/722Admission control; Resource allocation using reservation actions during connection setup at the destination endpoint, e.g. reservation of terminal resources or buffer space
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/901Buffering arrangements using storage descriptor, e.g. read or write pointers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2521Translation architectures other than single NAT servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2212/00Encapsulation of packets
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the invention relates to the field of communication technology, in particular to a data information processing method and server.
  • VXLAN Virtual eXtensible LAN, scalable virtual local area network
  • VXLAN Virtual eXtensible LAN, scalable virtual local area network
  • Embodiments of the present invention provide a data information processing method and a server.
  • the first process strips and saves the first vni in the first data segment to the reserved segment buffer In the area
  • the second process can directly share the first vni in the reserved segment buffer area to determine the corresponding nat information and the second vni; to solve the problem that the current second process needs to execute and the first process Obtaining the corresponding information by performing the same operation leads to a problem that the working efficiency of the server is low.
  • An embodiment of the present invention provides a method for processing data information, which is applied to a server.
  • the server includes a network card, a first process, and a second process.
  • the network card includes a buffer area, and the buffer area includes a data segment buffer area and a reserved segment buffer area. area, the data information processing method includes:
  • the network card receives a first data segment, and saves the first data segment to the data segment buffer area, the first data segment includes first encapsulated data and initial data, and the first encapsulated data includes the first vni;
  • the first process parses the first packaged data from the first data segment and acquires the first vni, and saves the first vni to the reserved segment buffer;
  • the second process extracts the initial data from the data segment buffer, extracts the first VNI from the reserved segment buffer, and determines the corresponding VNI according to the initial data and the first VNI. Nat inner data header information and the second vni;
  • the second process saves the nat inner layer data header information and the second vni to the reserved segment buffer;
  • the first process extracts the second vni from the reserved segment buffer, determines second package data according to the second vni, and saves the second package data to the reserved segment buffer , so that the initial data located in the data segment buffer, the nat inner data header information located in the reserved segment buffer and the second encapsulated data together constitute a second data segment.
  • the second process extracts the initial data from the data segment buffer, extracts the first vni from the reserved segment buffer, and according to the initial data and the The steps for the first vni to determine the corresponding nat inner layer data header information and the second vni include:
  • the second process extracts an initial inner data header from the initial data, and extracts the first vni from the reserved segment buffer;
  • the second process searches corresponding nat IP, nat PORT and the second vni respectively in the nat conversion table and the vni conversion table according to the initial inner layer data header and the first vni;
  • the second process determines the nat inner layer data header information according to the nat IP and the nat PORT.
  • the first process parses the first packaged data from the first data segment and obtains the first vni, and saves the first vni to the reserved segment buffer Before the steps, include:
  • the network card sends the pointer of the first data segment to the first process
  • the first process accesses the first data segment according to the pointer of the first data segment.
  • the second process extracts the initial data from the data segment buffer, extracts the first vni from the reserved segment buffer, and according to the initial data and the Before the first vni determines the corresponding nat inner layer data header information and the steps of the second vni, it includes:
  • the network card sends the pointer of the initial data to the second process
  • the second process determines the reserved segment buffer according to the pointer of the initial data, and accesses the initial data and the first vni.
  • the first process extracts the second vni from the reserved segment buffer, determines the second package data according to the second vni, and saves the second package data to the The reserved segment buffer area, so that the initial data located in the data segment buffer area, the nat inner layer data header information located in the reserved segment buffer area and the second encapsulation data together constitute the first After the steps of the second data segment, including:
  • the network card determines a corresponding sending tunnel according to the second data segment
  • the network card sends the second data segment according to the sending tunnel.
  • the server further includes a third process
  • the first encapsulated data also includes a source IP address and a destination IP address
  • the network card receives the first data segment and saves the first data segment to The data segment cache area
  • the first data segment includes first package data and initial data
  • the first process parses the first encapsulated data from the first data segment and obtains the source IP address and the destination IP address, and saves the source IP address and the destination IP address to the The reserved segment cache area;
  • the third process extracts the source IP address and the destination IP address from the reserved segment buffer, and judges whether the first data segment is legitimate data according to the source IP address and the destination IP address head;
  • the third process processes the initial data
  • the third process discards the initial data.
  • the server further includes a fourth process
  • the network card further includes a mirrored buffer
  • the mirrored buffer includes a mirrored data segment buffer and a mirrored reserved segment buffer
  • the network card receives the first data segment, and save the first data segment to the data segment buffer, the first data segment includes the first package data and initial data, after the first package data includes the step of the first vni, including:
  • the first process parses the first packaged data from the first data segment and obtains the first vni, and judges whether the user of the first data segment has subscribed to a virus detection service according to the first vni;
  • the first process saves the first data segment to the mirrored data segment cache area, and saves the first vni to the mirrored reserved segment cache area;
  • the fourth process extracts the first data segment and the first vni from the mirror buffer, and generates a corresponding virus detection report according to the rules of the virus detection service.
  • An embodiment of the present invention provides a server, the server includes a network card, a first process, and a second process, the network card includes a buffer area, and the buffer area includes a data segment buffer area and a reserved segment buffer area;
  • the network card is configured to receive a first data segment and save the first data segment to the data segment buffer, the first data segment includes first packaged data and initial data, and the first packaged data includes first vni;
  • the first process is configured to parse the first packaged data from the first data segment and obtain the first vni, and save the first vni to the reserved segment buffer;
  • the second process is used to extract the initial data from the data segment buffer, extract the first vni from the reserved segment buffer, and determine according to the initial data and the first vni The corresponding nat inner data header information and the second vni;
  • the second process is also used to save the nat inner layer data header information and the second vni to the reserved segment buffer;
  • the first process is further configured to extract the second vni from the reserved segment buffer, determine second package data according to the second vni, and save the second package data to the reserved A segment buffer, so that the initial data located in the data segment buffer, the nat inner layer data header information located in the reserved segment buffer and the second encapsulated data together constitute a second data segment.
  • the second process is further configured to extract an initial inner data header from the initial data, and extract the first vni from the reserved segment buffer;
  • the second process is used to search the corresponding nat IP and the second vni in the nat conversion table and the vni conversion table respectively according to the initial inner layer data header and the first vni.
  • the network card is further configured to send a pointer of the first data segment to the first process
  • the first process is further configured to determine the data segment cache according to the pointer of the first data segment, and access the first data segment.
  • the present invention provides a data information processing method and a server.
  • the buffer area in the network card includes a data segment buffer area and a reserved segment buffer area.
  • the first process parses the first VNI from the first data segment and converts the first VNI Save to the reserved segment buffer; the second process extracts the first vni from the reserved segment buffer, and determines the corresponding nat inner layer data header information and the second vni according to the first vni;
  • the second process saves the nat inner layer data header information and the second vni to the reserved segment buffer; the first process then extracts the second vni from the reserved segment buffer to Do the corresponding operation.
  • the reserved segment buffer area is opened in the buffer area of the network card, and the first vni, nat inner data header information and the second vni obtained by the first process and the second process are temporarily stored in the reserved segment buffer area , so that the first process and the second process can share the information obtained by processing each other, avoiding partial duplication of operations performed by the first process and the second process; and when the first process and the second process obtain The corresponding information in the first data segment and the corresponding operations are performed while still ensuring the integrity of the first data segment, so that other processes can normally obtain the information of the first data segment, preventing the server from restarting from the outside world The first data segment is obtained for use by other processes.
  • this solution improves the working efficiency of the server.
  • FIG. 1 is a schematic diagram of a scene of a data information processing system provided by an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a section of a cache area in a network card provided by an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of a first data information processing method provided by an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of an interval of a cache area in another network card provided by an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of the composition and structure of the first data segment provided by the embodiment of the present invention.
  • FIG. 6 is a schematic flowchart of a second data information processing method provided by an embodiment of the present invention.
  • FIG. 7 is a schematic flowchart of a third data information processing method provided by an embodiment of the present invention.
  • FIG. 8 is a schematic flowchart of a fourth data information processing method provided by an embodiment of the present invention.
  • FIG. 9 is a schematic flowchart of a fifth data information processing method provided by an embodiment of the present invention.
  • FIG. 10 is a schematic flowchart of a sixth data information processing method provided by an embodiment of the present invention.
  • FIG. 11 is a schematic flowchart of a seventh data information processing method provided by an embodiment of the present invention.
  • FIG. 12 is a schematic diagram of signaling interaction of a data information processing method provided by an embodiment of the present invention.
  • FIG. 13 is a schematic structural diagram of a first server provided by an embodiment of the present invention.
  • FIG. 14 is a schematic structural diagram of a second server provided by an embodiment of the present invention.
  • FIG. 15 is a schematic structural diagram of a third server provided by an embodiment of the present invention.
  • FIG. 16 is a schematic structural diagram of a fourth server provided by an embodiment of the present invention.
  • first”, “second”, etc. in the present invention are used to distinguish different objects, not to describe a specific order.
  • the terms “include” and “have”, as well as any variations thereof, are intended to cover a non-exclusive inclusion.
  • a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules, but optionally also includes steps or modules that are not listed, or optionally includes For other steps or modules inherent in these processes, methods, products or devices.
  • the execution subject of the data information processing method provided in the embodiment of the present invention may be the server provided in the embodiment of the present invention, or an electronic device integrated with the server, and the server may be implemented in the form of hardware or software.
  • Network card A piece of computer hardware designed to allow computers to communicate on a computer network, allowing users to connect to each other via cables or wirelessly. Each network card has a unique 48-bit serial number called a MAC address, which is written in a piece of ROM on the network card.
  • a network card is not a self-contained autonomous unit because it does not carry its own power source but must use the power of the computer it is plugged into and be controlled by that computer. When the network card receives an erroneous frame, it discards the frame without notifying the computer it's plugged into. When the network card receives a correct frame, it notifies the computer using an interrupt and delivers it to the network layer in the protocol stack. When the computer wants to send an IP data packet, it is handed down from the protocol stack to the network card to be assembled into a frame and sent to the LAN.
  • a process is an entity, and each process has its own address space.
  • a process includes a text area, a data area, and a stack; among them, the text area stores the code executed by the processor, and the data area stores variables and process execution Dynamically allocated memory used during, the stack area stores instructions and local variables for active procedure calls.
  • a process is also an "executing program".
  • a program is an inanimate entity. Only when the processor of the operating system gives life to the program can the program become an active entity. We call it a process.
  • Cache A data storage area shared by multiple hardware or program processes running at different speeds or priorities. It acts as a speed smoother between high-speed and low-speed devices, temporarily stores data, and frequently accessed data can be put into the buffer, reducing access to slow devices to improve system efficiency.
  • the embodiment of the present invention provides a data information processing method and server. The details will be described respectively below.
  • FIG. 1 is a schematic diagram of a scene of a data information processing system provided by an embodiment of the present invention.
  • the data information processing system may include a network card 100, a first process 200, and a second process 300.
  • the network card includes a cache area, and the buffer area includes a data segment buffer area and a reserved segment buffer area.
  • the cache area is located in the network card 100.
  • the network card 100 configures a space of 2048 bytes for the cache area, and each label indicates the corresponding The serial number of the byte, for example, "0" means the 0th byte, and "2047" means the 2047th byte.
  • the interval of the first 1600 bytes is the data segment cache area for storing the data segment, that is, the 0th byte to the 1599th byte are used to save the data segment; further, it can be from the 1600th byte to the 2047th byte Choose up to 256 bytes in the interval where the bytes are located as the reserved segment buffer for storing part of the information in the data segment. It should be noted that after the data segment buffer and the reserved segment buffer are determined, if the data segment buffer is known, the first byte and The relative position of the first byte of the reserved segment buffer to determine the reserved segment buffer.
  • a preset interval may be reserved between the reserved segment buffer area and the data segment buffer area, so as to properly distinguish the data segment from the stored part of the information in the data segment, as shown in FIG. 2
  • the reserved segment buffer area may be the interval of the 1663th byte to the 1918th byte in the buffer area; or the reserved segment buffer area and the data segment buffer area may also be adjacently set
  • the reserved segment buffer is determined only according to the preset relative position of the first byte of the data segment buffer and the first byte of the reserved segment buffer. Of course, the corresponding space of the reserved segment buffer can be reasonably selected according to the length of the stored partial information in the data segment.
  • the network card 100 is mainly used to receive the first data segment, and save the first data segment to the data segment buffer area, the first data segment includes the first packaged data and initial data , the first encapsulation data includes a first vni;
  • the first process is mainly used to parse the first encapsulation data from the first data segment and obtain the first vni, and convert the first vni Save to the reserved segment buffer;
  • the second process is mainly used to extract the initial data from the data segment buffer, extract the first vni from the reserved segment buffer, and according to The initial data and the first vni determine the corresponding nat inner layer data header information and the second vni, and save the nat inner layer data header information and the second vni to the reserved segment buffer;
  • the first process is mainly used to extract the second vni from the reserved segment buffer, determine the second encapsulation data according to the second vni, and save the second encapsulation data to the extended information, so that
  • the data information processing system may be included in a server, that is, the network card 100, the first process 200, and the second process 300 may all be included in the server.
  • the server may be an independent server, or a server network or server cluster composed of servers.
  • the server includes but is not limited to a computer, a network host, a single network server, multiple network server sets, or a server cluster composed of multiple servers.
  • Cloud Server is composed of a large number of computers or network servers based on cloud computing.
  • the network card 100 can communicate with the outside world and processes inside the server, for example, the network card 100 can receive or send data segments to the outside world, and the network card 100 can also communicate with processes inside the server Send the required data segment pointers respectively;
  • the first process 200 can decapsulate the data segment according to the data segment pointer, and can also perform the encapsulation operation on the data segment according to the corresponding information, whether it is decapsulation or encapsulation, Both can save the relevant information of the obtained header text in an area different from the area where the data segment is located;
  • the second process 300 can obtain the relevant information of the header text from the corresponding area, and obtain the corresponding information according to the corresponding mapping rules, And save the corresponding information to an area different from the area where the data segment is located.
  • the server may include multiple physical ports and multiple virtual ports.
  • the plurality of physical ports may be included in the network card 100, and the plurality of physical ports are used to receive data segments sent by the terminal or bras (broadband remote access server, broadband access server), or to send data to the terminal or bras (broadband remote access server, broadband access server) sends data segments.
  • the network card 100, the first process 200 and the second process 300 may communicate through the plurality of virtual ports.
  • one of the physical ports of the network card 100 receives a data segment
  • the network card driver can send a "data segment pointer" to the first process 200 or the second process 300 and notify the first process 200 or the second process 300
  • a process 200 or the second process 300 processes data segments
  • the first process 200 and the second process 300 can send "unpacking/encapsulating data task completion instructions" to different virtual ports through the network card driver and "process the data segment information task completion instruction" to indicate that the corresponding task has been completed, and the corresponding receiving and sending of reports can be carried out through the network card driver between different virtual ports, and the first process 200 can also notify another physical port to send Data segments to the outside world of the server.
  • the terminal may be a general-purpose computer device or a special-purpose computer device.
  • the terminal can be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, an embedded device, etc., and the present embodiment does not Define the type of the terminal.
  • PDA personal digital assistant
  • FIG. 1 is only an application scenario related to the solution of this application, and does not constitute a limitation on the application scenario of the solution of this application. More processes are shown. For example, only two processes are shown in FIG. 1 . It can be understood that the data information processing system may also include one or more other processes that can access the network card 100 , which is not limited here.
  • An embodiment of the present invention provides a data information processing method
  • the execution subject of the data information processing method is the server
  • the server includes a network card, a first process and a second process
  • the network card includes a cache area
  • the buffer area includes a data segment buffer area and a reserved segment buffer area
  • the data information processing method includes: the network card receives a first data segment, and saves the first data segment into the data segment buffer area, the first data segment includes first packaged data and initial data, the first packaged data includes the first vni;
  • the first process parses the first packaged data from the first data segment and obtains The first vni, and save the first vni to the reserved segment buffer;
  • the second process extracts the initial data from the data segment buffer, and extracts the initial data from the reserved segment buffer Extract the first vni from the first vni, and determine the corresponding nat inner layer data header information and the second vni according to the initial data and the first vni;
  • the second process uses
  • FIG. 3 it is a schematic flowchart of an embodiment of a method for processing data information in an embodiment of the present invention.
  • the method for processing data information includes:
  • the network card receives a first data segment, and saves the first data segment to the data segment buffer, the first data segment includes first encapsulated data and initial data, and the first encapsulated data includes first vni.
  • the network card may be the network card 100 as shown in FIG.
  • the data segment sent by the broadband access server may be the network card 100 as shown in FIG.
  • the data segment sent by the broadband access server may be the network card 100 as shown in FIG.
  • the data segment sent by the broadband access server may be the network card 100 as shown in FIG.
  • the data segment sent by the broadband access server may be the network card 100 as shown in FIG.
  • the buffer includes the data segment buffer and the reserved segment buffer, and the data segment buffer may be located before the reserved segment buffer, that is, the data segment buffer may be located the previous part of the buffer.
  • the first data segment may include the first encapsulation data and the initial data, the first encapsulation data is located before the initial data, and the first vni is included in the first encapsulation data.
  • the interval length division of the first vni, the first package data, and the initial data in Figure 4 is only for the convenience of drawing, and does not limit the proportional relationship of the interval lengths of the three .
  • the first data segment may include the first package data and the initial data, and the specific description is as follows:
  • the first encapsulation data may include VXLAN header 501, Outer UDP header 502, Outer IP header 503, and Outer Ethernet header 504 in turn, and further, according to the distance from the initial data by far Recently, VXLAN header501 includes VXLAN Flags505 and VNI506.
  • VNI is the first vni in the above
  • the first vni (VNI) is a VXLAN network identifier, which is used to identify the tenant to which the first data segment belongs.
  • VXLAN Flags is a flag bit, including 8 bits, and the format is "RRRRRRRR".
  • I 1
  • the "I" bit 1
  • the "R” bit is reserved and unused, and is set to 0
  • Reserved507 is also included between VXLAN Flags505 and VNI506, between VNI506 and the initial data, and is used to reserve unused Use, set to 0.
  • the initial data may include Inner Ethernet header 508, Inner IP header 509, Inner TCP header 601, and Payload 602 in sequence according to the distance from the first encapsulated data in descending order.
  • the Inner Ethernet header includes the MAC address of the sending end and the MAC address of the lan interface of the second process
  • the Inner IP header includes the IP address of the sending end and the IP address of the receiving end
  • the Inner TCP header includes the port number of the sending end.
  • the sending end and the receiving end correspond to two of the above-mentioned server, terminal, and bras according to the actual sending and receiving of the first data segment; wherein, the Payload may include instruction information or data information.
  • the first process parses the first encapsulated data from the first data segment to acquire the first vni, and saves the first vni to the reserved segment buffer.
  • the first process can access the first data segment, and parse the first encapsulation data in the first data segment, and obtain the first vni in the first encapsulation data according to the parsing result .
  • the first process can obtain the VXLAN Flags information in the first encapsulation data, and for the VXLAN Flags whose format is "RRRRRRRR", if the "I" bit is 1, then perform the step S102, if "I " bit is 0, then step S102 is not executed.
  • a preset interval may be reserved between the reserved segment buffer and the data segment buffer to properly distinguish the data segment from the stored part of the information in the data segment, so , here a preset interval can be reserved between the first vni and the initial data, so that when the first vni is acquired later, according to the first byte of the preset data segment buffer and
  • this embodiment can further verify the first vni, for example, it can be further judged that "determined by the above steps Whether there is a preset interval between the "first vni” and the data segment buffer area, so as to judge whether the "determined first vni" is the real first vni.
  • the first process may send related information such as "unpacking data segment task completion instruction" to the network card. Instructions to inform the network card that the first process has completed decapsulating data segments and other related operations, so that the network card can perform the next operation.
  • the first process may acquire the pointer of the initial data at this time, and the first process may also send the pointer of the initial data to the network card.
  • the second process extracts the initial data from the data segment buffer, extracts the first vni from the reserved segment buffer, and determines according to the initial data and the first vni The corresponding nat inner data header information and the second vni.
  • the first vni can be understood as the VXLAN network identifier of the sender who sends the first data segment to the network card, and the sender can be a terminal or a bras.
  • the first vni may be referred to as lan vni
  • the first vni (lan vni) and the Outer in the first encapsulated data UDP header, Outer IP header and Outer Ethernet header correspond, and the second vni can be determined according to the first vni.
  • the Inner IP header in the initial data contains the private network IP address, and the IP address related to the private network can be obtained from the mapping relationship formulated according to the NAT protocol.
  • the Inner IP header and the Payload in the initial data also include the Inner TCP header, where the Inner Ethernet header, the Inner IP header, and the Inner TCP header can be referred to as the initial data
  • the encapsulated data inside can be referred to as the initial inner layer data header, wherein, the Inner IP header and Payload can also be other protocol types such as Inner UDP header, Inner ICMP header, etc.
  • the initial inner layer data header can be updated as the nat inner layer data header.
  • the second process when the second process extracts the first vni from the reserved segment buffer or at the same time, it can also extract the first vni from the reserved segment buffer Stripping, that is, removing the first vni, so as to avoid affecting the subsequent storage of new information in the reserved segment buffer.
  • the second process saves the nat inner data header information and the second vni to the reserved segment buffer.
  • the second process may also access the first data segment, and "stripping" the initial inner data header in the first data segment.
  • the initial inner data header includes Inner Ethernet header, Inner IP header and Inner TCP header
  • the second process can point the pointer to the Payload in the initial data to "stripping" the initial inner layer data in the first data segment header, not really stripping the initial inner data header in the first data segment. It can be understood that what is saved in the data segment buffer at this time is the Payload in the initial data, and what is saved in the reserved segment buffer is the nat information and the second vni.
  • a preset interval can be reserved between the second vni, the nat information, and the initial data, so that when the second vni and the nat inner data header information are acquired later, the On the premise that the reserved segment buffer is determined according to the preset relative position of the first byte of the data segment buffer and the first byte of the reserved segment buffer, this embodiment can further verify The second vni and the nat information.
  • the second process may send related instructions such as "processing data segment information task completion instruction" to the network card to inform the network card of the The second process has completed related operations such as the task of processing data segment information, so that the network card can perform the next operation.
  • the second process may obtain the Payload pointer in the initial data at this time, and the second process may also send the Payload pointer in the initial data to the network card.
  • the first process extracts the second vni from the reserved segment buffer, determines second package data according to the second vni, and saves the second package data in the reserved segment A buffer area, so that the initial data located in the data segment buffer area, the nat inner layer data header information located in the reserved segment buffer area and the second encapsulated data together constitute a second data segment.
  • the second vni can determine a new outgoing tunnel ID, and a new corresponding Outer UDP header, Outer IP header, and Outer Ethernet header can be obtained according to the second vni and the outgoing tunnel ID.
  • the The first process can configure new corresponding Outer UDP header, Outer IP header and Outer Ethernet header for the second vni according to the second vni, and the second vni can also form a new corresponding VXLAN header, above
  • the new corresponding Outer UDP header, Outer IP header, Outer Ethernet header, and VXLAN header together constitute the second encapsulation data; specifically, the second encapsulation data can be stored in the nat in the reserved segment buffer area. After the inner data header information.
  • the second vni may also be stripped from the reserved segment buffer , that is, remove the second vni, so as to avoid affecting the subsequent storage of new information in the reserved segment buffer.
  • the nat inner layer data header information is the updated initial inner layer data header, that is, the initial inner layer data header has been converted into the nat inner layer data header information, and at this time the pointer The Payload in the initial data has been pointed to; therefore, it should be noted that the "the initial data located in the data segment buffer, the The nat inner layer data header information and the second encapsulated data together constitute the second data segment" actually means: the Payload in the initial data located in the data segment buffer and the reserved segment buffer The nat inner data header information and the second encapsulation data together constitute the second data segment.
  • the method of this embodiment can enable the first process and the second process to ensure the integrity of the first data segment while acquiring corresponding information in the first data segment and performing corresponding operations , so that other processes can normally obtain or process the information of the first data segment.
  • the steps before step S102 may include the following steps:
  • the network card sends the pointer of the first data segment to the first process.
  • the first data segment is located in the data segment buffer in the network card, therefore, when the physical port of the network card receives the first data segment and saves the first data segment in After the data segment buffer, the network card may send the pointer of the first data segment to the first process, so as to inform the first process of the address of the data segment buffer.
  • the first process accesses the first data segment according to the pointer of the first data segment.
  • the first process obtains the pointer of the first data segment, that is, obtains the address of the data segment buffer, it can obtain the first data segment and Execute related operations in step S102.
  • the steps before step S103 may include the following steps:
  • the network card sends the pointer of the initial data to the second process.
  • the first process can send the pointer of the initial data to the network card, that is, the network card sends the initial data to the second process
  • the second process can quickly locate the starting position of the initial data, and at this time only the initial data and the content behind it are visible to the second process, avoiding the initial The content before the data interferes with the second process, improving the working efficiency of the second process.
  • the second process accesses the initial data and the first vni according to the pointer of the initial data.
  • the second process obtains the pointer of the initial data, it can obtain the initial data and search backward according to the interval where the initial data is located.
  • the preset The relative position of the first byte of the data segment buffer area and the first byte of the reserved segment buffer area to determine the reserved segment buffer area, so here it can also be determined indirectly according to the pointer of the initial data
  • the reserved segment buffer area is used to obtain the first vni; and then the related operation of step S103 is performed on the initial data and the first vni.
  • the step S103 may include the following steps:
  • the second process extracts an initial inner data header from the initial data, and extracts the first vni from the reserved segment buffer.
  • the first vni is stored in the reserved segment buffer by the first process, that is, the second process can directly extract the first vni from the reserved segment buffer.
  • the first vni obtained through parsing and obtaining by the first process may be saved in the reserved segment buffer area, and may be directly extracted and used by the second process, that is, It can avoid that the second process also executes the step of "parsing and obtaining the first vni from the first data segment", which improves the working efficiency of the server.
  • the initial inner layer data header is the Inner IP header in the initial data in the step S103, that is, the second process extracts the reserved segment buffer according to the pointer of the initial data Describe the first vni.
  • the second process looks up the corresponding nat IP, nat PORT and second vni in the nat conversion table and vni conversion table respectively.
  • the nat conversion table can be a private network IP-nat IP conversion table, and each nat IP can correspond to a private network IP, that is, the private network IP obtained according to the initial inner layer data header can be in the nat conversion table Get the corresponding nat IP and corresponding nat PORT.
  • each first vni in the vni conversion table may correspond to a second vni.
  • the first vni may be called lan vni
  • the first vni (lan vni) and the Outer UDP header, Outer IP header and Outer Ethernet header correspond
  • the second vni obtained through the vni conversion table can be called wan vni, and further, it can also be determined according to the second vni (wan vni) New corresponding Outer UDP header, Outer IP header and Outer Ethernet header.
  • the second process determines the nat inner data header information according to the nat IP and the nat PORT.
  • the initial inner layer data header may include the original Inner Ethernet header, the original Inner IP header and the original Inner TCP header, taking the terminal sending the first data segment to the server as an example:
  • the MAC address of the sending end in the original Inner Ethernet header and the MAC address of the lan interface of the second process can be updated to the MAC address of the wan interface of the second process and the MAC address of the next-hop device respectively ;
  • the IP address of the sender in the original Inner IP header can be modified to the nat IP; the port of the sender in the original Inner TCP header can be modified to the nat PORT; above, update the initial inner layer data header It is the inner layer data header of the nat.
  • step S105 may include the following steps:
  • Step 1 The network card sends the pointer of the Payload in the initial data to the first process.
  • the second process obtains the pointer of the Payload in the initial data, and sends the pointer of the Payload in the initial data to the network card, and then, the network card can also send The first process sends a Payload pointer in the initial data.
  • the first process can quickly locate the initial position of the Payload in the initial data, and at this time only the Payload in the initial data and the content behind it are visible to the first process, avoiding the The content before the Payload in the initial data interferes with the first process, improving the work efficiency of the first process.
  • Step 2 The first process determines to access the second vni according to the Payload pointer in the initial data.
  • the first process obtains the pointer of the Payload in the initial data, it searches backward according to the interval where the Payload is located in the initial data.
  • the Payload pointer in the initial data can also indirectly determine the Reserving a segment buffer to acquire the second vni; and then performing the related operations of step S105 on the initial data and the second vni.
  • step S105 the following steps may be included after step S105:
  • the network card determines a corresponding sending tunnel according to the second data segment.
  • the second encapsulated data in the second data segment can determine a pair of IP addresses at both ends of the tunnel and the source MAC address of the tunnel, but one end of different tunnels may correspond to the same source MAC address and IP address. address; further, the second vni in the second data segment can determine the sending tunnel through the VXLAN network identifier.
  • the network card sends the second data segment according to the sending tunnel.
  • the sending tunnel is the transmission path of the second data segment.
  • the sending One end of the tunnel is the physical port of the network card, and the other end of the sending tunnel is the physical port of the bras, that is, the second data segment can be transmitted from the network card to the bras.
  • the server also includes a third process
  • the first encapsulated data also includes a source IP address and a destination IP address
  • the step S101 may include the following steps:
  • the first process parses the first encapsulated data from the first data segment to obtain the source IP address and the destination IP address, and save the source IP address and the destination IP address to the reserved segment buffer.
  • the Outer IP header in the first data segment includes IP SA603 and IP DA604, wherein IP SA is the source IP address, that is, the IP address of the VTEP at the source end of the VXLAN tunnel, and IP DA is the destination IP address, that is, the IP address of the destination VTEP of the VXLAN tunnel.
  • IP SA is the source IP address, that is, the IP address of the VTEP at the source end of the VXLAN tunnel
  • IP DA is the destination IP address, that is, the IP address of the destination VTEP of the VXLAN tunnel.
  • the first process can access the first data segment, and parse the first encapsulation data in the first data segment, and obtain the Outer IP header in the first encapsulation data according to the parsing result , to obtain the source IP address and the destination IP address therein. It can be understood that at this time, what is stored in the data segment buffer is the initial data, and what is saved in the reserved segment buffer is the source IP address and the destination IP address.
  • a preset interval may be reserved between the reserved segment buffer and the data segment buffer to properly distinguish the data segment from the stored part of the information in the data segment, so , where the source IP address, the destination IP address and the initial data can all reserve a corresponding preset space, so that when the source IP address and the destination IP address are acquired later,
  • the reserved segment buffer is determined according to the preset relative position of the first byte of the data segment buffer and the first byte of the reserved segment buffer
  • this embodiment can further verify The source IP address and the destination IP address, for example, can further determine whether there is a preset interval between "the source IP address and the destination IP address determined through the above steps" and the data segment cache area, so as to determine Whether the "determined source IP address and destination IP address" are the real source IP address and destination IP address.
  • the first process may send related instructions such as "unpacking data segment task completion instruction" to the network card to inform the network card that the first A process has completed related operations such as "unpacking the data segment", so that the network card can perform the next operation.
  • the first process may acquire the pointer of the initial data at this time, and the first process may also send the pointer of the initial data to the network card.
  • the third process extracts the source IP address and the destination IP address from the reserved segment buffer, and judges whether the first data segment is Legal data header.
  • the network card can also send the pointer of the initial data to the third process, so that the third process can quickly locate the initial data according to the pointer of the initial data. , so as to improve the working efficiency of the third process.
  • the source IP address and the destination IP address are respectively the IP address of the source VTEP and the IP address of the destination VTEP of the VXLAN tunnel, that is, the third process
  • the destination IP address can determine multiple VXLAN tunnels that can transmit the first data segment.
  • the third process may include a VXLAN tunnel table, and the VXLAN tunnel table lists legal conditions of data segments passing through each VXLAN tunnel. Therefore, according to the VXLAN tunnel corresponding to the first data segment, and then searching the VXLAN tunnel table, it can be determined whether the first data segment is legal.
  • the third process processes the initial data.
  • the third process may read the initial data, modify the initial data, and send the initial data.
  • the third process discards the initial data.
  • the third process may ignore the initial data and continue to perform related operations on other data segments.
  • the steps S401-S404 can be executed before the step S101, that is, it can be judged first whether the first data segment is a legal data header, and only when the first data segment is a legal data header, will it be executed The step S101, otherwise, the step S101 is not executed.
  • the server further includes a fourth process
  • the network card further includes a mirror buffer
  • the mirror buffer includes a mirror data segment buffer and a mirror reserved segment buffer
  • the network card receives the first data segment, and saves the first data segment to the data segment buffer, the first data segment includes first package data and initial data, and the first package data includes the first vni
  • the step may include the following steps:
  • the first process parses the first packaged data from the first data segment to acquire the first vni, and judges whether the user of the first data segment has enabled virus detection according to the first vni Serve.
  • the first process can access the first data segment, and parse the first encapsulation data in the first data segment, and obtain the first vni in the first encapsulation data according to the parsing result ; Further, the first process stores a mapping of multiple vnis and multiple results of "whether to activate virus detection service", that is, each vni will correspond to the result of "yes” or “no” to activate virus detection service. After the first process obtains the first vni, it can find the corresponding result of "whether to activate the virus detection service” according to the above mapping, so as to determine whether the user of the first data segment has activated the virus detection service.
  • the first process saves the first data segment to the mirrored data segment buffer, and saves the first vni to the mirrored pre- Segment cache.
  • the first process may first copy the first data segment, and then save the copied first data segment to the mirrored data segment cache Similarly, in the step S501, after the first process acquires the first vni, the first vni may be temporarily stored, and when the user of the first data segment activates the virus detection service, the The first process may save the temporarily stored first vni to the mirror reserved segment buffer.
  • both the first data segment and the first vni are stored in the mirror buffer, it can be understood that the first process performs mirror processing on the first data segment and the first vni, so that the The first data segment and the first vni are also stored in the mirror buffer area; like this, when multiple processes need to access the first data segment or the first vni at the same time, they can be accessed from the cache respectively.
  • the second process can execute the steps S103-S104, and at the same time, the fourth process can execute the step S503.
  • the fourth process does not need to spend time waiting for the second process to execute the steps S103-S104 before executing the step S503, that is, the time and the time for the second process to execute the steps S103-S104
  • the time for the fourth process to execute the step S503 does not need to be accumulated, but both are parallel; further, because the time for the second process to execute the steps S103-S104 and the time for the fourth process to execute the steps
  • the time of S503 exists in parallel rather than serially, so the time between receiving the first data segment and sending the first data segment of the network card in the embodiment of the present invention can be reduced, improving the Describe the efficiency of the server work.
  • the fourth process extracts the first data segment and the first vni from the mirror buffer, and generates a corresponding virus detection report according to the rules of the virus detection service.
  • the rules of the virus detection service can be understood as follows: multiple virus types are defined in the fourth process, and the fourth process can extract and parse the first data segment. If the data segment data analyzed in the segment hits at least one virus type in the plurality of virus types, then the fourth process will generate a virus detection report, which includes the virus detection report according to the first vni The determined user information and the virus type corresponding to the user information.
  • FIG. 12 it is a schematic diagram of the signaling interaction of the data information processing method in the embodiment of the present invention.
  • the schematic diagram of the signaling interaction of the data information processing method includes the following steps:
  • the network card receives the first data segment, and saves the first data segment to the data segment buffer area;
  • the network card sends the pointer of the first data segment to the first process
  • the first process parses the first encapsulated data in the first data segment from the first data segment, and acquires the first vni in the first encapsulated data;
  • the first process saves the first vni to a reserved segment buffer
  • the first process sends an "unblocking data segment task completion instruction" to the network card
  • the network card sends a pointer to the initial data in the first data segment to the second process
  • the second process extracts the initial data from the data segment buffer, and extracts the first vni from the reserved segment buffer;
  • the second process determines corresponding nat inner layer data header information and a second vni according to the initial data and the first vni;
  • the second process saves the nat inner layer data header information to the reserved segment buffer
  • the second process saves the second vni to the reserved segment buffer
  • the second process sends a "processing data segment information task completion instruction" to the network card
  • the network card sends a pointer to the Payload in the initial data in the first data segment to the first process
  • the first process extracts the second vni from the reserved segment buffer, and determines second encapsulation data according to the second vni;
  • the first process saves the second packaged data to the reserved segment buffer, so that the initial data located in the data segment buffer, the nat located in the reserved segment buffer
  • the inner data header information and the second encapsulated data together constitute a second data segment
  • the first process sends an "encapsulation data task completion instruction" to the network card.
  • the server 400 includes a network card 401, The first process 402 and the second process 403, the network card 401 includes a buffer area, and the buffer area includes a data segment buffer area and a reserved segment buffer area;
  • the network card 401 is configured to receive a first data segment, and save the first data segment to the data segment buffer, the first data segment includes first encapsulated data and initial data, and the first encapsulated data Including the first vni;
  • the first process 402 is configured to parse the first packaged data from the first data segment and acquire the first vni, and save the first vni to the reserved segment buffer;
  • the second process 403 is configured to extract the initial data from the data segment buffer, extract the first vni from the reserved segment buffer, and extract the initial data and the first vni according to the initial data and the first vni Determine the corresponding nat inner data header information and the second vni;
  • the second process 403 is also configured to save the nat inner layer data header information and the second vni to the reserved segment buffer;
  • the first process 402 is further configured to extract the second vni from the reserved segment cache, determine second package data according to the second vni, and save the second package data to the reserved segment A buffer area, so that the initial data located in the data segment buffer area, the nat inner layer data header information located in the reserved segment buffer area and the second encapsulated data together constitute a second data segment.
  • the second process 403 is further configured to extract an initial inner data header from the initial data, and extract the first vni from the reserved segment buffer;
  • the network card 401 is further configured to send a pointer of the first data segment to the first process 402;
  • the first process 402 is further configured to access the first data segment according to the pointer of the first data segment.
  • the network card 401 is further configured to send the pointer of the initial data to the second process.
  • the second process 403 is further configured to access the initial data and the first vni according to the pointer of the initial data.
  • the network card 401 is further configured to determine a corresponding sending tunnel according to the second data segment.
  • the network card 401 is further configured to send the second data segment according to the sending tunnel.
  • the server further includes a third process 404
  • the first encapsulation data further includes a source IP address and a destination IP address
  • the first process 402 is also used to Analyzing the first encapsulated data in the first data segment to obtain the source IP address and the destination IP address, and saving the source IP address and the destination IP address to the reserved segment cache District;
  • the third process 404 is specifically used for:
  • the third process processes the initial data
  • the third process discards the initial data.
  • the server further includes a fourth process 405, and the network card further includes a mirror cache area, and the mirror cache area includes a mirror data segment cache area and a mirror reserved segment cache area, the first process 402 is further configured to parse the first packaged data from the first data segment and obtain the first vni, and determine the user of the first data segment according to the first vni Whether to subscribe to the virus detection service; and
  • the first process 402 is further configured to save the first data segment to the mirrored data segment buffer, and save the first vni to mirror reserved segment buffer;
  • the fourth process 405 is specifically used for:
  • the present invention provides a data information processing method and a server.
  • the buffer area in the network card includes a data segment buffer area and a reserved segment buffer area.
  • the first process parses the first VNI from the first data segment and converts the first VNI Save to the reserved segment buffer; the second process extracts the first vni from the reserved segment buffer, and determines the corresponding nat inner layer data header information and the second vni according to the first vni;
  • the second process saves the nat inner layer data header information and the second vni to the reserved segment buffer; the first process then extracts the second vni from the reserved segment buffer to Do the corresponding operation.
  • the reserved segment buffer area is opened in the buffer area of the network card, and the first vni, nat inner data header information and the second vni obtained by the first process and the second process are temporarily stored in the reserved segment buffer area , so that the first process and the second process can share the information obtained by processing each other, avoiding partial duplication of operations performed by the first process and the second process; and when the first process and the second process obtain The corresponding information in the first data segment and the corresponding operations are performed while still ensuring the integrity of the first data segment, so that other processes can normally obtain the information of the first data segment, preventing the server from restarting from the outside world The first data segment is obtained for use by other processes.
  • this solution improves the working efficiency of the server.
  • the embodiment of the present invention also provides a server, as shown in FIG. 16 , which shows a schematic structural diagram of the server involved in the embodiment of the present invention, specifically:
  • the server may include a processor 801 of one or more processing cores, a memory 802 of one or more computer-readable storage media, a power supply 803, an input unit 804 and other components.
  • a processor 801 of one or more processing cores may include a processor 801 of one or more processing cores, a memory 802 of one or more computer-readable storage media, a power supply 803, an input unit 804 and other components.
  • FIG. 16 is not limited to the server, and may include more or less components than shown in the figure, or combine some components, or arrange different components. in:
  • the processor 801 is the control center of the server, and uses various interfaces and lines to connect various parts of the entire server, by running or executing software programs and/or modules stored in the memory 802, and calling data stored in the memory 802, Execute various functions of the server and process data to monitor the server as a whole.
  • the processor 801 can include one or more processing cores; the processor 801 can be a central processing unit (Central Processing Unit, CPU), and can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP ), Application Specific Integrated Circuit (ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • CPU Central Processing Unit
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., preferably, the processor 801 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, User interface and application programs, etc., modem processor mainly handles wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 801 .
  • the memory 802 can be used to store software programs and modules, and the processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802 .
  • the memory 802 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); The data created by the use of the server, etc.
  • the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
  • the memory 802 may also include a memory server, so as to provide the processor 801 with access to the memory 802.
  • the server also includes a power supply 803 for supplying power to each component.
  • the power supply 803 can be logically connected to the processor 801 through the power management system, so that functions such as charging, discharging, and power consumption management can be realized through the power management system.
  • the power supply 803 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
  • the server can also include an input unit 804, which can be used to receive input numbers or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • an input unit 804 can be used to receive input numbers or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • the server may also include a display unit, etc., which will not be repeated here.
  • the processor 801 in the server will load the executable file corresponding to the process of one or more application programs into the memory 802 according to the following instructions, and the processor 801 will run the executable file stored in the memory. 802 to implement various functions, the processor 801 can issue instructions to the network card, the first process and the second process in the server, so that the network card, the first process and the second process The process performs the following steps in sequence:
  • the network card receives a first data segment, and saves the first data segment to the data segment buffer area, the first data segment includes first encapsulated data and initial data, and the first encapsulated data includes the first vni;
  • the first process parses the first packaged data from the first data segment and acquires the first vni, and saves the first vni to the reserved segment buffer;
  • the second process extracts the initial data from the data segment buffer, extracts the first VNI from the reserved segment buffer, and determines the corresponding VNI according to the initial data and the first VNI. Nat inner data header information and the second vni;
  • the second process saves the nat inner layer data header information and the second vni to the reserved segment buffer;
  • the first process extracts the second vni from the reserved segment buffer, determines second package data according to the second vni, and saves the second package data to the reserved segment buffer , so that the initial data located in the data segment buffer, the nat inner data header information located in the reserved segment buffer and the second encapsulated data together constitute a second data segment.
  • the embodiment of the present invention provides a kind of computer-readable storage medium, and this storage medium can comprise: Read Only Memory (ROM, Read Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk etc. .
  • a computer program is stored thereon, and the computer program is loaded by the processor to issue instructions to the network card, the first process and the second process in the server, so that the network card, the first process and the second process The process performs the following steps in sequence:
  • the network card receives a first data segment, and saves the first data segment to the data segment buffer area, the first data segment includes first encapsulated data and initial data, and the first encapsulated data includes the first vni;
  • the first process parses the first packaged data from the first data segment and acquires the first vni, and saves the first vni to the reserved segment buffer;
  • the second process extracts the initial data from the data segment buffer, extracts the first VNI from the reserved segment buffer, and determines the corresponding VNI according to the initial data and the first VNI. Nat inner data header information and the second vni;
  • the second process saves the nat inner layer data header information and the second vni to the reserved segment buffer;
  • the first process extracts the second vni from the reserved segment buffer, determines second package data according to the second vni, and saves the second package data to the reserved segment buffer , so that the initial data located in the data segment buffer, the nat inner data header information located in the reserved segment buffer and the second encapsulated data together constitute a second data segment.
  • each of the above units or structures can be implemented as an independent entity, or can be combined arbitrarily as the same or several entities.
  • each of the above units or structures please refer to the previous method embodiments, here No longer.

Abstract

The present invention provides a data information processing method and a server. The method comprises: a network interface card saving a first data segment in a data segment buffer area, wherein the first data segment comprises first encapsulated data and initial data; during a first process, parsing the first encapsulated data to acquire a first vni therefrom, and saving the first vni in a reserved segment buffer area; during a second process, respectively extracting the initial data and the first vni from the data segment buffer area and the reserved segment buffer area, and saving, in the reserved segment buffer area, nat inner-layer data header information and a second vni that are determined according to the initial data and the first vni; and during the first process, extracting the second vni from the reserved segment buffer area, and saving, in the reserved segment buffer area, second encapsulated data determined according to the second vni, so that the initial data, the nat inner-layer data header information and the second encapsulated data together constitute a second data segment. By means of the solution, a reserved segment buffer area is provided for saving and data information processing, and for preventing a first data segment from being destroyed, thereby improving the operation efficiency of a server.

Description

数据信息处理的方法和服务器Data information processing method and server 技术领域technical field
本发明涉及通信技术领域,具体涉及数据信息处理的方法和服务器。The invention relates to the field of communication technology, in particular to a data information processing method and server.
背景技术Background technique
VXLAN(Virtual eXtensible LAN,可扩展虚拟局域网络)将虚拟机发出的数据包封装在UDP中,并使用物理网络的IP/MAC地址作为外层进行封装,对网络只表现为封装后的参数,因此,极大的降低了大二层网路对MAC地址规格的需求。VXLAN (Virtual eXtensible LAN, scalable virtual local area network) encapsulates the data packets sent by the virtual machine in UDP, and uses the IP/MAC address of the physical network as the outer layer for encapsulation, and only represents the encapsulated parameters to the network, so , which greatly reduces the requirement for MAC address specifications in large Layer 2 networks.
同一个服务器中的多个进程均需要对网卡的数据段执行不同的指令以得到对应的多个目标信息,并且每一目标消息无法被其它的进程直接获取,其中,至少两个进程需要执行相同的指令以获取对应的至少两个目标信息才能执行后续的指令,即服务器中同一指令需要被至少两个进程均执行,降低了服务器的工作效率。Multiple processes in the same server need to execute different instructions on the data segment of the network card to obtain corresponding multiple target information, and each target message cannot be directly obtained by other processes, and at least two processes need to execute the same In order to obtain at least two corresponding target information, subsequent instructions can be executed, that is, the same instruction in the server needs to be executed by at least two processes, which reduces the working efficiency of the server.
因此,有必要提供可以提高服务器的工作效率的数据信息处理的方法和服务器。Therefore, it is necessary to provide a data information processing method and a server that can improve the working efficiency of the server.
发明内容Contents of the invention
本发明实施例提供数据信息处理的方法和服务器,通过在网卡的缓存区中开辟预留段缓存区,第一进程将第一数据段中的第一vni剥离并保存至所述预留段缓存区中,第二进程可以直接共享所述预留段缓存区中的所述第一vni以确定对应的nat信息和第二vni;以解决目前的第二进程需要执行与第一进程所执行的操作相同的操作获取相应的信息,导致服务器的工作效率较低的问题。Embodiments of the present invention provide a data information processing method and a server. By opening a reserved segment buffer in the buffer area of the network card, the first process strips and saves the first vni in the first data segment to the reserved segment buffer In the area, the second process can directly share the first vni in the reserved segment buffer area to determine the corresponding nat information and the second vni; to solve the problem that the current second process needs to execute and the first process Obtaining the corresponding information by performing the same operation leads to a problem that the working efficiency of the server is low.
本发明实施例提供数据信息处理的方法,应用于服务器,所述服务器包括网卡、第一进程和第二进程,所述网卡包括缓存区,所述缓存区包括数据段缓存区和预留段缓存区,所述数据信息处理的方法包括:An embodiment of the present invention provides a method for processing data information, which is applied to a server. The server includes a network card, a first process, and a second process. The network card includes a buffer area, and the buffer area includes a data segment buffer area and a reserved segment buffer area. area, the data information processing method includes:
所述网卡接收第一数据段,并将所述第一数据段保存至所述数据段缓存区,所述第一数据段包括第一封装数据和初始数据,所述第一封装数据包括第一vni;The network card receives a first data segment, and saves the first data segment to the data segment buffer area, the first data segment includes first encapsulated data and initial data, and the first encapsulated data includes the first vni;
所述第一进程从所述第一数据段中解析所述第一封装数据以及获取所述第一vni,并将所述第一vni保存至所述预留段缓存区;The first process parses the first packaged data from the first data segment and acquires the first vni, and saves the first vni to the reserved segment buffer;
所述第二进程从所述数据段缓存区中提取所述初始数据、从所述预留段缓存区中提取所述第一vni,并根据所述初始数据和所述第一vni确定对应的nat内层数据头信息和第二vni;The second process extracts the initial data from the data segment buffer, extracts the first VNI from the reserved segment buffer, and determines the corresponding VNI according to the initial data and the first VNI. Nat inner data header information and the second vni;
所述第二进程将所述nat内层数据头信息和所述第二vni保存至所述预留段缓存区;The second process saves the nat inner layer data header information and the second vni to the reserved segment buffer;
所述第一进程从所述预留段缓存区中提取所述第二vni,并根据所述第二vni确定第二封装数据,将所述第二封装数据保存至所述预留段缓存区,使得位于所述数据段缓存区中的所述初始数据、位于所述预留段缓存区中的所述nat内层数据头信息和所述第二封装数据共同构成第二数据段。The first process extracts the second vni from the reserved segment buffer, determines second package data according to the second vni, and saves the second package data to the reserved segment buffer , so that the initial data located in the data segment buffer, the nat inner data header information located in the reserved segment buffer and the second encapsulated data together constitute a second data segment.
在一实施例中,所述第二进程从所述数据段缓存区中提取所述初始数据、从所述预留段缓存区中提取所述第一vni,并根据所述初始数据和所述第一vni确定对应的nat内层数据头信息和第二vni的步骤,包括:In an embodiment, the second process extracts the initial data from the data segment buffer, extracts the first vni from the reserved segment buffer, and according to the initial data and the The steps for the first vni to determine the corresponding nat inner layer data header information and the second vni include:
所述第二进程从所述初始数据中提取初始内层数据头,并从所述预留段缓存区提取所述第一vni;The second process extracts an initial inner data header from the initial data, and extracts the first vni from the reserved segment buffer;
所述第二进程根据所述初始内层数据头和所述第一vni,分别在nat转化表格和vni转化表格中查找对应的nat IP、nat PORT和第二vni;The second process searches corresponding nat IP, nat PORT and the second vni respectively in the nat conversion table and the vni conversion table according to the initial inner layer data header and the first vni;
所述第二进程根据所述nat IP、所述nat PORT确定所述nat内层数据头信息。The second process determines the nat inner layer data header information according to the nat IP and the nat PORT.
在一实施例中,所述第一进程从所述第一数据段中解析所述第一封装数据以及获取所述第一vni,并将所述第一vni保存至所述预留段缓存区的步骤之前,包括:In one embodiment, the first process parses the first packaged data from the first data segment and obtains the first vni, and saves the first vni to the reserved segment buffer Before the steps, include:
所述网卡向所述第一进程发送所述第一数据段的指针;The network card sends the pointer of the first data segment to the first process;
所述第一进程根据所述第一数据段的指针访问所述第一数据段。The first process accesses the first data segment according to the pointer of the first data segment.
在一实施例中,所述第二进程从所述数据段缓存区中提取所述初始数据、从所述预留段缓存区中提取所述第一vni,并根据所述初始数据和所述第一vni确定对应的nat内层数据头信息和第二vni的步骤之前,包括:In an embodiment, the second process extracts the initial data from the data segment buffer, extracts the first vni from the reserved segment buffer, and according to the initial data and the Before the first vni determines the corresponding nat inner layer data header information and the steps of the second vni, it includes:
所述网卡向所述第二进程发送所述初始数据的指针;The network card sends the pointer of the initial data to the second process;
所述第二进程根据所述初始数据的指针确定所述预留段缓存区,并访问所述初始数据和所述第一vni。The second process determines the reserved segment buffer according to the pointer of the initial data, and accesses the initial data and the first vni.
在一实施例中,所述第一进程从所述预留段缓存区中提取所述第二vni,并根据所述第二vni确定第二封装数据,将所述第二封装数据保存至所述预留段缓存区,使得位于所述数据段缓存区中的所述初始数据、位于所述预留段缓存区中的所述nat内层数据头信息和所述第二封装数据共同构成第二数据段的步骤之后,包括:In an embodiment, the first process extracts the second vni from the reserved segment buffer, determines the second package data according to the second vni, and saves the second package data to the The reserved segment buffer area, so that the initial data located in the data segment buffer area, the nat inner layer data header information located in the reserved segment buffer area and the second encapsulation data together constitute the first After the steps of the second data segment, including:
所述网卡根据所述第二数据段确定对应的发送隧道;The network card determines a corresponding sending tunnel according to the second data segment;
所述网卡根据所述发送隧道发送所述第二数据段。The network card sends the second data segment according to the sending tunnel.
在一实施例中,所述服务器还包括第三进程,所述第一封装数据还包括源IP地址和目的IP地址,所述网卡接收第一数据段,并将所述第一数据段保存至所述数据段缓存区,所述第一数据段包括第一封装数据和初始数据,所述第一封装数据包括第一vni的步骤之后,包括:In one embodiment, the server further includes a third process, the first encapsulated data also includes a source IP address and a destination IP address, and the network card receives the first data segment and saves the first data segment to The data segment cache area, the first data segment includes first package data and initial data, and after the first package data includes the step of the first vni, it includes:
所述第一进程从所述第一数据段中解析所述第一封装数据并获取所述源IP地址和所述目的IP地址,并将所述源IP地址和所述目的IP地址保存至所述预留段缓存区;The first process parses the first encapsulated data from the first data segment and obtains the source IP address and the destination IP address, and saves the source IP address and the destination IP address to the The reserved segment cache area;
所述第三进程从所述预留段缓存区提取所述源IP地址和所述目的IP地址,并根据所述源IP地址和所述目的IP地址判断所述第一数据段是否为合法数据 头;The third process extracts the source IP address and the destination IP address from the reserved segment buffer, and judges whether the first data segment is legitimate data according to the source IP address and the destination IP address head;
若所述第一数据段是合法数据头,则所述第三进程处理所述初始数据;If the first data segment is a legal data header, the third process processes the initial data;
若所述第一数据段不是合法数据头,则所述第三进程丢弃所述初始数据。If the first data segment is not a valid data header, the third process discards the initial data.
在一实施例中,所述服务器还包括第四进程,所述网卡还包括镜像缓存区,所述镜像缓存区包括镜像数据段缓存区和镜像预留段缓存区,所述网卡接收第一数据段,并将所述第一数据段保存至所述数据段缓存区,所述第一数据段包括第一封装数据和初始数据,所述第一封装数据包括第一vni的步骤之后,包括:In one embodiment, the server further includes a fourth process, and the network card further includes a mirrored buffer, the mirrored buffer includes a mirrored data segment buffer and a mirrored reserved segment buffer, and the network card receives the first data segment, and save the first data segment to the data segment buffer, the first data segment includes the first package data and initial data, after the first package data includes the step of the first vni, including:
所述第一进程从所述第一数据段中解析所述第一封装数据并获取所述第一vni,并根据所述第一vni判断所述第一数据段的用户是否开通病毒检测服务;The first process parses the first packaged data from the first data segment and obtains the first vni, and judges whether the user of the first data segment has subscribed to a virus detection service according to the first vni;
若所述第一数据段的用户开通病毒检测服务,则所述第一进程将所述第一数据段保存至所述镜像数据段缓存区,并将所述第一vni保存至镜像预留段缓存区;If the user of the first data segment activates the virus detection service, then the first process saves the first data segment to the mirrored data segment cache area, and saves the first vni to the mirrored reserved segment cache area;
所述第四进程从所述镜像缓存区中提取所述第一数据段和所述第一vni,并根据病毒检测服务的规则生成对应的病毒检测报告。The fourth process extracts the first data segment and the first vni from the mirror buffer, and generates a corresponding virus detection report according to the rules of the virus detection service.
本发明实施例提供服务器,所述服务器包括网卡、第一进程和第二进程,所述网卡包括缓存区,所述缓存区包括数据段缓存区和预留段缓存区;An embodiment of the present invention provides a server, the server includes a network card, a first process, and a second process, the network card includes a buffer area, and the buffer area includes a data segment buffer area and a reserved segment buffer area;
所述网卡用于接收第一数据段,并将所述第一数据段保存至所述数据段缓存区,所述第一数据段包括第一封装数据和初始数据,所述第一封装数据包括第一vni;The network card is configured to receive a first data segment and save the first data segment to the data segment buffer, the first data segment includes first packaged data and initial data, and the first packaged data includes first vni;
所述第一进程用于从所述第一数据段中解析所述第一封装数据以及获取所述第一vni,并将所述第一vni保存至所述预留段缓存区;The first process is configured to parse the first packaged data from the first data segment and obtain the first vni, and save the first vni to the reserved segment buffer;
所述第二进程用于从所述数据段缓存区中提取所述初始数据、从所述预留段缓存区中提取所述第一vni,并根据所述初始数据和所述第一vni确定对应的nat内层数据头信息和第二vni;The second process is used to extract the initial data from the data segment buffer, extract the first vni from the reserved segment buffer, and determine according to the initial data and the first vni The corresponding nat inner data header information and the second vni;
所述第二进程还用于将所述nat内层数据头信息和所述第二vni保存至所述预留段缓存区;The second process is also used to save the nat inner layer data header information and the second vni to the reserved segment buffer;
所述第一进程还用于从所述预留段缓存区中提取所述第二vni,并根据所述第二vni确定第二封装数据,将所述第二封装数据保存至所述预留段缓存区,使得位于所述数据段缓存区中所述初始数据、位于所述预留段缓存区中的所述nat内层数据头信息和所述第二封装数据共同构成第二数据段。The first process is further configured to extract the second vni from the reserved segment buffer, determine second package data according to the second vni, and save the second package data to the reserved A segment buffer, so that the initial data located in the data segment buffer, the nat inner layer data header information located in the reserved segment buffer and the second encapsulated data together constitute a second data segment.
在一实施例中,所述第二进程还用于从所述初始数据中提取初始内层数据头,并从所述预留段缓存区提取所述第一vni;以及In an embodiment, the second process is further configured to extract an initial inner data header from the initial data, and extract the first vni from the reserved segment buffer; and
所述第二进程用于根据所述初始内层数据头和所述第一vni,分别在nat转化表格和vni转化表格中查找对应的nat IP和第二vni。The second process is used to search the corresponding nat IP and the second vni in the nat conversion table and the vni conversion table respectively according to the initial inner layer data header and the first vni.
在一实施例中,所述网卡还用于向所述第一进程发送所述第一数据段的指针;以及In an embodiment, the network card is further configured to send a pointer of the first data segment to the first process; and
所述第一进程还用于根据所述第一数据段的指针确定所述数据段缓存区,并访问所述第一数据段。The first process is further configured to determine the data segment cache according to the pointer of the first data segment, and access the first data segment.
本发明提供了数据信息处理的方法和服务器,网卡中的缓存区包括数据段缓存区和预留段缓存区,第一进程从第一数据段中解析第一vni,并将所述第一vni保存至所述预留段缓存区;第二进程从所述预留段缓存区提取所述第一vni,并根据所述第一vni确定对应的nat内层数据头信息和第二vni;所述第二进程将所述nat内层数据头信息和所述第二vni保存至所述预留段缓存区;所述第一进程再从所述预留段缓存区提取所述第二vni以进行相应的操作。该方案通过在网卡中的缓存区中开辟预留段缓存区,将第一进程和第二进程处理得到的第一vni、nat内层数据头信息以及第二vni均暂存在预留段缓存区,以便于第一进程和第二进程可以共享彼此处理得到的信息,避免第一进程和第二进程执行的操作会出现部分重复的情况;并且在所述第一进程和所述第二进程获取所述第一数据段中的相应信息以及执行相应操作的同时,仍然保证所述第一数据段的完整性,使得其他的进程可以正常获取所述第一数据段的信息,避免服务器重新从外界获取所述第一数据段以供给其它进程使用。综上,本方案提高了服务器的工作效率。The present invention provides a data information processing method and a server. The buffer area in the network card includes a data segment buffer area and a reserved segment buffer area. The first process parses the first VNI from the first data segment and converts the first VNI Save to the reserved segment buffer; the second process extracts the first vni from the reserved segment buffer, and determines the corresponding nat inner layer data header information and the second vni according to the first vni; The second process saves the nat inner layer data header information and the second vni to the reserved segment buffer; the first process then extracts the second vni from the reserved segment buffer to Do the corresponding operation. In this solution, the reserved segment buffer area is opened in the buffer area of the network card, and the first vni, nat inner data header information and the second vni obtained by the first process and the second process are temporarily stored in the reserved segment buffer area , so that the first process and the second process can share the information obtained by processing each other, avoiding partial duplication of operations performed by the first process and the second process; and when the first process and the second process obtain The corresponding information in the first data segment and the corresponding operations are performed while still ensuring the integrity of the first data segment, so that other processes can normally obtain the information of the first data segment, preventing the server from restarting from the outside world The first data segment is obtained for use by other processes. In summary, this solution improves the working efficiency of the server.
附图说明Description of drawings
下面通过附图来对本发明进行进一步说明。需要说明的是,下面描述中的附图仅仅是用于解释说明本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。The present invention will be further described below by means of the accompanying drawings. It should be noted that the accompanying drawings in the following description are only used to explain some embodiments of the present invention, and those skilled in the art can also obtain other Attached picture.
图1为本发明实施例提供的数据信息处理的系统的场景示意图;FIG. 1 is a schematic diagram of a scene of a data information processing system provided by an embodiment of the present invention;
图2为本发明实施例提供的一种网卡中缓存区的区间示意图;FIG. 2 is a schematic diagram of a section of a cache area in a network card provided by an embodiment of the present invention;
图3为本发明实施例提供的第一种数据信息处理的方法的流程示意图;FIG. 3 is a schematic flowchart of a first data information processing method provided by an embodiment of the present invention;
图4为本发明实施例提供的另一种网卡中缓存区的区间示意图;FIG. 4 is a schematic diagram of an interval of a cache area in another network card provided by an embodiment of the present invention;
图5为本发明实施例提供的第一数据段的组成结构示意图;FIG. 5 is a schematic diagram of the composition and structure of the first data segment provided by the embodiment of the present invention;
图6为本发明实施例提供的第二种数据信息处理的方法的流程示意图;FIG. 6 is a schematic flowchart of a second data information processing method provided by an embodiment of the present invention;
图7为本发明实施例提供的第三种数据信息处理的方法的流程示意图;FIG. 7 is a schematic flowchart of a third data information processing method provided by an embodiment of the present invention;
图8为本发明实施例提供的第四种数据信息处理的方法的流程示意图;FIG. 8 is a schematic flowchart of a fourth data information processing method provided by an embodiment of the present invention;
图9为本发明实施例提供的第五种数据信息处理的方法的流程示意图;FIG. 9 is a schematic flowchart of a fifth data information processing method provided by an embodiment of the present invention;
图10为本发明实施例提供的第六种数据信息处理的方法的流程示意图;FIG. 10 is a schematic flowchart of a sixth data information processing method provided by an embodiment of the present invention;
图11为本发明实施例提供的第七种数据信息处理的方法的流程示意图;FIG. 11 is a schematic flowchart of a seventh data information processing method provided by an embodiment of the present invention;
图12为本发明实施例提供的数据信息处理的方法的信令交互示意图;FIG. 12 is a schematic diagram of signaling interaction of a data information processing method provided by an embodiment of the present invention;
图13为本发明实施例提供的第一种服务器的结构示意图;FIG. 13 is a schematic structural diagram of a first server provided by an embodiment of the present invention;
图14为本发明实施例提供的第二种服务器的结构示意图;FIG. 14 is a schematic structural diagram of a second server provided by an embodiment of the present invention;
图15为本发明实施例提供的第三种服务器的结构示意图;FIG. 15 is a schematic structural diagram of a third server provided by an embodiment of the present invention;
图16为本发明实施例提供的第四种服务器的结构示意图。FIG. 16 is a schematic structural diagram of a fourth server provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、完整的描述。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are only some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present invention.
本发明中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或模块的过程、方法、系统、产品或设备没有限定于已列出的步骤或模块,而是可选地还包括没有列出的步骤或模块,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或模块。The terms "first", "second", etc. in the present invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules, but optionally also includes steps or modules that are not listed, or optionally includes For other steps or modules inherent in these processes, methods, products or devices.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present invention. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
本发明实施例提供的数据信息处理的方法的执行主体,可以为本发明实施例提供的服务器,或者集成了所述服务器的电子设备,所述服务器可以采用硬件或者软件的方式实现。The execution subject of the data information processing method provided in the embodiment of the present invention may be the server provided in the embodiment of the present invention, or an electronic device integrated with the server, and the server may be implemented in the form of hardware or software.
下面首先对本发明实施例中涉及到的一些基本概念进行介绍。Some basic concepts involved in the embodiments of the present invention are firstly introduced below.
网卡:一块被设计用来允许计算机在计算机网络上进行通讯的计算机硬件,使得用户可以通过电缆或无线相互连接。每一个网卡都有一个被称为MAC地址的独一无二的48位串行号,它被写在网卡上的一块ROM中。网卡并不是独立的自治单元,因为网卡本身不带电源而是必须使用所插入的计算机的电源,并受该计算机的控制。当网卡收到一个有差错的帧时,它就将这个帧丢弃而不必通知它所插入的计算机。当网卡收到一个正确的帧时,它就使用中断来通知该计算机并交付给协议栈中的网络层。当计算机要发送一个IP数据包时,它就由协议栈向下交给网卡组装成帧后发送到局域网。Network card: A piece of computer hardware designed to allow computers to communicate on a computer network, allowing users to connect to each other via cables or wirelessly. Each network card has a unique 48-bit serial number called a MAC address, which is written in a piece of ROM on the network card. A network card is not a self-contained autonomous unit because it does not carry its own power source but must use the power of the computer it is plugged into and be controlled by that computer. When the network card receives an erroneous frame, it discards the frame without notifying the computer it's plugged into. When the network card receives a correct frame, it notifies the computer using an interrupt and delivers it to the network layer in the protocol stack. When the computer wants to send an IP data packet, it is handed down from the protocol stack to the network card to be assembled into a frame and sent to the LAN.
进程:进程是一个实体,每一个进程都有它自己的地址空间,一般情况下,进程包括文本区域、数据区域和堆栈;其中,文本区域存储处理器执行的代码,数据区域存储变量和进程执行期间使用的动态分配的内存,堆栈区域存储着活动过程调用的指令和本地变量。进程也是一个“执行中的程序”,程序是一个没有生命的实体,只有操作系统的处理器赋予程序生命时,程序才能成为一个活动的实体,我们称其为进程。Process: A process is an entity, and each process has its own address space. Generally, a process includes a text area, a data area, and a stack; among them, the text area stores the code executed by the processor, and the data area stores variables and process execution Dynamically allocated memory used during, the stack area stores instructions and local variables for active procedure calls. A process is also an "executing program". A program is an inanimate entity. Only when the processor of the operating system gives life to the program can the program become an active entity. We call it a process.
缓存区:多个以不同速度或优先级运行的硬件或程序进程共享的数据存储区。在高速和低速设备之间起一个速度平滑作用,暂时存储数据,经常访问的数据可以放进缓冲区,减少对慢速设备的访问以提高系统的效率。Cache: A data storage area shared by multiple hardware or program processes running at different speeds or priorities. It acts as a speed smoother between high-speed and low-speed devices, temporarily stores data, and frequently accessed data can be put into the buffer, reducing access to slow devices to improve system efficiency.
本发明实施例提供了数据信息处理的方法和服务器。以下将分别进行详细说明。The embodiment of the present invention provides a data information processing method and server. The details will be described respectively below.
请参阅图1,图1为本发明实施例所提供的数据信息处理的系统的场景示意图,该数据信息处理的系统可以包括网卡100、第一进程200和第二进程300, 所述网卡包括缓存区,所述缓存区包括数据段缓存区和预留段缓存区。Please refer to FIG. 1. FIG. 1 is a schematic diagram of a scene of a data information processing system provided by an embodiment of the present invention. The data information processing system may include a network card 100, a first process 200, and a second process 300. The network card includes a cache area, and the buffer area includes a data segment buffer area and a reserved segment buffer area.
本申请实施例中,所述缓存区位于所述网卡100中,如图2所示,所述网卡100为所述缓存区配置2048字节的空间,其中每一个标号表示所述缓存区中对应的字节的序号,例如“0”表示第0个字节,“2047”表示第2047个字节。其中,前1600个字节所在区间为保存数据段的数据段缓存区,即第0个字节至第1599个字节用于保存数据段;进一步的,可以从第1600个字节至第2047个字节所在区间中选择长达256个字节所在区间为保存数据段中部分信息的预留段缓存区。需要注意的是,当所述数据段缓存区和所述预留段缓存区确定后,若已知所述数据段缓存区,可以根据预先设置的所述数据段缓存区的首个字节和所述预留段缓存区的首个字节的相对位置,以确定所述预留段缓存区。In the embodiment of the present application, the cache area is located in the network card 100. As shown in FIG. 2, the network card 100 configures a space of 2048 bytes for the cache area, and each label indicates the corresponding The serial number of the byte, for example, "0" means the 0th byte, and "2047" means the 2047th byte. Among them, the interval of the first 1600 bytes is the data segment cache area for storing the data segment, that is, the 0th byte to the 1599th byte are used to save the data segment; further, it can be from the 1600th byte to the 2047th byte Choose up to 256 bytes in the interval where the bytes are located as the reserved segment buffer for storing part of the information in the data segment. It should be noted that after the data segment buffer and the reserved segment buffer are determined, if the data segment buffer is known, the first byte and The relative position of the first byte of the reserved segment buffer to determine the reserved segment buffer.
其中,所述预留段缓存区和所述数据段缓存区之间可以预留预设区间,以适当区分所述数据段和所保存的所述数据段中的部分信息,例如图2所示,所述预留段缓存区可以为所述缓存区中的第1663个字节至第1918个字节所在区间;或者所述预留段缓存区和所述数据段缓存区也可以相邻设置,仅根据预先设置的所述数据段缓存区的首个字节和所述预留段缓存区的首个字节的相对位置,以确定所述预留段缓存区。当然,可以根据所保存的所述数据段中的部分信息的长度合理地选择所述预留段缓存区相应的空间。Wherein, a preset interval may be reserved between the reserved segment buffer area and the data segment buffer area, so as to properly distinguish the data segment from the stored part of the information in the data segment, as shown in FIG. 2 , the reserved segment buffer area may be the interval of the 1663th byte to the 1918th byte in the buffer area; or the reserved segment buffer area and the data segment buffer area may also be adjacently set The reserved segment buffer is determined only according to the preset relative position of the first byte of the data segment buffer and the first byte of the reserved segment buffer. Of course, the corresponding space of the reserved segment buffer can be reasonably selected according to the length of the stored partial information in the data segment.
本申请实施例中,所述网卡100主要用于接收第一数据段,并将所述第一数据段保存至所述数据段缓存区,所述第一数据段包括第一封装数据和初始数据,所述第一封装数据包括第一vni;所述第一进程主要用于从所述第一数据段中解析所述第一封装数据以及获取所述第一vni,并将所述第一vni保存至所述预留段缓存区;所述第二进程主要用于从所述数据段缓存区中提取所述初始数据、从所述预留段缓存区中提取所述第一vni,并根据所述初始数据和所述第一vni确定对应的nat内层数据头信息和第二vni,以及将所述nat内层数据头信息和所述第二vni保存至所述预留段缓存区;所述第一进程主要还用于从所述预留段缓存区中提取所述第二vni,并根据所述第二vni确定第二封装数据,将所述第二封装数据保存至所述扩展信息,使得位于所述数据段缓存区中所述初始数据、位于所述预留段缓存区中的所述nat内层数据头信息和所述第二封装数据共同构成第二数据段。In the embodiment of the present application, the network card 100 is mainly used to receive the first data segment, and save the first data segment to the data segment buffer area, the first data segment includes the first packaged data and initial data , the first encapsulation data includes a first vni; the first process is mainly used to parse the first encapsulation data from the first data segment and obtain the first vni, and convert the first vni Save to the reserved segment buffer; the second process is mainly used to extract the initial data from the data segment buffer, extract the first vni from the reserved segment buffer, and according to The initial data and the first vni determine the corresponding nat inner layer data header information and the second vni, and save the nat inner layer data header information and the second vni to the reserved segment buffer; The first process is mainly used to extract the second vni from the reserved segment buffer, determine the second encapsulation data according to the second vni, and save the second encapsulation data to the extended information, so that the initial data located in the data segment buffer, the nat inner layer data header information located in the reserved segment buffer and the second encapsulated data together constitute a second data segment.
本申请实施例中,所述数据信息处理的系统可以包含于服务器中,即所述网卡100、所述第一进程200和所述第二进程300均可以包含于服务器中。所述服务器可以是独立的服务器,也可以是服务器组成的服务器网络或服务器集群,例如,所述服务器包括但不限于计算机、网络主机、单个网络服务器、多个网络服务器集或多个服务器构成的云服务器。其中,云服务器由基于云计算的大量计算机或网络服务器构成。In the embodiment of the present application, the data information processing system may be included in a server, that is, the network card 100, the first process 200, and the second process 300 may all be included in the server. The server may be an independent server, or a server network or server cluster composed of servers. For example, the server includes but is not limited to a computer, a network host, a single network server, multiple network server sets, or a server cluster composed of multiple servers. Cloud Server. Among them, the cloud server is composed of a large number of computers or network servers based on cloud computing.
本申请实施例中,所述网卡100可以和外界、所述服务器内部的进程之间通信,例如所述网卡100可以接收或者向外界发送数据段,所述网卡100还可以所述服务器内部的进程分别发送所需的数据段指针;所述第一进程200根据数据段指针可以对数据段进行解封的操作,还可以根据相应的信息对数据段进 行封装的操作,无论是解封还是封装,均可以将获取的报头文的相关信息保存至不同于数据段所在区域的区域;所述第二进程300可以从相应的区域获取报头文的相关信息,并根据相应的映射规则得到对应的信息,并将对应的信息保存至不同于数据段所在区域的区域。In the embodiment of the present application, the network card 100 can communicate with the outside world and processes inside the server, for example, the network card 100 can receive or send data segments to the outside world, and the network card 100 can also communicate with processes inside the server Send the required data segment pointers respectively; the first process 200 can decapsulate the data segment according to the data segment pointer, and can also perform the encapsulation operation on the data segment according to the corresponding information, whether it is decapsulation or encapsulation, Both can save the relevant information of the obtained header text in an area different from the area where the data segment is located; the second process 300 can obtain the relevant information of the header text from the corresponding area, and obtain the corresponding information according to the corresponding mapping rules, And save the corresponding information to an area different from the area where the data segment is located.
进一步的,所述服务器可以包括多个物理口和多个虚拟口。其中,所述多个物理口可以包含于所述网卡100,所述多个物理口用于接收终端或者bras(broadband remote access server,宽带接入服务器)发送的数据段,或者用于向终端或者bras(broadband remote access server,宽带接入服务器)发送数据段。其中,所述网卡100、所述第一进程200和所述第二进程300之间可以通过所述多个虚拟口进行通信。如图1所示,例如,所述网卡100的其中一个物理口接收数据段,网卡驱动程序可以向所述第一进程200或者所述第二进程300发送“数据段指针”并通知所述第一进程200或者所述第二进程300处理数据段,所述第一进程200、所述第二进程300均可以通过网卡驱动程序分别向不同的虚拟口发送“解封/封装数据任务完成指令”和“处理数据段信息任务完成指令”,以表示已完成相应的任务,不同的虚拟口之间可以通过网卡驱动程序进行对应的收报、发报,第一进程200也可以通知另一个物理口发送数据段至所述服务器外界。Further, the server may include multiple physical ports and multiple virtual ports. Wherein, the plurality of physical ports may be included in the network card 100, and the plurality of physical ports are used to receive data segments sent by the terminal or bras (broadband remote access server, broadband access server), or to send data to the terminal or bras (broadband remote access server, broadband access server) sends data segments. Wherein, the network card 100, the first process 200 and the second process 300 may communicate through the plurality of virtual ports. As shown in Figure 1, for example, one of the physical ports of the network card 100 receives a data segment, and the network card driver can send a "data segment pointer" to the first process 200 or the second process 300 and notify the first process 200 or the second process 300 A process 200 or the second process 300 processes data segments, and the first process 200 and the second process 300 can send "unpacking/encapsulating data task completion instructions" to different virtual ports through the network card driver and "process the data segment information task completion instruction" to indicate that the corresponding task has been completed, and the corresponding receiving and sending of reports can be carried out through the network card driver between different virtual ports, and the first process 200 can also notify another physical port to send Data segments to the outside world of the server.
本申请实施例中,所述终端可以是一个通用计算机设备或者是一个专用计算机设备。在具体实现中所述终端可以是台式机、便携式电脑、网络服务器、掌上电脑(Personal Digital Assistant,PDA)、移动手机、平板电脑、无线终端设备、通信设备、嵌入式设备等,本实施例不限定所述终端的类型。In the embodiment of the present application, the terminal may be a general-purpose computer device or a special-purpose computer device. In the specific implementation, the terminal can be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, an embedded device, etc., and the present embodiment does not Define the type of the terminal.
本领域技术人员可以理解,图1中示出的应用环境,仅仅是与本申请方案一种应用场景,并不构成对本申请方案应用场景的限定,其他的应用环境还可以包括比图1中所示更多的进程,例如图1中仅示出2个进程,可以理解的,该数据信息处理的系统还可以包括一个或多个可访问所述网卡100的其它进程,具体此处不作限定。Those skilled in the art can understand that the application environment shown in Figure 1 is only an application scenario related to the solution of this application, and does not constitute a limitation on the application scenario of the solution of this application. More processes are shown. For example, only two processes are shown in FIG. 1 . It can be understood that the data information processing system may also include one or more other processes that can access the network card 100 , which is not limited here.
需要说明的是,图1所示的数据信息处理的场景示意图仅仅是一个示例,本发明实施例描述的数据信息处理的系统以及场景是为了更加清楚的说明本发明实施例的技术方案,并不构成对于本发明实施例提供的技术方案的限定,本领域普通技术人员可知,随着数据信息处理的系统的演变和新业务场景的出现,本发明实施例提供的技术方案对于类似的技术问题,同样适用。It should be noted that the schematic diagram of the data information processing scene shown in FIG. Constituting a limitation on the technical solutions provided by the embodiments of the present invention, those of ordinary skill in the art know that, with the evolution of the data information processing system and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present invention can solve similar technical problems. The same applies.
本发明实施例中提供一种数据信息处理的方法,该一种数据信息处理的方法的执行主体为所述服务器,所述服务器包括网卡、第一进程和第二进程,所述网卡包括缓存区,所述缓存区包括数据段缓存区和预留段缓存区,所述数据信息处理的方法包括:所述网卡接收第一数据段,并将所述第一数据段保存至所述数据段缓存区,所述第一数据段包括第一封装数据和初始数据,所述第一封装数据包括第一vni;所述第一进程从所述第一数据段中解析所述第一封装数据以及获取所述第一vni,并将所述第一vni保存至所述预留段缓存区;所述第二进程从所述数据段缓存区中提取所述初始数据、从所述预留段缓存区中提取 所述第一vni,并根据所述初始数据和所述第一vni确定对应的nat内层数据头信息和第二vni;所述第二进程将所述nat内层数据头信息和所述第二vni保存至所述预留段缓存区;所述第一进程从所述预留段缓存区中提取所述第二vni,并根据所述第二vni确定第二封装数据,将所述第二封装数据保存至所述预留段缓存区,使得位于所述数据段缓存区中的所述初始数据、位于所述预留段缓存区中的所述nat内层数据头信息和所述第二封装数据共同构成第二数据段。An embodiment of the present invention provides a data information processing method, the execution subject of the data information processing method is the server, the server includes a network card, a first process and a second process, and the network card includes a cache area , the buffer area includes a data segment buffer area and a reserved segment buffer area, and the data information processing method includes: the network card receives a first data segment, and saves the first data segment into the data segment buffer area, the first data segment includes first packaged data and initial data, the first packaged data includes the first vni; the first process parses the first packaged data from the first data segment and obtains The first vni, and save the first vni to the reserved segment buffer; the second process extracts the initial data from the data segment buffer, and extracts the initial data from the reserved segment buffer Extract the first vni from the first vni, and determine the corresponding nat inner layer data header information and the second vni according to the initial data and the first vni; the second process uses the nat inner layer data header information and the The second vni is stored in the reserved segment buffer; the first process extracts the second vni from the reserved segment buffer, and determines the second encapsulation data according to the second vni, and converts the The second encapsulation data is saved to the reserved segment buffer, so that the initial data located in the data segment buffer, the nat inner layer data header information located in the reserved segment buffer and the The second packaged data together constitute the second data segment.
如图3所示,为本发明实施例中数据信息处理的方法的一个实施例流程示意图,该数据信息处理的方法包括:As shown in FIG. 3 , it is a schematic flowchart of an embodiment of a method for processing data information in an embodiment of the present invention. The method for processing data information includes:
S101、所述网卡接收第一数据段,并将所述第一数据段保存至所述数据段缓存区,所述第一数据段包括第一封装数据和初始数据,所述第一封装数据包括第一vni。S101. The network card receives a first data segment, and saves the first data segment to the data segment buffer, the first data segment includes first encapsulated data and initial data, and the first encapsulated data includes first vni.
本实施例中,所述网卡可以为如图1中所示的网卡100,其中,所述第一数据段可以是所述网卡100的物理端口接收到的来自终端或者bras(broadband remote access server,宽带接入服务器)发送的数据段。In this embodiment, the network card may be the network card 100 as shown in FIG. The data segment sent by the broadband access server).
其中,如图4所示,所述缓存区包括所述数据段缓存区和预留段缓存区,所述数据段缓存区可以位于预留段缓存区之前,即所述数据段缓存区可以位于所述缓存区中的前一部分。进一步的,所述第一数据段可以包括所述第一封装数据和所述初始数据,所述第一封装数据位于所述初始数据之前,所述第一vni包含于所述第一封装数据。需要注意的是,图4中对于所述第一vni、所述第一封装数据和所述初始数据三者的区间长度划分只是为了便于绘图,并不对三者的区间长度的比例关系做出限制。Wherein, as shown in FIG. 4, the buffer includes the data segment buffer and the reserved segment buffer, and the data segment buffer may be located before the reserved segment buffer, that is, the data segment buffer may be located the previous part of the buffer. Further, the first data segment may include the first encapsulation data and the initial data, the first encapsulation data is located before the initial data, and the first vni is included in the first encapsulation data. It should be noted that the interval length division of the first vni, the first package data, and the initial data in Figure 4 is only for the convenience of drawing, and does not limit the proportional relationship of the interval lengths of the three .
具体的,如图5所示,所述第一数据段可以包括所述第一封装数据和所述初始数据,具体描述如下:Specifically, as shown in FIG. 5, the first data segment may include the first package data and the initial data, and the specific description is as follows:
根据与所述初始数据的距离由近到远,所述第一封装数据可以依次包括VXLAN header501、Outer UDP header502、Outer IP header503和Outer Ethernet header504,进一步的,根据与所述初始数据的距离由远到近,VXLAN header501包括VXLAN Flags505和VNI506。其中,VNI为上文中的第一vni,所述第一vni(VNI)为VXLAN网络标识,用于标识所述第一数据段所属的租户,一个租户可以有一个或多个VNI,不同VNI的租户之间不能直接进行二层相互通信;其中,VXLAN Flags为标记位,包括8位,格式为“RRRRIRRR”,“I”位为1时,表示所述第一vni(VNI)有效,为0,表示所述第一vni(VNI)无效,“R”位保留未用,设置为0;其中,在VXLAN Flags505和VNI506之间、VNI506和所述初始数据之间也包括Reserved507,用于保留未用,设置为0。According to the distance from the initial data from near to far, the first encapsulation data may include VXLAN header 501, Outer UDP header 502, Outer IP header 503, and Outer Ethernet header 504 in turn, and further, according to the distance from the initial data by far Recently, VXLAN header501 includes VXLAN Flags505 and VNI506. Wherein, VNI is the first vni in the above, and the first vni (VNI) is a VXLAN network identifier, which is used to identify the tenant to which the first data segment belongs. A tenant can have one or more VNIs, and different VNIs Tenants cannot directly communicate with each other on the second layer; among them, VXLAN Flags is a flag bit, including 8 bits, and the format is "RRRRRRRR". When the "I" bit is 1, it means that the first vni (VNI) is valid, which is 0 , indicating that the first vni (VNI) is invalid, the "R" bit is reserved and unused, and is set to 0; wherein, Reserved507 is also included between VXLAN Flags505 and VNI506, between VNI506 and the initial data, and is used to reserve unused Use, set to 0.
根据与所述第一封装数据的距离由近到远,所述初始数据可以依次包括Inner Ethernet header508、Inner IP header509、Inner TCP header601和Payload602。其中,Inner Ethernet header包括发送端的MAC地址和所述第二进程的lan接口的MAC地址,Inner IP header包括发送端的IP地址和接收端的IP地址,Inner TCP header包括发送端的端口号。其中,所述发送端和所述接收端根据实际收发所述第一数据段的情况,与上文中提到的服务器、终端、bras三者中的两者相对 应;其中,Payload可以包括指令信息或者数据信息。The initial data may include Inner Ethernet header 508, Inner IP header 509, Inner TCP header 601, and Payload 602 in sequence according to the distance from the first encapsulated data in descending order. Wherein, the Inner Ethernet header includes the MAC address of the sending end and the MAC address of the lan interface of the second process, the Inner IP header includes the IP address of the sending end and the IP address of the receiving end, and the Inner TCP header includes the port number of the sending end. Wherein, the sending end and the receiving end correspond to two of the above-mentioned server, terminal, and bras according to the actual sending and receiving of the first data segment; wherein, the Payload may include instruction information or data information.
S102、所述第一进程从所述第一数据段中解析所述第一封装数据并获取所述第一vni,并将所述第一vni保存至所述预留段缓存区。S102. The first process parses the first encapsulated data from the first data segment to acquire the first vni, and saves the first vni to the reserved segment buffer.
其中,所述第一进程可以访问所述第一数据段,并且解析所述第一数据段中的所述第一封装数据,根据解析结果获取所述第一封装数据中的所述第一vni。具体的,所述第一进程可以获取所述第一封装数据中的VXLAN Flags信息,对于格式为“RRRRIRRR”的VXLAN Flags,若“I”位为1,则执行所述步骤S102,若“I”位为0,则不执行所述步骤S102。Wherein, the first process can access the first data segment, and parse the first encapsulation data in the first data segment, and obtain the first vni in the first encapsulation data according to the parsing result . Specifically, the first process can obtain the VXLAN Flags information in the first encapsulation data, and for the VXLAN Flags whose format is "RRRRRRRR", if the "I" bit is 1, then perform the step S102, if "I " bit is 0, then step S102 is not executed.
可以理解的,此时保存于所述数据段缓存区中的为所述初始数据,保存于所述预留段缓存区中的为所述第一vni。根据上文分析可知,所述预留段缓存区和所述数据段缓存区之间可以预留预设区间,以适当区分所述数据段和所保存的所述数据段中的部分信息,因此,此处所述第一vni和所述初始数据之间可以预留预设区间,这样在后期获取所述第一vni时,在根据预先设置的所述数据段缓存区的首个字节和所述预留段缓存区的首个字节的相对位置以确定所述预留段缓存区的前提下,本实施例可以进一步验证所述第一vni,例如可以进一步判断“经上述步骤确定的第一vni”和所述数据段缓存区之间是否有预设区间,以判断所述“确定的第一vni”是否为真正的所述第一vni。It can be understood that at this time, what is stored in the data segment buffer is the initial data, and what is saved in the reserved segment buffer is the first vni. According to the above analysis, it can be seen that a preset interval may be reserved between the reserved segment buffer and the data segment buffer to properly distinguish the data segment from the stored part of the information in the data segment, so , here a preset interval can be reserved between the first vni and the initial data, so that when the first vni is acquired later, according to the first byte of the preset data segment buffer and On the premise that the relative position of the first byte of the reserved segment buffer area is used to determine the reserved segment buffer area, this embodiment can further verify the first vni, for example, it can be further judged that "determined by the above steps Whether there is a preset interval between the "first vni" and the data segment buffer area, so as to judge whether the "determined first vni" is the real first vni.
可以理解的,当所述第一进程将所述第一vni保存至所述预留段缓存区后,所述第一进程可以向所述网卡发送“解封数据段任务完成指令”等相关的指令,以告知所述网卡所述第一进程已完成解封数据段等相关的操作,以便于所述网卡进行下一步操作。同时,所述第一进程此时可以获取所述初始数据的指针,并且所述第一进程也可以向所述网卡发送所述初始数据的指针。It can be understood that after the first process saves the first vni to the reserved segment buffer, the first process may send related information such as "unpacking data segment task completion instruction" to the network card. Instructions to inform the network card that the first process has completed decapsulating data segments and other related operations, so that the network card can perform the next operation. At the same time, the first process may acquire the pointer of the initial data at this time, and the first process may also send the pointer of the initial data to the network card.
S103、所述第二进程从所述数据段缓存区中提取所述初始数据、从所述预留段缓存区中提取所述第一vni,并根据所述初始数据和所述第一vni确定对应的nat内层数据头信息和第二vni。S103. The second process extracts the initial data from the data segment buffer, extracts the first vni from the reserved segment buffer, and determines according to the initial data and the first vni The corresponding nat inner data header information and the second vni.
根据上文描述可知,所述第一vni可以理解为向所述网卡发送所述第一数据段的发送者的VXLAN网络标识,所述发送者可以为终端或者bras。例如,当所述终端向所述网卡发送所述第一数据段时,所述第一vni可以称之为lan vni,所述第一vni(lan vni)与所述第一封装数据中的Outer UDP header、Outer IP header和Outer Ethernet header相对应,所述第二vni可以根据所述第一vni确定。According to the above description, the first vni can be understood as the VXLAN network identifier of the sender who sends the first data segment to the network card, and the sender can be a terminal or a bras. For example, when the terminal sends the first data segment to the network card, the first vni may be referred to as lan vni, and the first vni (lan vni) and the Outer in the first encapsulated data UDP header, Outer IP header and Outer Ethernet header correspond, and the second vni can be determined according to the first vni.
其中,当所述终端向所述网卡发送所述第一数据段时,所述初始数据中的Inner IP header中包含私网IP地址,从根据NAT协议制定的映射关系中可以获取与所述私网IP地址对应的nat IP信息以及对应的nat PORT信息。根据上文论述可知,所述初始数据中的Inner IP header和Payload之间还包括Inner TCP header,其中,Inner Ethernet header、Inner IP header、和Inner TCP header这三者可以称之为所述初始数据内的封装数据,可以简称初始内层数据头,其中,Inner IP header和Payload之间还可以为例如Inner UDP header、Inner ICMP header等其它协议类型。进一步的,根据所述nat IP信息、所述nat PORT信息可以更新所述初始内层数据头为所述nat内层数据头。Wherein, when the terminal sends the first data segment to the network card, the Inner IP header in the initial data contains the private network IP address, and the IP address related to the private network can be obtained from the mapping relationship formulated according to the NAT protocol. The nat IP information corresponding to the network IP address and the corresponding nat PORT information. According to the above discussion, it can be seen that the Inner IP header and the Payload in the initial data also include the Inner TCP header, where the Inner Ethernet header, the Inner IP header, and the Inner TCP header can be referred to as the initial data The encapsulated data inside can be referred to as the initial inner layer data header, wherein, the Inner IP header and Payload can also be other protocol types such as Inner UDP header, Inner ICMP header, etc. Further, according to the nat IP information and the nat PORT information, the initial inner layer data header can be updated as the nat inner layer data header.
需要注意的是,此处当所述第二进程从所述预留段缓存区中提取所述第一vni以后或者与此同时,也可以将所述第一vni从所述预留段缓存区中剥离,即去除所述第一vni,避免对后续在所述预留段缓存区中存入新的信息造成影响。It should be noted that here, when the second process extracts the first vni from the reserved segment buffer or at the same time, it can also extract the first vni from the reserved segment buffer Stripping, that is, removing the first vni, so as to avoid affecting the subsequent storage of new information in the reserved segment buffer.
S104、所述第二进程将所述nat内层数据头信息和所述第二vni保存至所述预留段缓存区。S104. The second process saves the nat inner data header information and the second vni to the reserved segment buffer.
具体的,所述第二进程也可以访问所述第一数据段,并且“剥离”所述第一数据段中的初始内层数据头,以上文论述为例,所述初始内层数据头包括Inner Ethernet header、Inner IP header和Inner TCP header,需要注意的是,此时所述第二进程可以将指针指向所述初始数据中Payload以“剥离”所述第一数据段中的初始内层数据头,并不是真正的剥离所述第一数据段中的初始内层数据头。可以理解的,此时保存于所述数据段缓存区中的为所述初始数据中的Payload,保存于所述预留段缓存区中的为所述nat信息和所述第二vni。同理,此处所述第二vni、所述nat信息和所述初始数据之间可以预留预设区间,这样在后期获取所述第二vni和所述nat内层数据头信息时,在根据预先设置的所述数据段缓存区的首个字节和所述预留段缓存区的首个字节的相对位置以确定所述预留段缓存区的前提下,本实施例可以进一步验证所述第二vni和所述nat信息。Specifically, the second process may also access the first data segment, and "stripping" the initial inner data header in the first data segment. Taking the above discussion as an example, the initial inner data header includes Inner Ethernet header, Inner IP header and Inner TCP header, it should be noted that at this time, the second process can point the pointer to the Payload in the initial data to "stripping" the initial inner layer data in the first data segment header, not really stripping the initial inner data header in the first data segment. It can be understood that what is saved in the data segment buffer at this time is the Payload in the initial data, and what is saved in the reserved segment buffer is the nat information and the second vni. Similarly, a preset interval can be reserved between the second vni, the nat information, and the initial data, so that when the second vni and the nat inner data header information are acquired later, the On the premise that the reserved segment buffer is determined according to the preset relative position of the first byte of the data segment buffer and the first byte of the reserved segment buffer, this embodiment can further verify The second vni and the nat information.
可以理解的,当所述第二进程执行完所述步骤S104后,所述第二进程可以向所述网卡发送“处理数据段信息任务完成指令”等相关的指令,以告知所述网卡所述第二进程已完成处理数据段信息任务等相关的操作,以便于所述网卡进行下一步操作。同时,所述第二进程此时可以获取所述初始数据中Payload的指针,并且所述第二进程也可以向所述网卡发送所述初始数据中Payload的指针。It can be understood that after the second process executes the step S104, the second process may send related instructions such as "processing data segment information task completion instruction" to the network card to inform the network card of the The second process has completed related operations such as the task of processing data segment information, so that the network card can perform the next operation. At the same time, the second process may obtain the Payload pointer in the initial data at this time, and the second process may also send the Payload pointer in the initial data to the network card.
S105、所述第一进程从所述预留段缓存区中提取所述第二vni,并根据所述第二vni确定第二封装数据,将所述第二封装数据保存至所述预留段缓存区,使得位于所述数据段缓存区中的所述初始数据、位于所述预留段缓存区中的所述nat内层数据头信息和所述第二封装数据共同构成第二数据段。S105. The first process extracts the second vni from the reserved segment buffer, determines second package data according to the second vni, and saves the second package data in the reserved segment A buffer area, so that the initial data located in the data segment buffer area, the nat inner layer data header information located in the reserved segment buffer area and the second encapsulated data together constitute a second data segment.
其中,所述第二vni可以确定新的出隧道ID,根据所述第二vni和所述出隧道ID可以得到出新的对应的Outer UDP header、Outer IP header和Outer Ethernet header,具体的,所述第一进程可以根据所述第二vni为所述第二vni配置新的对应的Outer UDP header、Outer IP header和Outer Ethernet header,所述第二vni也可以形成新的对应的VXLAN header,以上新的对应的Outer UDP header、Outer IP header和Outer Ethernet header、VXLAN header共同构成所述第二封装数据;具体的,所述第二封装数据可以保存于所述预留段缓存区中所述nat内层数据头信息之后。Wherein, the second vni can determine a new outgoing tunnel ID, and a new corresponding Outer UDP header, Outer IP header, and Outer Ethernet header can be obtained according to the second vni and the outgoing tunnel ID. Specifically, the The first process can configure new corresponding Outer UDP header, Outer IP header and Outer Ethernet header for the second vni according to the second vni, and the second vni can also form a new corresponding VXLAN header, above The new corresponding Outer UDP header, Outer IP header, Outer Ethernet header, and VXLAN header together constitute the second encapsulation data; specifically, the second encapsulation data can be stored in the nat in the reserved segment buffer area. After the inner data header information.
需要注意的是,当所述第一进程从所述预留段缓存区中提取所述第二vni以后或者与此同时,也可以将所述第二vni从所述预留段缓存区中剥离,即去除所述第二vni,避免对后续在所述预留段缓存区中存入新的信息造成影响。It should be noted that, when the first process extracts the second vni from the reserved segment buffer or at the same time, the second vni may also be stripped from the reserved segment buffer , that is, remove the second vni, so as to avoid affecting the subsequent storage of new information in the reserved segment buffer.
根据上文分析可知,所述nat内层数据头信息为更新后的所述初始内层数据头,即所述初始内层数据头已经转化为了所述nat内层数据头信息,并且此时指 针已经指向所述初始数据中Payload;因此需要注意的是,所述步骤S105中提到的“位于所述数据段缓存区中的所述初始数据、位于所述预留段缓存区中的所述nat内层数据头信息和所述第二封装数据共同构成第二数据段”实际上是表示:位于所述数据段缓存区中的所述初始数据中的Payload和位于所述预留段缓存区中的所述nat内层数据头信息和所述第二封装数据共同构成所述第二数据段。According to the above analysis, the nat inner layer data header information is the updated initial inner layer data header, that is, the initial inner layer data header has been converted into the nat inner layer data header information, and at this time the pointer The Payload in the initial data has been pointed to; therefore, it should be noted that the "the initial data located in the data segment buffer, the The nat inner layer data header information and the second encapsulated data together constitute the second data segment" actually means: the Payload in the initial data located in the data segment buffer and the reserved segment buffer The nat inner data header information and the second encapsulation data together constitute the second data segment.
可以理解的,经过所述步骤S101-S105后,所述第一数据段仍然完整存在于所述数据段缓存区,即整个方法步骤并没有修改或者破坏所述第一数据段。因此,本实施例的方法可以使得所述第一进程和所述第二进程在获取所述第一数据段中的相应信息以及执行相应操作的同时,可以保证所述第一数据段的完整性,使得其他的进程可以正常获取或者处理所述第一数据段的信息。It can be understood that after the steps S101-S105, the first data segment still exists completely in the data segment buffer, that is, the entire method steps do not modify or destroy the first data segment. Therefore, the method of this embodiment can enable the first process and the second process to ensure the integrity of the first data segment while acquiring corresponding information in the first data segment and performing corresponding operations , so that other processes can normally obtain or process the information of the first data segment.
本实施例中,如图6所示,所述步骤S102之前可以包括如下步骤:In this embodiment, as shown in FIG. 6, the steps before step S102 may include the following steps:
S201、所述网卡向所述第一进程发送所述第一数据段的指针。S201. The network card sends the pointer of the first data segment to the first process.
可以理解的,所述第一数据段位于所述网卡中的所述数据段缓存区,因此,当所述网卡的物理口接收到所述第一数据段并将所述第一数据段保存于所述数据段缓存区后,所述网卡可以向所述第一进程发送所述第一数据段的指针,以将所述数据段缓存区的地址告知所述第一进程。It can be understood that the first data segment is located in the data segment buffer in the network card, therefore, when the physical port of the network card receives the first data segment and saves the first data segment in After the data segment buffer, the network card may send the pointer of the first data segment to the first process, so as to inform the first process of the address of the data segment buffer.
S202、所述第一进程根据所述第一数据段的指针访问所述第一数据段。S202. The first process accesses the first data segment according to the pointer of the first data segment.
可以理解的,当所述第一进程获取所述第一数据段的指针后,即获取到所述数据段缓存区的地址,就可以获取所述第一数据段并且对所述第一数据段执行所述步骤S102的相关操作。It can be understood that after the first process obtains the pointer of the first data segment, that is, obtains the address of the data segment buffer, it can obtain the first data segment and Execute related operations in step S102.
本实施例中,如图7所示,所述步骤S103之前可以包括如下步骤:In this embodiment, as shown in FIG. 7, the steps before step S103 may include the following steps:
S301、所述网卡向所述第二进程发送所述初始数据的指针。S301. The network card sends the pointer of the initial data to the second process.
根据上文分析可知,执行完所述步骤S102后,所述第一进程可以向所述网卡发送所述初始数据的指针,即所述网卡向所述第二进程发送的也为所述初始数据的指针,这样,所述第二进程可以快速定位至所述初始数据的起始位置,且此时仅所述初始数据以及位于其后的内容对所述第二进程可见,避免位于所述初始数据之前的内容对所述第二进程造成干扰,提高了第二进程的工作效率。According to the above analysis, after the execution of the step S102, the first process can send the pointer of the initial data to the network card, that is, the network card sends the initial data to the second process In this way, the second process can quickly locate the starting position of the initial data, and at this time only the initial data and the content behind it are visible to the second process, avoiding the initial The content before the data interferes with the second process, improving the working efficiency of the second process.
S302、所述第二进程根据所述初始数据的指针访问所述初始数据和所述第一vni。S302. The second process accesses the initial data and the first vni according to the pointer of the initial data.
可以理解的,当所述第二进程获取所述初始数据的指针后,可以获取所述初始数据,并根据所述初始数据所在区间往后寻找,根据上文分析可知,根据预先设置的所述数据段缓存区的首个字节和所述预留段缓存区的首个字节的相对位置,以确定所述预留段缓存区,那么此处根据所述初始数据的指针同样可以间接确定所述预留段缓存区,以获取所述第一vni;再对所述初始数据和所述第一vni执行所述步骤S103的相关操作。It can be understood that after the second process obtains the pointer of the initial data, it can obtain the initial data and search backward according to the interval where the initial data is located. According to the above analysis, according to the preset The relative position of the first byte of the data segment buffer area and the first byte of the reserved segment buffer area to determine the reserved segment buffer area, so here it can also be determined indirectly according to the pointer of the initial data The reserved segment buffer area is used to obtain the first vni; and then the related operation of step S103 is performed on the initial data and the first vni.
本实施例中,如图8所示,所述步骤S103可以包括如下步骤:In this embodiment, as shown in FIG. 8, the step S103 may include the following steps:
S1031、所述第二进程从所述初始数据中提取初始内层数据头,并从所述预留段缓存区提取所述第一vni。S1031. The second process extracts an initial inner data header from the initial data, and extracts the first vni from the reserved segment buffer.
根据上文分析可知,所述第一vni被所述第一进程保存至所述预留段缓存区,即所述第二进程可以直接从所述预留段缓存区提取所述第一vni。可以理解的,本实施例中经所述第一进程进行解析、获取得到的所述第一vni可以被保存至所述预留段缓存区,可以被所述第二进程直接提取以使用,即可以避免所述第二进程也执行“从所述第一数据段中解析并获取所述第一vni”的步骤,提高了所述服务器的工作效率。According to the above analysis, it can be seen that the first vni is stored in the reserved segment buffer by the first process, that is, the second process can directly extract the first vni from the reserved segment buffer. It can be understood that, in this embodiment, the first vni obtained through parsing and obtaining by the first process may be saved in the reserved segment buffer area, and may be directly extracted and used by the second process, that is, It can avoid that the second process also executes the step of "parsing and obtaining the first vni from the first data segment", which improves the working efficiency of the server.
其中,所述初始内层数据头为所述步骤S103中的所述初始数据中的Inner IP header,即所述第二进程是根据所述初始数据的指针从所述预留段缓存区提取所述第一vni。Wherein, the initial inner layer data header is the Inner IP header in the initial data in the step S103, that is, the second process extracts the reserved segment buffer according to the pointer of the initial data Describe the first vni.
S1032、所述第二进程根据所述初始内层数据头和所述第一vni,分别在nat转化表格和vni转化表格中查找对应的nat IP、nat PORT和第二vni。S1032. According to the initial inner data header and the first vni, the second process looks up the corresponding nat IP, nat PORT and second vni in the nat conversion table and vni conversion table respectively.
其中,所述nat转化表格可以为私网IP-nat IP转化表,每一个nat IP可以对应一个私网IP,即根据所述初始内层数据头得到的私网IP可以在所述nat转化表格得到对应的nat IP以及对应的nat PORT。Wherein, the nat conversion table can be a private network IP-nat IP conversion table, and each nat IP can correspond to a private network IP, that is, the private network IP obtained according to the initial inner layer data header can be in the nat conversion table Get the corresponding nat IP and corresponding nat PORT.
其中,所述vni转化表格中每一个第一vni可以对应一个第二vni。具体的,当所述终端向所述网卡发送所述第一数据段时,所述第一vni可以称之为lan vni,所述第一vni(lan vni)与所述第一封装数据中的Outer UDP header、Outer IP header和Outer Ethernet header相对应;经过所述vni转化表格得到的所述第二vni可以称之为wan vni,进一步的,根据所述第二vni(wan vni)也可以确定出新的对应的Outer UDP header、Outer IP header和Outer Ethernet header。Wherein, each first vni in the vni conversion table may correspond to a second vni. Specifically, when the terminal sends the first data segment to the network card, the first vni may be called lan vni, and the first vni (lan vni) and the Outer UDP header, Outer IP header and Outer Ethernet header correspond; the second vni obtained through the vni conversion table can be called wan vni, and further, it can also be determined according to the second vni (wan vni) New corresponding Outer UDP header, Outer IP header and Outer Ethernet header.
S1033、所述第二进程根据所述nat IP、所述nat PORT确定所述nat内层数据头信息。S1033. The second process determines the nat inner data header information according to the nat IP and the nat PORT.
具体的,以上文论述为例,所述初始内层数据头可以包括原始的Inner Ethernet header、原始的Inner IP header和原始的Inner TCP header,以终端向服务器发送所述第一数据段为例:此时,原始的Inner Ethernet header中的发送端的MAC地址和所述第二进程的lan接口的MAC地址可以分别被更新为所述第二进程的wan接口的MAC地址和下一跳设备的MAC地址;原始的Inner IP header中的发送端的IP地址可以被修改为所述nat IP;原始的Inner TCP header中的发送端的端口可以被修改为所述nat PORT;以上,更新所述初始内层数据头为所述nat内层数据头。Specifically, taking the above discussion as an example, the initial inner layer data header may include the original Inner Ethernet header, the original Inner IP header and the original Inner TCP header, taking the terminal sending the first data segment to the server as an example: At this point, the MAC address of the sending end in the original Inner Ethernet header and the MAC address of the lan interface of the second process can be updated to the MAC address of the wan interface of the second process and the MAC address of the next-hop device respectively ; The IP address of the sender in the original Inner IP header can be modified to the nat IP; the port of the sender in the original Inner TCP header can be modified to the nat PORT; above, update the initial inner layer data header It is the inner layer data header of the nat.
可以理解的,所述步骤S105之前可以包括如下步骤:It can be understood that the steps before step S105 may include the following steps:
步骤一、所述网卡向所述第一进程发送所述初始数据中Payload的指针。Step 1. The network card sends the pointer of the Payload in the initial data to the first process.
根据上文分析可知,所述步骤S104中,所述第二进程获取所述初始数据中Payload的指针,并向所述网卡发送所述初始数据中Payload的指针,然后,所述网卡也可以向所述第一进程发送所述初始数据中Payload的指针。这样,所述第一进程可以快速定位至所述初始数据中Payload的起始位置,且此时仅所述初始数据中Payload以及位于其后的内容对所述第一进程可见,避免位于所述初始数据中Payload之前的内容对所述第一进程造成干扰,提高了第一进程的工作效率。According to the above analysis, in the step S104, the second process obtains the pointer of the Payload in the initial data, and sends the pointer of the Payload in the initial data to the network card, and then, the network card can also send The first process sends a Payload pointer in the initial data. In this way, the first process can quickly locate the initial position of the Payload in the initial data, and at this time only the Payload in the initial data and the content behind it are visible to the first process, avoiding the The content before the Payload in the initial data interferes with the first process, improving the work efficiency of the first process.
步骤二、所述第一进程根据所述初始数据中Payload的指针确定访问所述第二vni。Step 2: The first process determines to access the second vni according to the Payload pointer in the initial data.
可以理解的,当所述第一进程获取所述初始数据中Payload的指针后,根据所述初始数据中Payload所在区间往后寻找,根据上文分析可知,根据预先设置的所述数据段缓存区的首个字节和所述预留段缓存区的首个字节的相对位置,以确定所述预留段缓存区,那么此处根据所述初始数据中Payload的指针同样可以间接确定所述预留段缓存区,以获取所述第二vni;再对所述初始数据和所述第二vni执行所述步骤S105的相关操作。It can be understood that after the first process obtains the pointer of the Payload in the initial data, it searches backward according to the interval where the Payload is located in the initial data. According to the above analysis, according to the preset data segment buffer area The relative position of the first byte of the reserved segment buffer area and the first byte of the reserved segment buffer area to determine the reserved segment buffer area, then the Payload pointer in the initial data can also indirectly determine the Reserving a segment buffer to acquire the second vni; and then performing the related operations of step S105 on the initial data and the second vni.
本实施例中,如图9所示,所述步骤S105之后可以包括如下步骤:In this embodiment, as shown in FIG. 9, the following steps may be included after step S105:
S106、所述网卡根据所述第二数据段确定对应的发送隧道。S106. The network card determines a corresponding sending tunnel according to the second data segment.
其中,所述第二数据段中的所述第二封装数据可以确定出一对隧道两端的IP地址和隧道的源MAC地址,但是,不同的隧道其中一端可能会对应相同的源MAC地址和IP地址;进一步的,所述第二数据段中的第二vni可以通过VXLAN网络标识确定出所述发送隧道。Wherein, the second encapsulated data in the second data segment can determine a pair of IP addresses at both ends of the tunnel and the source MAC address of the tunnel, but one end of different tunnels may correspond to the same source MAC address and IP address. address; further, the second vni in the second data segment can determine the sending tunnel through the VXLAN network identifier.
S107、所述网卡根据所述发送隧道发送所述第二数据段。S107. The network card sends the second data segment according to the sending tunnel.
可以理解的,所述发送隧道即为所述第二数据段传输的路径。例如,当所述终端向所述网卡发送所述第一数据段时,所述第一数据段经过上述多种转化后得到的所述第二vni,所述第二数据段确定的所述发送隧道的一端即为所述网卡的物理口,所述发送隧道的另一端即为所述bras的物理口,即所述第二数据段可以从所述网卡传输至所述bras。It can be understood that the sending tunnel is the transmission path of the second data segment. For example, when the terminal sends the first data segment to the network card, the second vni obtained after the first data segment undergoes the above-mentioned multiple transformations, the sending One end of the tunnel is the physical port of the network card, and the other end of the sending tunnel is the physical port of the bras, that is, the second data segment can be transmitted from the network card to the bras.
本实施例中,如图10所示,所述服务器还包括第三进程,所述第一封装数据还包括源IP地址和目的IP地址,所述步骤S101之后可以包括如下步骤:In this embodiment, as shown in FIG. 10, the server also includes a third process, and the first encapsulated data also includes a source IP address and a destination IP address, and the step S101 may include the following steps:
S401、所述第一进程从所述第一数据段中解析所述第一封装数据并获取所述源IP地址和所述目的IP地址,并将所述源IP地址和所述目的IP地址保存至所述预留段缓存区。S401. The first process parses the first encapsulated data from the first data segment to obtain the source IP address and the destination IP address, and save the source IP address and the destination IP address to the reserved segment buffer.
具体的,如图5所示,所述第一数据段中的Outer IP header包括IP SA603和IP DA604,其中,IP SA为所述源IP地址,即VXLAN隧道的源端VTEP的IP地址,IP DA为目的IP地址,即VXLAN隧道的目的端VTEP的IP地址。Specifically, as shown in Figure 5, the Outer IP header in the first data segment includes IP SA603 and IP DA604, wherein IP SA is the source IP address, that is, the IP address of the VTEP at the source end of the VXLAN tunnel, and IP DA is the destination IP address, that is, the IP address of the destination VTEP of the VXLAN tunnel.
其中,所述第一进程可以访问所述第一数据段,并且解析所述第一数据段中的所述第一封装数据,根据解析结果获取所述第一封装数据中的所述Outer IP header,以获取其中的所述源IP地址和所述目的IP地址。可以理解的,此时保存于所述数据段缓存区中的为所述初始数据,保存于所述预留段缓存区中的为所述源IP地址和所述目的IP地址。根据上文分析可知,所述预留段缓存区和所述数据段缓存区之间可以预留预设区间,以适当区分所述数据段和所保存的所述数据段中的部分信息,因此,此处所述源IP地址、所述目的IP地址和所述初始数据三者之间可以均预留对应的预设空间,这样在后期获取所述源IP地址和所述目的IP地址时,在根据预先设置的所述数据段缓存区的首个字节和所述预留段缓存区的首个字节的相对位置确定所述预留段缓存区的前提下,本实施例可以进一步验证所述源IP地址和所述目的IP地址,例如可以进一步判断“经上述 步骤确定的所述源IP地址和目的IP地址”和所述数据段缓存区之间是否均有预设区间,以判断所述“确定的源IP地址和目的IP地址”是否为真正的所述源IP地址和所述目的IP地址。Wherein, the first process can access the first data segment, and parse the first encapsulation data in the first data segment, and obtain the Outer IP header in the first encapsulation data according to the parsing result , to obtain the source IP address and the destination IP address therein. It can be understood that at this time, what is stored in the data segment buffer is the initial data, and what is saved in the reserved segment buffer is the source IP address and the destination IP address. According to the above analysis, it can be seen that a preset interval may be reserved between the reserved segment buffer and the data segment buffer to properly distinguish the data segment from the stored part of the information in the data segment, so , where the source IP address, the destination IP address and the initial data can all reserve a corresponding preset space, so that when the source IP address and the destination IP address are acquired later, On the premise that the reserved segment buffer is determined according to the preset relative position of the first byte of the data segment buffer and the first byte of the reserved segment buffer, this embodiment can further verify The source IP address and the destination IP address, for example, can further determine whether there is a preset interval between "the source IP address and the destination IP address determined through the above steps" and the data segment cache area, so as to determine Whether the "determined source IP address and destination IP address" are the real source IP address and destination IP address.
同理,当所述第一进程执行完所述步骤S401后,所述第一进程可以向所述网卡发送“解封数据段任务完成指令”等相关的指令,以告知所述网卡所述第一进程已完成“解封数据段”等相关的操作,以便于网卡进行下一步操作。同时,所述第一进程此时可以获取所述初始数据的指针,并且所述第一进程也可以向所述网卡发送所述初始数据的指针。Similarly, after the first process executes the step S401, the first process may send related instructions such as "unpacking data segment task completion instruction" to the network card to inform the network card that the first A process has completed related operations such as "unpacking the data segment", so that the network card can perform the next operation. At the same time, the first process may acquire the pointer of the initial data at this time, and the first process may also send the pointer of the initial data to the network card.
S402、所述第三进程从所述预留段缓存区提取所述源IP地址和所述目的IP地址,并根据所述源IP地址和所述目的IP地址判断所述第一数据段是否为合法数据头。S402. The third process extracts the source IP address and the destination IP address from the reserved segment buffer, and judges whether the first data segment is Legal data header.
同理,所述网卡接收所述初始数据的指针后,也可以将所述初始数据的指针发送至所述第三进程,使得第三进程根据所述初始数据的指针快速定位至所述初始数据,以提高所述第三进程的工作效率。Similarly, after the network card receives the pointer of the initial data, it can also send the pointer of the initial data to the third process, so that the third process can quickly locate the initial data according to the pointer of the initial data. , so as to improve the working efficiency of the third process.
根据上文描述可知,所述源IP地址和所述目的IP地址分别为VXLAN隧道的源端VTEP的IP地址和目的端VTEP的IP地址,即所述第三进程根据所述源IP地址和所述目的IP地址可以确定可以传输所述第一数据段的多条VXLAN隧道。进一步的,所述第三进程中可以包含VXLAN隧道表格,所述VXLAN隧道表格中列出了经过每一个VXLAN隧道的数据段的合法情况。因此,根据所述第一数据段对应的VXLAN隧道,再查找所述VXLAN隧道表格,就可以判断所述第一数据段是否合法。According to the above description, the source IP address and the destination IP address are respectively the IP address of the source VTEP and the IP address of the destination VTEP of the VXLAN tunnel, that is, the third process The destination IP address can determine multiple VXLAN tunnels that can transmit the first data segment. Further, the third process may include a VXLAN tunnel table, and the VXLAN tunnel table lists legal conditions of data segments passing through each VXLAN tunnel. Therefore, according to the VXLAN tunnel corresponding to the first data segment, and then searching the VXLAN tunnel table, it can be determined whether the first data segment is legal.
S403、若所述第一数据段是合法数据头,则所述第三进程处理所述初始数据。S403. If the first data segment is a valid data header, the third process processes the initial data.
具体的,当所述第一数据段是合法数据头时,所述第三进程可以读取所述初始数据、更改所述初始数据以及发送所述初始数据。Specifically, when the first data segment is a valid data header, the third process may read the initial data, modify the initial data, and send the initial data.
S404、若所述第一数据段不是合法数据头,则所述第三进程丢弃所述初始数据。S404. If the first data segment is not a valid data header, the third process discards the initial data.
具体的,当所述第一数据段不是合法数据头时,所述第三进程可以忽视所述初始数据继续执行其它数据段的相关操作等。Specifically, when the first data segment is not a valid data header, the third process may ignore the initial data and continue to perform related operations on other data segments.
其中,所述步骤S401-S404可以执行于所述步骤S101之前,即可以先判断所述第一数据段是否为合法数据头,只有当所述第一数据段是合法数据头后,才会执行所述步骤S101,否则,则不执行所述步骤S101。Wherein, the steps S401-S404 can be executed before the step S101, that is, it can be judged first whether the first data segment is a legal data header, and only when the first data segment is a legal data header, will it be executed The step S101, otherwise, the step S101 is not executed.
本实施例中,如图11所示,所述服务器还包括第四进程,所述网卡还包括镜像缓存区,所述镜像缓存区包括镜像数据段缓存区和镜像预留段缓存区,所述网卡接收第一数据段,并将所述第一数据段保存至所述数据段缓存区,所述第一数据段包括第一封装数据和初始数据,所述第一封装数据包括第一vni的步骤之后可以包括如下步骤:In this embodiment, as shown in FIG. 11 , the server further includes a fourth process, and the network card further includes a mirror buffer, and the mirror buffer includes a mirror data segment buffer and a mirror reserved segment buffer, the The network card receives the first data segment, and saves the first data segment to the data segment buffer, the first data segment includes first package data and initial data, and the first package data includes the first vni After the step may include the following steps:
S501、所述第一进程从所述第一数据段中解析所述第一封装数据并获取所述第一vni,并根据所述第一vni判断所述第一数据段的用户是否开通病毒检测 服务。S501. The first process parses the first packaged data from the first data segment to acquire the first vni, and judges whether the user of the first data segment has enabled virus detection according to the first vni Serve.
其中,所述第一进程可以访问所述第一数据段,并且解析所述第一数据段中的所述第一封装数据,根据解析结果获取所述第一封装数据中的所述第一vni;进一步的,所述第一进程中保存了多个vni和多个“是否开通病毒检测服务”的结果的映射,即每一个vni都会对应“是”或者“否”开通病毒检测服务的结果。当所述第一进程获取所述第一vni后可以根据上述映射找到对应的“是否开通病毒检测服务”的结果,以判断所述第一数据段的用户是否开通病毒检测服务。Wherein, the first process can access the first data segment, and parse the first encapsulation data in the first data segment, and obtain the first vni in the first encapsulation data according to the parsing result ; Further, the first process stores a mapping of multiple vnis and multiple results of "whether to activate virus detection service", that is, each vni will correspond to the result of "yes" or "no" to activate virus detection service. After the first process obtains the first vni, it can find the corresponding result of "whether to activate the virus detection service" according to the above mapping, so as to determine whether the user of the first data segment has activated the virus detection service.
S502、若所述第一数据段的用户开通病毒检测服务,则所述第一进程将所述第一数据段保存至所述镜像数据段缓存区,并将所述第一vni保存至镜像预留段缓存区。S502. If the user of the first data segment activates the virus detection service, the first process saves the first data segment to the mirrored data segment buffer, and saves the first vni to the mirrored pre- Segment cache.
具体的,当所述第一数据段的用户开通病毒检测服务,所述第一进程可以先复制所述第一数据段,再将所述复制的第一数据段保存至所述镜像数据段缓存区;同理,在所述步骤S501中,所述第一进程获取所述第一vni后可以先暂存所述第一vni,当所述第一数据段的用户开通病毒检测服务,所述第一进程可以将暂存的第一vni保存至镜像预留段缓存区。Specifically, when the user of the first data segment activates the virus detection service, the first process may first copy the first data segment, and then save the copied first data segment to the mirrored data segment cache Similarly, in the step S501, after the first process acquires the first vni, the first vni may be temporarily stored, and when the user of the first data segment activates the virus detection service, the The first process may save the temporarily stored first vni to the mirror reserved segment buffer.
其中,所述第一数据段和所述第一vni均被保存至所述镜像缓存区可以理解为所述第一进程对所述第一数据段和所述第一vni进行镜像处理,使得所述镜像缓存区中也保存有所述第一数据段和所述第一vni;这样,当多个进程同时需要访问所述第一数据段或者所述第一vni时,可以分别从所述缓存区和所述镜像缓存区获取,例如,当所述网卡接收所述第一数据段后,若采取本发明的实施例,即“将所述第一数据段保存至所述镜像数据段缓存区,并将所述第一vni保存至镜像预留段缓存区”后,所述第二进程可以执行所述步骤S103-S104,同时,所述第四进程可以执行所述步骤S503。Wherein, both the first data segment and the first vni are stored in the mirror buffer, it can be understood that the first process performs mirror processing on the first data segment and the first vni, so that the The first data segment and the first vni are also stored in the mirror buffer area; like this, when multiple processes need to access the first data segment or the first vni at the same time, they can be accessed from the cache respectively. area and the mirrored buffer area, for example, after the network card receives the first data segment, if the embodiment of the present invention is adopted, that is, "save the first data segment to the mirrored data segment buffer area , and save the first vni to the mirror reserved segment buffer", the second process can execute the steps S103-S104, and at the same time, the fourth process can execute the step S503.
因此,所述第四进程不需要花费时间等待所述第二进程执行完所述步骤S103-S104后再来执行所述步骤S503,也即所述第二进程执行所述步骤S103-S104的时间和所述第四进程执行所述步骤S503的时间不需要累加,而是两者并行;进一步的,由于所述第二进程执行所述步骤S103-S104的时间和所述第四进程执行所述步骤S503的时间并行存在,而非串行存在,故本发明的实施例中的所述网卡从接收所述第一数据段到发送所述第一数据段之间的时间就可以减少,提高了所述服务器工作的效率。Therefore, the fourth process does not need to spend time waiting for the second process to execute the steps S103-S104 before executing the step S503, that is, the time and the time for the second process to execute the steps S103-S104 The time for the fourth process to execute the step S503 does not need to be accumulated, but both are parallel; further, because the time for the second process to execute the steps S103-S104 and the time for the fourth process to execute the steps The time of S503 exists in parallel rather than serially, so the time between receiving the first data segment and sending the first data segment of the network card in the embodiment of the present invention can be reduced, improving the Describe the efficiency of the server work.
S503、所述第四进程从所述镜像缓存区中提取所述第一数据段和所述第一vni,并根据病毒检测服务的规则生成对应的病毒检测报告。S503. The fourth process extracts the first data segment and the first vni from the mirror buffer, and generates a corresponding virus detection report according to the rules of the virus detection service.
其中,所述病毒检测服务的规则可以作如下理解:所述第四进程中定义了多种病毒类型,所述第四进程可以提取并解析所述第一数据段,如果从所述第一数据段中解析出的数据段数据命中了所述多种病毒类型中的至少一种病毒类型,则所述第四进程就会生成病毒检测报告,所述病毒检测报告中包括根据所述第一vni确定的用户信息以及所述用户信息对应的病毒类型。Wherein, the rules of the virus detection service can be understood as follows: multiple virus types are defined in the fourth process, and the fourth process can extract and parse the first data segment. If the data segment data analyzed in the segment hits at least one virus type in the plurality of virus types, then the fourth process will generate a virus detection report, which includes the virus detection report according to the first vni The determined user information and the virus type corresponding to the user information.
本实施例中,如图12所示,为本发明实施例中数据信息处理的方法的信令 交互的示意图,该数据信息处理的方法的信令交互的示意图包括如下步骤:In this embodiment, as shown in FIG. 12, it is a schematic diagram of the signaling interaction of the data information processing method in the embodiment of the present invention. The schematic diagram of the signaling interaction of the data information processing method includes the following steps:
S1、网卡接收第一数据段,并将所述第一数据段保存至数据段缓存区;S1. The network card receives the first data segment, and saves the first data segment to the data segment buffer area;
S2、网卡向第一进程发送所述第一数据段的指针;S2. The network card sends the pointer of the first data segment to the first process;
S3、第一进程从所述第一数据段中解析所述第一数据段中的第一封装数据,并获取所述第一封装数据中的第一vni;S3. The first process parses the first encapsulated data in the first data segment from the first data segment, and acquires the first vni in the first encapsulated data;
S4、第一进程将所述第一vni保存至预留段缓存区;S4. The first process saves the first vni to a reserved segment buffer;
S5、第一进程向网卡发送“解封数据段任务完成指令”;S5. The first process sends an "unblocking data segment task completion instruction" to the network card;
S6、网卡向第二进程发送第一数据段中的初始数据的指针;S6. The network card sends a pointer to the initial data in the first data segment to the second process;
S7、第二进程从所述数据段缓存区中提取所述初始数据、从所述预留段缓存区中提取所述第一vni;S7. The second process extracts the initial data from the data segment buffer, and extracts the first vni from the reserved segment buffer;
S8、第二进程根据所述初始数据和所述第一vni确定对应的nat内层数据头信息和第二vni;S8. The second process determines corresponding nat inner layer data header information and a second vni according to the initial data and the first vni;
S9、第二进程将所述nat内层数据头信息保存至所述预留段缓存区;S9. The second process saves the nat inner layer data header information to the reserved segment buffer;
S10、第二进程将所述第二vni保存至所述预留段缓存区;S10. The second process saves the second vni to the reserved segment buffer;
S11、第二进程向网卡发送“处理数据段信息任务完成指令”;S11. The second process sends a "processing data segment information task completion instruction" to the network card;
S12、网卡向第一进程发送第一数据段中的初始数据中Payload的指针;S12. The network card sends a pointer to the Payload in the initial data in the first data segment to the first process;
S13、第一进程从所述预留段缓存区中提取所述第二vni,并根据所述第二vni确定第二封装数据;S13. The first process extracts the second vni from the reserved segment buffer, and determines second encapsulation data according to the second vni;
S14、第一进程将所述第二封装数据保存至所述预留段缓存区,使得位于所述数据段缓存区中的所述初始数据、位于所述预留段缓存区中的所述nat内层数据头信息和所述第二封装数据共同构成第二数据段;S14. The first process saves the second packaged data to the reserved segment buffer, so that the initial data located in the data segment buffer, the nat located in the reserved segment buffer The inner data header information and the second encapsulated data together constitute a second data segment;
S15、第一进程向网卡发送“封装数据任务完成指令”。S15. The first process sends an "encapsulation data task completion instruction" to the network card.
为了更好实施本发明实施例中数据信息处理的方法,在数据信息处理的方法基础之上,本发明实施例中还提供一种服务器,如图13所示,所述服务器400包括网卡401、第一进程402和第二进程403,所述网卡401包括缓存区,所述缓存区包括数据段缓存区和预留段缓存区;In order to better implement the data information processing method in the embodiment of the present invention, on the basis of the data information processing method, a server is also provided in the embodiment of the present invention. As shown in FIG. 13 , the server 400 includes a network card 401, The first process 402 and the second process 403, the network card 401 includes a buffer area, and the buffer area includes a data segment buffer area and a reserved segment buffer area;
所述网卡401用于接收第一数据段,并将所述第一数据段保存至所述数据段缓存区,所述第一数据段包括第一封装数据和初始数据,所述第一封装数据包括第一vni;The network card 401 is configured to receive a first data segment, and save the first data segment to the data segment buffer, the first data segment includes first encapsulated data and initial data, and the first encapsulated data Including the first vni;
所述第一进程402用于从所述第一数据段中解析所述第一封装数据并获取所述第一vni,并将所述第一vni保存至所述预留段缓存区;The first process 402 is configured to parse the first packaged data from the first data segment and acquire the first vni, and save the first vni to the reserved segment buffer;
所述第二进程403用于从所述数据段缓存区中提取所述初始数据、从所述预留段缓存区中提取所述第一vni,并根据所述初始数据和所述第一vni确定对应的nat内层数据头信息和第二vni;The second process 403 is configured to extract the initial data from the data segment buffer, extract the first vni from the reserved segment buffer, and extract the initial data and the first vni according to the initial data and the first vni Determine the corresponding nat inner data header information and the second vni;
所述第二进程403还用于将所述nat内层数据头信息和所述第二vni保存至所述预留段缓存区;The second process 403 is also configured to save the nat inner layer data header information and the second vni to the reserved segment buffer;
所述第一进程402还用于从所述预留段缓存区中提取所述第二vni,并根据所述第二vni确定第二封装数据,将所述第二封装数据保存至预留段缓存区, 使得位于所述数据段缓存区中的所述初始数据、位于所述预留段缓存区中的所述nat内层数据头信息和所述第二封装数据共同构成第二数据段。The first process 402 is further configured to extract the second vni from the reserved segment cache, determine second package data according to the second vni, and save the second package data to the reserved segment A buffer area, so that the initial data located in the data segment buffer area, the nat inner layer data header information located in the reserved segment buffer area and the second encapsulated data together constitute a second data segment.
在本申请一些实施例中,所述第二进程403还用于从所述初始数据中提取初始内层数据头,并从所述预留段缓存区提取所述第一vni;以及In some embodiments of the present application, the second process 403 is further configured to extract an initial inner data header from the initial data, and extract the first vni from the reserved segment buffer; and
用于根据所述初始内层数据头和所述第一vni,分别在nat转化表格和vni转化表格中查找对应的nat IP和第二vni。It is used to search the corresponding nat IP and the second vni in the nat conversion table and the vni conversion table according to the initial inner layer data header and the first vni respectively.
在本申请一些实施例中,所述网卡401还用于向所述第一进程402发送所述第一数据段的指针;以及In some embodiments of the present application, the network card 401 is further configured to send a pointer of the first data segment to the first process 402; and
所述第一进程402还用于根据所述第一数据段的指针访问所述第一数据段。The first process 402 is further configured to access the first data segment according to the pointer of the first data segment.
在本申请一些实施例中,所述网卡401还用于向所述第二进程发送所述初始数据的指针;以及In some embodiments of the present application, the network card 401 is further configured to send the pointer of the initial data to the second process; and
所述第二进程403还用于根据所述初始数据的指针访问所述初始数据和所述第一vni。The second process 403 is further configured to access the initial data and the first vni according to the pointer of the initial data.
在本申请一些实施例中,所述网卡401还用于根据所述第二数据段确定对应的发送隧道;以及In some embodiments of the present application, the network card 401 is further configured to determine a corresponding sending tunnel according to the second data segment; and
所述网卡401还用于根据所述发送隧道发送所述第二数据段。The network card 401 is further configured to send the second data segment according to the sending tunnel.
在本申请一些实施例中,如图14所示,所述服务器还包括第三进程404,所述第一封装数据还包括源IP地址和目的IP地址,所述第一进程402还用于从所述第一数据段中解析所述第一封装数据以并获取所述源IP地址和所述目的IP地址,并将所述源IP地址和所述目的IP地址保存至所述预留段缓存区;以及In some embodiments of the present application, as shown in FIG. 14 , the server further includes a third process 404, the first encapsulation data further includes a source IP address and a destination IP address, and the first process 402 is also used to Analyzing the first encapsulated data in the first data segment to obtain the source IP address and the destination IP address, and saving the source IP address and the destination IP address to the reserved segment cache District; and
所述第三进程404具体用于:The third process 404 is specifically used for:
从所述预留段缓存区提取所述源IP地址和所述目的IP地址,并根据所述源IP地址和所述目的IP地址判断所述第一数据段是否为合法数据头;Extracting the source IP address and the destination IP address from the reserved segment buffer, and judging whether the first data segment is a legal data header according to the source IP address and the destination IP address;
若所述第一数据段是合法数据头,则所述第三进程处理所述初始数据;If the first data segment is a legal data header, the third process processes the initial data;
若所述第一数据段不是合法数据头,则所述第三进程丢弃所述初始数据。If the first data segment is not a valid data header, the third process discards the initial data.
在本申请一些实施例中,如图15所示,所述服务器还包括第四进程405,所述网卡还包括镜像缓存区,所述镜像缓存区包括镜像数据段缓存区和镜像预留段缓存区,所述第一进程402还用于从所述第一数据段中解析所述第一封装数据并获取所述第一vni,并根据所述第一vni判断所述第一数据段的用户是否开通病毒检测服务;以及In some embodiments of the present application, as shown in FIG. 15 , the server further includes a fourth process 405, and the network card further includes a mirror cache area, and the mirror cache area includes a mirror data segment cache area and a mirror reserved segment cache area, the first process 402 is further configured to parse the first packaged data from the first data segment and obtain the first vni, and determine the user of the first data segment according to the first vni Whether to subscribe to the virus detection service; and
若所述第一数据段的用户开通病毒检测服务,则所述第一进程402还用于将所述第一数据段保存至所述镜像数据段缓存区,并将所述第一vni保存至镜像预留段缓存区;If the user of the first data segment activates the virus detection service, the first process 402 is further configured to save the first data segment to the mirrored data segment buffer, and save the first vni to mirror reserved segment buffer;
所述第四进程405具体用于:The fourth process 405 is specifically used for:
从所述镜像缓存区中提取所述第一数据段和所述第一vni,并根据病毒检测服务的规则生成对应的病毒检测报告。Extracting the first data segment and the first vni from the mirror buffer, and generating a corresponding virus detection report according to the rules of the virus detection service.
本发明提供了数据信息处理的方法和服务器,网卡中的缓存区包括数据段缓存区和预留段缓存区,第一进程从第一数据段中解析第一vni,并将所述第一 vni保存至所述预留段缓存区;第二进程从所述预留段缓存区提取所述第一vni,并根据所述第一vni确定对应的nat内层数据头信息和第二vni;所述第二进程将所述nat内层数据头信息和所述第二vni保存至所述预留段缓存区;所述第一进程再从所述预留段缓存区提取所述第二vni以进行相应的操作。该方案通过在网卡中的缓存区中开辟预留段缓存区,将第一进程和第二进程处理得到的第一vni、nat内层数据头信息以及第二vni均暂存在预留段缓存区,以便于第一进程和第二进程可以共享彼此处理得到的信息,避免第一进程和第二进程执行的操作会出现部分重复的情况;并且在所述第一进程和所述第二进程获取所述第一数据段中的相应信息以及执行相应操作的同时,仍然保证所述第一数据段的完整性,使得其他的进程可以正常获取所述第一数据段的信息,避免服务器重新从外界获取所述第一数据段以供给其它进程使用。综上,本方案提高了服务器的工作效率。The present invention provides a data information processing method and a server. The buffer area in the network card includes a data segment buffer area and a reserved segment buffer area. The first process parses the first VNI from the first data segment and converts the first VNI Save to the reserved segment buffer; the second process extracts the first vni from the reserved segment buffer, and determines the corresponding nat inner layer data header information and the second vni according to the first vni; The second process saves the nat inner layer data header information and the second vni to the reserved segment buffer; the first process then extracts the second vni from the reserved segment buffer to Do the corresponding operation. In this solution, the reserved segment buffer area is opened in the buffer area of the network card, and the first vni, nat inner data header information and the second vni obtained by the first process and the second process are temporarily stored in the reserved segment buffer area , so that the first process and the second process can share the information obtained by processing each other, avoiding partial duplication of operations performed by the first process and the second process; and when the first process and the second process obtain The corresponding information in the first data segment and the corresponding operations are performed while still ensuring the integrity of the first data segment, so that other processes can normally obtain the information of the first data segment, preventing the server from restarting from the outside world The first data segment is obtained for use by other processes. In summary, this solution improves the working efficiency of the server.
本发明实施例还提供一种服务器,如图16所示,其示出了本发明实施例所涉及的服务器的结构示意图,具体来讲:The embodiment of the present invention also provides a server, as shown in FIG. 16 , which shows a schematic structural diagram of the server involved in the embodiment of the present invention, specifically:
该服务器可以包括一个或者一个以上处理核心的处理器801、一个或一个以上计算机可读存储介质的存储器802、电源803和输入单元804等部件。本领域技术人员可以理解,图16中示出的服务器结构并不构成对服务器的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:The server may include a processor 801 of one or more processing cores, a memory 802 of one or more computer-readable storage media, a power supply 803, an input unit 804 and other components. Those skilled in the art can understand that the server structure shown in FIG. 16 is not limited to the server, and may include more or less components than shown in the figure, or combine some components, or arrange different components. in:
处理器801是该服务器的控制中心,利用各种接口和线路连接整个服务器的各个部分,通过运行或执行存储在存储器802内的软件程序和/或模块,以及调用存储在存储器802内的数据,执行服务器的各种功能和处理数据,从而对服务器进行整体监控。可选的,处理器801可包括一个或多个处理核心;处理器801可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,优选的,处理器801可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器801中。The processor 801 is the control center of the server, and uses various interfaces and lines to connect various parts of the entire server, by running or executing software programs and/or modules stored in the memory 802, and calling data stored in the memory 802, Execute various functions of the server and process data to monitor the server as a whole. Optionally, the processor 801 can include one or more processing cores; the processor 801 can be a central processing unit (Central Processing Unit, CPU), and can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP ), Application Specific Integrated Circuit (ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., preferably, the processor 801 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, User interface and application programs, etc., modem processor mainly handles wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 801 .
存储器802可用于存储软件程序以及模块,处理器801通过运行存储在存储器802的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器802可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据服务器的使用所创建的数据等。此外,存储器802可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器802还可以包 括存储器服务器,以提供处理器801对存储器802的访问。The memory 802 can be used to store software programs and modules, and the processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802 . The memory 802 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); The data created by the use of the server, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 802 may also include a memory server, so as to provide the processor 801 with access to the memory 802.
服务器还包括给各个部件供电的电源803,优选的,电源803可以通过电源管理系统与处理器801逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源803还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The server also includes a power supply 803 for supplying power to each component. Preferably, the power supply 803 can be logically connected to the processor 801 through the power management system, so that functions such as charging, discharging, and power consumption management can be realized through the power management system. The power supply 803 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
该服务器还可包括输入单元804,该输入单元804可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。The server can also include an input unit 804, which can be used to receive input numbers or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
尽管未示出,服务器还可以包括显示单元等,在此不再赘述。具体在本实施例中,服务器中的处理器801会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器802中,并由处理器801来运行存储在存储器802中的应用程序,从而实现各种功能,所述处理器801可以向服务器中的网卡、第一进程和第二进程发出指令,以使得所述网卡、所述第一进程和所述第二进程依次执行以下步骤:Although not shown, the server may also include a display unit, etc., which will not be repeated here. Specifically, in this embodiment, the processor 801 in the server will load the executable file corresponding to the process of one or more application programs into the memory 802 according to the following instructions, and the processor 801 will run the executable file stored in the memory. 802 to implement various functions, the processor 801 can issue instructions to the network card, the first process and the second process in the server, so that the network card, the first process and the second process The process performs the following steps in sequence:
所述网卡接收第一数据段,并将所述第一数据段保存至所述数据段缓存区,所述第一数据段包括第一封装数据和初始数据,所述第一封装数据包括第一vni;The network card receives a first data segment, and saves the first data segment to the data segment buffer area, the first data segment includes first encapsulated data and initial data, and the first encapsulated data includes the first vni;
所述第一进程从所述第一数据段中解析所述第一封装数据以及获取所述第一vni,并将所述第一vni保存至所述预留段缓存区;The first process parses the first packaged data from the first data segment and acquires the first vni, and saves the first vni to the reserved segment buffer;
所述第二进程从所述数据段缓存区中提取所述初始数据、从所述预留段缓存区中提取所述第一vni,并根据所述初始数据和所述第一vni确定对应的nat内层数据头信息和第二vni;The second process extracts the initial data from the data segment buffer, extracts the first VNI from the reserved segment buffer, and determines the corresponding VNI according to the initial data and the first VNI. Nat inner data header information and the second vni;
所述第二进程将所述nat内层数据头信息和所述第二vni保存至所述预留段缓存区;The second process saves the nat inner layer data header information and the second vni to the reserved segment buffer;
所述第一进程从所述预留段缓存区中提取所述第二vni,并根据所述第二vni确定第二封装数据,将所述第二封装数据保存至所述预留段缓存区,使得位于所述数据段缓存区中的所述初始数据、位于所述预留段缓存区中的所述nat内层数据头信息和所述第二封装数据共同构成第二数据段。The first process extracts the second vni from the reserved segment buffer, determines second package data according to the second vni, and saves the second package data to the reserved segment buffer , so that the initial data located in the data segment buffer, the nat inner data header information located in the reserved segment buffer and the second encapsulated data together constitute a second data segment.
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by instructions controlling related hardware, and the instructions can be stored in a computer-readable storage medium, and is loaded and executed by the processor.
为此,本发明实施例提供一种计算机可读存储介质,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。其上存储有计算机程序,所述计算机程序被处理器进行加载,以向服务器中的网卡、第一进程和第二进程发出指令,以使得所述网卡、所述第一进程和所述第二进程依次执行以下步骤:For this reason, the embodiment of the present invention provides a kind of computer-readable storage medium, and this storage medium can comprise: Read Only Memory (ROM, Read Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk etc. . A computer program is stored thereon, and the computer program is loaded by the processor to issue instructions to the network card, the first process and the second process in the server, so that the network card, the first process and the second process The process performs the following steps in sequence:
所述网卡接收第一数据段,并将所述第一数据段保存至所述数据段缓存区,所述第一数据段包括第一封装数据和初始数据,所述第一封装数据包括第一 vni;The network card receives a first data segment, and saves the first data segment to the data segment buffer area, the first data segment includes first encapsulated data and initial data, and the first encapsulated data includes the first vni;
所述第一进程从所述第一数据段中解析所述第一封装数据以及获取所述第一vni,并将所述第一vni保存至所述预留段缓存区;The first process parses the first packaged data from the first data segment and acquires the first vni, and saves the first vni to the reserved segment buffer;
所述第二进程从所述数据段缓存区中提取所述初始数据、从所述预留段缓存区中提取所述第一vni,并根据所述初始数据和所述第一vni确定对应的nat内层数据头信息和第二vni;The second process extracts the initial data from the data segment buffer, extracts the first VNI from the reserved segment buffer, and determines the corresponding VNI according to the initial data and the first VNI. Nat inner data header information and the second vni;
所述第二进程将所述nat内层数据头信息和所述第二vni保存至所述预留段缓存区;The second process saves the nat inner layer data header information and the second vni to the reserved segment buffer;
所述第一进程从所述预留段缓存区中提取所述第二vni,并根据所述第二vni确定第二封装数据,将所述第二封装数据保存至所述预留段缓存区,使得位于所述数据段缓存区中的所述初始数据、位于所述预留段缓存区中的所述nat内层数据头信息和所述第二封装数据共同构成第二数据段。The first process extracts the second vni from the reserved segment buffer, determines second package data according to the second vni, and saves the second package data to the reserved segment buffer , so that the initial data located in the data segment buffer, the nat inner data header information located in the reserved segment buffer and the second encapsulated data together constitute a second data segment.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见上文针对其他实施例的详细描述,此处不再赘述。In the above-mentioned embodiments, the descriptions of each embodiment have their own emphases. For the part that is not described in detail in a certain embodiment, refer to the detailed description of other embodiments above, and will not be repeated here.
具体实施时,以上各个单元或结构可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单元或结构的具体实施可参见前面的方法实施例,在此不再赘述。During specific implementation, each of the above units or structures can be implemented as an independent entity, or can be combined arbitrarily as the same or several entities. For the specific implementation of each of the above units or structures, please refer to the previous method embodiments, here No longer.
以上各个操作的具体实施可参见前面的实施例,在此不再赘述。For the specific implementation of the above operations, reference may be made to the foregoing embodiments, and details are not repeated here.
以上对本发明实施例所提供的数据信息处理的方法和服务器进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The method and server for data information processing provided by the embodiments of the present invention have been described above in detail. In this paper, specific examples are used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only used to help understand the present invention. method and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. Invention Limitations.

Claims (10)

  1. 一种数据信息处理的方法,其特征在于,应用于服务器,所述服务器包括网卡、第一进程和第二进程,所述网卡包括缓存区,所述缓存区包括数据段缓存区和预留段缓存区,所述数据信息处理的方法包括:A data information processing method, characterized in that it is applied to a server, the server includes a network card, a first process and a second process, the network card includes a cache area, and the cache area includes a data segment buffer area and a reserved segment A cache area, the method for processing data information includes:
    所述网卡接收第一数据段,并将所述第一数据段保存至所述数据段缓存区,所述第一数据段包括第一封装数据和初始数据,所述第一封装数据包括第一vni;The network card receives a first data segment, and saves the first data segment to the data segment buffer area, the first data segment includes first encapsulated data and initial data, and the first encapsulated data includes the first vni;
    所述第一进程从所述第一数据段中解析所述第一封装数据以及获取所述第一vni,并将所述第一vni保存至所述预留段缓存区;The first process parses the first packaged data from the first data segment and acquires the first vni, and saves the first vni to the reserved segment buffer;
    所述第二进程从所述数据段缓存区中提取所述初始数据、从所述预留段缓存区中提取所述第一vni,并根据所述初始数据和所述第一vni确定对应的nat内层数据头信息和第二vni;The second process extracts the initial data from the data segment buffer, extracts the first VNI from the reserved segment buffer, and determines the corresponding VNI according to the initial data and the first VNI. Nat inner data header information and the second vni;
    所述第二进程将所述nat内层数据头信息和所述第二vni保存至所述预留段缓存区;The second process saves the nat inner layer data header information and the second vni to the reserved segment buffer;
    所述第一进程从所述预留段缓存区中提取所述第二vni,并根据所述第二vni确定第二封装数据,将所述第二封装数据保存至所述预留段缓存区,使得位于所述数据段缓存区中的所述初始数据、位于所述预留段缓存区中的所述nat内层数据头信息和所述第二封装数据共同构成第二数据段。The first process extracts the second vni from the reserved segment buffer, determines second package data according to the second vni, and saves the second package data to the reserved segment buffer , so that the initial data located in the data segment buffer, the nat inner data header information located in the reserved segment buffer and the second encapsulated data together constitute a second data segment.
  2. 根据权利要求1所述的数据信息处理的方法,其特征在于,所述第二进程从所述数据段缓存区中提取所述初始数据、从所述预留段缓存区中提取所述第一vni,并根据所述初始数据和所述第一vni确定对应的nat内层数据头信息和第二vni的步骤,包括:The method for processing data information according to claim 1, wherein the second process extracts the initial data from the data segment buffer, and extracts the first data from the reserved segment buffer. vni, and according to the initial data and the first vni determine the corresponding nat inner layer data header information and the steps of the second vni, including:
    所述第二进程从所述初始数据中提取初始内层数据头,并从所述预留段缓存区提取所述第一vni;The second process extracts an initial inner data header from the initial data, and extracts the first vni from the reserved segment buffer;
    所述第二进程根据所述初始内层数据头和所述第一vni,分别在nat转化表格和vni转化表格中查找对应的nat IP、nat PORT和第二vni;The second process searches corresponding nat IP, nat PORT and the second vni respectively in the nat conversion table and the vni conversion table according to the initial inner layer data header and the first vni;
    所述第二进程根据所述nat IP、所述nat PORT确定所述nat内层数据头信息。The second process determines the nat inner layer data header information according to the nat IP and the nat PORT.
  3. 根据权利要求1所述的数据信息处理的方法,其特征在于,所述第一进程从所述第一数据段中解析所述第一封装数据以及获取所述第一vni,并将所述第一vni保存至所述预留段缓存区的步骤之前,包括:The method for processing data information according to claim 1, wherein the first process parses the first packaged data from the first data segment and acquires the first vni, and converts the first vni Before the step of saving a vni to the reserved segment buffer area, it includes:
    所述网卡向所述第一进程发送所述第一数据段的指针;The network card sends the pointer of the first data segment to the first process;
    所述第一进程根据所述第一数据段的指针访问所述第一数据段。The first process accesses the first data segment according to the pointer of the first data segment.
  4. 根据权利要求1所述的数据信息处理的方法,其特征在于,所述第二进程从所述数据段缓存区中提取所述初始数据、从所述预留段缓存区中提取所述第一vni,并根据所述初始数据和所述第一vni确定对应的nat内层数据头信息和第二vni的步骤之前,包括:The method for processing data information according to claim 1, wherein the second process extracts the initial data from the data segment buffer, and extracts the first data from the reserved segment buffer. vni, and according to the initial data and the first vni determine the corresponding nat inner layer data header information and before the step of the second vni, including:
    所述网卡向所述第二进程发送所述初始数据的指针;The network card sends the pointer of the initial data to the second process;
    所述第二进程根据所述初始数据的指针访问所述初始数据和所述第一vni。The second process accesses the initial data and the first vni according to the pointer of the initial data.
  5. 根据权利要求1所述的数据信息处理的方法,其特征在于,所述第一进程从所述预留段缓存区中提取所述第二vni,并根据所述第二vni确定第二封装数据,将所述第二封装数据保存至所述预留段缓存区,使得位于所述数据段缓存区中的所述初始数据、位于所述预留段缓存区中的所述nat内层数据头信息和所述第二封装数据共同构成第二数据段的步骤之后,包括:The method for processing data information according to claim 1, wherein the first process extracts the second vni from the reserved segment buffer, and determines the second encapsulation data according to the second vni , saving the second encapsulation data to the reserved segment buffer, so that the initial data located in the data segment buffer, the nat inner layer data header located in the reserved segment buffer After the step of forming the second data segment together with the second packaged data, the steps include:
    所述网卡根据所述第二数据段确定对应的发送隧道;The network card determines a corresponding sending tunnel according to the second data segment;
    所述网卡根据所述发送隧道发送所述第二数据段。The network card sends the second data segment according to the sending tunnel.
  6. 根据权利要求1所述的数据信息处理的方法,其特征在于,所述服务器还包括第三进程,所述第一封装数据还包括源IP地址和目的IP地址,所述网卡接收第一数据段,并将所述第一数据段保存至所述数据段缓存区,所述第一数据段包括第一封装数据和初始数据,所述第一封装数据包括第一vni的步骤之后,包括:The method for processing data information according to claim 1, wherein the server further includes a third process, the first encapsulated data also includes a source IP address and a destination IP address, and the network card receives the first data segment , and save the first data segment to the data segment buffer, the first data segment includes first package data and initial data, and after the step of including the first vni in the first package data, include:
    所述第一进程从所述第一数据段中解析所述第一封装数据并获取所述源IP地址和所述目的IP地址,并将所述源IP地址和所述目的IP地址保存至所述预留段缓存区;The first process parses the first encapsulated data from the first data segment and obtains the source IP address and the destination IP address, and saves the source IP address and the destination IP address to the The reserved segment cache area;
    所述第三进程从所述预留段缓存区提取所述源IP地址和所述目的IP地址,并根据所述源IP地址和所述目的IP地址判断所述第一数据段是否为合法数据头;The third process extracts the source IP address and the destination IP address from the reserved segment buffer, and judges whether the first data segment is legitimate data according to the source IP address and the destination IP address head;
    若所述第一数据段是合法数据头,则所述第三进程处理所述初始数据;If the first data segment is a legal data header, the third process processes the initial data;
    若所述第一数据段不是合法数据头,则所述第三进程丢弃所述初始数据。If the first data segment is not a valid data header, the third process discards the initial data.
  7. 根据权利要求1所述的数据信息处理的方法,其特征在于,所述服务器还包括第四进程,所述网卡还包括镜像缓存区,所述镜像缓存区包括镜像数据段缓存区和镜像预留段缓存区,所述网卡接收第一数据段,并将所述第一数据段保存至所述数据段缓存区,所述第一数据段包括第一封装数据和初始数据,所述第一封装数据包括第一vni的步骤之后,包括:The method for processing data information according to claim 1, wherein the server further includes a fourth process, and the network card further includes a mirror buffer, and the mirror buffer includes a mirror data segment buffer and a mirror reserved A segment buffer area, the network card receives a first data segment, and saves the first data segment to the data segment buffer area, the first data segment includes first package data and initial data, and the first package After the step of including the first vni, the data includes:
    所述第一进程从所述第一数据段中解析所述第一封装数据并获取所述第一vni,并根据所述第一vni判断所述第一数据段的用户是否开通病毒检测服务;The first process parses the first packaged data from the first data segment and obtains the first vni, and judges whether the user of the first data segment has subscribed to a virus detection service according to the first vni;
    若所述第一数据段的用户开通病毒检测服务,则所述第一进程将所述第一数据段保存至所述镜像数据段缓存区,并将所述第一vni保存至镜像预留段缓存区;If the user of the first data segment activates the virus detection service, then the first process saves the first data segment to the mirrored data segment cache area, and saves the first vni to the mirrored reserved segment cache area;
    所述第四进程从所述镜像缓存区中提取所述第一数据段和所述第一vni,并根据病毒检测服务的规则生成对应的病毒检测报告。The fourth process extracts the first data segment and the first vni from the mirror buffer, and generates a corresponding virus detection report according to the rules of the virus detection service.
  8. 一种服务器,其特征在于,所述服务器包括网卡、第一进程和第二进程,所述网卡包括缓存区,所述缓存区包括数据段缓存区和预留段缓存区;A server, characterized in that the server includes a network card, a first process, and a second process, the network card includes a cache area, and the cache area includes a data segment buffer area and a reserved segment buffer area;
    所述网卡接收第一数据段,并将所述第一数据段保存至所述数据段缓存区,所述第一数据段包括第一封装数据和初始数据,所述第一封装数据包括第一vni;The network card receives a first data segment, and saves the first data segment to the data segment buffer area, the first data segment includes first encapsulated data and initial data, and the first encapsulated data includes the first vni;
    所述第一进程从所述第一数据段中解析所述第一封装数据以及获取所述第一vni,并将所述第一vni保存至所述预留段缓存区;The first process parses the first packaged data from the first data segment and acquires the first vni, and saves the first vni to the reserved segment buffer;
    所述第二进程从所述数据段缓存区中提取所述初始数据、从所述预留段缓存区中提取所述第一vni,并根据所述初始数据和所述第一vni确定对应的nat内层数据头信息和第二vni;The second process extracts the initial data from the data segment buffer, extracts the first VNI from the reserved segment buffer, and determines the corresponding VNI according to the initial data and the first VNI. Nat inner data header information and the second vni;
    所述第二进程将所述nat内层数据头信息和所述第二vni保存至所述预留段缓存区;The second process saves the nat inner layer data header information and the second vni to the reserved segment buffer;
    所述第一进程从所述预留段缓存区中提取所述第二vni,并根据所述第二vni确定第二封装数据,将所述第二封装数据保存至所述预留段缓存区,使得位于所述数据段缓存区中的所述初始数据、位于所述预留段缓存区中的所述nat内层数据头信息和所述第二封装数据共同构成第二数据段。The first process extracts the second vni from the reserved segment buffer, determines second package data according to the second vni, and saves the second package data to the reserved segment buffer , so that the initial data located in the data segment buffer, the nat inner data header information located in the reserved segment buffer and the second encapsulated data together constitute a second data segment.
  9. 根据权利要求8所述的服务器,其特征在于,所述第二进程还用于从所述初始数据中提取初始内层数据头,并从所述预留段缓存区提取所述第一vni;以及The server according to claim 8, wherein the second process is further configured to extract an initial inner data header from the initial data, and extract the first vni from the reserved segment buffer; as well as
    所述第二进程用于根据所述初始内层数据头和所述第一vni,分别在nat转化表格和vni转化表格中查找对应的nat IP和第二vni。The second process is used to search the corresponding nat IP and the second vni in the nat conversion table and the vni conversion table respectively according to the initial inner layer data header and the first vni.
  10. 根据权利要求8所述的服务器,其特征在于,所述网卡还用于向所述第一进程发送所述第一数据段的指针;以及The server according to claim 8, wherein the network card is further configured to send a pointer of the first data segment to the first process; and
    所述第一进程还用于根据所述第一数据段的指针访问所述第一数据段。The first process is further configured to access the first data segment according to the pointer of the first data segment.
PCT/CN2021/135684 2021-08-03 2021-12-06 Data information processing method and server WO2023010731A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110884143.3 2021-08-03
CN202110884143.3A CN113630341B (en) 2021-08-03 2021-08-03 Data information processing method and server

Publications (1)

Publication Number Publication Date
WO2023010731A1 true WO2023010731A1 (en) 2023-02-09

Family

ID=78382370

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/135684 WO2023010731A1 (en) 2021-08-03 2021-12-06 Data information processing method and server

Country Status (2)

Country Link
CN (1) CN113630341B (en)
WO (1) WO2023010731A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113630341B (en) * 2021-08-03 2023-06-06 武汉绿色网络信息服务有限责任公司 Data information processing method and server

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080229325A1 (en) * 2007-03-15 2008-09-18 Supalov Alexander V Method and apparatus to use unmapped cache for interprocess communication
CN101887399A (en) * 2010-06-28 2010-11-17 北京用友政务软件有限公司 Method for accessibly accessing cache data at server side
CN104111897A (en) * 2013-04-16 2014-10-22 华为技术有限公司 Data processing method, data processing device and computer system
CN105608159A (en) * 2015-12-18 2016-05-25 北京奇虎科技有限公司 Data caching method and device
CN113630341A (en) * 2021-08-03 2021-11-09 武汉绿色网络信息服务有限责任公司 Data information processing method and server

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6304564B1 (en) * 1996-11-29 2001-10-16 Lucent Technologies Inc. Method for transmitting messages in wireless communication system using a server process
CA2514086C (en) * 2003-01-23 2011-04-26 Cisco Technology, Inc. Methods and devices for transmitting data between storage area networks
CN103200085B (en) * 2013-04-16 2016-05-25 中航网信(北京)科技有限公司 A kind of method and system that realize the transmitting-receiving of VXLAN message linear speed
US9571362B2 (en) * 2013-05-24 2017-02-14 Alcatel Lucent System and method for detecting a virtual extensible local area network (VXLAN) segment data path failure
US9692698B2 (en) * 2014-06-30 2017-06-27 Nicira, Inc. Methods and systems to offload overlay network packet encapsulation to hardware
WO2017177400A1 (en) * 2016-04-13 2017-10-19 华为技术有限公司 Data processing method and system
US10713277B2 (en) * 2017-10-26 2020-07-14 Sap Se Patching content across shared and tenant containers in multi-tenancy database systems
CN110071880B (en) * 2018-01-24 2021-06-18 北京金山云网络技术有限公司 Message forwarding method, forwarding device, server and storage medium
US11962499B2 (en) * 2018-10-31 2024-04-16 Vmware, Inc. Multitenancy for service machines
CN109857517B (en) * 2019-01-04 2020-12-29 中国科学院计算技术研究所 Virtualization system and data exchange method thereof
CN110086571A (en) * 2019-04-10 2019-08-02 广州华多网络科技有限公司 A kind of data transmission and received method, apparatus and data processing system
US10877822B1 (en) * 2019-12-16 2020-12-29 Vmware, Inc. Zero-copy packet transmission between virtualized computing instances

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080229325A1 (en) * 2007-03-15 2008-09-18 Supalov Alexander V Method and apparatus to use unmapped cache for interprocess communication
CN101887399A (en) * 2010-06-28 2010-11-17 北京用友政务软件有限公司 Method for accessibly accessing cache data at server side
CN104111897A (en) * 2013-04-16 2014-10-22 华为技术有限公司 Data processing method, data processing device and computer system
CN105608159A (en) * 2015-12-18 2016-05-25 北京奇虎科技有限公司 Data caching method and device
CN113630341A (en) * 2021-08-03 2021-11-09 武汉绿色网络信息服务有限责任公司 Data information processing method and server

Also Published As

Publication number Publication date
CN113630341A (en) 2021-11-09
CN113630341B (en) 2023-06-06

Similar Documents

Publication Publication Date Title
CN112398817B (en) Data sending method and device
US20180309595A1 (en) Method for sending virtual extensible local area network packet, computer device, and computer readable medium
CN110048963B (en) Message transmission method, medium, device and computing equipment in virtual network
WO2021013046A1 (en) Communication method and network card
CN112040030B (en) Message transmission method and device, computer equipment and storage medium
CN108924274B (en) Domain name system DNS processing method and device, storage medium and electronic equipment
CN113132202B (en) Message transmission method and related equipment
CN112333298B (en) Message transmission method and device, computer equipment and storage medium
WO2024067336A1 (en) Packet processing method, programmable network card device, physical server, and storage medium
US20220255772A1 (en) Packet sending method, apparatus, and system
EP3771169A1 (en) Message processing method and related device
CN115486046A (en) Data packet processing method and device based on open virtual soft switch OVS
WO2020019958A1 (en) Vxlan message encapsulation method, device and system, and strategy execution method, device and system
WO2023010731A1 (en) Data information processing method and server
WO2022116850A1 (en) Method and device for identifying private network user, service system, and storage medium
CN114584526A (en) ARP protocol processing method, system, storage medium and electronic equipment
WO2023010730A1 (en) Data packet parsing method and server
WO2024037366A1 (en) Forwarding rule issuing method, and intelligent network interface card and storage medium
WO2020083380A1 (en) Message processing
CN113259220B (en) Method and server for sharing private information in message
WO2022078001A1 (en) Method and apparatus for managing static rule, and electronic device and storage medium
WO2021088357A1 (en) Method for generating forwarding information, device, and system
CN114567614A (en) Method and device for realizing ARP protocol processing based on FPGA
EP3913865A1 (en) Message decapsulation method and device, message encapsulation method and device, electronic device, and storage medium
CN116137585B (en) Message forwarding method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21952594

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE