Flow processing method and device of monitor, monitor and storage medium

By setting an internal network communication port larger than the actual business port for the ALB QUIC listener, the problem of the listener not supporting ports below 1024 is solved, efficient management of port resources and stable operation of the system are achieved, and the degree of automation and work efficiency are improved.

CN120602387APending Publication Date: 2025-09-05BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510741247.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

The existing ALB QUIC listener does not support internal network communication on ports below 1024, resulting in increased operational complexity and reduced work efficiency, as well as a lack of automation and intelligence.

Method used

By setting the internal network communication port for the target listener, the actual business port is less than the preset port value, the internal network communication port is greater than or equal to the preset port value, and communication is carried out within the listener through the internal network communication port, thereby achieving efficient management and allocation of port resources.

Benefits of technology

It realizes efficient management and allocation of listener port resources, improves the degree of automation, ensures the rational use of port resources and stable operation of the system, and reduces manual intervention and operational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602387A_ABST
    Figure CN120602387A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a flow processing method and device of a monitor, the monitor and a storage medium, an internal network communication port is set for a target monitor for processing a target protocol, a real service port of the target monitor is smaller than a preset port value, and the internal network communication port is larger than or equal to the preset port value; and when the real service port monitors the traffic, the first module of the target monitor sends the traffic to the second module of the target monitor through the internal network communication port. Therefore, the internal network communication port larger than the real service port is arranged on the monitor, communication is carried out in the monitor through the internal network communication port, the monitor can support monitoring of the real service port below the preset port value, efficient management and a distribution mechanism of monitor port resources are achieved, the automation degree is high, and the monitoring efficiency is improved. And port mapping can be intelligently processed, and reasonable utilization of port resources and stable operation of the system are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the technical field of listeners, and in particular to a traffic processing method and device for a listener, a listener, and a storage medium. Background Art

[0002] In modern network architectures, Application Layer Load Balancers (ALBs) can effectively distribute network traffic. The QUIC protocol is a UDP-based transport layer network protocol. Existing ALB QUIC listeners have design limitations. Their internal communication ports do not support listening on ports below 1024 (ports below 1024 mainly refer to the network communication ports between xgw and tengine. xgw is a high-performance, highly available, four-layer load balancing software based on the Linux kernel, mainly used to process four-layer network protocol requests. Seven-layer protocol listeners also undergo four-layer load balancing. tengine is a high-performance web server responsible for processing seven-layer network protocol requests). The user's actual business port is the real business port, and the port that xgw points to tengine is the internal communication port of the listener.

[0003] HTTPS, HTTP, and the QUIC protocol all use the client's actual business port as the internal communication port, which creates problems for QUIC protocol monitoring. Previously, the method of manually modifying the listener's internal network communication port and then reloading the configuration file was adopted. However, this method lacks automation and intelligence, requiring manual intervention, increasing operational complexity and reducing work efficiency and accuracy. Therefore, the ALB QUIC listener's internal communication does not support monitoring of ports below 1024, which has become a pressing issue. Summary of the Invention

[0004] In view of this, in order to solve the above technical problems or part of the technical problems, the embodiments of the present invention provide a traffic processing method and device of a listener, a listener and a storage medium.

[0005] In a first aspect, an embodiment of the present invention provides a traffic processing method of a listener, comprising:

[0006] Setting an internal network communication port for a target listener processing a target protocol, wherein the real service port of the target listener is smaller than a preset port value, and the internal network communication port is greater than or equal to the preset port value;

[0007] When the real business port monitors traffic, the first module of the target listener sends the traffic to the second module of the target listener through the internal network communication port. The first module is used to process four-layer network protocol traffic, and the second module is used to process seven-layer network protocol traffic.

[0008] In one possible implementation, when the target listener is a newly created listener, setting an internal network communication port for the target listener processing the target protocol includes:

[0009] When a newly created virtual address using the target protocol is detected, a corresponding internal network communication port is allocated to the virtual address from the cache;

[0010] Storing the internal network communication port in a port list;

[0011] When detecting the newly created target listener, obtaining the internal network communication port from the port list;

[0012] The internal network communication port is set as the communication port through which the first module sends traffic to the second module.

[0013] In one possible implementation, the method further includes:

[0014] After obtaining the internal network communication port from the port list, deleting the internal network communication port from the port list;

[0015] After the target listener is deleted, the internal network communication port is added to the port list.

[0016] In one possible implementation, when the target listener is an existing listener, setting an internal network communication port for the target listener processing the target protocol includes:

[0017] Acquire the internal network communication port from the port list;

[0018] Setting the port of the second module to monitor the internal network communication port and the real business port simultaneously;

[0019] Setting the port of the first module to the internal network communication port so that the first module sends traffic to the second module through the internal network communication port;

[0020] The port of the second module is set to only listen to the internal network communication port.

[0021] In one possible implementation, the method further includes:

[0022] Setting a first interface corresponding to the port of the first module and a second interface corresponding to the port of the second module;

[0023] The port of the first module is set through the first interface, and the port of the second module is set through the second interface.

[0024] In one possible implementation, before setting the internal network communication port for the target listener processing the target protocol, the method further includes:

[0025] First attribute information, second attribute information and third attribute information are set in the metadata of each listener, the first attribute information is used to configure the internal network communication port, the second attribute information is used to configure the port of the first module, and the third attribute information is used to configure the port of the second module.

[0026] In one possible implementation, the method further includes:

[0027] When the real service port of the target listener is greater than or equal to the preset port value, the first module of the target listener sends the traffic to the second module of the target listener through the real service port.

[0028] In a second aspect, an embodiment of the present invention provides a traffic processing device of a listener, comprising:

[0029] A setting module, configured to set an internal network communication port for a target listener processing a target protocol, wherein the real service port of the target listener is smaller than a preset port value, and the internal network communication port is greater than or equal to the preset port value;

[0030] A sending module is used for sending the traffic to the second module of the target listener through the internal network communication port when the real business port monitors the traffic. The first module is used to process the four-layer network protocol traffic, and the second module is used to process the seven-layer network protocol traffic.

[0031] In a third aspect, an embodiment of the present invention provides a listener device, comprising: a processor and a memory, wherein the processor is configured to execute a traffic processing program of the listener stored in the memory to implement the traffic processing method of the listener described in any one of the first aspects above.

[0032] In a fourth aspect, an embodiment of the present invention provides a storage medium storing one or more programs, which can be executed by one or more processors to implement the traffic processing method of the listener described in any one of the first aspects above.

[0033] The traffic processing solution of the listener provided by the embodiment of the present invention is to set an internal network communication port for the target listener that processes the target protocol, wherein the real business port of the target listener is less than the preset port value, and the internal network communication port is greater than or equal to the preset port value; when the real business port monitors the traffic, the first module of the target listener sends the traffic to the second module of the target listener through the internal network communication port, the first module is used to process the four-layer network protocol traffic, and the second module is used to process the seven-layer network protocol traffic. Thus, by setting an internal network communication port greater than the real business port for the listener, so as to communicate within the listener through the internal network communication port, when the real business port of the listener is less than the preset port value, the internal network can also communicate and monitor the port according to the set internal network communication port, thereby realizing an efficient management and allocation mechanism of the listener port resources, with a high degree of automation, and being able to intelligently process port mapping to ensure the rational use of port resources and the stable operation of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A flow chart of a traffic processing method of a listener provided in an embodiment of the present invention;

[0035] Figure 2 A flow chart of another method for processing traffic of a listener provided by an embodiment of the present invention;

[0036] Figure 3 A flow chart of another method for processing traffic of a listener provided in an embodiment of the present invention;

[0037] Figure 4 A flow chart of another method for processing traffic by a listener provided in an embodiment of the present invention;

[0038] Figure 5 A schematic structural diagram of a traffic processing device for a listener provided in an embodiment of the present invention;

[0039] Figure 6 A schematic diagram of the structure of a monitor provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0041] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below with reference to the accompanying drawings. The embodiments do not limit the embodiments of the present invention.

[0042] Figure 1 A flow chart of a traffic processing method of a listener provided in an embodiment of the present invention is shown as follows: Figure 1 As shown, the method specifically includes:

[0043] S11. Setting an internal network communication port for a target listener processing a target protocol, wherein the target listener's actual service port is smaller than a preset port value, and the internal network communication port is greater than or equal to the preset port value;

[0044] S12. When the real business port monitors traffic, the first module of the target listener sends the traffic to the second module of the target listener through the internal network communication port. The first module is used to process the four-layer network protocol traffic, and the second module is used to process the seven-layer network protocol traffic.

[0045] The traffic processing method of the listener provided in an embodiment of the present invention is applied to the listener, which can be an ALBQUIC listener, that is, a QUIC protocol listener of an application load balancer (Application Load Balancer), which is specially designed to process network traffic of the QUIC protocol and provide efficient data transmission and connection management. Specifically, by setting an internal network communication port larger than the actual business port for the listener, so as to communicate within the listener through the internal network communication port, the listener can support monitoring of internal network communication ports below the preset port value. It is suitable for multiple scenarios such as high concurrency, large-scale traffic management, low-latency network optimization, microservice architecture, cloud computing platform, etc.

[0046] In this embodiment, the target protocol is the QUIC protocol, and the target listener is a component used to process QUIC protocol traffic, which is responsible for listening to and receiving QUIC protocol requests from the client. The real business port refers to the port actually used by the client, usually a standard HTTP / HTTPS port (such as 80 or 443). For the QUIC protocol, ports similar to 443 are usually used, especially for encrypted QUIC traffic (such as HTTPS over QUIC). The real business port is the port for direct communication between the client and the server, and the user's network request will enter the target listener through this port. The preset port value (such as 1025) is used to ensure the port used for internal communication of the target listener, and to limit the use range of the internal network communication port. In order to avoid internal communication port conflicts or being restricted by the system, the target listener sets a preset port value, indicating that all internal communications must use a port number greater than or equal to the preset port value.

[0047] The first module is a module for processing four-layer network protocol traffic, which can specifically forward traffic to the second module. The second module is a module for processing seven-layer network protocol traffic, which can specifically receive traffic sent by the first module and process it. That is, the first module can be xgw (four-layer load balancing software), and the second module can be tengine, which is a high-performance Web server.

[0048] The first module acts as a traffic distributor, processing TCP / UDP requests. When the first module receives traffic from the real business port (such as 443), it forwards the network traffic from the client (such as QUIC requests, HTTP requests) to the backend service (the second module) through port mapping technology.

[0049] Port mapping allows data from one network port to be forwarded to another port and is commonly used for load balancing and network address translation. Communication between the first and second modules relies on internal port mapping. The first module forwards QUIC requests from clients to the second module via a specific internal network communication port. After passing through the first module, these requests are ultimately processed and responded to by the second module, ensuring load balancing and high availability.

[0050] In traditional solutions, communication between the first and second modules typically uses ports below 1024. However, since listeners do not support the use of ports below 1024 as internal network communication ports, a new port management mechanism has been introduced. An internally allocated port is set for the target listener: the internal network communication port, which is used for internal communication between the first and second modules. This port range is greater than or equal to the preset port value (for example, if the preset port value is 1025, the internal network communication port range is 1025 to 65535), ensuring that there will be no conflict with the system's reserved ports.

[0051] Internal network communication ports can be allocated and managed through the target listener's metadata, enabling the allocation of internal network communication ports to the first and second modules. When the real business port monitors external client traffic, the first module of the target listener sends the traffic to the second module of the target listener via the pre-set internal network communication port, allowing the second module to process the traffic. This ensures that the listener's internal communication is not restricted by the real business port below 1024, while also providing sufficient security and flexibility.

[0052] The traffic processing method of the listener provided by the embodiment of the present invention is to set an internal network communication port for the target listener that processes the target protocol, wherein the real business port of the target listener is less than the preset port value, and the internal network communication port is greater than or equal to the preset port value; when the real business port monitors the traffic, the first module of the target listener sends the traffic to the second module of the target listener through the internal network communication port, the first module is used to process the four-layer network protocol traffic, and the second module is used to process the seven-layer network protocol traffic. Thus, by setting an internal network communication port greater than the real business port for the listener, so as to communicate within the listener through the internal network communication port, when the real business port of the listener is less than the preset port value, the internal network can also communicate and monitor the port according to the set internal network communication port, thereby realizing an efficient management and allocation mechanism of the listener port resources, with a high degree of automation, and being able to intelligently process port mapping to ensure the rational use of port resources and the stable operation of the system.

[0053] Figure 2 A flow chart of another method for processing traffic of a listener provided by an embodiment of the present invention is shown as follows: Figure 2 As shown, the method specifically includes:

[0054] S21. Set first attribute information, second attribute information and third attribute information in the metadata of each listener, the first attribute information is used to configure the internal network communication port, the second attribute information is used to configure the port of the first module, and the third attribute information is used to configure the port of the second module.

[0055] In this embodiment, three key attribute information are added to the metadata of the listener in advance: the first attribute information inner_vip_port, the second attribute information tengine_port, and the third attribute information tengine_config_port. Among them, inner_vip_port refers to the internal network communication port allocated inside the listener, which is used for network communication between the first module and the second module, and its value range is 1025 to 65535. When the target listener is a newly created listener, the inner_vip_port can be configured directly. When the target listener is an existing listener created historically, it is necessary to switch the current port of the existing listener through tengine_port and tengine_config_port to switch the historical port for communication between the first module and the second module of the existing listener to inner_vip_port, so as to achieve a smooth transition of the port and ensure the continuity and stability of the service.

[0056] As an example, consider a QUIC listener whose metadata attributes are as follows:

[0057]

[0058] tengine_port represents the port used by the first module (xgw) to communicate with the second module (tengine), tengine_config_port represents the port that tengine currently listens on (the historically used real business port 80 and the new internal network communication port 10080), and inner_vip_port represents the allocated internal network communication port. This structure makes it easy to manage and switch ports.

[0059] This embodiment provides a basic data structure for port resource management, enabling the system to effectively track and manage different types of ports. By adding attribute information to metadata, persistent storage of port information is achieved, improving system reliability and maintainability. This provides the necessary information support for port switching operations, enabling smooth switching.

[0060] S22. When the target listener is a newly created listener and a newly created virtual address using the target protocol is detected, the corresponding internal network communication port is allocated to the virtual address from the cache; the internal network communication port is stored in the port list; when a newly created target listener is detected, the internal network communication port is obtained from the port list; the internal network communication port is set as the communication port for the first module to send traffic to the second module.

[0061] In this embodiment, when a new QUIC protocol type virtual address (VIP) is created, the system allocates an available internal network communication port (inner_vip_port) from the cache and stores it in a port list named inner_vip_port_quic. When a QUIC type target listener is subsequently created, the corresponding internal network communication port can be obtained from this port list and used as the port for communication between the first module and the second module, thereby achieving multiplexing and efficient management of port resources. The listener can use ports 1024 and below as its real business ports, but the listener communicates internally through the internal network communication port.

[0062] As an example, Figure 3The figure below is a flow chart of another listener traffic processing method provided by an embodiment of the present invention. When a new listener is created, the system allocates an available port 10080 from the inner_vip_port_quic list and sets it as the listener's inner_vip_port. This allows xgw and tengine to communicate through the internal network communication port, while the listener still communicates with the client through the real service port.

[0063] In a possible implementation, after the internal network communication port is obtained from the port list, the internal network communication port is deleted from the port list; after the target listener is deleted, the internal network communication port is added to the port list.

[0064] Specifically, each listener corresponds to an internal network communication port. When a user deletes a target listener, the target listener's internal network communication port is recycled to the list. The user can then obtain the port from the port list when creating a QUIC listener later.

[0065] As an example, suppose the inner_vip_port_quic list initially contains the following ports: [10080, 10081, 10082, 10083, 10084]. When a new QUIC listener is created, the system takes the first available port from the list (such as 10080) and assigns it to the new listener. The list now becomes: [10081, 10082, 10083, 10084]. When a listener using port 10082 is deleted, the system adds that port back to the end of the list. The list now becomes: [10081, 10083, 10084, 10082]. This approach ensures efficient and recyclable use of port resources.

[0066] S23. When the target listener is an existing listener, obtain the internal network communication port from the port list; set the port of the second module to listen to the internal network communication port and the real business port at the same time; set the port of the first module to the internal network communication port, so that the first module sends traffic to the second module through the internal network communication port; set the port of the second module to only listen to the internal network communication port.

[0067] In this embodiment, in order to ensure that traffic loss will not occur due to port switching when the port of the existing listener is switched, first, the port of the second module is set to listen to the internal network communication port and the real business port at the same time through the third attribute information tengine_config_port, and then the port for communication between the first module and the second module is set to the allocated internal network communication port inner_vip_port through the second attribute information tengine_port. At this time, the first module starts to send traffic to the second module through the internal network communication port, and finally, the port of the second module is set to listen only to the internal network communication port through the third attribute information tengine_config_port.

[0068] The specific setting method may be: pre-setting the first interface corresponding to the port of the first module and the second interface corresponding to the port of the second module; setting the port of the first module through the first interface and setting the port of the second module through the second interface.

[0069] The first interface and the second interface are both API interfaces for setting tengine_port and tengine_config_port respectively. The first interface may be set_tengine_port, and the second interface may be set_tengine_config_ports.

[0070] First, use set_tengine_config_ports to set tengine to listen on two ports: the real business port and inner_vip_port, to ensure that user services are not interrupted (for example, call set_tengine_config_ports(listener_id,[80,10080]), which makes tengine listen on both ports 80 and 10080).

[0071] Then, call set_tengine_port to set xgw to start sending traffic to inner_vip_port (for example, set_tengine_port(listener_id,10080), which makes xgw start sending traffic to inner_vip_port port 10080).

[0072] Finally, call set_tengine_config_ports again to set tengine to listen only on inner_vip_port (for example, set_tengine_config_ports(listener_id,

[10080] ), which makes tengine listen only on the new port 10080).

[0073] Through these three steps of API calls, a smooth switch from port 80 to port 10080 is achieved, and user services will not be interrupted during the entire process.

[0074] As an example, Figure 4 As shown, it is a flow chart of another traffic processing method of a listener provided by an embodiment of the present invention. First, the value range of set_tengine_config_ports is set to belong to the real business port of the listener and the internal network communication port inner_vip_port of the metadata. The value range of set_tengine_port belongs to the tengine_config_port of the metadata. When switching ports, the first step is to call set_tengine_config_ports to set the tengine of the listener to listen to the real business port and the inner_vip_port port in the metadata at the same time to ensure that the user business will not be interrupted. The second step is to call set_tengine_port to set the tengine_port to the inner_vip_port port in the metadata, so that xgw points to the new port. The third step is to call set_tengine_config_ports to set the tengine_config_port to the inner_vip_port port in the metadata, so that tengine only listens to the new port.

[0075] In one possible implementation, when the real business port of the target listener is greater than or equal to the preset port value (for example, 1025), the real business port can communicate within the target listener without allocating an internal network communication port. The first module of the target listener can directly send traffic to the second module of the target listener through the real business port.

[0076] S24. When the real business port monitors traffic, the first module of the target listener sends the traffic to the second module of the target listener through the internal network communication port. The first module is used to process the four-layer network protocol traffic, and the second module is used to process the seven-layer network protocol traffic.

[0077] In this embodiment, similar to step S12, please refer to Figure 1 For the sake of brevity, the relevant content will not be elaborated here.

[0078] The traffic processing method for the listener provided in an embodiment of the present invention realizes efficient management of port resources and flexible switching of listener ports by adding specific attributes to the metadata of the ALB QUIC listener and combining it with an intelligent port allocation algorithm. It not only solves the limitation problem that the ALB QUIC listener does not support ports below 1024, but also greatly improves the utilization and management efficiency of port resources, providing users with more flexible and convenient network service configuration options. It ensures the smoothness of system upgrades and avoids the impact on existing businesses. The customer's real business port is kept as the intranet communication port to reduce the risks brought by system changes.

[0079] Figure 5 A schematic diagram of a flow processing device for a listener provided in an embodiment of the present invention is shown in FIG. Figure 5 As shown, the device specifically includes:

[0080] A setting module 51 is configured to set an internal network communication port for a target listener processing a target protocol, wherein the real service port of the target listener is smaller than a preset port value, and the internal network communication port is greater than or equal to the preset port value;

[0081] The sending module 52 is used for sending the traffic to the second module of the target listener through the internal network communication port when the real business port monitors the traffic. The first module is used to process the four-layer network protocol traffic, and the second module is used to process the seven-layer network protocol traffic.

[0082] In a possible implementation, the setting module is specifically configured to allocate a corresponding internal network communication port to a newly created virtual address using the target protocol from a cache when detecting the virtual address;

[0083] Storing the internal network communication port in a port list;

[0084] When detecting the newly created target listener, obtaining the internal network communication port from the port list;

[0085] The internal network communication port is set as the communication port through which the first module sends traffic to the second module.

[0086] In a possible implementation manner, the setting module is further configured to delete the internal network communication port from the port list after obtaining the internal network communication port from the port list;

[0087] After the target listener is deleted, the internal network communication port is added to the port list.

[0088] In a possible implementation, the setting module is specifically configured to obtain the internal network communication port from the port list;

[0089] Setting the port of the second module to monitor the internal network communication port and the real business port simultaneously;

[0090] Setting the port of the first module to the internal network communication port so that the first module sends traffic to the second module through the internal network communication port;

[0091] The port of the second module is set to only listen to the internal network communication port.

[0092] In a possible implementation, the setting module is further configured to set a first interface corresponding to the port of the first module, and a second interface corresponding to the port of the second module;

[0093] The port of the first module is set through the first interface, and the port of the second module is set through the second interface.

[0094] In one possible embodiment, the setting module is also used to set first attribute information, second attribute information and third attribute information in the metadata of each listener, the first attribute information is used to configure the internal network communication port, the second attribute information is used to configure the port of the first module, and the third attribute information is used to configure the port of the second module.

[0095] In a possible implementation, the sending module is further configured to, when the real service port of the target listener is greater than or equal to a preset port value, cause the first module of the target listener to send the traffic to the second module of the target listener through the real service port.

[0096] The device provided in this embodiment can be Figure 5 The device shown in , can perform the following Figure 1-2 All steps of the traffic processing method of the listener in the Figure 1-2 For technical effects of the traffic processing method of the monitor shown, please refer to Figure 1-2 For the sake of brevity, the relevant description will not be repeated here.

[0097] Figure 6 A schematic diagram of the structure of a monitor provided by an embodiment of the present invention is provided. Figure 6The listener 600 shown includes: at least one processor 601, memory 602, at least one network interface 604 and other user interfaces 603. The various components in the listener 600 are coupled together via a bus system 605. It is understood that the bus system 605 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 605 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 605 is not shown in FIG. Figure 6 Various buses are labeled as bus system 605.

[0098] The user interface 603 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touchpad, or a touch screen).

[0099] It is understood that the memory 602 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced synchronous DRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 602 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0100] In some embodiments, the memory 602 stores the following elements, executable units, or data structures, or a subset thereof, or an extended set thereof: an operating system 6021 and application programs 6022 .

[0101] The operating system 6021 includes various system programs, such as a framework layer, a core library layer, and a driver layer, for implementing various basic services and handling hardware-based tasks. Application programs 6022 include various application programs, such as a media player and a browser, for implementing various application services. Programs implementing the methods of the embodiments of the present invention may be included in application programs 6022.

[0102] In an embodiment of the present invention, by calling a program or instruction stored in the memory 602, specifically, a program or instruction stored in the application 6022, the processor 601 is configured to execute the method steps provided in each method embodiment, for example, including:

[0103] Setting an internal network communication port for a target listener processing a target protocol, wherein the real service port of the target listener is smaller than a preset port value, and the internal network communication port is greater than or equal to the preset port value;

[0104] When the real business port monitors traffic, the first module of the target listener sends the traffic to the second module of the target listener through the internal network communication port. The first module is used to process four-layer network protocol traffic, and the second module is used to process seven-layer network protocol traffic.

[0105] In one possible implementation, when a newly created virtual address using the target protocol is detected, a corresponding internal network communication port is allocated to the virtual address from a cache;

[0106] Storing the internal network communication port in a port list;

[0107] When detecting the newly created target listener, obtaining the internal network communication port from the port list;

[0108] The internal network communication port is set as the communication port through which the first module sends traffic to the second module.

[0109] In a possible implementation, after obtaining the internal network communication port from the port list, deleting the internal network communication port from the port list;

[0110] After the target listener is deleted, the internal network communication port is added to the port list.

[0111] In a possible implementation, obtaining the internal network communication port from the port list;

[0112] Setting the port of the second module to monitor the internal network communication port and the real business port simultaneously;

[0113] Setting the port of the first module to the internal network communication port so that the first module sends traffic to the second module through the internal network communication port;

[0114] The port of the second module is set to only listen to the internal network communication port.

[0115] In one possible implementation, a first interface corresponding to the port of the first module and a second interface corresponding to the port of the second module are set;

[0116] The port of the first module is set through the first interface, and the port of the second module is set through the second interface.

[0117] In one possible implementation, first attribute information, second attribute information, and third attribute information are set in the metadata of each listener, wherein the first attribute information is used to configure the internal network communication port, the second attribute information is used to configure the port of the first module, and the third attribute information is used to configure the port of the second module.

[0118] In a possible implementation, when the real service port of the target listener is greater than or equal to a preset port value, the first module of the target listener sends the traffic to the second module of the target listener through the real service port.

[0119] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by processor 601. Processor 601 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in processor 601 or by software instructions. The above processor 601 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in conjunction with the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software units in the decoding processor. The software units can be located in storage media well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 602 , and the processor 601 reads the information in the memory 602 and completes the steps of the above method in combination with its hardware.

[0120] It is understood that the embodiments described herein may be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or a combination thereof.

[0121] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0122] The listener provided in this embodiment can be Figure 6 The listener shown in , can be executed as Figure 1-2 All steps of the traffic processing method of the listener in the Figure 1-2 For technical effects of the traffic processing method of the monitor shown, please refer to Figure 1-2 For the sake of brevity, the relevant description will not be repeated here.

[0123] An embodiment of the present invention further provides a storage medium (computer-readable storage medium). The storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; and the memory may also include a combination of the aforementioned types of memory.

[0124] When one or more programs in the storage medium can be executed by one or more processors, the traffic processing method of the listener executed on the device side can be implemented.

[0125] The processor is configured to execute a traffic processing program of the listener stored in the memory to implement the following steps of a traffic processing method of the listener executed on the device side:

[0126] Setting an internal network communication port for a target listener processing a target protocol, wherein the real service port of the target listener is smaller than a preset port value, and the internal network communication port is greater than or equal to the preset port value;

[0127] When the real business port monitors traffic, the first module of the target listener sends the traffic to the second module of the target listener through the internal network communication port. The first module is used to process four-layer network protocol traffic, and the second module is used to process seven-layer network protocol traffic.

[0128] In one possible implementation, when a newly created virtual address using the target protocol is detected, a corresponding internal network communication port is allocated to the virtual address from a cache;

[0129] Storing the internal network communication port in a port list;

[0130] When detecting the newly created target listener, obtaining the internal network communication port from the port list;

[0131] The internal network communication port is set as the communication port through which the first module sends traffic to the second module.

[0132] In a possible implementation, after obtaining the internal network communication port from the port list, deleting the internal network communication port from the port list;

[0133] After the target listener is deleted, the internal network communication port is added to the port list.

[0134] In a possible implementation, obtaining the internal network communication port from the port list;

[0135] Setting the port of the second module to monitor the internal network communication port and the real business port simultaneously;

[0136] Setting the port of the first module to the internal network communication port so that the first module sends traffic to the second module through the internal network communication port;

[0137] The port of the second module is set to only listen to the internal network communication port.

[0138] In one possible implementation, a first interface corresponding to the port of the first module and a second interface corresponding to the port of the second module are set;

[0139] The port of the first module is set through the first interface, and the port of the second module is set through the second interface.

[0140] In one possible implementation, first attribute information, second attribute information, and third attribute information are set in the metadata of each listener, wherein the first attribute information is used to configure the internal network communication port, the second attribute information is used to configure the port of the first module, and the third attribute information is used to configure the port of the second module.

[0141] In a possible implementation, when the real service port of the target listener is greater than or equal to a preset port value, the first module of the target listener sends the traffic to the second module of the target listener through the real service port.

[0142] Professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0143] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0144] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A traffic processing method for a monitor, characterized in that: include: Setting an internal network communication port for a target listener processing a target protocol, wherein the real service port of the target listener is smaller than a preset port value, and the internal network communication port is greater than or equal to the preset port value; When the real business port monitors traffic, the first module of the target listener sends the traffic to the second module of the target listener through the internal network communication port. The first module is used to process four-layer network protocol traffic, and the second module is used to process seven-layer network protocol traffic.

2. The method according to claim 1, characterized in that When the target listener is a newly created listener, setting an internal network communication port for the target listener processing the target protocol includes: When a newly created virtual address using the target protocol is detected, a corresponding internal network communication port is allocated to the virtual address from the cache; Storing the internal network communication port in a port list; When detecting the newly created target listener, obtaining the internal network communication port from the port list; The internal network communication port is set as the communication port through which the first module sends traffic to the second module.

3. The method according to claim 2, characterized in that The method further comprises: After obtaining the internal network communication port from the port list, deleting the internal network communication port from the port list; After the target listener is deleted, the internal network communication port is added to the port list.

4. The method according to claim 2, characterized in that When the target listener is an existing listener, setting an internal network communication port for the target listener processing the target protocol includes: Acquire the internal network communication port from the port list; Setting the port of the second module to monitor the internal network communication port and the real business port simultaneously; Setting the port of the first module to the internal network communication port so that the first module sends traffic to the second module through the internal network communication port; The port of the second module is set to only listen to the internal network communication port.

5. The method according to claim 4, characterized in that The method further comprises: Setting a first interface corresponding to the port of the first module and a second interface corresponding to the port of the second module; The port of the first module is set through the first interface, and the port of the second module is set through the second interface.

6. The method according to claim 1, characterized in that Before setting the internal network communication port for the target listener processing the target protocol, the method further includes: First attribute information, second attribute information and third attribute information are set in the metadata of each listener, the first attribute information is used to configure the internal network communication port, the second attribute information is used to configure the port of the first module, and the third attribute information is used to configure the port of the second module.

7. The method according to claim 1, characterized in that The method further comprises: When the real service port of the target listener is greater than or equal to the preset port value, the first module of the target listener sends the traffic to the second module of the target listener through the real service port.

8. A traffic processing device for a monitor, characterized in that: include: A setting module, configured to set an internal network communication port for a target listener processing a target protocol, wherein the real service port of the target listener is smaller than a preset port value, and the internal network communication port is greater than or equal to the preset port value; A sending module is used for sending the traffic to the second module of the target listener through the internal network communication port when the real business port monitors the traffic. The first module is used to process the four-layer network protocol traffic, and the second module is used to process the seven-layer network protocol traffic.

9. A monitoring device, characterized in that: include: A processor and a memory, wherein the processor is configured to execute a traffic processing program of a listener stored in the memory, so as to implement the traffic processing method of the listener according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the traffic processing method of the listener according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Unified deployment system and method for connection pools

    CN111431969A

  • Web access security encryption verification method and equipment based on UKEY hardware

    CN115333828A

  • Cloud load balancing method, device, equipment, storage medium and system

    CN117014443A

  • Load Balancing of Connectionless Traffic

    US20190116123A1