A hybrid cloud environment traffic collection method and device, a server and a storage medium

CN117914754BActive Publication Date: 2026-10-27科来网络技术股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410099157.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-24
Publication Date
2026-10-27
Estimated Expiration
2044-01-24

AI Technical Summary

Technical Problem

[0003]本发明的目的是提供一种混合云环境流量采集方法、装置、服务器及存储介质,解决了混合云环境各种混合云资源池的流量采集方法不一样,导致配置管理复杂,并且不能对同一宿主机内虚机通信产生的流量进行采集去重的问题

Benefits of technology

[0025]本发明提供的一种混合云环境流量采集方法,通过在混合云环境部署采集控制器和采集探针,采集控制器对接混合云资源池的应用程序接口,将云资源都拉取过来;采集探针连接采集控制器并等待采集控制器下发采集策略;通过采集控制器从资源视角配置采集策略,采集控制器将采集策略关联的虚拟端口下发给采集探针;采集探针的采集模块再根据虚拟端口信息找出与宿主机、虚拟机或容器对应的虚拟网络接口,以对虚拟网络接口的流量进行采集,获得数据包;采集探针对同一宿主机的虚机通信产生的流量进行采集去重;采集探针再根据采集策略指定的分发协议和分发目标,跟分发目标建立数据传输通道,对数据包进行封装发送。故此,实现了在任何混合云环境下,只需简单的配置采集策略就能实现云流量的采集,并且能够对同一宿主机内虚机通信产生的流量进行采集去重。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117914754B_ABST
    Figure CN117914754B_ABST
Patent Text Reader

Abstract

The application discloses a mixed cloud environment traffic collection method and device, a server and a storage medium, relates to the technical field of communication, and has the technical scheme as follows: a collection controller pulls at least one cloud resource of a mixed cloud resource pool application program interface; the collection controller generates an ID information for uniquely marking traffic for each cloud resource; the collection controller determines virtual port information associated with a collection strategy according to the preconfigured collection strategy, and sends the virtual port information, the ID information and the collection strategy to a corresponding collection probe; the collection probe finds out a virtual network interface corresponding to a host computer, a virtual machine or a container according to the virtual port information, collects traffic of the virtual network interface, and obtains a data packet; and the collection probe establishes a data transmission channel with a distribution target according to a distribution protocol specified by the collection strategy, encapsulates and sends the data packet.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and more specifically, to a method, apparatus, server, and storage medium for collecting traffic in a hybrid cloud environment. Background Technology

[0002] In a hybrid cloud environment, there are various cloud resource pools under a multi-cloud heterogeneous architecture, such as OpenStack, VMware, Kubernetes, and various private and public cloud platforms. The traffic collection methods of various cloud platforms are not the same. For example, the OpenStack platform uses OVS port mirroring or flow table methods, the Kubernetes environment collects the veth pair interface of Pod by deploying agents, and public clouds deploy agents on virtual machines to collect the traffic of virtual network cards. There is no unified management method to achieve efficient traffic collection, and traditional methods cannot deduplicate the traffic generated by virtual machine communication within the same host, which will lead to the collection of doubled traffic. Summary of the Invention

[0003] The purpose of this invention is to provide a method, device, server, and storage medium for traffic collection in a hybrid cloud environment. This invention solves the problem that different traffic collection methods exist for various hybrid cloud resource pools in a hybrid cloud environment, leading to complex configuration management and the inability to collect and deduplicate traffic generated by virtual machine communication within the same host machine.

[0004] The above-mentioned technical objective of the present invention is achieved through the following technical solution:

[0005] A first aspect of the present invention provides a method for traffic collection in a hybrid cloud environment, wherein a collection probe and a collection controller are deployed in the hybrid cloud environment, the collection probe being deployed on a host machine, a virtual machine, or a container, and the method includes:

[0006] The acquisition controller retrieves at least one cloud resource from the hybrid cloud resource pool application interface based on the docking parameters of the hybrid cloud resource pool in the hybrid cloud environment.

[0007] The acquisition controller generates a unique ID for each cloud resource to tag traffic;

[0008] The acquisition controller determines the virtual port information associated with the acquisition strategy based on the pre-configured acquisition strategy, and sends the virtual port information, ID information and acquisition strategy to the corresponding acquisition probe. The acquisition strategy includes four parameters: strategy type, acquisition object, distribution target and distribution protocol.

[0009] The acquisition probe identifies the virtual network interface corresponding to the host machine, virtual machine, or container based on the virtual port information, and collects the traffic of the virtual network interface to obtain data packets;

[0010] The acquisition probe establishes a data transmission channel with the distribution target according to the distribution protocol specified by the acquisition strategy, and encapsulates and sends the data packets.

[0011] In one implementation, the acquisition controller generates a unique ID for each cloud resource to tag traffic. Specifically, the acquisition controller configures an ID counter for each cloud resource. The initial value of the ID counter is 0. When a new cloud resource corresponding to the cloud resource is extracted, the value of the ID counter is incremented by one and assigned to the new cloud resource, thus obtaining the ID information for each cloud resource to tag traffic.

[0012] In one implementation, the system determines whether a cloud resource is a new cloud resource based on the ID of the cloud resource pool to which it belongs and its own UID.

[0013] In one implementation, the acquisition strategy pre-configured in the acquisition controller is configured based on the cloud resources contained in the hybrid cloud resource pool.

[0014] In one implementation, the method further includes: collecting and deduplicating the traffic generated by virtual machine communication on the same host machine using a collection probe.

[0015] In one implementation, the acquisition probe collects and deduplicates traffic generated by virtual machine communication on the same host machine, specifically as follows:

[0016] The acquisition probe establishes a flow table based on the source and destination IP tuples and virtual network interface information of the data packets generated by virtual machine communication on the same host machine;

[0017] When the acquisition probe collects a new data packet, it matches the source and destination IP tuples and virtual network interface information of the new data packet with the flow table. If the matching result is that the source and destination IP tuples of the new data packet are the same as those in the flow table, but the virtual network interface information of the new data packet is different from that in the flow table, then the new data packet belongs to duplicate traffic, and the acquisition probe performs deduplication processing on the new data packet; if the matching result is that the source and destination IP tuples of the new data packet are different from those in the flow table, then the source and destination IP tuples of the flow table are updated.

[0018] In one implementation, before the acquisition probe establishes a data transmission channel with the distribution target according to the distribution protocol specified by the acquisition strategy and encapsulates and sends the traffic data packets, the method further includes: the acquisition probe truncating, compressing or filtering the data packets.

[0019] A second aspect of the present invention provides a traffic acquisition device for a hybrid cloud environment, the device comprising: an acquisition probe and an acquisition controller deployed in a hybrid cloud environment, wherein the acquisition probe is deployed on a host machine, a virtual machine or a container;

[0020] The acquisition controller is used to pull at least one cloud resource from the hybrid cloud resource pool application interface according to the docking parameters of the hybrid cloud resource pool in the hybrid cloud environment; generate a unique ID information for each cloud resource to tag traffic; determine the virtual port information associated with the acquisition strategy according to the pre-configured acquisition strategy, and send the virtual port information, ID information and acquisition strategy to the corresponding acquisition probe, wherein the acquisition strategy includes four parameters: strategy type, acquisition object, distribution target and distribution protocol;

[0021] The data collection probe is used to locate the virtual network interface corresponding to the host machine, virtual machine, or container based on the virtual port information, so as to collect the traffic of the virtual network interface and obtain data packets; establish a data transmission channel with the distribution target according to the distribution protocol specified by the collection strategy, and encapsulate and send the data packets.

[0022] A third aspect of the present invention provides a server comprising: a processor and a memory, wherein the memory is used to store a computer program, the computer program including program instructions, and the processor is used to invoke the program instructions to execute the steps of a hybrid cloud environment traffic collection method provided in the first aspect of the present invention.

[0023] A fourth aspect of the present invention provides a readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform a hybrid cloud environment traffic acquisition method as provided in the first aspect of the present invention.

[0024] Compared with the prior art, the present invention has the following beneficial effects:

[0025] This invention provides a method for traffic collection in a hybrid cloud environment. It involves deploying a collection controller and collection probes in the hybrid cloud environment. The collection controller interfaces with the application programming interface (API) of the hybrid cloud resource pool to retrieve cloud resources. The collection probes connect to the collection controller and wait for the controller to issue collection policies. The collection controller configures the collection policies from a resource perspective, and then sends the virtual ports associated with the collection policies to the collection probes. The collection module of the collection probes then identifies the virtual network interfaces corresponding to the host machine, virtual machines, or containers based on the virtual port information, and collects traffic from these virtual network interfaces to obtain data packets. The collection probes also collect and deduplicate traffic generated by virtual machine communication within the same host machine. Finally, based on the distribution protocol and distribution target specified by the collection policy, the collection probes establish a data transmission channel with the distribution target and encapsulate and send the data packets. Therefore, this method enables cloud traffic collection in any hybrid cloud environment with simple configuration of the collection policy, and also allows for the collection and deduplication of traffic generated by virtual machine communication within the same host machine. Attached Figure Description

[0026] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:

[0027] Figure 1 A schematic diagram of the architecture of the cloud acquisition device provided in an embodiment of the present invention is shown;

[0028] Figure 2 The diagram shows a flowchart of a hybrid cloud environment traffic collection method provided by an embodiment of the present invention. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.

[0030] It should be noted that the terms "comprising" or "may include" used in the various embodiments of this application indicate the presence of the claimed function, operation, or element, and do not limit the addition of one or more functions, operations, or elements. Furthermore, as used in the various embodiments of this application, the terms "comprising," "having," and their cognates are intended only to indicate a specific feature, number, step, operation, element, component, or combination of the foregoing, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing, or adding one or more combinations of the foregoing.

[0031] Furthermore, terms such as "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0032] First, the technical terminology of this application will be explained.

[0033] Hybrid cloud resource pools are an organic whole system of various resources and products in public and private clouds, which helps users manage IT infrastructure across clouds and regions.

[0034] Cloud platform APIs, or Application Programming Interfaces, are a set of predefined functions and methods that allow developers to programmatically manipulate and control resources and services on a cloud platform. This type of API enables developers to easily perform tasks such as creating and managing virtual machines, storing and processing data, and deploying and running applications.

[0035] A hybrid cloud environment, as a form of cloud computing, integrates the resources and services of private and public clouds to form a collaborative and organic whole system. A hybrid cloud environment can contain a wide variety of complex environments, including combinations of at least one private cloud and at least one public cloud, two or more interconnected private clouds, two or more public clouds, or even bare metal or virtual servers connected to at least one public or private cloud.

[0036] Currently, in the multi-cloud heterogeneous architecture of hybrid cloud environments, there are various cloud resource pools, such as OpenStack, VMware, Kubernetes, and various private and public cloud platforms. The traffic collection methods of various cloud platforms are not the same. For example, the OpenStack platform uses OVS port mirroring or flow table methods, the Kubernetes environment collects the veth pair interface of Pod by deploying agents, and public clouds deploy agents on virtual machines to collect the traffic of virtual network cards. There is no unified management method to achieve efficient traffic collection. Moreover, traditional methods cannot deduplicate the traffic generated by virtual machine communication within the same host, which will lead to the collection of doubled traffic.

[0037] Therefore, to address the issue of inconsistent traffic collection methods across various hybrid cloud resource pools in a hybrid cloud environment, leading to complex configuration management and the inability to collect and deduplicate traffic generated by virtual machine communication within the same host, this application provides a hybrid cloud environment traffic collection method. The method involves deploying a collection controller and collection probes in the hybrid cloud environment. The collection controller interfaces with the application programming interface (API) of the hybrid cloud resource pool to retrieve cloud resources. The collection probes connect to the collection controller and wait for the controller to issue collection policies. The collection controller configures the collection policies from a resource perspective, and the controller sends the associated virtual ports to the collection probes. The collection module of the collection probes then identifies the virtual network interfaces corresponding to the host, virtual machine, or container based on the virtual port information to collect traffic from these interfaces and obtain data packets. The collection probes collect and deduplicate traffic generated by virtual machine communication within the same host. Finally, based on the distribution protocol and distribution target specified by the collection policy, the collection probes establish a data transmission channel with the distribution target and encapsulate and send the data packets. In summary, the method provided by this invention enables cloud traffic collection in any hybrid cloud environment with simple collection policy configuration, and also allows for the collection and deduplication of traffic generated by virtual machine communication within the same host.

[0038] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the embodiments and accompanying drawings. The illustrative embodiments and descriptions of this application are only for explaining this application and are not intended to limit this application.

[0039] Please refer to Figure 1 , Figure 1 This diagram illustrates a traffic acquisition architecture provided in an embodiment of the present invention. The acquisition system uses a client / server (C / S) architecture. It acquires and forwards cloud traffic by deploying agent programs for acquisition probes on the host machine, virtual machine, or container node. A acquisition controller is deployed at the central end to interface with the cloud platform API and manage acquisition policies for the acquisition probes. The acquisition probes act as clients, and the acquisition controller acts as a server, establishing TCP connections. The C / S architecture is a two-tier software architecture. In a C / S architecture, the application is divided into two parts: a client and a server. The client is the application installed on the user's device, responsible for providing the user interface and processing user input. The server is an independent computer primarily responsible for processing data and executing business logic.

[0040] Please refer to Figure 2 , Figure 2 This diagram illustrates a flow chart of a hybrid cloud environment traffic collection method provided by an embodiment of the present invention. Figure 2 As shown, the method includes:

[0041] S210, the acquisition controller retrieves at least one cloud resource from the hybrid cloud resource pool application interface based on the docking parameters of the hybrid cloud resource pool in the hybrid cloud environment.

[0042] In this embodiment, the connection parameters include the cloud platform's API access URL, username, password, etc.

[0043] Cloud resources include availability zones, host machines, virtual machines, VPCs, subnets, virtual ports, Kubernetes nodes, pods, namespaces, ingress, services, and workloads.

[0044] The S220 data acquisition controller generates a unique ID for each cloud resource to tag traffic.

[0045] In this embodiment, the ID information generation process is as follows: the acquisition controller configures an ID counter for each cloud resource. The initial value of the ID counter is 0. When a new cloud resource corresponding to the cloud resource is extracted, the value of the ID counter is incremented by one and allocated to the new cloud resource to obtain the ID information of each cloud resource used to tag traffic.

[0046] The method for distinguishing whether a cloud resource is new is as follows: First, determine if the cloud resource is new based on the ID of the cloud resource pool to which it belongs and its own UID. Second, check if there are existing values ​​for the ID of the cloud resource pool to which it belongs, its own UID, or other uniquely identifiable attributes.

[0047] S230, the acquisition controller determines the virtual port information associated with the acquisition strategy according to the pre-configured acquisition strategy, and sends the virtual port information, ID information and acquisition strategy to the corresponding acquisition probe. The acquisition strategy includes four parameters: strategy type, acquisition object, distribution target and distribution protocol.

[0048] In some embodiments, the acquisition strategy pre-configured in the acquisition controller is configured based on the cloud resources contained in the hybrid cloud resource pool. Specifically, the acquisition strategy configured by the acquisition controller is configured from the perspective of cloud resources (such as VPC, virtual machines, POD, etc.).

[0049] Furthermore, the collection controller identifies the collection probes that need to execute the collection policy based on the policy type and collection object. Then, it sends the associated virtual port (or Pod) information, distribution target, distribution protocol, traffic tag type, and traffic tag ID information to the identified collection probes.

[0050] S240: The acquisition probe identifies the virtual network interface corresponding to the host machine, virtual machine, or container based on the virtual port information, and collects the traffic of the virtual network interface to obtain data packets.

[0051] In this embodiment, the acquisition module of the acquisition probe then finds the corresponding virtual network interface of the local machine based on the virtual port information, and collects the traffic of the virtual network interface.

[0052] S250: The acquisition probe establishes a data transmission channel with the distribution target according to the distribution protocol specified by the acquisition strategy, and encapsulates and sends the data packets.

[0053] In this embodiment, the distribution protocol can be TCP, UDP, VXLAN, GRE, etc. Data packet encapsulation is a conventional technique in this field; therefore, it will not be described in detail here.

[0054] In some embodiments, the method further includes: collecting and deduplicating traffic generated by virtual machine communication on the same host machine using a collection probe. The deduplication process specifically involves: the collection probe establishing a flow table based on the source and destination IP tuples and virtual network interface information of the data packets generated by virtual machine communication on the same host machine; each time the collection probe collects a new data packet, it matches the source and destination IP tuples and virtual network interface information of the new data packet with the flow table; if the matching result shows that the source and destination IP tuples of the new data packet are the same as those in the flow table, and the virtual network interface information of the new data packet is different from that in the flow table, then the new data packet belongs to duplicate traffic, and the collection probe performs deduplication processing on the new data packet; if the matching result shows that the source and destination IP tuples of the new data packet are different from those in the flow table, then the source and destination IP tuples of the flow table are updated.

[0055] Specifically, when two virtual machines (VMs) on the same host communicate with each other, collecting traffic generated by both VMs will result in duplicate traffic. The deduplication method is to create a flow table containing a key field and a value field. The key is the source and destination IP address tuple of the data packet.<IP1,IP2> (IP1 contains the larger IP address, IP2 contains the smaller IP address), and the value is the virtual network interface information. When the probe collects traffic, it matches the key and value of the collected data packets against the established flow table. If a new data packet has the same key but a different value, it is considered duplicate traffic, and the newly collected data packet is deduplicated. If the key of a new data packet is different, the flow table is updated by inserting the source and destination IP tuples of the new data packet, along with the corresponding virtual network interface information.

[0056] In some embodiments, before the acquisition probe establishes a data transmission channel with the distribution target according to the distribution protocol specified by the acquisition strategy and encapsulates and sends the traffic data packets, the method further includes: the acquisition probe truncating, compressing or filtering the data packets.

[0057] In this embodiment, truncation is performed: In the forwarding module of the acquisition probe, a maximum length parameter can be set to limit the length of the data packet. When the length of the data packet exceeds this maximum length, the data packet is truncated to the specified length.

[0058] Compression can be performed using compression algorithms such as gzip or zlib. In the forwarding module of the acquisition probe, after receiving a data packet, it is first decompressed before further processing.

[0059] The filtering process is based on protocols, ports, and IP addresses. Specifically, in the forwarding module of the data acquisition probe, it can determine whether the filtering conditions are met based on information such as the protocol, port, and IP address of the data packet. If the conditions are met, the data packet is forwarded to the target device; otherwise, the data packet is discarded.

[0060] The present invention also provides a hybrid cloud environment traffic acquisition device, which can be used to perform a hybrid cloud environment traffic acquisition method described in the above embodiments of the present disclosure. The device includes: a acquisition probe and an acquisition controller deployed in a hybrid cloud environment, wherein the acquisition probe is deployed on a host machine, a virtual machine, or a container;

[0061] The acquisition controller is used to pull at least one cloud resource from the hybrid cloud resource pool application interface according to the docking parameters of the hybrid cloud resource pool in the hybrid cloud environment; generate a unique ID information for each cloud resource to tag traffic; determine the virtual port information associated with the acquisition strategy according to the pre-configured acquisition strategy, and send the virtual port information, ID information and acquisition strategy to the corresponding acquisition probe, wherein the acquisition strategy includes four parameters: strategy type, acquisition object, distribution target and distribution protocol;

[0062] The data collection probe is used to locate the virtual network interface corresponding to the host machine, virtual machine, or container based on the virtual port information, so as to collect the traffic of the virtual network interface and obtain data packets; establish a data transmission channel with the distribution target according to the distribution protocol specified by the collection strategy, and encapsulate and send the data packets.

[0063] Accordingly, this disclosure provides a hybrid cloud environment traffic collection device and a hybrid cloud environment traffic collection method. By deploying a collection controller and a collection probe in the hybrid cloud environment, the collection controller interfaces with the application programming interface of the hybrid cloud resource pool to retrieve cloud resources. The collection probe connects to the collection controller and waits for the collection controller to issue a collection policy. The collection controller configures the collection policy from a resource perspective, and the collection controller sends the virtual ports associated with the collection policy to the collection probe. The collection module of the collection probe then finds the virtual network interface corresponding to the host machine, virtual machine, or container based on the virtual port information to collect traffic from the virtual network interface and obtain data packets. The collection probe collects and deduplicates traffic generated by virtual machine communication within the same host machine. The collection probe then establishes a data transmission channel with the distribution target according to the distribution protocol and distribution target specified by the collection policy, and encapsulates and sends the data packets. Therefore, in any hybrid cloud environment, cloud traffic can be collected with simple configuration of the collection policy, and the collection and deduplication of traffic generated by virtual machine communication within the same host machine can be achieved.

[0064] In embodiments of this disclosure, a server is also provided, comprising: a processor and a memory, wherein the memory is used to store a computer program, the computer program including program instructions, and the processor is used to invoke the program instructions to execute, for example... Figure 1 This illustrates a method for collecting traffic in a hybrid cloud environment.

[0065] In embodiments of this disclosure, a computer-readable storage medium is also provided. This computer-readable storage medium is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both built-in storage media in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the operating system of a terminal. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the hybrid cloud environment traffic collection method in the above embodiments. Those skilled in the art should understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0066] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment 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 within the scope of protection of the present invention.

Claims

1. A method for collecting traffic in a hybrid cloud environment, characterized in that, In a hybrid cloud environment, a data acquisition probe and a data acquisition controller are deployed, wherein the data acquisition probe is deployed on a host machine, a virtual machine, or a container. The method includes: The acquisition controller retrieves at least one cloud resource from the hybrid cloud resource pool application interface based on the docking parameters of the hybrid cloud resource pool in the hybrid cloud environment. The acquisition controller generates a unique ID for each cloud resource to tag traffic; The acquisition controller determines the virtual port information associated with the acquisition strategy based on the pre-configured acquisition strategy, and sends the virtual port information, ID information and acquisition strategy to the corresponding acquisition probe. The acquisition strategy includes four parameters: strategy type, acquisition object, distribution target and distribution protocol. The acquisition probe identifies the virtual network interface corresponding to the host machine, virtual machine, or container based on the virtual port information, and collects the traffic of the virtual network interface to obtain data packets; The acquisition probe establishes a data transmission channel with the distribution target according to the distribution protocol specified by the acquisition strategy, and encapsulates and sends the data packets; The method also includes: collecting and deduplicating traffic generated by virtual machine communication on the same host machine using a collection probe; specifically, the collection and deduplication process includes: the collection probe establishing a flow table based on the source and destination IP tuples and virtual network interface information of the data packets generated by virtual machine communication on the same host machine; each time the collection probe collects a new data packet, it matches the source and destination IP tuples and virtual network interface information of the new data packet with the flow table; if the matching result is that the source and destination IP tuples of the new data packet are the same as the source and destination IP tuples of the flow table, and the virtual network interface information of the new data packet is different from the virtual network interface information of the flow table, then the new data packet belongs to duplicate traffic, and the collection probe performs deduplication processing on the new data packet; if the matching result is that the source and destination IP tuples of the new data packet are different from the source and destination IP tuples of the flow table, then the source and destination IP tuples of the flow table are updated.

2. The method for collecting traffic in a hybrid cloud environment according to claim 1, characterized in that, The acquisition controller generates a unique ID for each cloud resource to tag traffic. Specifically, the acquisition controller configures an ID counter for each cloud resource. The initial value of the ID counter is 0. When a new cloud resource corresponding to the cloud resource is extracted, the value of the ID counter is incremented by one and assigned to the new cloud resource, thus obtaining the ID information for each cloud resource to tag traffic.

3. The method for collecting traffic in a hybrid cloud environment according to claim 2, characterized in that, Determine whether a cloud resource is a new cloud resource based on the ID of the cloud resource pool to which it belongs and its own UID.

4. The method for collecting traffic in a hybrid cloud environment according to claim 1, characterized in that, The acquisition strategy pre-configured in the acquisition controller is based on the cloud resources contained in the hybrid cloud resource pool.

5. The method for collecting traffic in a hybrid cloud environment according to claim 1, characterized in that, Before the acquisition probe establishes a data transmission channel with the distribution target according to the distribution protocol specified by the acquisition strategy and encapsulates and sends the traffic data packets, the method further includes: the acquisition probe truncating, compressing or filtering the data packets.

6. A hybrid cloud environment traffic acquisition device, used to perform a hybrid cloud environment traffic acquisition method as described in any one of claims 1 to 5, characterized in that, The device includes: a data acquisition probe and a data acquisition controller deployed in a hybrid cloud environment, wherein the data acquisition probe is deployed on a host machine, a virtual machine, or a container; The acquisition controller is used to pull at least one cloud resource from the hybrid cloud resource pool application interface according to the docking parameters of the hybrid cloud resource pool in the hybrid cloud environment; generate a unique ID information for each cloud resource to tag traffic; determine the virtual port information associated with the acquisition strategy according to the pre-configured acquisition strategy, and send the virtual port information, ID information and acquisition strategy to the corresponding acquisition probe, wherein the acquisition strategy includes four parameters: strategy type, acquisition object, distribution target and distribution protocol; The data collection probe is used to locate the virtual network interface corresponding to the host machine, virtual machine, or container based on the virtual port information, so as to collect the traffic of the virtual network interface and obtain data packets; establish a data transmission channel with the distribution target according to the distribution protocol specified by the collection strategy, and encapsulate and send the data packets.

7. A server, characterized in that, include: A processor and a memory, wherein the memory is used to store a computer program, the computer program including program instructions, and the processor is used to invoke the program instructions to perform the steps of a hybrid cloud environment traffic acquisition method as described in any one of claims 1 to 5.

8. A readable storage medium, characterized in that, The readable storage medium stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform a hybrid cloud environment traffic acquisition method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Network shooting range data acquisition system and method

    CN114265666A

  • Traffic collection method and device, network apparatus and storage medium

    WO2020199780A1