Traffic information acquisition method and device, electronic equipment, virtual machine and storage medium
By obtaining abnormal traffic event notifications of virtual machines in the micro-isolated system and generating and updating traffic acquisition cycle strategies, the problem of difficult to set the traffic information acquisition cycle in the micro-isolated system is solved, and traffic acquisition efficiency and performance are improved.
Patent Information
- Application Number
- CN202310551737.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-16
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2043-05-16
AI Technical Summary
The existing micro-isolation system cannot set the traffic information acquisition cycle, which makes it difficult to balance network element performance and abnormal traffic recognition efficiency.
By obtaining the abnormal traffic event notification of the target virtual machine, the target traffic acquisition period update information is generated, and the information is sent to the second device, so that the target virtual machine can monitor traffic according to the adjusted traffic acquisition period strategy to realize the dynamics of the traffic acquisition period renew.
It realizes the setting and dynamic update of the traffic acquisition cycle, improves the efficiency and performance of traffic acquisition, and balances resource utilization and security threat identification.
Smart Images

Figure CN119011157A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security technology, and in particular to a method, device, electronic device, virtual machine and storage medium for acquiring flow information. Background Art
[0002] Micro-segmentation, as a typical technology for fine-grained control of east-west traffic, was first proposed by Gartner in its software-defined data center (SDDC) related technology system. It is used to provide secure access control between hosts (virtual machines, containers) (different from the secure access control between security domains in the past) and to visually manage east-west traffic. Currently, micro-segmentation technology has been used as one of the three key technologies of zero trust along with software-defined perimeter (SDP) and identity and access management (IAM). Among the micro-segmentation solutions proposed by the industry, the most deployed one is the host agent-based solution, in which the agent collects traffic information and periodically reports it to the micro-segmentation management module for analysis. In the telecom cloud, the guest OS of the network element has a certain degree of privacy. Installing a third-party agent has related problems such as poor compatibility and difficulty in locating problems. Therefore, the industry has proposed a micro-isolation solution with a built-in agent in the network element. However, in the existing traffic information acquisition method of the micro-isolation system, it is impossible to set the traffic information acquisition cycle and achieve a balance between network element performance and abnormal traffic identification efficiency. Summary of the invention
[0003] The purpose of the present invention is to provide a flow information acquisition method, device, virtual machine, electronic device and storage medium, so as to solve the problem that the flow information acquisition cycle cannot be set in the existing flow information acquisition method of the micro-isolation system.
[0004] In a first aspect, the present invention provides a method for acquiring flow information, which is applied to a first device, and the method includes:
[0005] Obtaining an abnormal traffic event notification of a target virtual machine; generating target traffic acquisition period update information according to the abnormal traffic event notification;
[0006] The target traffic acquisition cycle update information is sent to the second device, so that the second device sends the target traffic acquisition cycle update information to the target virtual machine, and the target virtual machine adjusts the current target traffic acquisition cycle policy according to the target traffic acquisition cycle update information to obtain the adjusted traffic acquisition cycle policy, and the target virtual machine performs traffic monitoring according to the adjusted traffic acquisition cycle policy.
[0007] Optionally, before obtaining the abnormal traffic event notification of the target virtual machine, the method further includes:
[0008] Set the initial traffic acquisition cycle strategy corresponding to the virtual machine;
[0009] Sending the initial traffic acquisition cycle policy corresponding to the virtual machine to the second device, so that the second device sends the corresponding initial traffic acquisition cycle policy to the virtual machine, and the virtual machine performs traffic monitoring according to the initial traffic acquisition cycle policy;
[0010] wherein the target virtual machine is one of the virtual machines;
[0011] The initial traffic acquisition cycle strategy includes at least one of the following:
[0012] The proxy module of the virtual machine obtains an initial period of traffic information from the storage and data retrieval module;
[0013] An initial period in which the proxy module of the virtual machine sends traffic information to the second device;
[0014] An initial period in which the first device obtains flow information from the second device.
[0015] Optionally, obtaining the abnormal traffic event notification of the target virtual machine includes:
[0016] Generate network topology information and a security policy corresponding to the virtual machine according to the traffic information of the virtual machine sent by the second device;
[0017] According to the target information and the initial traffic acquisition cycle policy corresponding to the virtual machine, a first traffic acquisition cycle policy corresponding to the virtual machine is obtained; the target information includes at least one of the following: the network topology information; the traffic processing volume information of the virtual machine; the workload information of the second device;
[0018] Sending the security policy and the corresponding first traffic acquisition cycle policy corresponding to the virtual machine to the second device, so that the second device sends the corresponding security policy and the corresponding first traffic acquisition cycle policy to the virtual machine, and enables the virtual machine to perform traffic monitoring according to the corresponding security policy and the corresponding first traffic acquisition cycle policy;
[0019] Acquire abnormal traffic information of the target virtual machine sent by the second device, where the abnormal traffic information is obtained by the target virtual machine through traffic monitoring according to the security policy corresponding to the target virtual machine sent by the second device, and sent to the second device;
[0020] Generate an abnormal traffic event notification of the target virtual machine according to the abnormal traffic information;
[0021] wherein the target virtual machine is one of the virtual machines, and the target traffic acquisition cycle policy is a traffic acquisition cycle policy in the first traffic acquisition cycle policy;
[0022] The first traffic acquisition cycle strategy includes at least one of the following:
[0023] The identity of the virtual machine;
[0024] The period during which the proxy module in the virtual machine obtains the flow information from the storage and data retrieval module;
[0025] A period during which the proxy module in the virtual machine sends traffic information to the second device;
[0026] The first device obtains the flow information from the second device during a period.
[0027] Optionally, obtaining the first traffic acquisition cycle policy corresponding to the virtual machine according to the target information and the initial traffic acquisition cycle policy corresponding to the virtual machine includes:
[0028] The initial traffic acquisition cycle strategy corresponding to the virtual machine is updated according to the target information to obtain a first traffic acquisition cycle strategy corresponding to the virtual machine;
[0029] The network topology information includes at least one of the following:
[0030] Type information of the virtual machine; specification information of the virtual machine.
[0031] Optionally, the target traffic acquisition cycle strategy includes at least one of the following:
[0032] The period during which the proxy module in the target virtual machine obtains traffic information from the storage and data retrieval module;
[0033] A period during which the proxy module in the target virtual machine sends traffic information to the second device;
[0034] A period during which the first device obtains traffic information from the second device;
[0035] The adjusted traffic acquisition cycle strategy includes at least one of the following:
[0036] The proxy module in the target virtual machine obtains the adjusted period of traffic information from the storage and data retrieval module;
[0037] An adjusted period during which the proxy module in the target virtual machine sends traffic information to the second device;
[0038] The first device obtains the adjusted period of flow information from the second device.
[0039] Optionally, the method further comprises:
[0040] If no abnormal traffic event notification of the target virtual machine is obtained within a preset time period, generating target adjustment information;
[0041] Send the target adjustment information to the second device so that the second device sends the target adjustment information to the target virtual machine, and the target virtual machine adjusts the adjusted traffic acquisition cycle policy to the target traffic acquisition cycle policy according to the target adjustment information, so that the target virtual machine performs traffic monitoring according to the target traffic acquisition cycle policy.
[0042] In a second aspect, an embodiment of the present invention further provides a method for obtaining traffic information, which is applied to a target virtual machine, and the method includes:
[0043] Receiving target traffic acquisition period update information sent by the second device;
[0044] Adjust the current target traffic acquisition cycle strategy according to the target traffic acquisition cycle update information to obtain an adjusted traffic acquisition cycle strategy; and perform traffic monitoring according to the adjusted traffic acquisition cycle strategy;
[0045] The target traffic acquisition period update information is generated by the first device according to the abnormal traffic event notification of the target virtual machine.
[0046] Optionally, the target traffic acquisition cycle strategy includes at least one of the following:
[0047] The period during which the proxy module in the target virtual machine obtains traffic information from the storage and data retrieval module;
[0048] A period during which the proxy module in the target virtual machine sends traffic information to the second device;
[0049] The adjusted traffic acquisition cycle strategy includes at least one of the following:
[0050] The proxy module in the target virtual machine obtains the adjusted period of traffic information from the storage and data retrieval module;
[0051] The proxy module in the target virtual machine sends the adjusted period of traffic information to the second device.
[0052] Optionally, before receiving the target traffic acquisition period update information sent by the second device, the method further includes:
[0053] receiving an initial traffic acquisition cycle policy corresponding to the target virtual machine sent by the second device, where the initial traffic acquisition cycle policy corresponding to the target virtual machine is set by the first device and sent to the second device;
[0054] Performing traffic monitoring according to the initial traffic acquisition cycle strategy corresponding to the target virtual machine;
[0055] The initial traffic acquisition cycle strategy corresponding to the target virtual machine includes at least one of the following:
[0056] The proxy module of the target virtual machine obtains an initial period of traffic information from the storage and data retrieval module;
[0057] The proxy module of the target virtual machine sends an initial period of traffic information to the second device.
[0058] Optionally, before receiving the target traffic acquisition period update information sent by the second device, the method further includes:
[0059] Receive a security policy and a corresponding first traffic acquisition cycle policy corresponding to the target virtual machine sent by the second device, wherein the security policy is generated by the first device according to the traffic information of the target virtual machine and sent to the second device; the first traffic acquisition cycle policy corresponding to the target virtual machine is generated by the first device according to the network topology information and the initial traffic acquisition cycle policy and sent to the second device, and the network topology information is generated by the first device according to the traffic information of the virtual machine;
[0060] Performing traffic monitoring according to the security policy corresponding to the target virtual machine and the corresponding first traffic acquisition cycle policy;
[0061] In a case where abnormal traffic information of the target virtual machine is obtained by traffic monitoring according to the security policy, the abnormal traffic information of the target virtual machine is sent to the second device, so that the second device sends the abnormal traffic information of the target virtual machine to the first device, and the first device generates an abnormal traffic event notification of the target virtual machine according to the abnormal traffic information of the target virtual machine;
[0062] wherein the target virtual machine is one of the virtual machines;
[0063] The first traffic acquisition cycle strategy corresponding to the target virtual machine includes at least one of the following:
[0064] The identity of the target virtual machine;
[0065] The period during which the proxy module in the target virtual machine obtains traffic information from the storage and data retrieval module;
[0066] The period during which the proxy module in the target virtual machine sends traffic information to the second device.
[0067] Optionally, the method further comprises:
[0068] receiving target adjustment information sent by the second device;
[0069] Adjusting the adjusted traffic acquisition cycle strategy to the target traffic acquisition cycle strategy according to the target adjustment information;
[0070] Performing flow monitoring according to the target flow acquisition cycle strategy;
[0071] The target adjustment information is generated when the first device does not obtain the abnormal traffic event notification of the target virtual machine within a preset time period, and is sent to the second device.
[0072] In a third aspect, an embodiment of the present invention further provides a method for acquiring flow information, which is applied to a second device, and the method includes:
[0073] Receive target traffic acquisition period update information sent by the first device; the target traffic acquisition period update information is generated by the first device according to the abnormal traffic event notification of the target virtual machine;
[0074] The target traffic acquisition cycle update information is sent to the target virtual machine, so that the target virtual machine adjusts the current target traffic acquisition cycle policy according to the target traffic acquisition cycle update information to obtain the adjusted traffic acquisition cycle policy, and enables the target virtual machine to obtain the adjusted traffic acquisition cycle policy.
[0075] Optionally, before receiving the target traffic acquisition period update information sent by the first device, the method further includes:
[0076] Receive an initial traffic acquisition cycle policy corresponding to the virtual machine sent by the first device; the initial traffic acquisition cycle policy corresponding to the virtual machine is set by the first device;
[0077] Sending a corresponding initial traffic acquisition cycle policy to the virtual machine, so that the virtual machine performs traffic monitoring according to the initial traffic acquisition cycle policy;
[0078] wherein the target virtual machine is one of the virtual machines;
[0079] The initial traffic acquisition cycle strategy includes at least one of the following:
[0080] The proxy module of the virtual machine obtains an initial period of traffic information from the storage and data retrieval module;
[0081] The proxy module of the virtual machine sends an initial period of traffic information to the second device.
[0082] Optionally, before receiving the target traffic acquisition period update information sent by the first device, the method further includes:
[0083] Receive a security policy and a corresponding first traffic acquisition cycle policy corresponding to the virtual machine sent by the first device;
[0084] Sending the corresponding security policy and the corresponding first traffic acquisition cycle policy to the virtual machine, so that the virtual machine performs traffic monitoring according to the corresponding security policy and the corresponding first traffic acquisition cycle policy;
[0085] receiving abnormal traffic information of the target virtual machine sent by the target virtual machine; the abnormal traffic information of the target virtual machine is obtained by the target virtual machine through traffic monitoring according to the security policy sent by the second device;
[0086] Sending abnormal traffic information of the target virtual machine to the first device, so that the first device generates an abnormal traffic event notification of the target virtual machine according to the abnormal traffic information;
[0087] The target virtual machine is one of the virtual machines, and the target traffic acquisition cycle policy is one of the first traffic acquisition cycle policies;
[0088] The first traffic acquisition cycle strategy includes at least one of the following:
[0089] The identity of the virtual machine;
[0090] The period during which the proxy module in the virtual machine obtains the flow information from the storage and data retrieval module;
[0091] The period during which the proxy module in the virtual machine sends traffic information to the second device.
[0092] Optionally, the method further comprises:
[0093] receiving target adjustment information sent by the first device;
[0094] Sending the target adjustment information to the target virtual machine, so that the target virtual machine adjusts the adjusted traffic acquisition cycle policy to the target traffic acquisition cycle policy according to the target adjustment information, and enables the target virtual machine to perform traffic monitoring according to the target traffic acquisition cycle policy;
[0095] The target adjustment information is generated when the first device does not obtain the abnormal traffic event notification of the target virtual machine within a preset time period, and is sent to the second device.
[0096] In a fourth aspect, an embodiment of the present invention further provides a flow information acquisition device, which is applied to a first device, and the device includes:
[0097] A first acquisition module, used to obtain an abnormal traffic event notification of a target virtual machine;
[0098] A first processing module, configured to generate target traffic acquisition period update information according to the abnormal traffic event notification;
[0099] The first sending module is used to send the target traffic acquisition cycle update information to the second device, so that the second device sends the target traffic acquisition cycle update information to the target virtual machine, and the target virtual machine adjusts the current target traffic acquisition cycle policy according to the target traffic acquisition cycle update information to obtain the adjusted traffic acquisition cycle policy, and enables the target virtual machine to monitor traffic according to the adjusted traffic acquisition cycle policy.
[0100] In a fifth aspect, an embodiment of the present invention further provides a flow information acquisition device, which is applied to a target virtual machine, and the device includes:
[0101] A first receiving module, configured to receive target traffic acquisition period update information sent by a second device;
[0102] A first adjustment module, configured to adjust the current target traffic acquisition cycle strategy according to the target traffic acquisition cycle update information to obtain an adjusted traffic acquisition cycle strategy;
[0103] A first monitoring module, configured to perform flow monitoring according to the adjusted flow acquisition cycle strategy;
[0104] The target traffic acquisition period update information is generated by the first device according to the abnormal traffic event notification of the target virtual machine.
[0105] In a sixth aspect, an embodiment of the present invention further provides a flow information acquisition device, which is applied to a second device, and the device includes:
[0106] A second receiving module is used to receive target traffic acquisition period update information sent by the first device; the target traffic acquisition period update information is generated by the first device according to the abnormal traffic event notification of the target virtual machine;
[0107] The second sending module is used to send the target traffic acquisition cycle update information to the target virtual machine, so that the target virtual machine adjusts the current target traffic acquisition cycle policy according to the target traffic acquisition cycle update information to obtain the adjusted traffic acquisition cycle policy, and enables the target virtual machine to obtain the adjusted traffic acquisition cycle policy.
[0108] In the seventh aspect, an embodiment of the present invention further provides an electronic device, which is a first device and includes: a transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; when the processor executes the program or instruction, it implements the steps in the traffic information acquisition method described in any one of the first aspects.
[0109] In the eighth aspect, an embodiment of the present invention further provides a virtual machine, which is a target virtual machine, including: a transceiver, a processor, a memory, and a program or instruction stored on the memory and executable on the processor; when the processor executes the program or instruction, it implements the steps in the traffic information acquisition method described in any one of the second aspects.
[0110] In the ninth aspect, an embodiment of the present invention further provides an electronic device, which is a second device and includes: a transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; when the processor executes the program or instruction, it implements the steps in the traffic information acquisition method described in any one of the third aspects.
[0111] In the tenth aspect, an embodiment of the present invention further provides a readable storage medium having a program or instruction stored thereon, wherein when the program or instruction is executed by a processor, the steps in the method for obtaining flow information as described in any one of the first aspect are implemented, or the steps in the method for obtaining flow information as described in any one of the second aspect are implemented, or the steps in the method for obtaining flow information as described in any one of the third aspect are implemented.
[0112] The beneficial effects of the above technical solution of the present invention are as follows:
[0113] The method for obtaining traffic information provided by the scheme of the present invention obtains an abnormal traffic event notification of a target virtual machine through a first device, generates target traffic acquisition cycle update information according to the abnormal traffic event notification, sends the target traffic acquisition cycle update information to a second device, and the second device sends the target traffic acquisition cycle update information to the target virtual machine. The target virtual machine adjusts the current target traffic acquisition cycle strategy according to the target traffic acquisition cycle update information to obtain an adjusted traffic acquisition cycle strategy. The target virtual machine monitors traffic according to the adjusted traffic acquisition cycle strategy, thereby realizing the setting and dynamic update of the traffic acquisition cycle. BRIEF DESCRIPTION OF THE DRAWINGS
[0114] Figure 1 An architecture diagram of eBPF provided by an embodiment of the present invention;
[0115] Figure 2 A flow chart of a method for acquiring flow information applied to a first device provided in an embodiment of the present invention;
[0116] Figure 3 A schematic diagram of the structure of a traffic acquisition system for a micro-isolation system provided in an embodiment of the present invention;
[0117] Figure 4 A schematic diagram of the structure of a flow acquisition cycle management submodule provided in an embodiment of the present invention;
[0118] Figure 5 A flow chart of a method for acquiring traffic information applied to a target virtual machine provided by an embodiment of the present invention;
[0119] Figure 6 A schematic diagram of the structure of an agent provided in an embodiment of the present invention;
[0120] Figure 7 A flow chart of a method for acquiring flow information applied to a second device provided in an embodiment of the present invention;
[0121] Figure 8 A specific flow chart of the method for obtaining flow information provided by an embodiment of the present invention;
[0122] Fig. 9 A schematic diagram of the structure of a flow information acquisition device applied to a first device provided in an embodiment of the present invention;
[0123] Fig.10 A schematic diagram of the structure of a flow information acquisition device applied to a target virtual machine provided by an embodiment of the present invention;
[0124] Fig.11 A schematic diagram of the structure of a flow information acquisition device applied to a second device provided in an embodiment of the present invention;
[0125] Fig.12 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0126] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0127] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present invention. Therefore, the references to "in one embodiment", "in one embodiment", or "in an alternative embodiment" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0128] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0129] Additionally, the terms "system" and "network" are often used interchangeably herein.
[0130] In the embodiments provided in the present application, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.
[0131] For ease of understanding, before describing the specific embodiments of the present invention, the following description is first given:
[0132] The following are the main types of micro-isolation solutions proposed by the industry:
[0133] Independent physical security devices: Physical security devices, such as firewalls, are deployed at the boundaries of security domains to isolate different security domains. This will lead to the deployment of a large number of physical security devices. The network of a data center is dynamically changing and has no fixed physical boundaries. Therefore, statically deployed physical security devices will lead to a large amount of traffic diversion and policy configuration.
[0134] Host agent: Install agent software on each virtual machine to check the traffic in and out of the virtual machine and the applications and content inside the virtual machine. This method is dependent on the virtual machine operating system;
[0135] Virtual switch: Divide virtual local area networks (VLNs) and set access control lists (ACLs) on virtual switches. This method requires the capabilities of the switch.
[0136] Hypervisor-based control: The Hypervisor and virtual switch work together to control the virtual network card of the virtual machine. This method relies on the Application Programming Interface (API) provided by the Hypervisor;
[0137] Traffic diversion: divert the traffic of the virtual machine that needs to be protected to a security virtual machine or physical security device that specializes in security analysis for analysis. This method does not rely on the virtual environment and requires a traffic diversion mechanism.
[0138] Extended Berkeley Packet Filter (eBPF) is a packet filtering technology. The architecture of eBPF is as follows: Figure 1 As shown in the figure, it is an extension of the Berkeley Packet Filter (BPF) technology. With the help of the Just-In-Time Compiler (JIT), eBPF runs a virtual machine in the kernel to ensure that only verified safe eBPF instructions are executed by the kernel. At the same time, because eBPF instructions still run in the kernel, there is no need to copy data to the user state, which greatly improves the efficiency of event processing. eBPF has been widely used in fault diagnosis, network optimization, security control, performance monitoring and other fields. eBPF will only be executed after an event is triggered. These events include system calls, kernel trace points, kernel function and user state function call exit, network events, etc. The eBPF program is loaded into the kernel in the form of bytecode, attached to the mount point to trigger execution, and interacts with the user state program through the eBPF Map.
[0139] In order to solve the problem that the flow information acquisition cycle cannot be set in the existing flow information acquisition method of the micro-isolation system, the embodiments of the present invention provide a flow information acquisition method, device, virtual machine, electronic device and storage medium.
[0140] like Figure 2 As shown, an embodiment of the present invention provides a method for obtaining flow information, which is applied to a first device, and the method includes:
[0141] Step 201: Acquire an abnormal traffic event notification of a target virtual machine, where the abnormal traffic event notification includes an identity of the target virtual machine.
[0142] It should be noted that the flow information acquisition method provided in the embodiment of the present invention is applied to the flow acquisition system of the micro-isolation system. The structure of the flow acquisition system of the micro-isolation system is as follows: Figure 3 As shown, the traffic acquisition system of the micro-isolation system includes a micro-isolation management module (including a security monitoring submodule), a convergence forwarding module connected to the micro-isolation management module and set in the management virtual machine (Virtual Machine, VM), and a newly added eBPF program, an agent module (agent) and a storage and data retrieval module (Map) in the management virtual machine (management VM) and the business virtual machine (business VM1), wherein the agent is connected to the convergence forwarding module. The eBPF program of the network element kernel collects the traffic quintuple information (traffic information) in real time and filters the traffic according to the security policy issued by the micro-isolation management module, that is, the security monitoring stage is carried out. When abnormal traffic information is found, an abnormal traffic log is generated and written to the Map; at the same time, the traffic information is also stored in the Map, and the agent periodically reads the traffic information from the Map (such as 40s), and sends it to the convergence forwarding module periodically (such as 5 minutes) after preliminary integration, and the convergence forwarding module reports it to the micro-isolation management center. Among them, the micro-isolation management module includes a traffic acquisition cycle management submodule, and the agent includes a traffic acquisition cycle setting submodule.
[0143] In an embodiment of the present invention, the first device is a micro-isolation management module, the target virtual machine is one of the virtual machines connected to the first device, the target virtual machine can be a management VM or a business VM, and the second device is an aggregation forwarding module in the management VM.
[0144] In this step, when the security monitoring stage is performed, when the traffic information read by the agent from the Map contains abnormal traffic information of the target virtual machine, an abnormal traffic log is generated according to the abnormal traffic information, and the agent immediately reports the abnormal traffic information and the abnormal traffic log to the second device, and the second device forwards the abnormal traffic information and the abnormal traffic log to the first device, and the traffic acquisition cycle management submodule of the first device generates an abnormal traffic event notification of the target virtual machine according to the abnormal traffic information and the abnormal traffic log, wherein it can also be that the security monitoring submodule of the first device generates an abnormal traffic event notification of the target virtual machine according to the abnormal traffic information and the abnormal traffic log, and sends the abnormal traffic event notification of the target virtual machine to the traffic acquisition cycle management submodule, and the abnormal traffic event notification of the target virtual machine includes the detection time of the abnormal traffic information and the identity of the target virtual machine (i.e., VM id).
[0145] Step 202: Generate target traffic acquisition cycle update information according to the abnormal traffic event notification, wherein the target traffic acquisition cycle update information includes an adjustment method for the current target traffic acquisition cycle policy of the target virtual machine.
[0146] In this step, after the traffic acquisition cycle management submodule obtains the abnormal traffic event notification of the target virtual machine, the traffic acquisition cycle management submodule generates target traffic acquisition cycle update information based on the abnormal traffic event notification and the identity of the target virtual machine. The target traffic acquisition cycle update information includes the adjustment method of the current target traffic acquisition cycle policy of the VM (target virtual machine) accessed by the abnormal traffic and the identity of the target virtual machine (VM id).
[0147] The target traffic acquisition cycle strategy includes at least one of the following:
[0148] The agent module (agent) in the target virtual machine obtains the period of traffic information from the storage and data retrieval module (Map);
[0149] A period during which an agent module (agent) in the target virtual machine sends traffic information to the second device;
[0150] The first device obtains the flow information from the second device during a period.
[0151] Step 203: Send the target traffic acquisition cycle update information to the second device, so that the second device sends the target traffic acquisition cycle update information to the target virtual machine, and enables the target virtual machine to adjust the current target traffic acquisition cycle policy according to the target traffic acquisition cycle update information to obtain the adjusted traffic acquisition cycle policy, and enables the target virtual machine to perform traffic monitoring according to the adjusted traffic acquisition cycle policy.
[0152] Exemplarily, the target traffic acquisition cycle strategy in the target traffic acquisition cycle update information is adjusted by shortening the cycle in the target traffic acquisition cycle strategy, including at least one of the following:
[0153] The period for the agent in the target virtual machine to obtain traffic information from the Map is shortened by one time unit;
[0154] The period of sending flow information from the agent in the target virtual machine to the second device is shortened by one time unit;
[0155] The period during which the first device obtains traffic information from the second device is shortened by one time unit;
[0156] A time unit may be 20 seconds or 30 seconds.
[0157] As another example, the target traffic acquisition cycle strategy in the target traffic acquisition cycle update information is adjusted by shortening the cycle in the target traffic acquisition cycle strategy, including at least one of the following:
[0158] The period for the agent in the target virtual machine to obtain traffic information from the Map is shortened to a first preset time length;
[0159] The period during which the agent in the target virtual machine sends traffic information to the second device is shortened by a second preset time length;
[0160] The period during which the first device obtains the flow information from the second device is shortened by a third preset time period;
[0161] Among them, the first preset time length is greater than the third preset time length, the second preset time length is greater than the third preset time length, or the first preset time length, the second preset time length and the third preset time length are all different, and the size relationship between them is not limited.
[0162] The adjusted traffic acquisition cycle strategy includes:
[0163] The agent module (agent) in the target virtual machine obtains the adjusted period of traffic information from the storage and data retrieval module (Map);
[0164] The agent module (agent) in the target virtual machine sends the adjusted period of traffic information to the second device.
[0165] In this step, the traffic acquisition cycle management submodule of the first device sends the target traffic acquisition cycle update information and the identity of the target virtual machine to the second device, and the second device sends the target traffic acquisition cycle update information to the agent of the target virtual machine according to the identity of the target virtual machine. The agent includes a traffic acquisition cycle setting submodule, and the traffic acquisition cycle setting submodule adjusts the current target traffic acquisition cycle policy according to the target traffic acquisition cycle update information to obtain the adjusted traffic acquisition cycle policy, sets the adjusted period for the agent to obtain traffic information from the Map and / or the adjusted period for the agent to send traffic information to the second device, and monitors and reports the traffic information according to the above-mentioned adjusted period.
[0166] In an optional embodiment of the present invention, step 201 includes:
[0167] Before the security monitoring stage, an embodiment of the present invention also includes a traffic learning stage, that is, before step 201, the method also includes: in the traffic learning stage, the traffic acquisition cycle management submodule of the micro-isolation management module sets the initial traffic policy corresponding to the virtual machine; wherein each of the initial traffic acquisition cycle policies includes at least one of the following: the agent module (agent) of the virtual machine obtains the initial period of traffic information from the storage and data retrieval module (Map); the agent module (agent) of the virtual machine sends the initial period of traffic information to the second device; the first device obtains the initial period of traffic information from the second device.
[0168] The second device sends a corresponding initial traffic acquisition cycle strategy to each of the virtual machines, and the initial traffic acquisition cycle strategy includes at least one of the following: the agent module (agent) of the virtual machine obtains the initial cycle of traffic information from the storage and data retrieval module (Map); the agent module (agent) of the virtual machine sends the initial cycle of traffic information to the second device. The traffic acquisition cycle setting submodule in the agent of the virtual machine sets the initial cycle of the agent obtaining traffic information from the Map and / or the initial cycle of the agent sending traffic information to the second device according to the initial traffic acquisition cycle strategy, and the agent monitors traffic according to the above initial cycle and sends traffic information to the second device.
[0169] It should be noted that the traffic learning phase is also called the testing phase, which requires a large amount of traffic information for learning, so the type of virtual machine in the virtualized network function (VNF) may be ignored. The traffic acquisition cycle management submodule of the first device sets the initial traffic acquisition cycle strategy for generating the virtual machine, wherein the target virtual machine is one of the at least one virtual machine, that is, the target virtual machine can be a management VM or a business VM.
[0170] In an optional embodiment of the present invention, step 201 includes: in the traffic learning stage, the second device obtains the traffic information of the virtual machine sent by the agent of the virtual machine in the virtualized network function VNF connected to the second device (the number of VNFs connected to the second device is at least one, and the number of virtual machines in each VNF is also at least one, and the traffic information of the virtual machine can be the traffic monitoring and sending of the virtual machine according to the initial traffic acquisition cycle policy), the second device sends the traffic information of each virtual machine to the first device, the traffic acquisition cycle management submodule of the first device obtains the traffic information of each virtual machine sent by the second device, the first device learns according to the traffic information of each virtual machine, generates network topology information and the security policy corresponding to each virtual machine, and the first device sends the security policy and the corresponding virtual machine identity (VM) to the second device. id), the second device sends a security policy to the agent of the corresponding virtual machine according to the identity of the virtual machine, the agent stores the security policy in the Map of the virtual machine, the eBPF program of the virtual machine obtains the security policy from the Map, and performs traffic monitoring according to the security policy, entering the security monitoring level stage, and sending the security policy corresponding to each virtual machine to the agent in the corresponding virtual machine, entering the security monitoring stage, and the traffic acquisition cycle management submodule of the first device generates a corresponding first traffic acquisition cycle policy according to the target information and the initial traffic acquisition cycle policy corresponding to each virtual machine, wherein the target information includes at least one of the following: the network topology information; the traffic processing volume information of the virtual machine; the workload information of the second device;
[0171] Each of the first traffic acquisition cycle strategies includes at least one of the following:
[0172] The identity of the virtual machine;
[0173] The period during which the agent module (agent) in the virtual machine obtains traffic information from the storage and data retrieval module (Map);
[0174] A period during which an agent module (agent) in the virtual machine sends traffic information to the second device;
[0175] The first device obtains the flow information from the second device during a period.
[0176] The traffic acquisition cycle management submodule of the first device forwards the updated first traffic acquisition cycle strategy to the second device, and the first traffic acquisition cycle strategy includes at least one of the following: the identity of the virtual machine; the cycle of the agent acquiring traffic information from the Map; the cycle of the agent sending traffic information to the second device. The second device sends the first traffic acquisition cycle strategy to the agent of the corresponding virtual machine according to the identity of the virtual machine, and the traffic acquisition cycle setting submodule in the agent sets the cycle of the agent acquiring traffic information from the Map and / or the cycle of the agent sending traffic information to the second device according to the first traffic acquisition cycle strategy, and the agent monitors the traffic information and reports the traffic information according to the above cycles.
[0177] If the eBPF program of the target virtual machine performs traffic monitoring according to the security policy corresponding to the target virtual machine to obtain abnormal traffic information, the eBPF program of the target virtual machine sends the abnormal traffic information to the agent of the target virtual machine, the agent sends the abnormal traffic information of the target virtual machine and the identity of the target virtual machine to the second device, the second device reports the abnormal traffic information and the identity of the target virtual machine to the first device, and the first device generates an abnormal traffic event notification of the target virtual machine according to the identity of the target virtual machine, the network topology information and the abnormal traffic information of the target virtual machine.
[0178] The network topology information includes at least one of the following or can display at least one of the following:
[0179] The VNF connected to the first device, the identity of the VNF, the virtual machines in the VNF, the identity of each virtual machine, the connection relationship between the VNFs, the connection relationship between the virtual machines, the VM type of the VNF, the network function carried by the VM, the workload of the first device, the workload of the second device, whether the VM receives abnormal traffic, and the duration of the abnormal traffic.
[0180] The target virtual machine is one of the virtual machines.
[0181] Further, according to the target information and the initial traffic acquisition cycle policy corresponding to the virtual machine, a first traffic acquisition cycle policy corresponding to the virtual machine is obtained, including:
[0182] The traffic acquisition cycle management submodule of the first device updates the initial traffic acquisition cycle strategy according to the type of VM in the VNF displayed by the network topology information, the specification information of the VM, the traffic processing volume information of the virtual machine, and the workload information of the micro-isolation management module, and obtains a first traffic acquisition cycle strategy corresponding to each of the virtual machines, wherein the first traffic acquisition cycle strategy includes the target traffic acquisition cycle strategy;
[0183] For example, for a virtual VM, it is interconnected with the network management of the management domain and the service VM in the VNF at the same time, and the exposure area is relatively large. Therefore, when the initial traffic acquisition cycle policy is updated, the initial period of the agent reading the traffic information from the Map and the initial period of the agent reporting the traffic information to the second device in the initial traffic acquisition cycle policy are respectively increased in time, for example, 1 time unit and 2 time units are respectively increased, so as to obtain the period of the agent obtaining the traffic information from the Map and the period of the agent sending the traffic information to the second device in the first traffic acquisition cycle policy. For a service VM that performs data / signaling processing, there is no direct external exposure interface, and its security risk is relatively low. Therefore, when the initial traffic acquisition cycle policy is updated, the initial period of the agent reading the traffic information from the Map and the initial period of the agent reporting the traffic information to the second device in the initial traffic acquisition cycle policy are respectively increased in time, for example, 2 time units and 3 time units are respectively increased, so as to obtain the period of the agent obtaining the traffic information from the Map and the period of the agent sending the traffic information to the second device in the first traffic acquisition cycle policy. For all VMs in the VNF with Internet exposure, when the initial traffic acquisition cycle policy is updated, the initial period for the agent to read traffic information from the Map and the initial period for the agent to report traffic information to the second device in the initial traffic acquisition cycle policy are respectively increased by 1 time unit, and the initial period for the first device to obtain traffic information from the second device in the initial traffic acquisition cycle policy is increased by 1 time unit.
[0184] Here, 1 time unit can be 20 seconds or 30 seconds.
[0185] It should also be noted that the specific time unit added and the time unit definition when updating the initial traffic acquisition cycle strategy are determined by the traffic acquisition cycle management submodule, which can be determined according to the type of VM of the VNF, the CPU size inferred from the type, the average value of the processed traffic, etc. The traffic acquisition cycle management submodule updates the cycle time of reading traffic information from the convergence forwarding module according to the target traffic acquisition cycle update information.
[0186] Further, after the first device generates target traffic acquisition period update information according to the abnormal traffic event notification, an abnormal traffic monitoring timer is started. In an optional embodiment of the present invention, the method further includes:
[0187] If no abnormal traffic event notification of the target virtual machine is obtained within a preset time period, generating target adjustment information;
[0188] Send the target adjustment information to the second device so that the second device sends the target adjustment information to the target virtual machine, and the target virtual machine adjusts the adjusted traffic acquisition cycle policy to the target traffic acquisition cycle policy according to the target adjustment information, so that the target virtual machine performs traffic monitoring according to the target traffic acquisition cycle policy.
[0189] Specifically, after the traffic acquisition cycle management submodule of the first device generates target traffic acquisition cycle update information according to the abnormal traffic event notification, the abnormal traffic monitoring timer is started. If the abnormal traffic event notification of the target virtual machine is not received within the preset time, that is, the traffic acquisition cycle management submodule considers that the abnormality ends, target adjustment information is generated, and the target adjustment information and the identity of the target virtual machine are sent to the second device. The second device sends the target adjustment information to the target virtual machine according to the identity of the target virtual machine. The target virtual machine adjusts the above-mentioned adjusted traffic acquisition cycle policy back to the target traffic acquisition cycle policy, that is, adjusts it to the traffic acquisition cycle policy before the abnormal traffic occurs. The traffic acquisition cycle setting submodule of the agent of the target virtual machine sets the period for the agent to obtain traffic information from the Map and / or the period for the agent to send traffic information to the second device according to the target traffic acquisition cycle policy (including at least one of the following: the period for the agent module in the target virtual machine to obtain traffic information from the storage and data retrieval module, and the period for the agent module in the target virtual machine to send traffic information to the second device), and monitors and reports the traffic information according to the above-mentioned period.
[0190] Exemplarily, the preset duration is the duration of a period in which three agents send traffic information to the second device.
[0191] Furthermore, if within the preset time period, the abnormal traffic event notification of the target virtual machine is obtained again, the adjusted traffic acquisition cycle policy is used as the current target traffic acquisition cycle policy of the target virtual machine, and the step of generating the target traffic acquisition cycle update information according to the abnormal traffic event notification is repeated, and the target traffic acquisition cycle update information is sent to the second device again, so that the second device sends the target traffic acquisition cycle update information to the target virtual machine, and the target virtual machine adjusts the current target traffic acquisition cycle policy according to the target traffic acquisition cycle update information to obtain the adjusted traffic acquisition cycle policy, and the target virtual machine performs traffic monitoring according to the adjusted traffic acquisition cycle policy, and repeats the above steps.
[0192] In summary, the traffic acquisition cycle management submodule has the following functions: managing the period for the agent to obtain traffic information from the Map, the period for the agent to send traffic information to the second device, and the period for the micro-isolation management module to obtain traffic information from the convergence and forwarding module, including initial settings, updating the cycle time according to the VM type of the VNF, the network function carried by the VM, the workload of the convergence and forwarding module and the micro-isolation management module, whether the VM receives abnormal traffic, the duration of abnormal traffic, etc. Traffic acquisition cycle management can be an independent submodule in the micro-isolation management module, or it can be a function in the security monitoring submodule.
[0193] The embodiment of the present invention also provides a structure of a flow acquisition cycle management submodule. Figure 4 The schematic diagram of the structure of the traffic acquisition cycle management submodule is as follows: Figure 4 As shown, the traffic acquisition cycle management submodule at least includes traffic acquisition cycle setting, network topology query, abnormal traffic event notification reception, micro-isolation management module compliance query, abnormal traffic event timer, and traffic acquisition cycle library. The specific functions are as follows:
[0194] The traffic acquisition cycle setting function is to set the traffic acquisition cycle strategy according to the network topology, virtual machine type and specifications, and micro-isolation management module load; second, update the traffic acquisition cycle based on abnormal traffic monitoring of abnormal traffic and abnormal traffic timing cycle; third, set and update the cycle time for the micro-isolation management module to obtain traffic information from the aggregation and forwarding module.
[0195] Abnormal traffic event notification reception: Receive abnormal traffic event notifications.
[0196] Abnormal traffic timer: It counts the abnormal traffic received.
[0197] Network topology query: query the network topology from the traffic visualization submodule of the micro-isolation management module
[0198] Micro-isolation management module load query: obtain the load of the micro-isolation management module (such as central processing unit (CPU) and memory usage, etc.).
[0199] Traffic acquisition cycle library: stores VM IDs and related traffic acquisition cycles, and stores traffic acquisition cycles for various management modules.
[0200] like Figure 5 As shown, an embodiment of the present invention further provides a method for obtaining traffic information, which is applied to a target virtual machine, and the method includes:
[0201] Step 501: Receive target traffic acquisition period update information sent by the second device; wherein the target traffic acquisition period update information is generated by the first device based on the abnormal traffic event notification of the target virtual machine, and the abnormal traffic event notification includes the identity of the target virtual machine.
[0202] In the embodiment of the present invention, the first device is a micro-isolation management module, and the second device is a convergence forwarding module in the management VM.
[0203] Step 502: Adjust the current target traffic acquisition cycle strategy according to the target traffic acquisition cycle update information to obtain an adjusted traffic acquisition cycle strategy. Step 503: Perform traffic monitoring according to the adjusted traffic acquisition cycle strategy.
[0204] The target traffic acquisition cycle strategy includes at least one of the following:
[0205] The period during which the proxy module in the target virtual machine obtains traffic information from the storage and data retrieval module;
[0206] A period during which the proxy module in the target virtual machine sends traffic information to the second device;
[0207] The adjusted traffic acquisition cycle strategy includes at least one of the following:
[0208] The proxy module in the target virtual machine obtains the adjusted period of traffic information from the storage and data retrieval module;
[0209] The proxy module in the target virtual machine sends the adjusted period of traffic information to the second device.
[0210] It should be noted that the target virtual machine provided in the embodiment of the present invention can be a management VM or a business VM. A new traffic acquisition period setting submodule is added to the agent of the target virtual machine. The function of the traffic acquisition period setting submodule is to set the period for the agent to obtain traffic information from the Map and the period for the agent to report traffic information to the convergence forwarding module according to the target traffic acquisition period update information sent by the traffic acquisition management submodule. In an optional embodiment of the present invention, before receiving the target traffic acquisition period update information sent by the second device, the method also includes:
[0211] receiving an initial traffic acquisition cycle policy corresponding to the target virtual machine sent by the second device, where the initial traffic acquisition cycle policy corresponding to the target virtual machine is set by the first device and sent to the second device;
[0212] Performing traffic monitoring according to the initial traffic acquisition cycle strategy corresponding to the target virtual machine;
[0213] The initial traffic acquisition cycle strategy corresponding to the target virtual machine includes at least one of the following:
[0214] The proxy module of the target virtual machine obtains an initial period of traffic information from the storage and data retrieval module;
[0215] The proxy module of the target virtual machine sends an initial period of traffic information to the second device.
[0216] In an optional embodiment of the present invention, before receiving the target traffic acquisition period update information sent by the second device, the method further includes:
[0217] Receive a security policy and a corresponding first traffic acquisition cycle policy corresponding to the target virtual machine sent by the second device, wherein the security policy is generated by the first device according to the traffic information of the target virtual machine and sent to the second device; the first traffic acquisition cycle policy corresponding to the target virtual machine is generated by the first device according to the network topology information and the initial traffic acquisition cycle policy and sent to the second device, and the network topology information is generated by the first device according to the traffic information of the virtual machine;
[0218] Performing traffic monitoring according to the security policy corresponding to the target virtual machine and the corresponding first traffic acquisition cycle policy;
[0219] In a case where abnormal traffic information of the target virtual machine is obtained by traffic monitoring according to the security policy, the abnormal traffic information of the target virtual machine is sent to the second device, so that the second device sends the abnormal traffic information of the target virtual machine to the first device, and the first device generates an abnormal traffic event notification of the target virtual machine according to the abnormal traffic information of the target virtual machine;
[0220] wherein the target virtual machine is one of the virtual machines;
[0221] The first traffic acquisition cycle strategy corresponding to the target virtual machine includes at least one of the following:
[0222] The identity of the target virtual machine;
[0223] The period during which the proxy module in the target virtual machine obtains traffic information from the storage and data retrieval module;
[0224] The period during which the proxy module in the target virtual machine sends traffic information to the second device.
[0225] In an optional embodiment of the present invention, the method further includes:
[0226] receiving target adjustment information sent by the second device;
[0227] Adjusting the adjusted traffic acquisition cycle strategy to the target traffic acquisition cycle strategy according to the target adjustment information;
[0228] Performing flow monitoring according to the target flow acquisition cycle strategy;
[0229] The target adjustment information is generated when the first device does not obtain the abnormal traffic event notification of the target virtual machine within a preset time period, and is sent to the second device.
[0230] It should be noted that the embodiment of the present invention also provides a structural diagram of an agent, such as Figure 6 As shown, the agent at least includes a Map creation module, a traffic and log information acquisition module, a traffic and log information reporting module, a security policy receiving module, a security policy issuing module, and an eBPF management module, which respectively create a Map associated with the eBPF program, obtain traffic five-tuple information and abnormal traffic information from the Map, and report them to the convergence forwarding module; receive the security policy from the convergence forwarding module, store it in the Map, and notify the eBPF program of the security policy update. Manage the eBPF program, including loading the eBPF program into the kernel space, mounting it to the relevant kernel function, monitoring the running status of the eBPF program, etc. In addition, the traffic acquisition cycle setting function is added to the agent, that is, the traffic and log information acquisition module and the traffic and log information reporting module respectively include the reading cycle setting and the reporting cycle setting functions, and the reading cycle setting and the reporting cycle setting functions can set the cycle time according to the received initial traffic acquisition cycle policy and the traffic acquisition cycle update policy.
[0231] like Figure 7 As shown, an embodiment of the present invention further provides a method for obtaining flow information, which is applied to a second device, and the method includes:
[0232] Step 701: Receive target traffic acquisition period update information sent by the first device; the target traffic acquisition period update information is generated by the first device according to the abnormal traffic event notification of the target virtual machine, and the abnormal traffic event notification includes the identity of the target virtual machine.
[0233] Step 702: Send the target traffic acquisition cycle update information to the target virtual machine, so that the target virtual machine adjusts the current target traffic acquisition cycle policy according to the target traffic acquisition cycle update information to obtain the adjusted traffic acquisition cycle policy, and enables the target virtual machine to obtain the adjusted traffic acquisition cycle policy.
[0234] In an optional implementation of the present invention, before receiving the target traffic acquisition period update information sent by the first device, the method further includes:
[0235] Receive an initial traffic acquisition cycle policy corresponding to the virtual machine sent by the first device; the initial traffic acquisition cycle policy corresponding to the virtual machine is set by the first device;
[0236] Sending a corresponding initial traffic acquisition cycle policy to the virtual machine, so that the virtual machine performs traffic monitoring according to the initial traffic acquisition cycle policy;
[0237] wherein the target virtual machine is one of the virtual machines;
[0238] The initial traffic acquisition cycle strategy includes at least one of the following:
[0239] The proxy module of the virtual machine obtains an initial period of traffic information from the storage and data retrieval module;
[0240] The proxy module of the virtual machine sends an initial period of traffic information to the second device.
[0241] In an optional implementation of the present invention, before receiving the target traffic acquisition period update information sent by the first device, the method further includes:
[0242] Receive a security policy and a corresponding first traffic acquisition cycle policy corresponding to the virtual machine sent by the first device;
[0243] Sending the corresponding security policy and the corresponding first traffic acquisition cycle policy to the virtual machine, so that the virtual machine performs traffic monitoring according to the corresponding security policy and the corresponding first traffic acquisition cycle policy;
[0244] receiving abnormal traffic information of the target virtual machine sent by the target virtual machine; the abnormal traffic information of the target virtual machine is obtained by the target virtual machine through traffic monitoring according to the security policy sent by the second device;
[0245] Sending abnormal traffic information of the target virtual machine to the first device, so that the first device generates an abnormal traffic event notification of the target virtual machine according to the abnormal traffic information;
[0246] The target virtual machine is one of the virtual machines, and the target traffic acquisition cycle policy is a traffic acquisition cycle policy in the first traffic acquisition cycle policy;
[0247] The first traffic acquisition cycle strategy includes at least one of the following:
[0248] The identity of the virtual machine;
[0249] The period during which the proxy module in the virtual machine obtains the flow information from the storage and data retrieval module;
[0250] The period during which the proxy module in the virtual machine sends traffic information to the second device.
[0251] In an optional implementation of the present invention, the method further comprises:
[0252] receiving target adjustment information sent by the first device;
[0253] Sending the target adjustment information to the target virtual machine, so that the target virtual machine adjusts the adjusted traffic acquisition cycle policy to the target traffic acquisition cycle policy according to the target adjustment information, and enables the target virtual machine to perform traffic monitoring according to the target traffic acquisition cycle policy;
[0254] The target adjustment information is generated when the first device does not obtain the abnormal traffic event notification of the target virtual machine within a preset time period, and is sent to the second device.
[0255] Combine the following Figure 8 , describing the specific process of the method for obtaining flow information provided by an embodiment of the present invention:
[0256] Step 1: In the traffic learning phase, the traffic acquisition cycle management submodule sends an initial traffic acquisition cycle strategy to the second device;
[0257] Step 2: During the traffic learning phase, the second device sends an initial traffic acquisition cycle policy to the agent in each VM;
[0258] Step 3: In the security monitoring stage, the traffic acquisition cycle management submodule sets a traffic acquisition cycle update strategy according to the VM type and the load information of the first device, updates the cycle of reading traffic information sent from the second device (i.e., the initial traffic acquisition cycle strategy), and obtains the first traffic acquisition cycle strategy;
[0259] Step 4: The traffic acquisition cycle management submodule sends the first traffic acquisition cycle strategy to the second device;
[0260] Step 5: The second device sends the first traffic acquisition cycle policy to the agent in each VM;
[0261] Step 6: The agent in the management VM (target virtual machine) reports abnormal traffic information and abnormal traffic logs to the second device;
[0262] Step 7, the traffic acquisition cycle management submodule generates target traffic acquisition cycle update information according to the abnormal traffic information and abnormal traffic log;
[0263] Step 8: The traffic acquisition cycle management submodule sends target traffic acquisition cycle update information to the second device;
[0264] Step 9, the second device sends target traffic acquisition cycle update information to the target virtual machine, and the target virtual machine adjusts the current target traffic acquisition cycle policy according to the target traffic acquisition cycle update information to obtain an adjusted traffic acquisition cycle policy, and performs traffic monitoring according to the adjusted traffic acquisition cycle policy;
[0265] Step 10: When the abnormal traffic monitoring timer of the traffic acquisition cycle management submodule completes a timing cycle and finds no abnormal traffic event notification, the traffic acquisition cycle management submodule considers the abnormal end and generates target adjustment information;
[0266] Step 11, the traffic acquisition cycle management submodule sends target adjustment information to the second device;
[0267] Step 12, the second device sends target adjustment information to the target virtual machine, and the target virtual machine adjusts the adjusted traffic acquisition cycle policy back to the target traffic acquisition cycle policy according to the target adjustment information, and performs traffic monitoring according to the target traffic acquisition cycle policy; if abnormal traffic information is obtained again, the adjusted traffic acquisition cycle policy is used as the target traffic acquisition cycle policy, and the above steps 6 to 12 are repeated.
[0268] The flow acquisition framework and flow acquisition cycle dynamic setting process of the micro-isolation system provided by the embodiment of the present invention include a new flow acquisition cycle setting function of the agent in the VM of the VNF, and a new flow acquisition cycle management submodule in the micro-isolation management module; in the flow learning stage, the flow acquisition cycle management submodule performs initial settings on the period of the agent reading flow information from the Map, the period of the agent reporting flow information, and the period of the micro-isolation management module obtaining flow information from the convergence forwarding module; in the security monitoring stage, the flow acquisition cycle management submodule updates the flow acquisition cycle time according to the VM type of the VNF, the network function carried by the VM, the workload of the convergence forwarding module and the micro-isolation management module, whether the VM receives abnormal flow, the duration of abnormal flow, etc.; the flow acquisition cycle management sets and updates the cycle time of the micro-isolation management module reading flow information from the convergence forwarding module; the flow acquisition cycle setting in the agent executes the received initial flow acquisition cycle strategy, as well as the flow acquisition cycle update strategy, and sets the flow acquisition cycle time. By dynamically setting the flow acquisition cycle, a balance between the resources occupied by flow acquisition and the efficiency of identifying security threats can be achieved.
[0269] like Fig. 9As shown, an embodiment of the present invention also provides an embodiment of the present invention also provides a flow information acquisition device, which is applied to a first device, and the device includes:
[0270] The first acquisition module 901 is used to obtain an abnormal traffic event notification of a target virtual machine;
[0271] A first processing module 902 is used to generate target traffic acquisition period update information according to the abnormal traffic event notification;
[0272] The first sending module 903 is used to send the target traffic acquisition cycle update information to the second device, so that the second device sends the target traffic acquisition cycle update information to the target virtual machine, and the target virtual machine adjusts the current target traffic acquisition cycle policy according to the target traffic acquisition cycle update information to obtain the adjusted traffic acquisition cycle policy, so that the target virtual machine performs traffic monitoring according to the adjusted traffic acquisition cycle policy.
[0273] Optionally, the device further comprises:
[0274] A first generating module, used to set an initial traffic acquisition cycle strategy corresponding to the virtual machine;
[0275] A first policy sending module, configured to send an initial traffic acquisition cycle policy corresponding to the virtual machine to the second device, so that the second device sends the corresponding initial traffic acquisition cycle policy to the virtual machine, and enables the virtual machine to perform traffic monitoring according to the initial traffic acquisition cycle policy;
[0276] wherein the target virtual machine is one of the virtual machines;
[0277] The initial traffic acquisition cycle strategy includes at least one of the following:
[0278] The proxy module of the virtual machine obtains an initial period of traffic information from the storage and data retrieval module;
[0279] An initial period in which the proxy module of the virtual machine sends traffic information to the second device;
[0280] An initial period in which the first device obtains flow information from the second device.
[0281] Optionally, the first acquisition module 901 includes:
[0282] A first processing unit, configured to generate network topology information and a security policy corresponding to the virtual machine according to the traffic information of the virtual machine sent by the second device;
[0283] A second processing unit is configured to obtain a first traffic acquisition cycle policy corresponding to the virtual machine according to target information and an initial traffic acquisition cycle policy corresponding to the virtual machine; the target information includes at least one of the following: the network topology information; the traffic processing volume information of the virtual machine; the workload information of the second device;
[0284] A first sending unit is used to send the security policy and the corresponding first traffic acquisition cycle policy corresponding to the virtual machine to the second device, so that the second device sends the corresponding security policy and the corresponding first traffic acquisition cycle policy to the virtual machine, and enables the virtual machine to perform traffic monitoring according to the corresponding security policy and the corresponding first traffic acquisition cycle policy;
[0285] A first acquisition unit is used to acquire abnormal traffic information of the target virtual machine sent by the second device, where the abnormal traffic information is obtained by the target virtual machine through traffic monitoring according to the security policy corresponding to the target virtual machine sent by the second device, and sent to the second device;
[0286] A third processing unit, configured to generate an abnormal traffic event notification of the target virtual machine according to the abnormal traffic information;
[0287] wherein the target virtual machine is one of the virtual machines, and the target traffic acquisition cycle policy is a traffic acquisition cycle policy in the first traffic acquisition cycle policy;
[0288] The first traffic acquisition cycle strategy includes at least one of the following:
[0289] The identity of the virtual machine;
[0290] The period during which the proxy module in the virtual machine obtains the flow information from the storage and data retrieval module;
[0291] A period during which the proxy module in the virtual machine sends traffic information to the second device;
[0292] The first device obtains the flow information from the second device during a period.
[0293] Optionally, the second processing unit is specifically configured to:
[0294] The initial traffic acquisition cycle strategy corresponding to the virtual machine is updated according to the target information to obtain a first traffic acquisition cycle strategy corresponding to the virtual machine;
[0295] The network topology information includes at least one of the following:
[0296] Type information of the virtual machine; specification information of the virtual machine.
[0297] Optionally, the target traffic acquisition cycle strategy includes at least one of the following:
[0298] The period during which the proxy module in the target virtual machine obtains traffic information from the storage and data retrieval module;
[0299] A period during which the proxy module in the target virtual machine sends traffic information to the second device;
[0300] A period during which the first device obtains traffic information from the second device;
[0301] The adjusted traffic acquisition cycle strategy includes at least one of the following:
[0302] The proxy module in the target virtual machine obtains the adjusted period of traffic information from the storage and data retrieval module;
[0303] An adjusted period during which the proxy module in the target virtual machine sends traffic information to the second device;
[0304] The first device obtains the adjusted period of flow information from the second device.
[0305] Optionally, the device further comprises:
[0306] A second generating module is used to generate target adjustment information when no abnormal traffic event notification of the target virtual machine is obtained within a preset time period;
[0307] The first information sending module is used to send the target adjustment information to the second device, so that the second device sends the target adjustment information to the target virtual machine, and the target virtual machine adjusts the adjusted traffic acquisition cycle policy to the target traffic acquisition cycle policy according to the target adjustment information, so that the target virtual machine performs traffic monitoring according to the target traffic acquisition cycle policy.
[0308] It should be noted that the flow information acquisition device applied to the first device provided in an embodiment of the present invention is a device capable of executing the above-mentioned flow information acquisition method applied to the first device. All embodiments of the above-mentioned flow information acquisition method applied to the first device are applicable to the device and can achieve the same or similar technical effects.
[0309] like Fig.10 As shown, an embodiment of the present invention further provides a flow information acquisition device, which is applied to a target virtual machine, and the device includes:
[0310] The first receiving module 1001 is used to receive the adjusted traffic acquisition cycle strategy sent by the second device;
[0311] A first adjustment module 1002 is used to adjust the current target traffic acquisition cycle strategy according to the target traffic acquisition cycle update information to obtain an adjusted traffic acquisition cycle strategy;
[0312] A first monitoring module 1003, configured to perform flow monitoring according to the adjusted flow acquisition cycle strategy;
[0313] The target traffic acquisition period update information is generated by the first device according to the abnormal traffic event notification of the target virtual machine.
[0314] Optionally, the target traffic acquisition cycle strategy includes at least one of the following:
[0315] The period during which the proxy module in the target virtual machine obtains traffic information from the storage and data retrieval module;
[0316] A period during which the proxy module in the target virtual machine sends traffic information to the second device;
[0317] The adjusted traffic acquisition cycle strategy includes at least one of the following:
[0318] The proxy module in the target virtual machine obtains the adjusted period of traffic information from the storage and data retrieval module;
[0319] The proxy module in the target virtual machine sends the adjusted period of traffic information to the second device.
[0320] Optionally, the device further comprises:
[0321] A first policy receiving module, configured to receive an initial traffic acquisition cycle policy corresponding to the target virtual machine sent by the second device, where the initial traffic acquisition cycle policy corresponding to the target virtual machine is set by the first device and sent to the second device;
[0322] A first target monitoring module, configured to perform traffic monitoring according to an initial traffic acquisition cycle strategy corresponding to the target virtual machine;
[0323] The initial traffic acquisition cycle strategy corresponding to the target virtual machine includes at least one of the following:
[0324] The proxy module of the target virtual machine obtains an initial period of traffic information from the storage and data retrieval module;
[0325] The proxy module of the target virtual machine sends an initial period of traffic information to the second device.
[0326] Optionally, the device further comprises:
[0327] A first target receiving module is used to receive the security policy and the corresponding first traffic acquisition cycle policy corresponding to the target virtual machine sent by the second device, wherein the security policy corresponding to the target virtual machine is generated by the first device according to the traffic information of the target virtual machine and sent to the second device; the first traffic acquisition cycle policy corresponding to the target virtual machine is generated by the first device according to the network topology information and the initial traffic acquisition cycle policy and sent to the second device, and the network topology information is generated by the first device according to the traffic information of the virtual machine;
[0328] A second target monitoring module is used to perform traffic monitoring according to the security policy corresponding to the target virtual machine and the corresponding first traffic acquisition cycle policy;
[0329] a second information sending module, configured to, when abnormal traffic information of the target virtual machine is obtained by traffic monitoring according to the security policy, send the abnormal traffic information of the target virtual machine to the second device, so that the second device sends the abnormal traffic information of the target virtual machine to the first device, and enable the first device to generate an abnormal traffic event notification of the target virtual machine according to the abnormal traffic information of the target virtual machine;
[0330] wherein the target virtual machine is one of the virtual machines;
[0331] The first traffic acquisition cycle strategy corresponding to the target virtual machine includes at least one of the following:
[0332] The identity of the target virtual machine;
[0333] The period during which the proxy module in the target virtual machine obtains traffic information from the storage and data retrieval module;
[0334] The period during which the proxy module in the target virtual machine sends traffic information to the second device.
[0335] Optionally, the device further comprises:
[0336] A first information receiving module, configured to receive target adjustment information sent by the second device;
[0337] A second adjustment module, configured to adjust the adjusted traffic acquisition cycle strategy to the target traffic acquisition cycle strategy according to the target adjustment information;
[0338] A third target monitoring module, used to perform flow monitoring according to the target flow acquisition cycle strategy;
[0339] The target adjustment information is generated when the first device does not obtain the abnormal traffic event notification of the target virtual machine within a preset time period, and is sent to the second device.
[0340] It should be noted that the traffic information acquisition device applied to the target virtual machine provided in the embodiment of the present invention is a device capable of executing the above-mentioned traffic information acquisition method applied to the target virtual machine. All embodiments of the above-mentioned traffic information acquisition method applied to the target virtual machine are applicable to the device and can achieve the same or similar technical effects.
[0341] like Fig.11 As shown, an embodiment of the present invention further provides a flow information acquisition device, which is applied to a second device, and the device includes:
[0342] The second receiving module 1101 is used to receive target traffic acquisition period update information sent by the first device; the target traffic acquisition period update information is generated by the first device according to the abnormal traffic event notification of the target virtual machine;
[0343] The second sending module 1102 is used to send the target traffic acquisition cycle update information to the target virtual machine, so that the target virtual machine adjusts the current target traffic acquisition cycle strategy according to the target traffic acquisition cycle update information to obtain the adjusted traffic acquisition cycle strategy, and enables the target virtual machine to obtain the adjusted traffic acquisition cycle strategy.
[0344] Optionally, the device further comprises:
[0345] A third policy receiving module is used to receive an initial traffic acquisition cycle policy corresponding to the virtual machine sent by the first device; the initial traffic acquisition cycle policy corresponding to the virtual machine is set by the first device;
[0346] A third strategy sending module is used to send the corresponding initial traffic acquisition cycle strategy to the virtual machine, so that the virtual machine performs traffic monitoring according to the initial traffic acquisition cycle strategy;
[0347] wherein the target virtual machine is one of the virtual machines;
[0348] The initial traffic acquisition cycle strategy includes at least one of the following:
[0349] The proxy module of the virtual machine obtains an initial period of traffic information from the storage and data retrieval module;
[0350] The proxy module of the virtual machine sends an initial period of traffic information to the second device.
[0351] Optionally, the device further comprises:
[0352] A second target receiving module, used to receive the security policy corresponding to the virtual machine and the corresponding first traffic acquisition cycle policy sent by the first device;
[0353] A first target sending module, used to send the corresponding security policy and the corresponding first traffic acquisition cycle policy to the virtual machine, so that the virtual machine performs traffic monitoring according to the corresponding security policy and the corresponding first traffic acquisition cycle policy;
[0354] A second information receiving module is used to receive abnormal traffic information of the target virtual machine sent by the target virtual machine; the abnormal traffic information of the target virtual machine is obtained by the target virtual machine performing traffic monitoring according to the security policy sent by the second device;
[0355] a fourth information sending module, configured to send the abnormal traffic information of the target virtual machine to the first device, so that the first device generates an abnormal traffic event notification of the target virtual machine according to the abnormal traffic information;
[0356] The target virtual machine is one of the virtual machines, and the target traffic acquisition cycle policy is one of the first traffic acquisition cycle policies;
[0357] The first traffic acquisition cycle strategy includes at least one of the following:
[0358] The identity of the virtual machine;
[0359] The period during which the proxy module in the virtual machine obtains the flow information from the storage and data retrieval module;
[0360] The period during which the proxy module in the virtual machine sends traffic information to the second device.
[0361] Optionally, the device further comprises:
[0362] A third information receiving module, used to receive target adjustment information sent by the first device;
[0363] a fifth information sending module, configured to send the target adjustment information to the target virtual machine, so that the target virtual machine adjusts the adjusted traffic acquisition cycle policy to the target traffic acquisition cycle policy according to the target adjustment information, and enables the target virtual machine to perform traffic monitoring according to the target traffic acquisition cycle policy;
[0364] The target adjustment information is generated when the first device does not obtain the abnormal traffic event notification of the target virtual machine within a preset time period, and is sent to the second device.
[0365] It should be noted that the flow information acquisition device applied to the second device provided in an embodiment of the present invention is a device capable of executing the above-mentioned flow information acquisition method applied to the second device. All embodiments of the above-mentioned flow information acquisition method applied to the first device are applicable to the device and can achieve the same or similar technical effects.
[0366] like Fig.12 As shown, an embodiment of the present invention also provides a device, which is a first device, including: a processor 1201; and a memory 1203 connected to the processor 1201 through a bus interface 1202, wherein the memory 1203 is used to store programs and data used by the processor 1201 when performing operations, and the processor 1201 calls and executes the programs and data stored in the memory 1203.
[0367] The transceiver 1204 is connected to the bus interface 1202 and is used to receive and send data under the control of the processor 1201. Specifically, the processor 1201 is used to read the program in the memory 1203 and execute the following process:
[0368] Obtaining an abnormal traffic event notification of a target virtual machine; the abnormal traffic event notification includes an identity identifier of the target virtual machine;
[0369] Generate target traffic acquisition period update information according to the abnormal traffic event notification;
[0370] The transceiver 1204 performs the following process:
[0371] The target traffic acquisition cycle update information is sent to the second device, so that the second device sends the target traffic acquisition cycle update information to the target virtual machine, and the target virtual machine adjusts the current target traffic acquisition cycle policy according to the target traffic acquisition cycle update information to obtain the adjusted traffic acquisition cycle policy, and the target virtual machine performs traffic monitoring according to the adjusted traffic acquisition cycle policy.
[0372] Optionally, the processor 1201 is further configured to:
[0373] Setting an initial traffic acquisition cycle strategy corresponding to the virtual machine;
[0374] The transceiver 1204 is further used for:
[0375] Sending the initial traffic acquisition cycle policy corresponding to the virtual machine to the second device, so that the second device sends the corresponding initial traffic acquisition cycle policy to the virtual machine, and the virtual machine performs traffic monitoring according to the initial traffic acquisition cycle policy;
[0376] wherein the target virtual machine is one of the virtual machines;
[0377] The initial traffic acquisition cycle strategy includes at least one of the following:
[0378] The proxy module of the virtual machine obtains an initial period of traffic information from the storage and data retrieval module;
[0379] An initial period in which the proxy module of the virtual machine sends traffic information to the second device;
[0380] An initial period in which the first device obtains flow information from the second device.
[0381] Optionally, the processor 1201 is specifically configured to:
[0382] Generate network topology information and a security policy corresponding to the virtual machine according to the traffic information of the virtual machine sent by the second device;
[0383] According to the target information and the initial traffic acquisition cycle policy corresponding to the virtual machine, a first traffic acquisition cycle policy corresponding to the virtual machine is obtained; the target information includes at least one of the following: the network topology information; the traffic processing volume information of the virtual machine; the workload information of the second device;
[0384] The transceiver 1204 is specifically used for:
[0385] Sending the security policy and the corresponding first traffic acquisition cycle policy corresponding to the virtual machine to the second device, so that the second device sends the corresponding security policy and the corresponding first traffic acquisition cycle policy to the virtual machine, and enables the virtual machine to perform traffic monitoring according to the corresponding security policy and the corresponding first traffic acquisition cycle policy;
[0386] The processor 1201 is specifically configured to:
[0387] Acquire abnormal traffic information of the target virtual machine sent by the second device, where the abnormal traffic information is obtained by the target virtual machine through traffic monitoring according to the security policy corresponding to the target virtual machine sent by the second device, and sent to the second device;
[0388] Generate an abnormal traffic event notification of the target virtual machine according to the abnormal traffic information;
[0389] wherein the target virtual machine is one of the virtual machines, and the target traffic acquisition cycle policy is a traffic acquisition cycle policy in the first traffic acquisition cycle policy;
[0390] The first traffic acquisition cycle strategy includes at least one of the following:
[0391] The identity of the virtual machine;
[0392] The period during which the proxy module in the virtual machine obtains the flow information from the storage and data retrieval module;
[0393] A period during which the proxy module in the virtual machine sends traffic information to the second device;
[0394] The first device obtains the flow information from the second device during a period.
[0395] Optionally, the processor 1201 is specifically configured to:
[0396] The initial traffic acquisition cycle strategy corresponding to the virtual machine is updated according to the target information to obtain a first traffic acquisition cycle strategy corresponding to the virtual machine;
[0397] The network topology information includes at least one of the following:
[0398] Type information of the virtual machine; specification information of the virtual machine.
[0399] Optionally, the target traffic acquisition cycle strategy includes at least one of the following:
[0400] The period during which the proxy module in the target virtual machine obtains traffic information from the storage and data retrieval module;
[0401] A period during which the proxy module in the target virtual machine sends traffic information to the second device;
[0402] A period during which the first device obtains traffic information from the second device;
[0403] The adjusted traffic acquisition cycle strategy includes at least one of the following:
[0404] The proxy module in the target virtual machine obtains the adjusted period of traffic information from the storage and data retrieval module;
[0405] An adjusted period during which the proxy module in the target virtual machine sends traffic information to the second device;
[0406] The first device obtains the adjusted period of flow information from the second device.
[0407] Optionally, the processor 1201 is further configured to:
[0408] If no abnormal traffic event notification of the target virtual machine is obtained within a preset time period, generating target adjustment information;
[0409] The transceiver 1204 is further used for:
[0410] Send the target adjustment information to the second device so that the second device sends the target adjustment information to the target virtual machine, and the target virtual machine adjusts the adjusted traffic acquisition cycle policy to the target traffic acquisition cycle policy according to the target adjustment information, so that the target virtual machine performs traffic monitoring according to the target traffic acquisition cycle policy.
[0411] Among them, Fig.12 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 1201 and memory represented by memory 1203. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides a user interface 1205. The transceiver 1204 may be a plurality of components, i.e., including a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. The processor 1201 is responsible for managing the bus architecture and general processing, and the memory 1203 may store data used by the processor 1201 when performing operations.
[0412] An embodiment of the present invention also provides a virtual machine, which is a target virtual machine, including: a processor; and a memory connected to the processor through a bus interface, the memory being used to store programs and data used by the processor when performing operations, and the processor calling and executing the programs and data stored in the memory.
[0413] The transceiver is connected to the bus interface and is used to receive and send data under the control of the processor.
[0414] It should be noted that the virtual machine provided by the embodiment of the present invention is Fig.12 The structure of the first device shown is similar and will not be described in detail here.
[0415] Specifically, the processor is used to read the program in the memory, and the transceiver performs the following process:
[0416] Receiving target traffic acquisition period update information sent by the second device;
[0417] The processor performs the following processes:
[0418] Adjust the current target traffic acquisition cycle strategy according to the target traffic acquisition cycle update information to obtain an adjusted traffic acquisition cycle strategy; and perform traffic monitoring according to the adjusted traffic acquisition cycle strategy;
[0419] The target traffic acquisition period update information is generated by the first device according to the abnormal traffic event notification of the target virtual machine.
[0420] Optionally, the target traffic acquisition cycle strategy includes at least one of the following:
[0421] The period during which the proxy module in the target virtual machine obtains traffic information from the storage and data retrieval module;
[0422] A period during which the proxy module in the target virtual machine sends traffic information to the second device;
[0423] The adjusted traffic acquisition cycle strategy includes at least one of the following:
[0424] The proxy module in the target virtual machine obtains the adjusted period of traffic information from the storage and data retrieval module;
[0425] The proxy module in the target virtual machine sends the adjusted period of traffic information to the second device.
[0426] Optionally, receiving an initial traffic acquisition cycle policy corresponding to the target virtual machine sent by the second device, where the initial traffic acquisition cycle policy corresponding to the target virtual machine is set by the first device and sent to the second device;
[0427] The processor is further configured to:
[0428] Performing traffic monitoring according to the initial traffic acquisition cycle strategy corresponding to the target virtual machine;
[0429] The initial traffic acquisition cycle strategy corresponding to the target virtual machine includes at least one of the following:
[0430] The proxy module of the target virtual machine obtains an initial period of traffic information from the storage and data retrieval module;
[0431] The proxy module of the target virtual machine sends an initial period of traffic information to the second device.
[0432] Optionally, the transceiver is further used for:
[0433] Receive the security policy and the corresponding first traffic acquisition cycle policy corresponding to the target virtual machine sent by the second device, where the security policy corresponding to the target virtual machine is generated by the first device according to the traffic information of the target virtual machine and sent to the second device; the first traffic acquisition cycle policy corresponding to the target virtual machine is generated by the first device according to the network topology information and the initial traffic acquisition cycle policy and sent to the second device, where the network topology information is generated by the first device according to the traffic information of the virtual machine;
[0434] The processor is further configured to:
[0435] Performing traffic monitoring according to the security policy corresponding to the target virtual machine and the corresponding first traffic acquisition cycle policy;
[0436] The transceiver is further used for:
[0437] In the case of obtaining abnormal traffic information of the target virtual machine by performing traffic monitoring according to the security policy, sending the abnormal traffic information of the target virtual machine to the second device, so that the second device sends the abnormal traffic information of the target virtual machine to the first device, and the first device generates an abnormal traffic event notification of the target virtual machine according to the abnormal traffic information of the target virtual machine;
[0438] wherein the target virtual machine is one of the virtual machines;
[0439] The first traffic acquisition cycle strategy includes at least one of the following:
[0440] The identity of the target virtual machine;
[0441] The period during which the proxy module in the target virtual machine obtains traffic information from the storage and data retrieval module;
[0442] The period during which the proxy module in the target virtual machine sends traffic information to the second device.
[0443] Optionally, the transceiver is further used for:
[0444] receiving target adjustment information sent by the second device;
[0445] The processor is further configured to:
[0446] Adjusting the adjusted traffic acquisition cycle strategy to the target traffic acquisition cycle strategy according to the target adjustment information;
[0447] The target adjustment information is generated when the first device does not obtain the abnormal traffic event notification of the target virtual machine within a preset time period, and is sent to the second device.
[0448] An embodiment of the present invention also provides a device, which is a second device, comprising: a processor; and a memory connected to the processor via a bus interface, the memory being used to store programs and data used by the processor when performing operations, and the processor calling and executing the programs and data stored in the memory.
[0449] The transceiver is connected to the bus interface and is used to receive and send data under the control of the processor.
[0450] It should be noted that the second device provided in the embodiment of the present invention is Fig.12 The structure of the first device shown is similar and will not be described in detail here.
[0451] Specifically, the processor is used to read the program in the memory, and the transceiver performs the following process:
[0452] Receive target traffic acquisition period update information sent by the first device; the target traffic acquisition period update information is generated by the first device according to the abnormal traffic event notification of the target virtual machine;
[0453] The target traffic acquisition cycle update information is sent to the target virtual machine, so that the target virtual machine adjusts the current target traffic acquisition cycle policy according to the target traffic acquisition cycle update information to obtain the adjusted traffic acquisition cycle policy, and enables the target virtual machine to obtain the adjusted traffic acquisition cycle policy.
[0454] Optionally, the transceiver is further used for:
[0455] Receive an initial traffic acquisition cycle policy corresponding to each virtual machine sent by the first device; the initial traffic acquisition cycle policy corresponding to the virtual machine is set by the first device;
[0456] Sending a corresponding initial traffic acquisition cycle policy to the virtual machine, so that the virtual machine performs traffic monitoring according to the initial traffic acquisition cycle policy;
[0457] wherein the target virtual machine is one of the virtual machines;
[0458] The initial traffic acquisition cycle strategy includes at least one of the following:
[0459] The proxy module of the virtual machine obtains an initial period of traffic information from the storage and data retrieval module;
[0460] The proxy module of the virtual machine sends an initial period of traffic information to the second device.
[0461] Optionally, the transceiver is further used for:
[0462] Receive a security policy and a corresponding first traffic acquisition cycle policy corresponding to the virtual machine sent by the first device;
[0463] Sending the corresponding security policy and the corresponding first traffic acquisition cycle policy to the virtual machine, so that the virtual machine performs traffic monitoring according to the corresponding security policy and the corresponding first traffic acquisition cycle policy;
[0464] receiving abnormal traffic information of the target virtual machine sent by the target virtual machine; the abnormal traffic information of the target virtual machine is obtained by the target virtual machine through traffic monitoring according to the security policy sent by the second device;
[0465] Sending abnormal traffic information of the target virtual machine to the first device, so that the first device generates an abnormal traffic event notification of the target virtual machine according to the abnormal traffic information;
[0466] The target virtual machine is one of the virtual machines, and the target traffic acquisition cycle policy is a traffic acquisition cycle policy in the first traffic acquisition cycle policy;
[0467] The first traffic acquisition cycle strategy includes at least one of the following:
[0468] The identity of the virtual machine;
[0469] The period during which the proxy module in the virtual machine obtains the flow information from the storage and data retrieval module;
[0470] The period during which the proxy module in the virtual machine sends traffic information to the second device.
[0471] Optionally, the transceiver is further used for:
[0472] receiving target adjustment information sent by the first device;
[0473] Sending the target adjustment information to the target virtual machine, so that the target virtual machine adjusts the adjusted traffic acquisition cycle policy to the target traffic acquisition cycle policy according to the target adjustment information, and enables the target virtual machine to perform traffic monitoring according to the target traffic acquisition cycle policy;
[0474] The target adjustment information is generated when the first device does not obtain the abnormal traffic event notification of the target virtual machine within a preset time period, and is sent to the second device.
[0475] In addition, a specific embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the steps of the method for obtaining traffic information applied to a first device as described in any one of the above are implemented, or the steps of the method for obtaining traffic information applied to a target virtual machine as described in any one of the above are implemented, or the steps of the method for obtaining traffic information applied to a second device as described in any one of the above are implemented.
[0476] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0477] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0478] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the sending and receiving methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.
[0479] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for obtaining flow information, characterized in that: Applied to a first device, the method includes: Obtaining an abnormal traffic event notification of a target virtual machine; generating target traffic acquisition period update information according to the abnormal traffic event notification; The target traffic acquisition cycle update information is sent to the second device, so that the second device sends the target traffic acquisition cycle update information to the target virtual machine, and the target virtual machine adjusts the current target traffic acquisition cycle policy according to the target traffic acquisition cycle update information to obtain the adjusted traffic acquisition cycle policy, and the target virtual machine performs traffic monitoring according to the adjusted traffic acquisition cycle policy.
2. The method for obtaining flow information according to claim 1, characterized in that: Before obtaining the abnormal traffic event notification of the target virtual machine, the method further includes: Set the initial traffic acquisition cycle strategy corresponding to the virtual machine; Sending the initial traffic acquisition cycle policy corresponding to the virtual machine to the second device, so that the second device sends the corresponding initial traffic acquisition cycle policy to the virtual machine, and the virtual machine performs traffic monitoring according to the initial traffic acquisition cycle policy; wherein the target virtual machine is one of the virtual machines; The initial traffic acquisition cycle strategy includes at least one of the following: The proxy module of the virtual machine obtains an initial period of traffic information from the storage and data retrieval module; An initial period in which the proxy module of the virtual machine sends traffic information to the second device; An initial period in which the first device obtains flow information from the second device.
3. The method for obtaining flow information according to claim 1, characterized in that: The obtaining of the abnormal traffic event notification of the target virtual machine includes: Generate network topology information and a security policy corresponding to the virtual machine according to the traffic information of the virtual machine sent by the second device; According to the target information and the initial traffic acquisition cycle policy corresponding to the virtual machine, a first traffic acquisition cycle policy corresponding to the virtual machine is obtained; the target information includes at least one of the following: the network topology information; the traffic processing volume information of the virtual machine; the workload information of the second device; Sending the security policy and the corresponding first traffic acquisition cycle policy corresponding to the virtual machine to the second device, so that the second device sends the corresponding security policy and the corresponding first traffic acquisition cycle policy to the virtual machine, and enables the virtual machine to perform traffic monitoring according to the corresponding security policy and the corresponding first traffic acquisition cycle policy; Acquire abnormal traffic information of the target virtual machine sent by the second device, where the abnormal traffic information is obtained by the target virtual machine through traffic monitoring according to the security policy corresponding to the target virtual machine sent by the second device, and sent to the second device; Generate an abnormal traffic event notification of the target virtual machine according to the abnormal traffic information; wherein the target virtual machine is one of the virtual machines, and the target traffic acquisition cycle policy is a traffic acquisition cycle policy in the first traffic acquisition cycle policy; The first traffic acquisition cycle strategy includes at least one of the following: The identity of the virtual machine; The period during which the proxy module in the virtual machine obtains the flow information from the storage and data retrieval module; A period during which the proxy module in the virtual machine sends traffic information to the second device; The first device obtains the flow information from the second device during a period.
4. The method for obtaining flow information according to claim 3, characterized in that: The obtaining, according to the target information and the initial traffic acquisition cycle policy corresponding to the virtual machine, a first traffic acquisition cycle policy corresponding to the virtual machine includes: The initial traffic acquisition cycle strategy corresponding to the virtual machine is updated according to the target information to obtain a first traffic acquisition cycle strategy corresponding to the virtual machine; The network topology information includes at least one of the following: Type information of the virtual machine; specification information of the virtual machine.
5. The method for acquiring flow information according to claim 1, characterized in that: The target traffic acquisition cycle strategy includes at least one of the following: The period during which the proxy module in the target virtual machine obtains traffic information from the storage and data retrieval module; A period during which the proxy module in the target virtual machine sends traffic information to the second device; A period during which the first device obtains traffic information from the second device; The adjusted traffic acquisition cycle strategy includes at least one of the following: The proxy module in the target virtual machine obtains the adjusted period of traffic information from the storage and data retrieval module; An adjusted period during which the proxy module in the target virtual machine sends traffic information to the second device; The first device obtains the adjusted period of flow information from the second device.
6. The method for acquiring flow information according to claim 1, characterized in that: The method further comprises: If no abnormal traffic event notification of the target virtual machine is obtained within a preset time period, generating target adjustment information; Send the target adjustment information to the second device so that the second device sends the target adjustment information to the target virtual machine, and the target virtual machine adjusts the adjusted traffic acquisition cycle policy to the target traffic acquisition cycle policy according to the target adjustment information, so that the target virtual machine performs traffic monitoring according to the target traffic acquisition cycle policy.
7. A method for obtaining flow information, characterized in that: Applied to a target virtual machine, the method comprises: Receiving target traffic acquisition period update information sent by the second device; Adjust the current target traffic acquisition cycle strategy according to the target traffic acquisition cycle update information to obtain an adjusted traffic acquisition cycle strategy; and perform traffic monitoring according to the adjusted traffic acquisition cycle strategy; The target traffic acquisition period update information is generated by the first device according to the abnormal traffic event notification of the target virtual machine.
8. The method for acquiring flow information according to claim 7, characterized in that: The target traffic acquisition cycle strategy includes at least one of the following: The period during which the proxy module in the target virtual machine obtains traffic information from the storage and data retrieval module; A period during which the proxy module in the target virtual machine sends traffic information to the second device; The adjusted traffic acquisition cycle strategy includes at least one of the following: The proxy module in the target virtual machine obtains the adjusted period of traffic information from the storage and data retrieval module; The proxy module in the target virtual machine sends the adjusted period of traffic information to the second device.
9. The method for acquiring flow information according to claim 7, characterized in that: Before receiving the target traffic acquisition period update information sent by the second device, the method further includes: receiving an initial traffic acquisition cycle policy corresponding to the target virtual machine sent by the second device, where the initial traffic acquisition cycle policy corresponding to the target virtual machine is set by the first device and sent to the second device; Performing traffic monitoring according to the initial traffic acquisition cycle strategy corresponding to the target virtual machine; The initial traffic acquisition cycle strategy corresponding to the target virtual machine includes at least one of the following: The proxy module of the target virtual machine obtains an initial period of traffic information from the storage and data retrieval module; The proxy module of the target virtual machine sends an initial period of traffic information to the second device.
10. The method for acquiring flow information according to claim 7, characterized in that: Before receiving the target traffic acquisition period update information sent by the second device, the method further includes: Receive the security policy and the corresponding first traffic acquisition cycle policy corresponding to the target virtual machine sent by the second device; the security policy corresponding to the target virtual machine is generated by the first device according to the traffic information of the target virtual machine and sent to the second device; the first traffic acquisition cycle policy corresponding to the target virtual machine is generated by the first device according to the network topology information and the initial traffic acquisition cycle policy and sent to the second device, and the network topology information is generated by the first device according to the traffic information of the virtual machine; Performing traffic monitoring according to the security policy corresponding to the target virtual machine and the corresponding first traffic acquisition cycle policy; In the case of obtaining abnormal traffic information of the target virtual machine by performing traffic monitoring according to the security policy, sending the abnormal traffic information of the target virtual machine to the second device, so that the second device sends the abnormal traffic information of the target virtual machine to the first device, and the first device generates an abnormal traffic event notification of the target virtual machine according to the abnormal traffic information of the target virtual machine; wherein the target virtual machine is one of the virtual machines; The first traffic acquisition cycle strategy corresponding to the target virtual machine includes at least one of the following: The identity of the target virtual machine; The period during which the proxy module in the target virtual machine obtains traffic information from the storage and data retrieval module; The period during which the proxy module in the target virtual machine sends traffic information to the second device.
11. The method for acquiring flow information according to claim 7, characterized in that: The method further comprises: receiving target adjustment information sent by the second device; Adjusting the adjusted traffic acquisition cycle strategy to the target traffic acquisition cycle strategy according to the target adjustment information; Performing flow monitoring according to the target flow acquisition cycle strategy; The target adjustment information is generated when the first device does not obtain the abnormal traffic event notification of the target virtual machine within a preset time period, and is sent to the second device.
12. A method for obtaining flow information, characterized in that: Applied to the second device, the method includes: Receive target traffic acquisition period update information sent by the first device; the target traffic acquisition period update information is generated by the first device according to the abnormal traffic event notification of the target virtual machine; The target traffic acquisition cycle update information is sent to the target virtual machine, so that the target virtual machine adjusts the current target traffic acquisition cycle policy according to the target traffic acquisition cycle update information to obtain the adjusted traffic acquisition cycle policy, and enables the target virtual machine to obtain the adjusted traffic acquisition cycle policy.
13. The method for acquiring flow information according to claim 12, characterized in that: Before receiving the target traffic acquisition period update information sent by the first device, the method further includes: Receive an initial traffic acquisition cycle policy corresponding to the virtual machine sent by the first device; the initial traffic acquisition cycle policy corresponding to the virtual machine is set by the first device; Sending a corresponding initial traffic acquisition cycle policy to the virtual machine, so that the virtual machine performs traffic monitoring according to the initial traffic acquisition cycle policy; wherein the target virtual machine is one of the virtual machines; The initial traffic acquisition cycle strategy includes at least one of the following: The proxy module of the virtual machine obtains an initial period of traffic information from the storage and data retrieval module; The proxy module of the virtual machine sends an initial period of traffic information to the second device.
14. The method for acquiring flow information according to claim 12, characterized in that: Before receiving the target traffic acquisition period update information sent by the first device, the method further includes: Receive a security policy and a corresponding first traffic acquisition cycle policy corresponding to the virtual machine sent by the first device; Sending the corresponding security policy and the corresponding first traffic acquisition cycle policy to the virtual machine, so that the virtual machine performs traffic monitoring according to the corresponding security policy and the corresponding first traffic acquisition cycle policy; receiving abnormal traffic information of the target virtual machine sent by the target virtual machine; the abnormal traffic information of the target virtual machine is obtained by the target virtual machine through traffic monitoring according to the security policy sent by the second device; Sending abnormal traffic information of the target virtual machine to the first device, so that the first device generates an abnormal traffic event notification of the target virtual machine according to the abnormal traffic information; The target virtual machine is one of the virtual machines, and the target traffic acquisition cycle policy is one of the first traffic acquisition cycle policies; The first traffic acquisition cycle strategy includes at least one of the following: The identity of the virtual machine; The period during which the proxy module in the virtual machine obtains the flow information from the storage and data retrieval module; The period during which the proxy module in the virtual machine sends traffic information to the second device.
15. The method for acquiring flow information according to claim 12, characterized in that: The method further comprises: receiving target adjustment information sent by the first device; Sending the target adjustment information to the target virtual machine, so that the target virtual machine adjusts the adjusted traffic acquisition cycle policy to the target traffic acquisition cycle policy according to the target adjustment information, and enables the target virtual machine to perform traffic monitoring according to the target traffic acquisition cycle policy; The target adjustment information is generated when the first device does not obtain the abnormal traffic event notification of the target virtual machine within a preset time period, and is sent to the second device.
16. A flow information acquisition device, characterized in that: Applied to a first device, the apparatus comprises: A first acquisition module, used to obtain an abnormal traffic event notification of a target virtual machine; A first processing module, configured to generate target traffic acquisition period update information according to the abnormal traffic event notification; The first sending module is used to send the target traffic acquisition cycle update information to the second device, so that the second device sends the target traffic acquisition cycle update information to the target virtual machine, and the target virtual machine adjusts the current target traffic acquisition cycle policy according to the target traffic acquisition cycle update information to obtain the adjusted traffic acquisition cycle policy, and enables the target virtual machine to monitor traffic according to the adjusted traffic acquisition cycle policy.
17. A flow information acquisition device, characterized in that: Applied to a target virtual machine, the device comprises: A first receiving module, configured to receive target traffic acquisition period update information sent by a second device; A first adjustment module, configured to adjust the current target traffic acquisition cycle strategy according to the target traffic acquisition cycle update information to obtain an adjusted traffic acquisition cycle strategy; A first monitoring module, configured to perform flow monitoring according to the adjusted flow acquisition cycle strategy; The target traffic acquisition period update information is generated by the first device according to the abnormal traffic event notification of the target virtual machine.
18. A flow information acquisition device, characterized in that: Applied to a second device, the apparatus comprises: A second receiving module is used to receive target traffic acquisition period update information sent by the first device; the target traffic acquisition period update information is generated by the first device according to the abnormal traffic event notification of the target virtual machine; The second sending module is used to send the target traffic acquisition cycle update information to the target virtual machine, so that the target virtual machine adjusts the current target traffic acquisition cycle policy according to the target traffic acquisition cycle update information to obtain the adjusted traffic acquisition cycle policy, and enables the target virtual machine to obtain the adjusted traffic acquisition cycle policy.
19. An electronic device, the electronic device being a first device, comprising: A transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; characterized in that when the processor executes the program or instruction, the steps in the method for obtaining traffic information as described in any one of claims 1 to 6 are implemented.
20. A virtual machine, the virtual machine being a target virtual machine, comprising: A transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; characterized in that when the processor executes the program or instruction, the steps in the method for obtaining traffic information as described in any one of claims 7 to 11 are implemented.
21. An electronic device, the electronic device being a second device, comprising: A transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; characterized in that when the processor executes the program or instruction, the steps in the method for obtaining traffic information as described in any one of claims 12 to 15 are implemented.
22. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by the processor, it implements the steps in the method for obtaining flow information as described in any one of claims 1 to 6, or implements the steps in the method for obtaining flow information as described in any one of claims 7 to 11, or implements the steps in the method for obtaining flow information as described in any one of claims 12 to 15.
Citation Information
Patent Citations
Method and system for traffic guidance
CN107846470A
Safety protection system, method and equipment and storage medium
CN109995794A
Adaptive traffic acquisition method and device, storage medium and electronic equipment
CN114050983A
Network information acquisition method and device, electronic equipment and readable storage medium
CN115002186A
Communication fault processing method, system and equipment
CN115733729A
