Method and apparatus for processing data in cleaning device
AssigneeBeijing Baidu Netcom Science Technology Co., Ltd.
InventorsQingzhi Zhou, Shaoyan Wang
Life of this patent
Estimating the term…
Abstract
Embodiments of the present disclosure relate to a method and apparatus for processing data. The method can include: receiving a SYN message with a destination address being a target IP; establishing a session based on a quadruple of the SYN message; and forwarding the SYN message to a server corresponding to the target IP.
Claims11
A method for processing data in a cleaning device, the method comprising:
- receiving a SYN message from a client with a destination address being a target IP;
- establishing a session with the client based on a quadruple of the SYN message;
- and
- forwarding the SYN message to a server corresponding to the target IP,
- wherein the method further comprises:
- in response to an ACK message responding to the SYN message from the client being received within a first preset time after establishing the session and there being a session associated with a quadruple of the ACK message, forwarding the ACK message to the server corresponding to the target IP;
- and
- in response to a TCP message associated with the session associated with the quadruple of the ACK message from the client being not received within a second preset time after receiving the ACK message responding to the SYN message within the first preset time after establishing the session, determining that the client is an attack client and deleting the session associated with the quadruple of the ACK message;
- in response to receiving a message except for the SYN message, the destination address thereof being the target IP, determining whether there is a session associated with a quadruple of the message except for the SYN message;
- in response to there being the session associated with the quadruple of the message except for the SYN message, forwarding the message except for the SYN message to the server corresponding to the target IP;
- and
- in response to there being no session associated with the quadruple of the message except for the SYN message, discarding the message except for the SYN message.
An apparatus for processing data in a cleaning device, comprising:
- at least one processor;
- and
- a memory storing instructions, the instructions when executed by the at least one processor, cause the at least one processor to perform operations, the operations comprising:
- receiving a SYN message from a client with a destination address being a target IP;
- establishing a session with the client based on a quadruple of the SYN message;
- and
- forwarding the SYN message to a server corresponding to the target IP,
- wherein the operations further comprise:
- in response to an ACK message responding to the SYN message from the client being received within a first preset time after establishing the session and there being a session associated with a quadruple of the ACK message, forwarding the ACK message to the server corresponding to the target IP;
- and
- in response to a TCP message associated with the session associated with the quadruple of the ACK message from the client being not received within a second preset time after receiving the ACK message responding to the SYN message within the first preset time after establishing the session, determining that the client is an attack client and deleting the session associated with the quadruple of the ACK message;
- in response to receiving a message except for the SYN message, the destination address thereof being the target IP, determining whether there is a session associated with a quadruple of the message except for the SYN message;
- in response to there being the session associated with the quadruple of the message except for the SYN message, forwarding the message except for the SYN message to the server corresponding to the target IP;
- and
- in response to there being no session associated with the quadruple of the message except for the SYN message, discarding the message except for the SYN message.
A non-transitory computer readable medium, storing a computer program thereon, wherein the program, when executed by a processor, causes the processor to perform operations, the operations comprising:
- receiving a SYN message from a client with a destination address being a target IP;
- establishing a session with the client based on a quadruple of the SYN message;
- and
- forwarding the SYN message to a server corresponding to the target IP,
- wherein the operations further comprise:
- in response to an ACK message responding to the SYN message from the client being received within the first preset time after establishing the session and there being a session associated with a quadruple of the ACK message, forwarding the ACK message to the server corresponding to the target IP;
- and
- in response to a TCP message associated with the session associated with the quadruple of the ACK message from the client being not received within a second preset time after receiving the ACK message responding to the SYN message within the first preset time after establishing the session, determining that the client is an attack client and deleting the session associated with the quadruple of the ACK message;
- in response to receiving a message except for the SYN message, the destination address thereof being the target IP, determining whether there is a session associated with a quadruple of the message except for the SYN message;
- in response to there being the session associated with the quadruple of the message except for the SYN message, forwarding the message except for the SYN message to the server corresponding to the target IP;
- and
- in response to there being no session associated with the quadruple of the message except for the SYN message, discarding the message except for the SYN message.
Dependencies are inferred from the claim text.