CN114006955B - Data processing method, device, equipment and readable storage medium - Google Patents

Data processing method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN114006955B
CN114006955B CN202111263630.4A CN202111263630A CN114006955B CN 114006955 B CN114006955 B CN 114006955B CN 202111263630 A CN202111263630 A CN 202111263630A CN 114006955 B CN114006955 B CN 114006955B
Authority
CN
China
Prior art keywords
information
virtual
network card
real
packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111263630.4A
Other languages
Chinese (zh)
Other versions
CN114006955A (en
Inventor
王启超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202111263630.4A priority Critical patent/CN114006955B/en
Publication of CN114006955A publication Critical patent/CN114006955A/en
Application granted granted Critical
Publication of CN114006955B publication Critical patent/CN114006955B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details

Landscapes

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

Abstract

The application discloses a data processing method, a device, equipment and a readable storage medium. The application firstly determines the virtual ID information based on the ICMP protocol request packet, so that the ICMP protocol response packet also carries the virtual ID information, and the virtual ID information corresponds to the network card identification information of the network card sending the ICMP protocol request packet, so that the virtual ID information can determine which network card the current response packet needs to be transmitted to, thereby reducing the packet loss rate when a plurality of network cards work simultaneously, and simultaneously restoring the virtual ID information in the response packet to be real ID information, so that the network card can normally analyze the response packet. Correspondingly, the data processing device, the data processing equipment and the readable storage medium have the technical effects.

Description

Data processing method, device, equipment and readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method, apparatus, device, and readable storage medium.
Background
Currently, a client (Windows, linux, MAC, etc.) operating system environment may have multiple network adapters (i.e., network cards). After the multi-network card is started, ICMP control packets sent from each network card are required to be drained to the server side so that the server side can verify the network of the client side based on the ICMP control packets.
However, when receiving the response packet of the ICMP control packet, the client may face the problem of "which network card the current response packet is transmitted to", and may give the response of the packet sent by the a network card to the B network card, which results in packet loss of the a network card and unstable network.
Therefore, how to reduce the packet loss rate when the multiple network cards work simultaneously is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
Accordingly, the present application is directed to a data processing method, apparatus, device and readable storage medium, so as to reduce the packet loss rate when multiple network cards are simultaneously operating. The specific scheme is as follows:
in a first aspect, the present application provides a data processing method, including:
if a response packet of the ICMP protocol is received, the response packet is analyzed to obtain virtual ID information; the virtual ID information is determined based on a request packet corresponding to the response packet;
inquiring real ID information corresponding to the virtual ID information and network card identification information of a target network card for sending the request packet;
and modifying the virtual ID information in the response packet into the real ID information to obtain a new response packet, and transmitting the new response packet to the target network card based on the network card identification information.
Preferably, a network request packet is acquired through SSL connection, and a protocol type field in the network request packet is extracted; determining whether the network request packet is a response packet of an ICMP protocol based on the protocol type field.
Preferably, the querying real ID information corresponding to the virtual ID information and the network card identification information of the target network card sending the request packet include:
inquiring the network card identification information and the real ID information in a pre-stored mapping file.
Preferably, the method further comprises:
and if the network card identification information and/or the real ID information are not queried in the mapping file, discarding the response packet.
Preferably, the mapping file is: MAP mapping table, mapping array or mapping linked list.
Preferably, before the transmitting the new response packet to the target network card based on the network card identification information, the method further includes:
updating the checksum in the new response packet.
In a second aspect, the present application provides a data processing method, including:
intercepting a request packet of an ICMP protocol sent by a target network card;
analyzing the request packet to obtain real ID information, and determining virtual ID information based on the real ID information; the virtual ID information, the real ID information and the network card identification information of the target network card correspond to each other;
and modifying the real ID information in the request packet into the virtual ID information to obtain a new request packet, and sending the new request packet.
Preferably, the intercepting the ICMP protocol request packet sent by the destination network card includes:
and monitoring a plurality of network cards of the self in real time to intercept the request packet.
Preferably, the determining virtual ID information based on the real ID information includes:
and inquiring the virtual ID information in a pre-stored mapping file based on the real ID information.
Preferably, the querying the virtual ID information in a pre-stored mapping file based on the real ID information includes:
inquiring the virtual ID information in the mapping file by taking the real ID information as an inquiry keyword;
and/or
And creating the virtual ID information based on the network card identification information and the real ID information, and inquiring the virtual ID information in the mapping file by taking the created virtual ID information as an inquiry keyword.
Preferably, the method further comprises:
if the virtual ID information is not queried in the mapping file, creating the virtual ID information based on the network card identification information and the real ID information, and storing the network card identification information, the real ID information and the created virtual ID information into the mapping file.
Preferably, the mapping file is: MAP mapping table, mapping array or mapping linked list.
Preferably, the sending the new request packet includes:
updating the checksum in the new request packet, and sending the updated new request packet through the SSL connection.
In a third aspect, the present application provides a data processing apparatus comprising:
the receiving module is used for analyzing the response packet to obtain virtual ID information if the response packet of the ICMP protocol is received; the virtual ID information is determined based on a request packet corresponding to the response packet;
the inquiring module is used for inquiring the real ID information corresponding to the virtual ID information and sending the network card identification information of the target network card of the request packet;
and the restoration module is used for modifying the virtual ID information in the response packet into the real ID information to obtain a new response packet, and transmitting the new response packet to the target network card based on the network card identification information.
In a fourth aspect, the present application provides a data processing apparatus comprising:
the interception module is used for intercepting a request packet of the ICMP protocol sent by the target network card;
the determining module is used for analyzing the request packet to obtain real ID information and determining virtual ID information based on the real ID information; the virtual ID information, the real ID information and the network card identification information of the target network card correspond to each other;
and the modification module is used for modifying the real ID information in the request packet into the virtual ID information to obtain a new request packet and sending the new request packet.
In a fifth aspect, the present application provides an electronic device, comprising:
a memory for storing a computer program;
and a processor for executing the computer program to implement the previously disclosed data processing method.
In a sixth aspect, the present application provides a readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the previously disclosed data processing method.
As can be seen from the above scheme, the present application provides a data processing method, including: if a response packet of the ICMP protocol is received, the response packet is analyzed to obtain virtual ID information; the virtual ID information is determined based on a request packet corresponding to the response packet; inquiring real ID information corresponding to the virtual ID information and network card identification information of a target network card for sending the request packet; and modifying the virtual ID information in the response packet into the real ID information to obtain a new response packet, and transmitting the new response packet to the target network card based on the network card identification information.
Therefore, the virtual ID information in the response packet of the ICMP protocol can be inquired about the real ID information corresponding to the virtual ID information and the network card identification information of the network card sending the request packet, the virtual ID information in the response packet is modified into the real ID information, and a new response packet is obtained, so that the new response packet is transmitted to the corresponding network card based on the network card identification information, and the response packet is transmitted to the correct network card. According to the scheme, virtual ID information is determined based on the ICMP protocol request packet, so that the ICMP protocol response packet also carries the virtual ID information, and the virtual ID information corresponds to network card identification information of a network card sending the ICMP protocol request packet, so that the virtual ID information can determine which network card the current response packet needs to be transmitted to, the packet loss rate of the multi-network card during simultaneous working is reduced, and meanwhile, the virtual ID information in the response packet is restored to be real ID information, so that the network card can normally analyze the response packet.
Correspondingly, the data processing device, the data processing equipment and the readable storage medium have the technical effects.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a data processing method disclosed by the application;
fig. 2 is a schematic structural diagram of an ICMP packet header according to the present disclosure;
FIG. 3 is a flow chart of another data processing method disclosed in the present application;
FIG. 4 is a schematic diagram of a mapping file according to the present disclosure;
FIG. 5 is a schematic diagram of the operations of sending and receiving packets according to the present application;
FIG. 6 is a schematic diagram of a data processing apparatus according to the present disclosure;
FIG. 7 is a schematic diagram of another data processing apparatus according to the present disclosure;
FIG. 8 is a schematic diagram of an electronic device according to the present disclosure;
fig. 9 is a schematic diagram of another electronic device according to the present disclosure.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
At present, when multiple network cards work simultaneously, the response of the packet sent by the A network card may be given to the B network card, so that the A network card loses the packet, and the network is unstable. Therefore, the application provides a data processing scheme which can reduce the packet loss rate when a plurality of network cards work simultaneously.
Referring to fig. 1, an embodiment of the present application discloses a data processing method, which is applied to a client, and includes:
s101, if a response packet of an ICMP protocol is received, analyzing the response packet to obtain virtual ID information; the virtual ID information is determined based on the request packet to which the response packet corresponds.
The ICMP (Internet Control Message Protocol) protocol is an Internet control message protocol, and is used for transferring control messages between IP hosts, routers and other devices. The control message refers to a message of the network itself such as a network is not connected, whether a host is reachable, whether a route is available, and the like. These control messages, although not transmitting user data, play an important role in the transfer of user data.
Generally, SSL (Secure Sockets Layer, secure socket protocol) connection is adopted between the client and the server for communication, so in a specific embodiment, the network request packet is obtained through the SSL connection, and a protocol type field in the network request packet is extracted; it is determined whether the network request packet is a response packet of the ICMP protocol based on the protocol type field. If the protocol type field is ipproto_icmp type, the network request packet is considered to be a response packet of ICMP protocol.
The secure socket protocol is a security protocol for providing security and data integrity for network communications, and is capable of encrypting network connections between a transport layer and an application layer.
Please refer to fig. 2. Fig. 2 illustrates the structure of an ICMP packet header. As can be seen from fig. 2, the configuration example of the IP header includes: type field (Type), checksum (Checksum), protocol ID field (ID), etc. The protocol ID field is a field specified by the ICMP protocol, and the user can modify the field, which is the ID information according to the present application. The application refers to the original protocol ID field specified by ICMP protocol as: the real ID information will be referred to as virtual ID information after modification.
S102, inquiring real ID information corresponding to the virtual ID information and network card identification information of a target network card for sending the request packet.
In order to realize mutual correspondence of the virtual ID information, the real ID information and the network card identification information, the embodiment maps the virtual ID information, the real ID information and the network card identification information to each other. Of course, the real ID information and the network card identification information may be combined, and the combined result and the virtual ID information may be mapped. At this time, the combination result may be directly used as virtual ID information. Assuming that the real ID information is 100 and the network card identification information is 1, the virtual ID information may be 10. This 10 can be calculated based on 100 and 1 or can be arbitrarily specified.
S103, modifying the virtual ID information in the response packet into real ID information to obtain a new response packet, and transmitting the new response packet to the target network card based on the network card identification information.
The virtual ID information in the response packet is modified into real ID information, so that the network card can normally analyze the response packet. Of course, a re-computerized Checksum (Checksum) is also required to update the Checksum in the response packet. Therefore, in one specific embodiment, before transmitting the new response packet to the target network card based on the network card identification information, the method further includes: the checksum in the new response packet is updated.
Wherein the checksum is used to check the sum of a set of data items. These data items may be numbers or other strings that are considered numbers in the calculation of the checksum.
According to the embodiment, aiming at the virtual ID information in the response packet of the ICMP protocol, real ID information corresponding to the virtual ID information and network card identification information of a network card sending the request packet can be queried, the virtual ID information in the response packet is modified into the real ID information, and a new response packet is obtained, so that the new response packet is transmitted to the corresponding network card based on the network card identification information, and the response packet is transmitted to a correct network card.
Therefore, the virtual ID information is determined based on the ICMP protocol request packet, so that the ICMP protocol response packet also carries the virtual ID information, and the virtual ID information corresponds to the network card identification information of the network card sending the ICMP protocol request packet, so that the virtual ID information can determine which network card the current response packet needs to be transmitted to, thereby reducing the packet loss rate when the multiple network cards work simultaneously, and simultaneously restoring the virtual ID information in the response packet to be real ID information, so that the network card can normally analyze the response packet.
It should be noted that, in order to implement mutual mapping between the virtual ID information, the real ID information, and the network card identification information, these information may be recorded using a mapping data storage technique such as a MAP mapping table, a mapping array, or a mapping linked list. Therefore, in a specific embodiment, querying real ID information corresponding to the virtual ID information and network card identification information of the target network card sending the request packet includes: inquiring the identification information and the real ID information of the network card in a pre-stored mapping file. The mapping file is: MAP mapping tables, mapping arrays, or mapping linked lists, etc.
In a specific embodiment, if the network card identification information and/or the real ID information is not queried in the mapping file, it is indicated that the virtual ID information, the network card identification information and/or the real ID information in the corresponding response packet are not stored in advance, or the protocol ID field is not modified when the request packet corresponding to the corresponding response packet is sent, at this time, the network card corresponding to the response packet cannot be determined, so that the response packet is discarded.
Another data processing method provided in the embodiments of the present application is described below, and a data processing method described below and a data processing method described above may be referred to each other.
Referring to fig. 3, an embodiment of the present application discloses a data processing method, which is applied to a client, and includes:
s301, intercepting a request packet of an ICMP protocol sent by a target network card.
If a plurality of network cards on the client work simultaneously, the problem of packet loss is easy to occur. For this reason, the present embodiment modifies the ICMP protocol request packet before sending it so that the ICMP protocol request packet and the ICMP protocol response packet may correspond to the corresponding network cards. In order to modify ICMP protocol request packets sent by each network card completely, the client can monitor own network card in real time. Therefore, in one specific embodiment, intercepting a request packet of an ICMP protocol sent by a target network card includes: and monitoring a plurality of network cards of the self in real time to intercept the request packet.
S302, analyzing the request packet to obtain real ID information, and determining virtual ID information based on the real ID information; the virtual ID information, the real ID information and the network card identification information of the target network card correspond to each other.
S303, modifying the real ID information in the request packet into virtual ID information to obtain a new request packet, and sending the new request packet.
After modifying the real ID information in the request packet, the corresponding checksum also needs to be modified, so in a specific embodiment, the sending of the new request packet includes: updating the checksum in the new request packet and sending the updated new request packet through the SSL connection.
In one embodiment, determining virtual ID information based on real ID information includes: and inquiring virtual ID information in the pre-stored mapping file. Wherein, inquiring virtual ID information in a pre-stored mapping file comprises: inquiring virtual ID information in the mapping file by taking network card identification information and/or real ID information as inquiry keywords; and/or creating virtual ID information based on the network card identification information and the real ID information, taking the created virtual ID information as a query keyword, and querying the virtual ID information in the mapping file.
If the virtual ID information is not queried in the mapping file, creating virtual ID information based on the network card identification information and the real ID information, and storing the network card identification information, the real ID information and the created virtual ID information into the mapping file. The mapping file is: MAP mapping table, mapping array or mapping linked list.
Referring to fig. 4, the map mapping table may be divided into two parts, one part records the paired network card identification information and real ID information, and the other part records virtual ID information, and a mapping relationship between the two parts is established. Of course, the virtual ID information, the real ID information and the network card identification information may be recorded in the mapping file in three parts, and at this time, a mutual mapping relationship between the three parts needs to be established.
In FIG. 4, icmpID-1, icmpID-2 represent real ID information; virtual IcmpId-1 and virtual IcmpId-2 represent virtual ID information; the network cards 1 and 2 represent network card identification information.
Therefore, the embodiment can intercept the request packet of ICMP protocol which the target network card wants to send out; and then, the real ID information in the request packet is modified into virtual ID information corresponding to the real ID information and the network card identification information of the target network card, so that the ICMP protocol request packet corresponds to the target network card, and the server side still generates a response packet based on the packet head of the ICMP protocol request packet when returning the packet. The response packet also carries virtual ID information corresponding to the real ID information and the network card identification information of the target network card, so that the response packet can be clearly transmitted back to which network card, and the packet loss rate of the multi-network card when working simultaneously is reduced.
Referring to fig. 5, fig. 5 illustrates a transmission flow of an ICMP protocol request packet and a reception flow of an ICMP protocol response packet. When the packet is sent, the ICMP packet structure is analyzed, the protocol ID field in the packet is modified and then sent, and when the packet is returned, the protocol ID field is reversely checked by the buffer memory, restored and then plugged into the corresponding network card.
Of course, a mapping table of [ network card id+real ICMP-ID ] - [ virtual ICMP-ID ] needs to be established in advance, and specifically, see fig. 4.
The sending flow of the ICMP protocol request packet comprises the following steps:
1. and circularly grabbing the network data packets.
2. Judging the protocol type of the network data packet, if the network data packet is IPPROTO_ICMP type (ICMP protocol packet), continuing the flow.
3. And analyzing the data packet to obtain the contents of the IP header and the ICMP header.
4. The ID value in the ICMP header is obtained, namely: true ICMP-ID.
5. Acquiring a network card number value: network card ID (i.e., network card 1, network card 2 in fig. 4).
6. And searching elements in the mapping table based on the real ICMP-ID and the network card ID, and if the elements are found, taking out the corresponding virtual ICMP-ID.
7. If no element is found, then creating a virtual ICMP-ID, and creating a mapping of [ NIC ID+real ICMP-ID ] - [ virtual ICMP-ID ], storing in a mapping table, and returning to the newly created virtual ICMP-ID.
8. The real ICMP-ID in the ICMP header is modified to a virtual ICMP-ID.
9. The Checksum (Checksum) in the data packet is recalculated and modified.
10. The packets are sent using a dedicated drain communication outlet (SSL connection).
The receiving flow of the ICMP protocol response packet comprises the following steps:
1. the data packets are received using a dedicated drain communication outlet (SSL connection).
2. Judging the protocol type of the network data packet, and if the protocol type is IPPROTO_ICMP type, continuing the flow.
3. And analyzing the data packet to obtain the contents of the IP header and the ICMP header.
4. The ID value in the ICMP header is obtained, which is the virtual ICMP-ID in the previously sent packet.
5. And searching the corresponding [ network card ID+real ICMP-ID ] in the mapping table based on the [ virtual ICMP-ID ], and discarding the data packet if the query fails.
6. If found, the virtual ICMP-ID in the ICMP header is modified to the corresponding real ICMP-ID in the mapping table.
7. The Checksum (Checksum) in the data packet is recalculated and modified.
8. And pressing the new packet into the network card corresponding to the queried network card ID, and closing the communication loop.
Therefore, the MAP mapping table can be used to realize quick inquiry and reverse inquiry, and the mapping data storage technology is used to realize correct matching of the network cards, so that the packet loss rate of the simultaneous operation of multiple network cards is reduced.
A data processing apparatus according to an embodiment of the present application is described below, and a data processing apparatus described below and a data processing method described above may be referred to each other.
Referring to fig. 6, an embodiment of the present application discloses a data processing apparatus, including:
the receiving module 601 is configured to parse the response packet to obtain virtual ID information if the response packet of the ICMP protocol is received; the virtual ID information is determined based on a request packet corresponding to the response packet;
the query module 602 is configured to query real ID information corresponding to the virtual ID information, and network card identification information of a target network card that sends the request packet;
the restoration module 603 is configured to modify the virtual ID information in the response packet into real ID information, obtain a new response packet, and transmit the new response packet to the target network card based on the network card identification information.
In one specific embodiment, the method further comprises:
the data screening module is used for acquiring a network request packet through SSL connection and extracting a protocol type field in the network request packet; it is determined whether the network request packet is a response packet of the ICMP protocol based on the protocol type field.
In one embodiment, the query module is specifically configured to:
inquiring the identification information and the real ID information of the network card in a pre-stored mapping file.
In one specific embodiment, the method further comprises:
and the discarding module is used for discarding the response packet if the network card identification information and/or the real ID information are not queried in the mapping file.
In one embodiment, the mapping file is: MAP mapping table, mapping array or mapping linked list.
In one specific embodiment, the method further comprises:
and the updating module is used for updating the checksum in the new response packet.
The more specific working process of each module and unit in this embodiment may refer to the corresponding content disclosed in the foregoing embodiment, and will not be described herein.
Therefore, the embodiment provides a data processing device, which can clearly need to send the response packet back to which network card, so as to reduce the packet loss rate when the multiple network cards work simultaneously.
The following describes another data processing apparatus provided in the embodiment of the present application, and the another data processing apparatus described below and the another data processing method described above may be referred to each other.
Referring to fig. 7, an embodiment of the present application discloses a data processing apparatus, including:
the interception module 701 is configured to intercept a request packet of an ICMP protocol sent by a target network card;
a determining module 702, configured to parse the request packet to obtain real ID information, and determine virtual ID information based on the real ID information; the virtual ID information, the real ID information and the network card identification information of the target network card correspond to each other;
the modifying module 703 is configured to modify the real ID information in the request packet into virtual ID information, obtain a new request packet, and send the new request packet.
In one embodiment, the interception module is specifically configured to:
and monitoring a plurality of network cards of the self in real time to intercept the request packet.
In one embodiment, the determining module is specifically configured to:
and inquiring virtual ID information in a pre-stored mapping file based on the real ID information.
In one embodiment, the determining module is specifically configured to:
the real ID information is used as a query keyword, and virtual ID information is queried in the mapping file;
and/or
Virtual ID information is created based on the network card identification information and the real ID information, the created virtual ID information is used as a query keyword, and the virtual ID information is queried in the mapping file.
In one specific embodiment, the method further comprises:
the creation module is used for creating virtual ID information based on the network card identification information and the real ID information if the virtual ID information is not queried in the mapping file, and storing the network card identification information, the real ID information and the created virtual ID information into the mapping file.
In one embodiment, the mapping file is: MAP mapping table, mapping array or mapping linked list.
In one embodiment, the modification module is specifically configured to:
updating the checksum in the new request packet and sending the updated new request packet through the SSL connection.
The more specific working process of each module and unit in this embodiment may refer to the corresponding content disclosed in the foregoing embodiment, and will not be described herein.
Therefore, the embodiment provides another data processing device, which can clearly need to send the response packet back to which network card, so as to reduce the packet loss rate when the multiple network cards work simultaneously.
The following describes an electronic device provided in an embodiment of the present application, and the electronic device described below and the data processing method and apparatus described above may be referred to each other.
Referring to fig. 8, an embodiment of the present application discloses an electronic device, including:
a memory 801 for storing a computer program;
a processor 802 for executing the computer program to implement the method disclosed in any of the embodiments above.
Referring to fig. 9, fig. 9 is a schematic diagram of another electronic device provided in this embodiment, where the electronic device may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units, CPU) 322 (e.g., one or more processors) and a memory 332, and one or more storage media 330 (e.g., one or more mass storage devices) storing application programs 342 or data 344. Wherein the memory 332 and the storage medium 330 may be transitory or persistent. The program stored on the storage medium 330 may include one or more modules (not shown), each of which may include a series of instruction operations in the data processing apparatus. Still further, the central processor 322 may be configured to communicate with the storage medium 330 and execute a series of instruction operations in the storage medium 330 on the electronic device 301.
The electronic device 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input/output interfaces 358, and/or one or more operating systems 341. For example, windows ServerTM, mac OS XTM, unixTM, linuxTM, freeBSDTM, etc.
In fig. 9, an application 342 may be a program that performs a data processing method, and data 344 may be data required or generated to perform the data processing method.
The steps in the data processing method described above may be implemented by the structure of the electronic device.
The following describes a readable storage medium according to an embodiment of the present application, and the readable storage medium and the data processing method, apparatus and device described above may be referred to with each other.
A readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the data processing method disclosed in the foregoing embodiments. For specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no further description is given here.
The references to "first," "second," "third," "fourth," etc. (if present) are used to distinguish similar objects from each other and are not necessarily used to describe a particular order or sequence. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, or apparatus.
It should be noted that the description of "first", "second", etc. in this disclosure is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implying an indication of the number of technical features being indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present application.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of readable storage medium known in the art.
The principles and embodiments of the present application have been described herein with reference to specific examples, the description of which is intended only to assist in understanding the methods of the present application and the core ideas thereof; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (17)

1. A method of data processing, comprising:
if a response packet of the ICMP protocol is received, the response packet is analyzed to obtain virtual ID information; the virtual ID information is determined based on a request packet corresponding to the response packet;
inquiring real ID information corresponding to the virtual ID information and network card identification information of a target network card for sending the request packet; the real ID information is a protocol ID field in an ICMP data packet header, and the virtual ID information is obtained by modifying the protocol ID field;
and modifying the virtual ID information in the response packet into the real ID information to obtain a new response packet, and transmitting the new response packet to the target network card based on the network card identification information.
2. A data processing method according to claim 1, wherein,
acquiring a network request packet through SSL connection, and extracting a protocol type field in the network request packet;
determining whether the network request packet is a response packet of an ICMP protocol based on the protocol type field.
3. The data processing method according to claim 1, wherein the querying the real ID information corresponding to the virtual ID information and the network card identification information of the target network card that sends the request packet includes:
inquiring the network card identification information and the real ID information in a pre-stored mapping file.
4. A data processing method according to claim 3, further comprising:
and if the network card identification information and/or the real ID information are not queried in the mapping file, discarding the response packet.
5. The data processing method according to claim 3 or 4, wherein the mapping file is: MAP mapping table, mapping array or mapping linked list.
6. The data processing method according to claim 1, wherein before the transmitting the new response packet to the target network card based on the network card identification information, further comprises:
updating the checksum in the new response packet.
7. A method of data processing, comprising:
intercepting a request packet of an ICMP protocol sent by a target network card;
analyzing the request packet to obtain real ID information, and determining virtual ID information based on the real ID information; the virtual ID information, the real ID information and the network card identification information of the target network card correspond to each other; the real ID information is a protocol ID field in an ICMP data packet header, and the virtual ID information is obtained by modifying the protocol ID field;
and modifying the real ID information in the request packet into the virtual ID information to obtain a new request packet, and sending the new request packet.
8. The data processing method according to claim 7, wherein intercepting the ICMP protocol request packet sent by the destination network card includes:
and monitoring a plurality of network cards of the self in real time to intercept the request packet.
9. The data processing method according to claim 7, wherein the determining virtual ID information based on real ID information includes:
and inquiring the virtual ID information in a pre-stored mapping file based on the real ID information.
10. The data processing method according to claim 9, wherein the querying the pre-stored mapping file for the virtual ID information based on the real ID information includes:
inquiring the virtual ID information in the mapping file by taking the real ID information as an inquiry keyword;
and/or
And creating the virtual ID information based on the network card identification information and the real ID information, and inquiring the virtual ID information in the mapping file by taking the created virtual ID information as an inquiry keyword.
11. The data processing method according to claim 9, characterized by further comprising:
if the virtual ID information is not queried in the mapping file, creating the virtual ID information based on the network card identification information and the real ID information, and storing the network card identification information, the real ID information and the created virtual ID information into the mapping file.
12. The data processing method according to any one of claims 9 to 11, wherein the mapping file is: MAP mapping table, mapping array or mapping linked list.
13. The data processing method of claim 7, wherein the sending the new request packet comprises:
updating the checksum in the new request packet, and sending the updated new request packet through the SSL connection.
14. A data processing apparatus, comprising:
the receiving module is used for analyzing the response packet to obtain virtual ID information if the response packet of the ICMP protocol is received; the virtual ID information is determined based on a request packet corresponding to the response packet;
the inquiring module is used for inquiring the real ID information corresponding to the virtual ID information and sending the network card identification information of the target network card of the request packet; the real ID information is a protocol ID field in an ICMP data packet header, and the virtual ID information is obtained by modifying the protocol ID field;
and the restoration module is used for modifying the virtual ID information in the response packet into the real ID information to obtain a new response packet, and transmitting the new response packet to the target network card based on the network card identification information.
15. A data processing apparatus, comprising:
the interception module is used for intercepting a request packet of the ICMP protocol sent by the target network card;
the determining module is used for analyzing the request packet to obtain real ID information and determining virtual ID information based on the real ID information; the virtual ID information, the real ID information and the network card identification information of the target network card correspond to each other; the real ID information is a protocol ID field in an ICMP data packet header, and the virtual ID information is obtained by modifying the protocol ID field;
and the modification module is used for modifying the real ID information in the request packet into the virtual ID information to obtain a new request packet and sending the new request packet.
16. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the data processing method of any one of claims 1 to 13.
17. A readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the data processing method according to any one of claims 1 to 13.
CN202111263630.4A 2021-10-28 2021-10-28 Data processing method, device, equipment and readable storage medium Active CN114006955B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111263630.4A CN114006955B (en) 2021-10-28 2021-10-28 Data processing method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111263630.4A CN114006955B (en) 2021-10-28 2021-10-28 Data processing method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN114006955A CN114006955A (en) 2022-02-01
CN114006955B true CN114006955B (en) 2023-09-05

Family

ID=79924602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111263630.4A Active CN114006955B (en) 2021-10-28 2021-10-28 Data processing method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114006955B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114726930A (en) * 2022-03-30 2022-07-08 深信服科技股份有限公司 Data packet tracking method, system, device and readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003103790A1 (en) * 2002-06-11 2003-12-18 富士通株式会社 Method and device for managing card for network card game
CN104378449A (en) * 2014-12-09 2015-02-25 飞天诚信科技股份有限公司 Virtual IP realization method
CN105472628A (en) * 2015-11-19 2016-04-06 深圳市华讯方舟科技有限公司 Method and device for expanding WLAN ID number
WO2016115831A1 (en) * 2015-01-23 2016-07-28 华为技术有限公司 Fault tolerant method, apparatus and system for virtual machine
KR101970515B1 (en) * 2018-01-17 2019-04-19 주식회사 엑스게이트 Managing method and management apparatus for virtual network providing system
CN109905352A (en) * 2017-12-11 2019-06-18 亿阳安全技术有限公司 A kind of method, apparatus and storage medium based on cryptographic protocol Audit data
CN111491274A (en) * 2020-04-08 2020-08-04 高新兴物联科技有限公司 Privacy protection method, device and equipment in vehicle-mounted communication process
CN111600913A (en) * 2020-07-22 2020-08-28 南京赛宁信息技术有限公司 Self-adaptive access method and system for real equipment in attack and defense scene of network shooting range
CN113271245A (en) * 2021-05-21 2021-08-17 平安科技(深圳)有限公司 Message processing method and device, network card and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106330779B (en) * 2015-06-23 2019-07-26 联想企业解决方案(新加坡)有限公司 Server, physical switch, and communication system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003103790A1 (en) * 2002-06-11 2003-12-18 富士通株式会社 Method and device for managing card for network card game
CN104378449A (en) * 2014-12-09 2015-02-25 飞天诚信科技股份有限公司 Virtual IP realization method
WO2016115831A1 (en) * 2015-01-23 2016-07-28 华为技术有限公司 Fault tolerant method, apparatus and system for virtual machine
CN105472628A (en) * 2015-11-19 2016-04-06 深圳市华讯方舟科技有限公司 Method and device for expanding WLAN ID number
CN109905352A (en) * 2017-12-11 2019-06-18 亿阳安全技术有限公司 A kind of method, apparatus and storage medium based on cryptographic protocol Audit data
KR101970515B1 (en) * 2018-01-17 2019-04-19 주식회사 엑스게이트 Managing method and management apparatus for virtual network providing system
CN111491274A (en) * 2020-04-08 2020-08-04 高新兴物联科技有限公司 Privacy protection method, device and equipment in vehicle-mounted communication process
CN111600913A (en) * 2020-07-22 2020-08-28 南京赛宁信息技术有限公司 Self-adaptive access method and system for real equipment in attack and defense scene of network shooting range
CN113271245A (en) * 2021-05-21 2021-08-17 平安科技(深圳)有限公司 Message processing method and device, network card and computer readable storage medium

Also Published As

Publication number Publication date
CN114006955A (en) 2022-02-01

Similar Documents

Publication Publication Date Title
CN108449282B (en) Load balancing method and device
US8660130B2 (en) Transmitting a packet
US7289509B2 (en) Apparatus and method of splitting a data stream over multiple transport control protocol/internet protocol (TCP/IP) connections
US7991877B2 (en) Rogue router hunter
US8549286B2 (en) Method and system for forwarding data between private networks
US7917597B1 (en) RDMA network configuration using performance analysis
WO2015165296A1 (en) Method and device for identifying protocol type
US20130297671A1 (en) Method, apparatus and system for processing packets
US11178101B1 (en) Method and apparatus of establishing a connection between devices using cached connection information
CN107682470B (en) Method and device for detecting public network IP availability in NAT address pool
CN112804223B (en) Message processing method and device
US9948568B2 (en) Packet size control using maximum transmission units for facilitating packet transmission
US20080028034A1 (en) Method for mapping an iscsi target name to a storage resource based on an initiator hardware class identifier
CN107124483A (en) Domain name analytic method and server
US7924829B2 (en) Technique for enabling network statistics on software partitions
CN114006955B (en) Data processing method, device, equipment and readable storage medium
US8416754B2 (en) Network location based processing of data communication connection requests
TWI735633B (en) Data transmission method, equipment, device and system
CN111953810B (en) Method, device and storage medium for identifying proxy internet protocol address
JP7228712B2 (en) Abnormal host monitoring
CN113114643A (en) Operation and maintenance access method and system of operation and maintenance auditing system
CN115190042B (en) Network target range target access state detection system and method
CN113660134B (en) Port detection method, device, electronic device and storage medium
US20080140687A1 (en) Socket structure simultaneously supporting both toe and ethernet network interface card and method of forming the socket structure
CN105227420B (en) Processing method, device and the system of data frame

Legal Events

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