Data processing method, device and equipment
By sending port probe packets at the gateway and using flow table matching, combined with message queue management, the problem of lengthy gateway port probe paths in large-scale network environments is solved, achieving efficient and secure port status detection and improving probe efficiency and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DAWNING CLOUD COMPUTING TECH CO LTD
- Filing Date
- 2026-03-10
- Publication Date
- 2026-05-15
AI Technical Summary
In large-scale network environments, gateway port probing paths are lengthy and inefficient, making it difficult to meet the need for rapid probing. Furthermore, centralized nodes can easily become performance bottlenecks, affecting the real-time performance and reliability of network management.
By sending port probe packets at the gateway and using preset time intervals and flow table matching, the port of the server to be probed can be directly accessed. By constructing port probe packets and combining them with message queue management, elastic load balancing of distributed gateway deployment can be achieved, shortening the probe path and improving probe efficiency.
It achieves lightweight and highly reliable port status detection, improves detection efficiency and accuracy, reduces network resource consumption and forged packet interference, and ensures the security and reliability of detection.
Smart Images

Figure CN122053430A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network technology, and more specifically to a data processing method, apparatus, and device. Background Technology
[0002] With the continuous expansion of network scale and the increasing complexity of services, the efficiency of port probing of gateways, as the core hub connecting internal and external networks, directly affects the real-time performance and reliability of network management. During port probing, multiple probe traffic must undergo unified processing and forwarding through network nodes before reaching the target port to complete the probing task. This results in a lengthy probing path, with probe packets traversing network nodes multiple times, leading to increased end-to-end latency and making it difficult to meet the rapid probing requirements of large-scale network environments. Therefore, shortening the probing path and improving probing efficiency has become an urgent technical problem to be solved. Summary of the Invention
[0003] In view of the above problems, this application provides a data processing method, apparatus, and device. A storage medium and a program product are also provided.
[0004] According to a first aspect of this application, a data processing method is provided, comprising: sending port probe messages to multiple servers to be probed at preset time intervals, wherein the port probe messages are used to detect the connectivity status of ports in the servers to be probed, and the source address of the port probe messages is a gateway address; upon receiving multiple reply messages from the servers to be probed within a first preset time period, determining a message queue of reply messages, wherein the message queue includes a key value indicating the identifier of the server to be probed and the port number of the server to be probed used to send the reply messages; and determining the port probe result of the server to be probed based on the message queue.
[0005] According to embodiments of this application, port probe messages are sent to multiple probe servers at preset time intervals. These port probe messages can be used to detect the connectivity status of ports on the servers to be probed. By setting the source address of the port probe messages to the gateway address, multiple port probe messages converge at the gateway for unified monitoring. If multiple reply messages are received from the servers to be probed within a first preset time period, the message queue of the reply messages can be determined. By setting the first preset time period, the port status can be quickly determined. Based on the identifier of the server to be probed indicated by the key value in the message queue and the port number of the server to be probed used to send the reply messages, it is easy to distinguish reply messages from different ports of the same server to be probed, thereby determining the port connection status of the server to be probed. Furthermore, the method provided in this application does not require passing through network nodes during port probe; it can directly access the ports on the servers to be probed through the gateway, shortening the probe path and improving probe efficiency.
[0006] According to an embodiment of this application, the port probe message includes: the logical address of the gateway as the source logical address; the logical address of the server to be probed as the destination logical address; the physical address of the gateway as the source physical address; the physical address of the server to be probed as the destination physical address; and the port number of the server to be probed.
[0007] According to the embodiments of this application, the port probe message uses the gateway as the source address, so that the port probe message is initiated from the network boundary, avoiding the exposure of the real address of the internal host and improving security; at the same time, the gateway's routing optimization capability is used to ensure that the message is delivered efficiently, reduce the impact of probe traffic on the core business network, and realize lightweight and highly reliable port status detection.
[0008] According to an embodiment of this application, sending port probe packets to multiple servers to be probed includes: matching the port probe packets with a flow table to obtain a first matching result, wherein the first matching result includes the destination port number being the port providing services in the server to be probed, the transport protocol being the transport protocol used by the server to be probed, and the flow table representing a rule table for sending port probe packets; and sending port probe packets to the servers to be probed when the first matching result is consistent with the destination logical address in the port probe packet and the transport protocol carried by the port probe packet is consistent with the transport protocol in the flow table.
[0009] According to embodiments of this application, by pre-matching port probe packets with flow tables, it is ensured that probes are only initiated when both the destination address and the transport protocol are compatible, thereby avoiding the injection of invalid packets into the network, reducing bandwidth waste and server processing overhead, and significantly improving probe accuracy and network resource utilization efficiency.
[0010] According to an embodiment of this application, when multiple reply messages are received from the server to be probed within a first preset time period, determining the message queue of the reply messages includes: in response to receiving a reply message from the server to be probed within the first preset time period, matching the reply message with a flow table to obtain a second matching result, the second matching result including a source logical address being the logical address of the server to be probed, a destination logical address being the logical address of the gateway, a destination port number being the gateway port, and the reply message corresponding to a port probe message; if the source logical address is the logical address of the server to be probed, the destination logical address is the logical address of the gateway, and the destination port number is the gateway port in the second matching result, sending a first port probe message to the server to be probed based on the transmission protocol of the server to be probed, the content of the first port probe message being different from that of the port probe message; determining the message queue of the first reply message based on the reply status of the first port probe message, the first reply message corresponding to the first port probe message.
[0011] According to the embodiments of this application, the legality of the response message is verified by flow table matching to ensure the authenticity and security of the probe interaction; secondary probe messages are sent based on protocol differentiation to accurately identify service type and port status; and the response results are managed by message queue to realize structured storage and asynchronous processing of probe data, thereby improving the probe efficiency and scalability in large-scale network environments.
[0012] According to an embodiment of this application, if the second matching result satisfies the following matching conditions, it is determined that the port of the server to be probed is connected; the source logical address is the logical address of the server to be probed; the destination logical address is the logical address of the gateway; and the destination port number is the gateway port.
[0013] According to the embodiments of this application, the port connectivity is verified by determining whether the second matching result meets the matching conditions, effectively filtering forged packets and network noise interference, accurately determining the port connectivity status, and improving the reliability and accuracy of network detection.
[0014] According to embodiments of this application, the data processing method further includes: when communicating with the server to be probed based on the User Datagram Protocol (UDP), sending an Internet Control Message Protocol (IDP) echo request message to the server to be probed; if an IDP echo response message is received from the server to be probed within a first preset time period, matching the IDP echo response message with a flow table to obtain a IDP matching result; if the IDP matching result indicates that the destination logical address is a gateway logical address and the destination port number is a gateway port, sending a IDP port probe message to the server to be probed; and within a second preset time period, determining the port probe result of the server to be probed based on the response to the IDP port probe message.
[0015] According to the embodiments of this application, a communication channel is established with the server to be probed via User Datagram Protocol (UDP), the reachability of port probe packets is verified by flow table matching, and then UDP port probe packets are sent in a targeted manner to realize a layered and progressive probe strategy. Moreover, the port probe process does not need to pass through network nodes, which shortens the probe path and improves the probe efficiency.
[0016] According to an embodiment of this application, within a second preset time period, the port probe result of the server to be probed is determined based on the response status of the User Datagram Protocol (UDP) port probe message, including: if no Internet Control Message Protocol (ICP) port unreachable message is received within the second preset time period, the port probe result of the server to be probed is determined to be in a normal state; if an ICP port unreachable message is received, the port probe result of the server to be probed is determined to be in an abnormal state.
[0017] According to embodiments of this application, the Internet Control Message Protocol (ICP) port unreachable message is used as a negative feedback mechanism for User Datagram Protocol (UDP) probes to accurately distinguish between open and closed port states and improve the accuracy of probe results.
[0018] According to an embodiment of this application, the data processing method further includes: when communicating with the server to be probed based on the Transmission Control Protocol (TCP), sending a connection request message to the server to be probed; receiving a reply message allowing connection from the server to be probed within a first preset time period, matching the reply message with the flow table to obtain a TCP matching result; and when the TCP matching result indicates that the destination logical address is the gateway logical address and the destination port number is the gateway port, sending a connection establishment message to the server to be probed, and determining the port probe result of the server to be probed as normal.
[0019] According to the embodiments of this application, the integrity and legality of the Transmission Control Protocol (TCP) connection establishment are ensured through a three-way handshake process and flow table dual verification, the port open status is accurately identified, forged responses are effectively prevented, and the security and reliability of the detection are improved.
[0020] A second aspect of this application provides a data processing apparatus, comprising: a sending module, configured to send port probe messages to multiple servers to be probed at preset time intervals, wherein the port probe messages are used to detect the connectivity status of ports in the servers to be probed, and the source address of the port probe messages is a gateway address; a message queue determination module, configured to determine a message queue of reply messages when multiple reply messages are received from the servers to be probed within a first preset time period, wherein the message queue includes a key value indicating the identifier of the server to be probed and the port number of the server to be probed used to send the reply messages; and a probe result determination module, configured to determine the port probe result of the server to be probed based on the message queue.
[0021] A third aspect of this application provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.
[0022] A fourth aspect of this application also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.
[0023] The fifth aspect of this application also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method. Attached Figure Description
[0024] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments of this application with reference to the accompanying drawings.
[0025] Figure 1 The diagram illustrates an application scenario of the data processing method, apparatus, and device according to embodiments of this application.
[0026] Figure 2 A flowchart of a data processing method according to an embodiment of this application is shown.
[0027] Figure 3 A schematic diagram illustrating flow table-based matching according to an embodiment of this application is shown.
[0028] Figure 4 A schematic diagram of User Datagram Protocol (UDP) port probing according to an embodiment of this application is shown.
[0029] Figure 5 A schematic diagram of port detection based on Transmission Control Protocol (TCP) according to an embodiment of this application is shown.
[0030] Figure 6 A flowchart of a data processing method according to another embodiment of this application is shown.
[0031] Figure 7 A structural block diagram of a data processing apparatus according to an embodiment of this application is shown.
[0032] Figure 8 A block diagram of an electronic device suitable for implementing a data processing method according to an embodiment of this application is shown. Detailed Implementation
[0033] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0034] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0035] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0036] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0037] As network scale continues to expand and business complexity increases, the efficiency of gateway port probing, as the core hub connecting internal and external networks, directly impacts the real-time performance and reliability of network management. Currently, integrated gateways are widely used at enterprise network boundaries, undertaking critical functions such as traffic forwarding, security policy enforcement, and network status monitoring. However, in port probing scenarios, integrated gateways generally adopt a centralized probing architecture, meaning all probing traffic must undergo unified processing and forwarding through specific network nodes before reaching the target port to complete the probing task.
[0038] This architecture suffers from significant structural flaws. First, the probe path is lengthy, requiring probe packets to traverse network nodes multiple times, leading to increased end-to-end latency and making it difficult to meet the rapid probe requirements in large-scale network environments. Second, centralized nodes easily become performance bottlenecks. When the concurrency of probe tasks is high, the upper limit of node processing capacity will severely restrict probe efficiency, and may even cause probe timeouts or packet loss. Furthermore, long-path probes increase network bandwidth consumption and become highly dependent on the stability of intermediate nodes; failure in any link can lead to probe failure, reducing the overall reliability and fault tolerance of the probe.
[0039] Therefore, how to shorten the detection path and improve detection efficiency has become an urgent technical problem to be solved in the field of network management.
[0040] In view of this, embodiments of this application provide a data processing method, which sends port probe messages to multiple servers to be probed at preset time intervals. The port probe messages are used to detect the connectivity status of ports in the servers to be probed, and the source address of the port probe messages is the gateway address. If multiple reply messages are received from the servers to be probed within a first preset time period, a message queue of reply messages is determined. The message queue includes a key value, which indicates the identifier of the server to be probed and the port number of the server to be probed used to send the reply messages. Based on the message queue, the port probe result of the server to be probed is determined.
[0041] Figure 1 The diagram illustrates an application scenario of the data processing method, apparatus, and device according to embodiments of this application.
[0042] like Figure 1 As shown, the application scenario according to this embodiment may include a controller 110, a first port 121, a second port 122, a first port 123 in the first server to be probed, and an elastic load balancer 130. The controller 110 is used to obtain the port probe results of the first port 121, the second port 122, and the first port 123 in the first and second servers to be probed. The elastic load balancer 130 is used to obtain the port probe results of multiple different servers to be probed from the controller 110 and distribute the load to different servers to be probed based on the port probe results. There is no limitation on the number of servers to be probed or the number of ports; the connectivity of ports of different servers to be probed can be detected simultaneously, and the connectivity of multiple ports in the same server to be probed can also be detected.
[0043] The method in this application implements port probing of the backend cloud host servers of an elastic load balancer deployed in the transport layer of a distributed gateway. The controller can utilize the controller in the SDN architecture to issue relevant flow tables and rules within the cloud computing network, controlling the flow of data traffic. In the cloud load balancer implemented based on OpenVSwitch Group tables, its communication with the backend cloud service instances is also implemented based on the southbound communication protocol (OpenFlow) flow tables of the SDN architecture.
[0044] The following will be based on Figure 1 The described scene, through Figures 2-5 The data processing method according to the embodiments of this application will be described in detail.
[0045] Figure 2 A flowchart of a data processing method according to an embodiment of this application is shown.
[0046] like Figure 2 As shown, the data processing method of this embodiment includes operations S210 to S230.
[0047] When operating S210, port probe messages are sent to multiple servers to be probed at preset time intervals.
[0048] In operation S220, if multiple reply messages are received from the server to be probed within a first preset time period, the message queue of the reply messages is determined.
[0049] In operation S230, the port probe results of the server to be probed are determined based on the message queue.
[0050] The server to be probed can represent the backend real server (RS) of the elastic load balancer. Port probe messages are used to detect the connectivity status of ports on the server to be probed. The source address of the port probe message is the gateway address. The source logical address of the port probe message is the gateway logical address, the destination logical address is the server to be probed logical address, the source physical address is the gateway logical address, and the destination physical address is the server to be probed physical address. The destination port number is the port number of the server to be probed. Port probe messages can be sent to the ports of different servers to be probed, or to different ports within the same server to be probed. Sending port probe messages to multiple servers to be probed at preset time intervals facilitates subsequent cyclic reading of the message queue, allowing the elastic load balancer to distribute the load based on port status. For example, with a preset time interval of 5 seconds, the response status of multiple servers to be probed at different time periods can be determined based on this 5-second interval. If multiple response messages are received from the servers to be probed within the first preset time period, the message queue of the response messages is determined. The preset time interval for health checks needs to be controlled within seconds or milliseconds to enable real-time monitoring, rapid detection of system anomalies, and ensure high service availability.
[0051] The message queue can include key-value pairs, which indicate the identifier of the server to be probed and the port number of the server to be probed for sending reply messages. For example, the message queue stores key-value pairs RS1_10, RS1_31, and RS2_1. This indicates that the port identified as RS1 with port number 10 is in a normal state, as are the ports identified as RS1 with port number 31 and RS2 with port number 1. By consuming messages in the message queue in a timely manner and reading the message queue, the port probe results of the server to be probed can be determined. Additionally, the key-value pairs in the message queue can also include the identifier of the server to be probed, the port number to be probed on the server to be probed, and the protocol service to be started. The protocol service can include TCP and UDP protocols. The same port on the same server to be probed can have both TCP and UDP services running simultaneously; therefore, the key-value pairs in the message queue can also include protocol names for differentiation.
[0052] According to embodiments of this application, port probe messages are sent to multiple probe servers at preset time intervals. These port probe messages can be used to detect the connectivity status of ports on the servers to be probed. By setting the source address of the port probe messages to the gateway address, multiple port probe messages converge at the gateway for unified monitoring. If multiple reply messages are received from the servers to be probed within a first preset time period, the message queue of the reply messages can be determined. By setting the first preset time period, the port status can be quickly determined. Based on the identifier of the server to be probed indicated by the key value in the message queue and the port number of the server to be probed used to send the reply messages, it is easy to distinguish reply messages from different ports of the same server to be probed, thereby determining the port connection status of the server to be probed. Furthermore, the method provided in this application does not require passing through network nodes during port probe; it can directly access the ports on the servers to be probed through the gateway, shortening the probe path and improving probe efficiency.
[0053] According to an embodiment of this application, the port probe message includes: the logical address of the gateway as the source logical address; the logical address of the server to be probed as the destination logical address; the physical address of the gateway as the source physical address; the physical address of the server to be probed as the destination physical address; and the port number of the server to be probed.
[0054] Port probe packets can be constructed using an SDN controller. The source logical address of the port probe packet is the gateway's logical address, and the source physical address is the gateway's physical address. The destination logical address of the port probe packet is the logical address of the server being probed, and the destination physical address is the physical address of the server being probed. The source port number can be defined as a constant, such as 64536, to match the traffic in the reply packets. The destination port number is the port number of the service provided by the server being probed.
[0055] According to the embodiments of this application, the port probe message uses the gateway as the source address, so that the port probe message is initiated from the network boundary, avoiding the exposure of the real address of the internal host and improving security; at the same time, the gateway's routing optimization capability is used to ensure that the message is delivered efficiently, reduce the impact of probe traffic on the core business network, and realize lightweight and highly reliable port status detection.
[0056] According to an embodiment of this application, sending port probe packets to multiple servers to be probed includes: matching the port probe packets with a flow table to obtain a first matching result, wherein the first matching result includes the destination port number being the port providing services in the server to be probed, the transport protocol being the transport protocol used by the server to be probed, and the flow table representing a rule table for sending port probe packets; and sending port probe packets to the servers to be probed when the first matching result is consistent with the destination logical address in the port probe packet and the transport protocol carried by the port probe packet is consistent with the transport protocol in the flow table.
[0057] A flow table represents a rule table for sending port probe packets. In cloud computing networks, the relevant flow tables and rules are typically issued by the SDN controller to control the direction of data traffic. A flow table includes multiple matching items, the main matching items of which may include the transport protocol, source logical address, destination logical address, source physical address, destination physical address, or destination port number, but are not limited to these. The embodiments of this application do not limit this.
[0058] The port probe packets are matched with the flow table to obtain the first matching result. The first matching result includes the destination port number being the port providing services in the server to be probed, and the transport protocol being the transport protocol used by the server to be probed.
[0059] If the first matching result is that the destination logical address in the port probe message matches the destination logical address in the flow table and the transport protocol carried by the port probe message matches the transport protocol in the flow table, a port probe message can be sent to the server to be probed.
[0060] By matching port probe packets with flow tables, if a match is found, the port probe packets can be forwarded to the corresponding server to be probed.
[0061] According to embodiments of this application, by pre-matching port probe packets with flow tables, it is ensured that probes are only initiated when both the destination address and the transport protocol are compatible, thereby avoiding the injection of invalid packets into the network, reducing bandwidth waste and server processing overhead, and significantly improving probe accuracy and network resource utilization efficiency.
[0062] According to an embodiment of this application, when multiple reply messages are received from the server to be probed within a first preset time period, determining the message queue of the reply messages includes: in response to receiving a reply message from the server to be probed within the first preset time period, matching the reply message with a flow table to obtain a second matching result, the second matching result including a source logical address being the logical address of the server to be probed, a destination logical address being the logical address of the gateway, a destination port number being the gateway port, and the reply message corresponding to a port probe message; if the source logical address is the logical address of the server to be probed, the destination logical address is the logical address of the gateway, and the destination port number is the gateway port in the second matching result, sending a first port probe message to the server to be probed based on the transmission protocol of the server to be probed, the content of the first port probe message being different from that of the port probe message; determining the message queue of the first reply message based on the reply status of the first port probe message, the first reply message corresponding to the first port probe message.
[0063] The SDN controller issues a return flow table and matches the received response packets from the servers to be probed against the return flow table. If a match is successful, the gateway receives the response packet. The gateway can also forward the response packet back to the SDN controller. This matching mainly determines whether the source logical address is the logical address of the server to be probed, whether the destination logical address is the logical address of the gateway, and whether the destination port number is the gateway port.
[0064] Based on the transmission protocol of the server to be probed, a first port probe message can also be sent to the server to be probed. The content of the first port probe message is different from that of the port probe message. The message queue of the first reply message is determined according to the reply of the first port probe message.
[0065] Figure 3 A schematic diagram illustrating flow table-based matching according to an embodiment of this application is shown.
[0066] like Figure 3 As shown, the controller 310 performs port detection based on the port health check module 320, and can use the gateway as the source address to communicate with the first server to be detected 360 or the second server to be detected 370.
[0067] Taking communication with the first server to be detected, 360, as an example:
[0068] First, a port probe message 340 can be constructed. This port probe message is used to detect the connectivity status of the ports in the first server to be probed 360. The port probe message 340 includes: the logical address of the gateway as the source logical address; the logical address of the first server to be probed 360 as the destination logical address; the physical address of the gateway as the source physical address; the physical address of the first server to be probed 360 as the destination physical address; and the port number of the first server to be probed 360.
[0069] Controller 310 sends flow table 330 to open virtual switch 380. Flow table 330 is used to match the port probe packet 340. The first server to be probed 360 receives the port probe packet 340 and sends a reply packet 350 related to the port probe packet 340. The reply packet 350 includes: the logical address of the first server to be probed 360 as the source logical address; the logical address of the gateway as the destination logical address; the physical address of the first server to be probed 360 as the source physical address; the physical address of the gateway as the destination physical address; and the port number of the gateway as the destination port number.
[0070] Controller 310 continues to distribute flow table 330, sending the flow table 330 rules related to the reply message to the open virtual switch 380 to match the aforementioned reply message 350. If the match is successful, the reply message 350 can be forwarded to controller 310. Upon receiving the reply message 350, controller 310 can determine the port probe result of the first server to be probed 360.
[0071] The above process is only for sending port probe messages to a single server to be probed and determining the port probe results. Probes can be sent to the ports of multiple servers to be probed simultaneously or to different ports of the same server to be probed. These will not be elaborated on here.
[0072] According to the embodiments of this application, the legality of the response message is verified by flow table matching to ensure the authenticity and security of the probe interaction; secondary probe messages are sent based on protocol differentiation to accurately identify service type and port status; and the response results are managed by message queue to realize structured storage and asynchronous processing of probe data, thereby improving the probe efficiency and scalability in large-scale network environments.
[0073] According to an embodiment of this application, if the second matching result satisfies the following matching conditions, it is determined that the port of the server to be probed is connected; the source logical address is the logical address of the server to be probed; the destination logical address is the logical address of the gateway; and the destination port number is the gateway port.
[0074] If the second matching result satisfies the following conditions: the source logical address is the logical address of the server to be probed, the destination logical address is the logical address of the gateway, and the destination port number is the gateway port, then it can be determined that the port of the server to be probed is connected. If any of the above conditions are not met, it can be determined that the port of the server to be probed is not connected.
[0075] According to the embodiments of this application, the port connectivity is verified by determining whether the second matching result meets the matching conditions, effectively filtering forged packets and network noise interference, accurately determining the port connectivity status, and improving the reliability and accuracy of network detection.
[0076] According to embodiments of this application, the data processing method further includes: when communicating with the server to be probed based on the User Datagram Protocol (UDP), sending an Internet Control Message Protocol (IDP) echo request message to the server to be probed; if an IDP echo response message is received from the server to be probed within a first preset time period, matching the IDP echo response message with a flow table to obtain a IDP matching result; if the IDP matching result indicates that the destination logical address is a gateway logical address and the destination port number is a gateway port, sending a IDP port probe message to the server to be probed; and within a second preset time period, determining the port probe result of the server to be probed based on the response to the IDP port probe message.
[0077] Figure 4 A schematic diagram of User Datagram Protocol (UDP) port probing according to an embodiment of this application is shown.
[0078] like Figure 4 As shown, when multiple servers to be probed in an Elastic Cloud Server communicate using the User Datagram Protocol (UDP), an Internet Control Message Protocol Echo Request (ICMP Echo Req) message can be sent to the servers to be probed. If an ICMP Echo Repy message is received from the servers to be probed within a first preset time period, the ICMP Echo Repy message can be matched with the flow table to obtain the UDP matching result.
[0079] If the first preset time period is exceeded or no Internet Control Message Protocol (ICP) echo response message is received from the server under test, it can be determined that the port of the server under test is in an abnormal state. If the port of the server under test is determined to be in an abnormal state, subsequent ACK and RST sending actions will not be performed.
[0080] If the UDP matching result indicates that the destination logical address is the corresponding gateway logical address and the destination port number is the corresponding gateway port, UDP port probe messages can be sent to the server to be probed.
[0081] Within the second preset time period, the port probe results of the server to be probed can be determined based on the received Internet Control Message Protocol Port Unreachable (ICMP) messages.
[0082] Based on the port detection results, the port status of the server being probed can be modified in real time and displayed to the front-end user.
[0083] In addition, elastic load balancers can distribute the load to servers with normal port status based on the port status of the servers being probed.
[0084] According to the embodiments of this application, a communication channel is established with the server to be probed via User Datagram Protocol (UDP), the reachability of port probe packets is verified by flow table matching, and then UDP port probe packets are sent in a targeted manner to realize a layered and progressive probe strategy. Moreover, the port probe process does not need to pass through network nodes, which shortens the probe path and improves the probe efficiency.
[0085] According to an embodiment of this application, within a second preset time period, the port probe result of the server to be probed is determined based on the response status of the User Datagram Protocol (UDP) port probe message, including: if no Internet Control Message Protocol (ICP) port unreachable message is received within the second preset time period, the port probe result of the server to be probed is determined to be in a normal state; if an ICP port unreachable message is received, the port probe result of the server to be probed is determined to be in an abnormal state.
[0086] If no Internet Control Message Protocol (ICMP) PortUnreachable message is received within the second preset time period, the port probe result of the server to be probed can be determined as normal.
[0087] If an Internet Control Message Protocol (ICP) port unreachable message is received, it can be determined that the port of the server to be probed is not connected, i.e., the UDP health check has failed.
[0088] According to embodiments of this application, the Internet Control Message Protocol (ICP) port unreachable message is used as a negative feedback mechanism for User Datagram Protocol (UDP) probes to accurately distinguish between open and closed port states and improve the accuracy of probe results.
[0089] According to an embodiment of this application, the data processing method further includes: when communicating with the server to be probed based on the Transmission Control Protocol (TCP), sending a connection request message to the server to be probed; receiving a reply message allowing connection from the server to be probed within a first preset time period, matching the reply message with the flow table to obtain a TCP matching result; and when the TCP matching result indicates that the destination logical address is the gateway logical address and the destination port number is the gateway port, sending a connection establishment message to the server to be probed, and determining the port probe result of the server to be probed as normal.
[0090] Figure 5 A schematic diagram of port detection based on Transmission Control Protocol (TCP) according to an embodiment of this application is shown.
[0091] like Figure 5 As shown, when communicating with the server to be probed based on the Transmission Control Protocol (TCP), a connection request message (i.e., a SYN message) can be sent to the server to be probed.
[0092] Within the first preset time period, a connection permission reply message (i.e., SYN+ACK) is received from the server to be probed. The reply message is matched with the flow table to obtain the transmission control protocol matching result.
[0093] If no reply message allowing connection is received from the server to be probed after the first preset time period, it can be determined that the port status of the server to be probed is abnormal.
[0094] If the Transmission Control Protocol (TCP) matching result indicates that the destination logical address is the gateway logical address and the destination port number is the gateway port, a connection establishment message (i.e., an ACK message) can be sent to the server to be probed, and the port probe result of the server to be probed can be determined as normal. Alternatively, a reset message (i.e., an RST message) can be sent to the server to be probed to interrupt the TCP-based communication connection.
[0095] According to the embodiments of this application, the integrity and legality of the Transmission Control Protocol (TCP) connection establishment are ensured through a three-way handshake process and flow table dual verification, the port open status is accurately identified, forged responses are effectively prevented, and the security and reliability of the detection are improved.
[0096] Figure 6 A flowchart of a data processing method according to another embodiment of this application is shown.
[0097] like Figure 6 As shown, the data processing method of this embodiment includes operations S610 to S670.
[0098] In operation S610, a port probe message is constructed, and operation S620 is executed.
[0099] In operation S620, the port probe packet is matched with the flow table to obtain the first matching result, and then operation S630 is executed.
[0100] In operation S630, if the first matching result is that the destination logical address in the port probe message is consistent with the destination logical address in the flow table and the transport protocol carried by the port probe message is consistent with the transport protocol in the flow table, a port probe message is sent to the server to be probed, and operation S640 is executed.
[0101] In operation S640, in response to receiving a reply message from the server to be probed within a first preset time period, the reply message is matched with the flow table to obtain a second matching result, and operation S650 is executed.
[0102] In operation S650, if the source logical address is the logical address of the server to be probed, the destination logical address is the logical address of the gateway, and the destination port number is the gateway port in the second matching result, a first port probe message is sent to the server to be probed based on the transmission protocol of the server to be probed. The content of the first port probe message and the port probe message are different, and operation S660 is executed.
[0103] In operation S660, based on the response status of the first port probe message, the message queue of the first reply message is determined. The first reply message corresponds to the first port probe message, and operation S670 is executed.
[0104] When operating the S670, the port probe results of the server to be probed are determined based on the message queue.
[0105] Based on the above data processing method, this application also provides a data processing apparatus. The following will be combined with... Figure 7 The device is described in detail.
[0106] Figure 7 A structural block diagram of a data processing apparatus according to an embodiment of this application is shown.
[0107] like Figure 7 As shown, the data processing apparatus 700 of this embodiment includes a sending module 710, a message queue determination module 720, and a detection result determination module 730.
[0108] The sending module 710 is used to send port probe messages to multiple servers to be probed at preset time intervals. The port probe messages are used to detect the connectivity status of ports in the servers to be probed, and the source address of the port probe messages is the gateway address.
[0109] The message queue determination module 720 is used to determine the message queue of the reply messages when multiple reply messages are received from the server to be probed within a first preset time period. The message queue includes a key value, which indicates the identifier of the server to be probed and the port number of the server to be probed used to send the reply messages.
[0110] The detection result determination module 730 is used to determine the port detection result of the server to be probed based on the message queue.
[0111] According to embodiments of this application, port probe messages are sent to multiple probe servers at preset time intervals. These port probe messages can be used to detect the connectivity status of ports on the servers to be probed. By setting the source address of the port probe messages to the gateway address, multiple port probe messages converge at the gateway for unified monitoring. If multiple reply messages are received from the servers to be probed within a first preset time period, the message queue of the reply messages can be determined. By setting the first preset time period, the port status can be quickly determined. Based on the identifier of the server to be probed indicated by the key value in the message queue and the port number of the server to be probed used to send the reply messages, it is easy to distinguish reply messages from different ports of the same server to be probed, thereby determining the port connection status of the server to be probed. Furthermore, the method provided in this application does not require passing through network nodes during port probe; it can directly access the ports on the servers to be probed through the gateway, shortening the probe path and improving probe efficiency.
[0112] A port probe packet includes: the logical address of the gateway (source logical address); the logical address of the server to be probed (destination logical address); the physical address of the gateway (source physical address); the physical address of the server to be probed (destination physical address); and the port number of the server to be probed.
[0113] The transmitting module 710 includes a matching unit and a transmitting unit.
[0114] The matching unit is used to match port probe packets with flow tables to obtain a first matching result. The first matching result includes the destination port number being the port providing services in the server to be probed, the transport protocol being the transport protocol used by the server to be probed, and the flow table representing the rule table for sending port probe packets.
[0115] The sending unit is configured to send a port probe message to the server to be probed when the first matching result is that the destination logical address in the port probe message is consistent with the destination logical address in the flow table and the transport protocol carried by the port probe message is consistent with the transport protocol in the flow table.
[0116] The message queue determination module 720 includes: a second matching unit, a message sending unit, and a message queue determination unit.
[0117] The second matching unit is used to respond to a reply message received from the server to be probed within a first preset time period, match the reply message with the flow table, and obtain a second matching result. The second matching result includes a source logical address that is the logical address of the server to be probed, a destination logical address that is the logical address of the gateway, a destination port number that is the gateway port, and a reply message that corresponds to a port probe message.
[0118] The message sending unit is used to send a first port probe message to the server to be probed based on the transmission protocol of the server to be probed when the source logical address is the logical address of the server to be probed, the destination logical address is the logical address of the gateway, and the destination port number is the gateway port in the second matching result. The content of the first port probe message is different from that of the port probe message.
[0119] The message queue determination unit is used to determine the message queue of the first reply message based on the reply status of the first port probe message. The first reply message corresponds to the first port probe message.
[0120] The port connectivity of the server to be probed is determined if the second matching result meets the following matching conditions: The source logical address is the logical address of the server to be probed; the destination logical address is the logical address of the gateway; and the destination port number is the gateway port.
[0121] The data processing device 700 in this embodiment further includes: a first protocol communication module, an echo response matching module, a datagram protocol sending module, and a port detection result determination module.
[0122] The first protocol communication module is used to send Internet Control Message Protocol echo request messages to the server to be probed when communicating with the server to be probed based on the User Datagram Protocol.
[0123] The echo response matching module is used to match the Internet Control Message Protocol (ICP) echo response message with the flow table when an ICP echo response message is received from the server to be probed within a first preset time period, so as to obtain the User Datagram Protocol (UDP) matching result.
[0124] The datagram protocol sending module is used to send a datagram protocol port probe message to the server to be probed when the user datagram protocol matching result indicates that the destination logical address is the gateway logical address and the destination port number is the gateway port.
[0125] The port probe result determination module is used to determine the port probe result of the server to be probed based on the response of the User Datagram Protocol (UDP) port probe message within a second preset time period.
[0126] The port detection result determination module includes: a first detection result unit and a status determination unit.
[0127] The first detection result unit is used to determine the port detection result of the server to be detected as normal if no Internet Control Message Protocol (ICP) port unreachable message is received within the second preset time period.
[0128] The status determination unit is used to determine the port probe result of the server to be probed as an abnormal state when an Internet Control Message Protocol (ICP) port unreachable message is received.
[0129] The data processing apparatus 700 in this embodiment further includes: a connection request message sending module, a flow table matching module, and a connection establishment message sending module.
[0130] The connection request message sending module is used to send connection request messages to the server to be probed when communicating with the server to be probed based on the Transmission Control Protocol.
[0131] The flow table matching module is used to receive a connection permission reply message sent by the server to be probed within a first preset time period, and to match the reply message with the flow table to obtain the transmission control protocol matching result.
[0132] The connection establishment message sending module is used to send a connection establishment message to the server to be probed when the transmission control protocol matching result indicates that the destination logical address is the gateway logical address and the destination port number is the gateway port, and to determine the port probe result of the server to be probed as normal.
[0133] According to embodiments of this application, any plurality of modules among the sending module 710, message queue determination module 720, and detection result determination module 730 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this application, at least one of the sending module 710, message queue determination module 720, and detection result determination module 730 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any appropriate combination of any of these three implementation methods. Alternatively, at least one of the sending module 710, message queue determination module 720, and detection result determination module 730 can be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.
[0134] Figure 8 A block diagram of an electronic device suitable for implementing a data processing method according to an embodiment of this application is shown.
[0135] like Figure 8 As shown, an electronic device 800 according to an embodiment of this application includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0136] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 802 and / or RAM 803. It should be noted that programs may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in one or more memories.
[0137] According to embodiments of this application, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the input / output (I / O) interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.
[0138] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the data processing method according to the embodiments of this application.
[0139] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803 described above.
[0140] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to enable the computer system to implement the data processing methods provided in the embodiments of this application.
[0141] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0142] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 809, and / or installed from a removable medium 811. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0143] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, it performs the functions defined in the system of this application embodiment. According to the embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0144] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0145] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0146] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
Claims
1. A data processing method, characterized in that, The method includes: Port probe messages are sent to multiple servers to be probed at preset time intervals. The port probe messages are used to detect the connectivity status of ports in the servers to be probed. The source address of the port probe messages is the gateway address. If multiple reply messages are received from the server to be probed within a first preset time period, a message queue for the reply messages is determined. The message queue includes a key value, which indicates the identifier of the server to be probed and the port number of the server to be probed used to send the reply messages. Based on the message queue, determine the port probe results of the server to be probed.
2. The method according to claim 1, characterized in that, The port probe message includes: The logical address of the gateway as the source logical address; The logical address of the server to be probed, which serves as the destination logical address; The physical address of the gateway, which serves as the source physical address; The physical address of the server to be probed, serving as the destination physical address; and The port number of the server to be detected.
3. The method according to claim 1, characterized in that, Send port probe packets to multiple servers to be probed, including: The port probe message is matched with the flow table to obtain a first matching result. The first matching result includes the destination port number being the port providing services in the server to be probed, the transmission protocol being the transmission protocol used by the server to be probed, and the flow table representing the rule table for sending the port probe message. If the first matching result is that the destination logical address in the port probe message is consistent with the destination logical address in the flow table and the transport protocol carried by the port probe message is consistent with the transport protocol in the flow table, then the port probe message is sent to the server to be probed.
4. The method according to claim 3, characterized in that, If multiple reply messages are received from the server to be probed within a first preset time period, the message queue of the reply messages is determined, including: In response to receiving a reply message from the server to be probed within the first preset time period, the reply message is matched with the flow table to obtain a second matching result. The second matching result includes a source logical address that is the logical address of the server to be probed, a destination logical address that is the logical address of the gateway, a destination port number that is the gateway port, and the reply message that corresponds to the port probe message. In the second matching result, if the source logical address is the logical address of the server to be probed, the destination logical address is the logical address of the gateway, and the destination port number is the gateway port, a first port probe message is sent to the server to be probed based on the transmission protocol of the server to be probed. The content of the first port probe message and the port probe message are different. Based on the response to the first port probe message, the message queue of the first reply message is determined, and the first reply message corresponds to the first port probe message.
5. The method according to claim 4, characterized in that, If the second matching result meets the following matching conditions, it is determined that the port of the server to be probed is connected; The source logical address is the logical address of the server to be probed; and The destination logical address is the logical address of the gateway; and The destination port number is the gateway port.
6. The method according to claim 1, characterized in that, The method further includes: When communicating with the server to be probed based on the User Datagram Protocol (UDP), send an Internet Control Message Protocol (ICP) echo request message to the server to be probed; If an Internet Control Message Protocol (ICP) echo response message is received from the server to be detected within the first preset time period, the ICP echo response message is matched with the flow table to obtain the User Datagram Protocol (UDP) matching result. If the User Datagram Protocol (UDP) matching result indicates that the destination logical address is the gateway logical address and the destination port number is the gateway port, a UDP port probe message is sent to the server to be probed. Within a second preset time period, the port probe result of the server to be probed is determined based on the response status of the User Datagram Protocol (UDP) port probe message.
7. The method according to claim 6, characterized in that, The determination of the port probe result of the server to be probed based on the response status of the User Datagram Protocol (UDP) port probe message within the second preset time period includes: If no Internet Control Message Protocol (ICP) port unreachable message is received within the second preset time period, the port detection result of the server to be probed is determined to be in a normal state. Upon receiving an Internet Control Message Protocol (ICP) port unreachable message, the port probe result of the server to be probed is determined to be in an abnormal state.
8. The method according to claim 6, characterized in that, The method further includes: When communicating with the server to be probed based on the Transmission Control Protocol, a connection request message is sent to the server to be probed; Within the first preset time period, a connection permission reply message is received from the server to be probed. The reply message is matched with the flow table to obtain the transmission control protocol matching result. If the transmission control protocol matching result indicates that the destination logical address is the gateway logical address and the destination port number is the gateway port, a connection establishment message is sent to the server to be probed, and the port probe result of the server to be probed is determined to be in a normal state.
9. A data processing apparatus, characterized in that, The device includes: The sending module is used to send port probe messages to multiple servers to be probed at preset time intervals. The port probe messages are used to detect the connectivity status of ports in the servers to be probed, and the source address of the port probe messages is the gateway address. The message queue determination module is used to determine the message queue of the reply messages when multiple reply messages are received from the server to be probed within a first preset time period. The message queue includes a key value, which indicates the identifier of the server to be probed and the port number of the server to be probed used to send the reply messages. The detection result determination module is used to determine the port detection result of the server to be detected based on the message queue.
10. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.