User traffic collection method and device based on network target range

By determining the target host and acquisition strategy based on the target range scenario and network traffic situation in the network shooting range, efficient and flexible collection of traffic data is achieved, and the problems of inaccurate and insufficient collection in the existing technology are solved, and performance is reduced Pressure and network occupation.

CN119071042APending Publication Date: 2024-12-03INTEGRITY TECH GRP INC +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411114064.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The existing network shooting range technology has problems such as insufficient targeted traffic acquisition, many acquisition scenarios, and many objects, resulting in high performance pressure and many invalid traffic analysis. It is not very flexible in collection, and the transmission occupies a large bandwidth, and subsequent processing is complicated. Adjustment Lag.

Method used

By determining the target host and target network interface based on the target target range scene configuration file and scene unit attribute information of the network shooting range, formulating a target acquisition strategy, sending a policy to the target host to collect traffic data, and returning the collected data through a specific network, Business analysis.

Benefits of technology

It realizes simple and fast acquisition of traffic data, improves collection efficiency and flexibility, accurately determines the target host and network interface, reduces invalid traffic acquisition and analysis, reduces performance pressure, avoids the occupation of data network, and reduces normal applications. interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071042A_ABST
    Figure CN119071042A_ABST
Patent Text Reader

Abstract

The invention discloses a user traffic collection method based on a network target range, and the method can achieve the simple and rapid collection of traffic data, and the collection of the traffic data is higher in efficiency and is more flexible. A target host machine, a target network interface and a target collection strategy for traffic collection can be more accurately determined, collection and analysis of invalid traffic are reduced, and subsequent performance pressure is reduced; a target acquisition strategy can be determined according to the network traffic condition information of the scene unit, and the pertinence and flexibility of traffic acquisition are improved; according to the method, the target host machine can perform flow data acquisition on the specified target network interface according to the target acquisition strategy, and return the acquired flow data through the acquisition network of the flow data, so that occupation of a data network / SDN network is avoided, and interference to normal application of the network is reduced; simple and rapid planning, monitoring and realization of user traffic collection can be realized; compared with an acquisition mode in the prior art, the method is higher in efficiency and more flexible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network target range technology, and in particular to a method and device for collecting user traffic based on a network target range. Background Art

[0002] Cyber ​​ranges play an important role in cyberspace security research and are the core infrastructure for countries to conduct related learning, testing, verification, and drills. The scenarios constructed by cyber ranges are a reflection of real cyberspace. The more realistic and detailed the simulation scenarios are, the more useful value and better experience they can bring to users. This is especially true in practical training, confrontational drills, and test verification scenarios, which can guide or connect to actual business applications. However, as the complexity of scenario content increases, the requirements for accurate analysis of user traffic are getting higher and higher, and existing technologies have many shortcomings. Specifically, they are:

[0003] The traffic is mirrored globally, such as physical switch mirroring or OpenvSwitch port mirroring. This method is relatively easy to implement, but there are many traffic collection scenarios (related / irrelevant scenarios are all together) and many objects (even in one scene, background / foreground / normal business traffic are all together). This leads to subsequent performance pressure, high requirements for correlation analysis, and a lot of invalid traffic analysis. Overall, it is not very targeted and does not focus on analyzing the traffic related to the target range users.

[0004] Traffic collection is not very flexible. When using full-traffic collection methods such as mirroring, all data packets are collected, which need to be processed to know the user traffic protocol type and other contents. The full-traffic method not only occupies a large bandwidth for transmission, but also makes subsequent processing more troublesome. When the results are known, adjustments are often delayed. Summary of the invention

[0005] The present application provides a user traffic collection method and device based on a network target range to achieve simple and rapid traffic data collection, making the traffic data collection more efficient and flexible; it can more accurately determine the target host machine, target network interface, and target collection strategy for traffic collection, reduce the collection and analysis of invalid traffic, and reduce subsequent performance pressure; improve the pertinence and flexibility of traffic collection; avoid occupying the data network / SDN network, and reduce interference with normal network applications.

[0006] In a first aspect, the present application provides a method for collecting user traffic based on a network range, the method being applied to a network range platform, the method comprising:

[0007] Determine a target host machine corresponding to the target range scene according to a configuration file of the target range scene of the network range and attribute information of the scene unit;

[0008] Determining a target acquisition strategy based on the network traffic information of the scene unit;

[0009] Sending the target acquisition strategy and the interface information of the target network interface corresponding to the target range scene to the target host machine, so that the target host machine collects flow data of the target network interface according to the target acquisition strategy, and returns the collected flow data through the flow data collection network;

[0010] The collected process data is analyzed to obtain business analysis results.

[0011] In a second aspect, the present application provides a user traffic collection device based on a network range, the device is applied to a network range platform, and the device includes:

[0012] The first unit is used to determine a target host machine corresponding to the target range scene according to a configuration file of the target range scene of the network range and attribute information of the scene unit;

[0013] The second unit is used to determine the target collection strategy according to the network traffic situation information of the scene unit;

[0014] The third unit is used to send the interface information of the target network interface corresponding to the target acquisition strategy and the target range scene to the target host machine, so that the target host machine collects flow data of the target network interface according to the target acquisition strategy, and returns the collected flow data;

[0015] The fourth unit is used to analyze the collected process data to obtain business analysis results.

[0016] In a third aspect, the present application provides a readable medium comprising execution instructions. When a processor of an electronic device executes the execution instructions, the electronic device executes any method described in the first aspect.

[0017] In a fourth aspect, the present application provides an electronic device, comprising a processor and a memory storing execution instructions, wherein when the processor executes the execution instructions stored in the memory, the processor executes any method described in the first aspect.

[0018] It can be seen from the above technical scheme that the present application provides a user traffic collection method based on a network target range, and the method is applied to a network target range platform, and the method includes: determining the target host corresponding to the target target range scene according to the configuration file of the target target range scene of the network target range and the attribute information of the scene unit; determining the target collection strategy according to the network traffic situation information of the scene unit; sending the target collection strategy and the interface information of the target network interface corresponding to the target target range scene to the target host, so that the target host collects traffic data of the target network interface according to the target collection strategy, and returns the collected traffic data; analyzing the collected process data to obtain business analysis results. It can be seen that the present application can achieve the following

[0019] Beneficial effects:

[0020] 1. It can realize the simple and fast collection of flow data. Compared with the existing technology, the collection of flow data is more efficient and flexible;

[0021] 2. It can more accurately determine the target host, target network interface, and target collection strategy for traffic collection, reduce the collection and analysis of invalid traffic, and reduce subsequent performance pressure;

[0022] 3. The target collection strategy can be determined according to the network traffic information of the scene unit, and the target collection strategy can be sent to the target host, thereby improving the pertinence and flexibility of traffic collection;

[0023] 4. The target host can collect traffic data from the designated target network interface according to the target collection strategy, and return the collected traffic data through the traffic data collection network, thereby avoiding the occupation of the data network / SDN network and reducing the interference with the normal application of the network;

[0024] 5. It can realize the planning, monitoring and implementation of simple and fast user traffic collection; it is more efficient and flexible than the existing collection methods.

[0025] The further effects of the above-mentioned non-conventional preferred manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present application or the existing technical solutions, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0027] Figure 1 A flowchart of a method for collecting user traffic based on a network range provided in this application;

[0028] Figure 2 A schematic diagram of the structure of a user traffic collection device based on a network range provided in this application;

[0029] Figure 3 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0031] The inventor found that at present, the cyber range has become an indispensable core infrastructure for cyberspace security for countries to conduct cyberspace security research, learning, testing, verification, and drills. Countries around the world attach great importance to the construction of cyber ranges and regard it as an important means to support security capacity building.

[0032] The scenarios constructed by the cyber range are a reflection of the real cyberspace. The more realistic and detailed the simulated scenarios are, the more useful value and better experience the users can get. This is especially true in practical training, confrontation exercises, test verification and other scenarios, which can guide or connect to actual business applications. At the same time, as the complexity of the scenario content increases, the requirements for accurate analysis of user traffic are getting higher and higher, and the existing technology has many shortcomings.

[0033] 1) Traffic is mirrored globally, such as physical switch mirroring or OpenvSwitch port mirroring. This method is relatively easy to implement, but there are many traffic collection scenarios (related / irrelevant scenarios are all together) and many objects (even in one scenario, background / foreground / normal business traffic are all together), which leads to subsequent performance pressure, high requirements for correlation analysis, and more invalid traffic analysis. In general, it is not very targeted and does not focus on analyzing the traffic related to the target users;

[0034] 2) Traffic collection is not flexible. When using full-traffic collection methods such as mirroring, all data packets are collected, which need to be processed to know the user traffic protocol type and other contents. The full-traffic method not only occupies a large bandwidth for transmission, but also makes subsequent processing more troublesome. When the results are known, adjustments are often delayed.

[0035] Therefore, the present application provides a user traffic collection method based on a network target range, which can realize simple and fast traffic data collection. Compared with the existing technology, the traffic data collection efficiency is higher and more flexible; it can more accurately determine the target host machine, target network interface, and target collection strategy for traffic collection, reduce the collection and analysis of invalid traffic, and reduce subsequent performance pressure; it can determine the target collection strategy based on the network traffic situation information of the scene unit, and send the target collection strategy to the target host machine, thereby improving the pertinence and flexibility of traffic collection; the target host machine can collect traffic data for the designated target network interface according to the target collection strategy, and return the collected traffic data through the traffic data collection network, thereby avoiding the occupation of the data network / SDN network and reducing interference with the normal application of the network.

[0036] Various non-limiting implementations of the present application are described in detail below in conjunction with the accompanying drawings.

[0037] See also Figure 1 , shows a method for collecting user traffic based on a network range in an embodiment of the present application. The method is applied to a network range platform. In this embodiment, the method may include the following steps:

[0038] S101: Determine a target host machine corresponding to the target range scene according to a configuration file of a target range scene of a network range and attribute information of a scene unit.

[0039] In this embodiment, the target host corresponding to the target range scene can be determined based on the configuration file of the target range scene of the network range and the attribute information of the scene unit. It can be understood that the configuration file of the target range scene can include relevant information of the scene configuration of the range scene, and the attribute information of the scene unit can include the construction status of the scene unit.

[0040] As an example, the virtual machine or virtual device corresponding to the target range scene can be determined based on the configuration file of the target range scene of the network range and the attribute information of the scene unit; then, the host machine where the virtual machine or virtual device is located can be determined, and the host machine can be used as the target host machine corresponding to the target range scene. It can be understood that according to a scene configuration file of the network range and the construction of the actual scene unit, the host machine list where the virtual machine / device of the range scene is located (i.e., the target host machine corresponding to the target range scene) is determined.

[0041] S102: Determine a target acquisition strategy according to the network traffic situation information of the scene unit.

[0042] As an example, the content to be collected and the collection time can be determined based on the network traffic information of the scene unit; then, the target collection strategy can be determined based on the content to be collected and the collection time. It can be understood that the target collection strategy can include the content to be collected and the collection time.

[0043] In one implementation, the method for acquiring the network traffic situation information of the scene unit may include the following steps:

[0044] First, based on the sFlow protocol of the switch, the network traffic of the virtual unit corresponding to the scene unit is sampled and collected through the sFlow proxy device. For example, based on the sFlow protocol of the switch, the network traffic of the virtual unit corresponding to the scene unit within a preset time period can be sampled and collected through the sFlow proxy device. Specifically, the network interface of the virtual device / virtual machine for collecting traffic in the configuration file of the target host can be loaded through the sFlow proxy device deployed on the switch, and the traffic of the network interface can be sampled and collected to obtain the network traffic of the virtual unit corresponding to the scene unit within the preset time period. The network traffic may include: source IP, target IP, source port, target port, protocol type, and intercepted original message content, and the switch may be an SDN switch or an OpenvSwitch switch.

[0045] Then, the network traffic of the virtual unit corresponding to the scene unit can be analyzed to obtain the network traffic information of the scene unit. For example, the network traffic of the virtual unit corresponding to the scene unit within the preset time period can be analyzed by dimensionality reduction to determine the network connection relationship corresponding to the scene unit; wherein the network connection relationship includes a network port and a protocol type; and the business traffic information within the network connection relationship corresponding to the scene unit is used as the network traffic information of the scene unit.

[0046] It can be understood that this embodiment can adopt the sFlow protocol based on the SDN switch, and the network traffic on the virtual device can be sampled and collected by sFlowagent and sent to the sFlow collector; the network traffic has been preliminarily analyzed during the sampling process and can be directly provided to the network range platform for analysis; through monitoring and analysis, the network range platform accurately collects user traffic and possible user traffic based on the existing network traffic model, and provides an implementation path. User traffic (i.e., the network traffic of the virtual unit corresponding to the scenario unit) refers to the traffic that users conduct in a confrontational / non-confrontational environment such as attack and defense, practical exercises or competitions in the network range scenario through virtual machines / virtual devices, and then transmit between network devices in a step-by-step manner according to the attack lines built into the network range / developed by users. The user traffic here does not refer to the traffic generated by user operations, such as directly attacking virtual devices / virtual machines, controlling a certain virtual device through vulnerabilities, and then controlling the next device / virtual machine through the device / virtual machine. By default, the network target range will have foreground traffic, background traffic, and some business traffic (for example, a web server provides external services, and when responding to services, it needs to access the backend database server through the network. By default, the web server and database server will have network traffic, which can be referred to as business traffic). These traffic have no direct relationship with user traffic. If they are collected, they will only increase the subsequent transmission and analysis burden. Therefore, it is very important to identify user traffic and collect it accurately.

[0047] In one implementation, the management user can choose to set user traffic collection for a specific virtual unit in a certain scenario of the network range, that is, set the target collection strategy, such as equipment, collection strategy, data storage strategy, etc. If there is, this setting will be the highest priority configuration. If not, the network range will follow the no configuration requirements, or continue to use the previous user traffic collection strategy.

[0048] As an example, by deploying sFlowagent on an SDN switch / OpenvSwitch switch, the network interface of the virtual device / virtual machine for collecting traffic in the configuration file of the target host is loaded, and the traffic of the network interface is sampled and collected, and sent to the designated remote network target range sFlowcollector for analysis. The network target range performs dimensionality reduction analysis on the collected sampled data to form the direct network connection relationship of the scene unit of the current network target range scenario, including network ports, protocol types, etc. After continuous monitoring for a period of time, a relatively solidified network connection relationship is formed. The traffic within the network relationship is regarded as business traffic and is not collected, and a collection strategy is formed. Once the scene unit is accessed externally and the access relationship within the scene unit is not previously solidified, it will be judged as user traffic and needs to be collected.

[0049] The sFlowagent deployed on the SDN switch / OpenvSwitch switch can send the sampled data of the specified unit to the remote sFlowcollcetor. The network traffic is sent through the collection network, using the collection network card, or through the management network, using the management network card, to avoid interference with the data network of the SDN switch / OpenvSwitch switch. The collected sFlow data uses the udp protocol for data transmission, and the message type is ExpandedFlowSample. The sampled data includes but is not limited to: source IP, target IP, source port, target port, protocol type and other information, as well as the intercepted original message content. The above data is collected and stored by sFlowcollcetor, extracted and analyzed, and the IP address and service port of the scene unit matching the scene are obtained. After a period of time, a solidified network connection relationship is formed, and the network with the fixed connection relationship is included in the collection configuration strategy, and the traffic is not collected, and it is sent to the collection and strategy unit of the target host; the matching unit of the network target range automatically compares the sampled collection data. Once it is found that the active connection of a scene unit to the outside is inconsistent with the previous one, it can be understood that the unit is controlled by the user and there is user traffic. The traffic command is issued for a specific length of time. The analysis and decision unit of the network target range can be used in combination with the industry's PETS penetration testing framework, network kill chain, ATT&CK and other frameworks, and connected with the network target range's traffic analysis platform. Using its existing analysis results, the network target range users can be located, so as to perform relatively accurate traffic collection. Roughly determine the area or location of the user, and form the situation before and after the current location. In terms of traffic collection, if the IP address of the virtual machine / virtual device occupied by the user has not changed, the strategy of directly collecting the external traffic of the IP can be adopted. If the IP address of the virtual machine / device changes (it may be re-obtained by DHCP, modified by the user, or restarted under user control), it can be monitored and identified through sFlow.

[0050] S103: Send the interface information of the target network interface corresponding to the target acquisition strategy and the target shooting range scene to the target host machine, so that the target host machine collects flow data of the target network interface according to the target acquisition strategy, and returns the collected flow data through the flow data collection network.

[0051] In this embodiment, the interface information of the target network interface corresponding to the target shooting range scenario may include a unique identifier of the target network interface, a network IP address, virtual switch access information, and scenario information.

[0052] It is understandable that the target collection strategy and the interface information of the target network interface corresponding to the target range scenario can be sent to the target host. The target host can determine the target network interface according to the interface information of the target network interface corresponding to the target range scenario, and then, according to the target collection strategy, flow data collection can be performed on the target network interface (i.e., the content to be collected can be collected according to the collection time), and the collected flow data can be returned through the flow data collection network. In other words, the target host returns the collected data packets to the analysis and utilization platform, that is, through the target host, flow data collection is performed on the target network interface according to the target collection strategy, and transmitted to the network range platform for analysis through the collection network, so as to avoid occupying the data network / SDN network.

[0053] As an example, the virtual device information that potentially needs to collect user traffic (i.e., the interface information of the target network interface corresponding to the target range scenario) can be synchronized to all target hosts, including the unique number of the virtual machine / device, the network IP address (static or DHCP assigned), and the virtual switch access information (including the interface number, VLAN information, etc.), and receive the default collection policy of the network range management user (such as defined by the customer, or the collection policy for the same scenario before) or the management user specifies that the user traffic (i.e., traffic data) of a certain virtual machine (i.e., the target network interface) must be collected (if any, or if there is no subsequent configuration, no configuration is required), and start the sFlowagent function on the SDN switch (OpenvSwitch by default) on the target host.

[0054] Specifically, after a scene in the network target range (taking one scene as an example) is started, the host information of the scene unit and the target host machine is obtained, and the unique identifier of the virtual device / device (i.e., the target network interface) of the virtual device / virtual machine to be collected (if not specified, the default is all units), the network IP address (static or DHCP assigned), the virtual switch access information (including interface number, VLAN information, etc.), and the scene information (unique identifier) ​​are synchronized to the target host machine.

[0055] If there is interface information of the target network interface corresponding to the target collection strategy and the target range scenario, the target host machine can accept the interface information of the target network interface corresponding to the target collection strategy and the target range scenario, so that the target host machine can collect flow data of the target network interface according to the target collection strategy. If there is no target collection strategy, the sFlow agent function of the SDN switch / OpenvSwitch switch can be enabled. After enabling this function, the port flow on the virtual machine switch (i.e., the target network interface) can be sampled for all virtual devices / virtual machines of the target host machine, that is, flow data collection is performed on the target network interface.

[0056] After the host machine receives the target collection strategy and the interface information of the target network interface corresponding to the target target range scenario, it can automatically stop collecting normal traffic. Once a traffic collection command is received, the collection unit of the target host machine can determine the target network interface according to the interface information of the target network interface corresponding to the target target range scenario, and start collecting traffic from the network interface of the virtual device / virtual machine (i.e., the target network interface), and at the same time not collect normal traffic.

[0057] If the target host has a default collection policy, it will be executed according to the default collection policy first. If not, it will be executed according to the policy formed after the latest network target range analysis (i.e., the target collection policy). If there is a user-specified collection policy, such as under what circumstances to collect traffic for a certain virtual device / virtual machine, it will be executed according to that policy first.

[0058] The target host may have background traffic construction and foreground traffic construction tasks. In this case, if the object of traffic collection is also on the host, IP address-based traffic collection can be used to filter out irrelevant traffic.

[0059] The target host can start the collection program with the collection unit, and after loading the collection strategy for the network card of the specified virtual machine (i.e., the target network interface), the collection time can adopt the default strategy (i.e., the target collection strategy), or communicate with the network target range decision analysis unit to obtain a stop command to complete the collection of traffic data (i.e., the target network interface collects traffic data). After the collection, it is cached in the local folder of the target host by default, and the task name, scene name, device name, time and other information are marked.

[0060] The target host completes traffic collection and can send the collected traffic data to the network range analysis platform. The collected traffic data is sent to the network range analysis platform through the collection network for subsequent data analysis and business applications. The traffic data collected by the target host can be sent to the network range platform through the collection network composed of physical network cards.

[0061] S104: Analyze the collected process data to obtain business analysis results.

[0062] After obtaining the collected process data, data analysis can be performed on the collected process data to obtain business analysis results.

[0063] It can be seen from the above technical scheme that the present application provides a user traffic collection method based on a network target range, and the method is applied to a network target range platform, and the method includes: determining the target host corresponding to the target target range scene according to the configuration file of the target target range scene of the network target range and the attribute information of the scene unit; determining the target collection strategy according to the network traffic situation information of the scene unit; sending the target collection strategy and the interface information of the target network interface corresponding to the target target range scene to the target host, so that the target host collects traffic data of the target network interface according to the target collection strategy, and returns the collected traffic data; analyzing the collected process data to obtain business analysis results. It can be seen that the present application can achieve the following

[0064] Beneficial effects:

[0065] 1. It can realize the simple and fast collection of flow data. Compared with the existing technology, the collection of flow data is more efficient and flexible;

[0066] 2. It can more accurately determine the target host, target network interface, and target collection strategy for traffic collection, reduce the collection and analysis of invalid traffic, and reduce subsequent performance pressure;

[0067] 3. The target collection strategy can be determined according to the network traffic information of the scene unit, and the target collection strategy can be sent to the target host, thereby improving the pertinence and flexibility of traffic collection;

[0068] 4. The target host can collect traffic data from the designated target network interface according to the target collection strategy, and return the collected traffic data through the traffic data collection network, thereby avoiding the occupation of the data network / SDN network and reducing the interference with the normal application of the network;

[0069] 5. It can realize the planning, monitoring and implementation of simple and fast user traffic collection; it is more efficient and flexible than the existing collection methods.

[0070] It can be understood that this application uses scenario configuration files and actual scenario units to sort out and determine the host machine that can collect user traffic; through sFlow sampling, collect the network traffic of all units in the actual scenario in real time, analyze it, form a scene collection rule library, and issue user traffic collection policies and commands; the host machine collects the specified network interface traffic according to the collection policy and command, and sends the traffic packet through the data collection interface. In other words, this embodiment can use the target host machine to collect the network card traffic of the virtual device, that is, to collect it at the next layer of the cloud platform / virtualization (further explanation of the layer can be simply understood as: virtual device, virtual switch / SDN, cloud platform, host machine, physical hardware). a) The benefits of this collection method: 1. Traffic can be collected from many virtual devices on the host machine; 2. Many functions of the virtual switch / SDN switch can be used; 3. Flexible traffic collection strategies can be received or executed to achieve traffic collection of specified virtual devices at specified time points and under specified conditions; 4. The collected traffic can be temporarily stored or simply analyzed (if necessary), through the data collection network (separated from the SDN switching network, physical network card, etc. of the virtual device), that is, the transmission does not go through the SDN switching network, but can go through the management network (under the cloud platform, the data network / SDN network, management network, data collection network / operation and maintenance network, etc. can be separated if necessary), which can avoid the traditional method from interfering with the normal application of the data network / SDN network or occupying the network bandwidth.

[0071] like Figure 2 As shown, a specific embodiment of a user traffic collection device based on a network range described in this application is shown. The device described in this embodiment is a physical device for executing the method described in the above embodiment. Its technical solution is essentially consistent with the above embodiment, and the corresponding description in the above embodiment is also applicable to this embodiment. The device described in this embodiment is applied to a network range platform, and the device includes:

[0072] The first unit 201 is used to determine a target host machine corresponding to the target range scene according to a configuration file of the target range scene of the network range and attribute information of the scene unit;

[0073] The second unit 202 is used to determine a target collection strategy according to the network traffic situation information of the scene unit;

[0074] The third unit 203 is used to send the interface information of the target network interface corresponding to the target acquisition strategy and the target range scene to the target host machine, so that the target host machine collects flow data of the target network interface according to the target acquisition strategy, and returns the collected flow data;

[0075] The fourth unit 204 is used to analyze the collected process data to obtain a business analysis result.

[0076] Optionally, the first unit 201 is used to:

[0077] Determine a virtual machine or virtual device corresponding to a target range scene in a network range according to a configuration file of the target range scene and attribute information of a scene unit;

[0078] The host machine where the virtual machine or virtual device is located is determined, and the host machine is used as a target host machine corresponding to the target range scenario.

[0079] Optionally, the second unit 202 is used to:

[0080] Determine the content to be collected and the collection time according to the network traffic information of the scene unit;

[0081] A target collection strategy is determined according to the content to be collected and the collection time.

[0082] Optionally, the method for acquiring the network traffic situation information of the scene unit includes the following steps:

[0083] Based on the sFlow protocol of the switch, the network traffic of the virtual unit corresponding to the scene unit is sampled and collected through the sFlow proxy device;

[0084] The network traffic of the virtual unit corresponding to the scene unit is analyzed to obtain network traffic situation information of the scene unit.

[0085] Optionally, the switch is an SDN switch or an OpenvSwitch switch; and the switch-based sFlow protocol, sampling and collecting network traffic of the virtual unit corresponding to the scene unit through an sFlow proxy device, includes:

[0086] Based on the sFlow protocol of the switch, the network traffic of the virtual unit corresponding to the scene unit within a preset time period is sampled and collected through the sFlow proxy device; wherein the network traffic includes: source IP, target IP, source port, target port, protocol type and intercepted original message content;

[0087] Accordingly, the analyzing the network traffic of the virtual unit corresponding to the scene unit to obtain the network traffic situation information of the scene unit includes:

[0088] Performing dimensionality reduction analysis on the network traffic of the virtual unit corresponding to the scene unit within the preset time period to determine the network connection relationship corresponding to the scene unit; wherein the network connection relationship includes a network port and a protocol type;

[0089] The business traffic situation information within the network connection relationship corresponding to the scene unit is used as the network traffic situation information of the scene unit.

[0090] Optionally, the switch-based sFlow protocol, sampling and collecting network traffic of the virtual unit corresponding to the scene unit within a preset time period through an sFlow proxy device, includes:

[0091] By deploying an sFlow proxy device on the switch, the network interface of the virtual device / virtual machine for collecting traffic in the configuration file of the target host machine is loaded, and the traffic of the network interface is sampled and collected to obtain the network traffic of the virtual unit corresponding to the scene unit within a preset time period.

[0092] Optionally, the interface information of the target network interface corresponding to the target shooting range scenario includes a unique identifier of the target network interface, a network IP address, virtual switch access information, and scenario information.

[0093] Figure 3 It is a structural diagram of an electronic device provided in an embodiment of the present application. At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Among them, the memory may include a memory, such as a high-speed random access memory (Random-Access Memory, RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.

[0094] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0095] The memory is used to store execution instructions. Specifically, the execution instructions are computer programs that can be executed. The memory may include internal memory and non-volatile memory, and provides execution instructions and data to the processor.

[0096] In one possible implementation, the processor reads the corresponding execution instructions from the non-volatile memory into the memory and then runs them, and can also obtain the corresponding execution instructions from other devices to form a user flow collection device based on the network range at the logical level. The processor executes the execution instructions stored in the memory to implement the user flow collection method based on the network range provided in any embodiment of the present application through the executed execution instructions.

[0097] The above application Figure 1 The method performed by the user traffic collection device based on the network range provided in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The various methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0098] The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0099] An embodiment of the present application also proposes a readable storage medium, which stores execution instructions. When the stored execution instructions are executed by a processor of an electronic device, the electronic device can execute the user traffic collection method based on the network target range provided in any embodiment of the present application, and is specifically used to execute the above-mentioned user traffic collection method based on the network target range.

[0100] The electronic device described in the above embodiments may be a computer.

[0101] Those skilled in the art should understand that the embodiments of the present application can be provided as methods or computer program products. Therefore, the present application can adopt a complete hardware embodiment, a complete software embodiment, or a combination of software and hardware.

[0102] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0103] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0104] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A user traffic collection method based on a network range, characterized in that: The method is applied to a network range platform, and the method comprises: Determine a target host machine corresponding to the target range scene according to a configuration file of the target range scene of the network range and attribute information of the scene unit; Determining a target acquisition strategy based on the network traffic information of the scene unit; Sending the target acquisition strategy and the interface information of the target network interface corresponding to the target range scene to the target host machine, so that the target host machine collects flow data of the target network interface according to the target acquisition strategy, and returns the collected flow data through the flow data collection network; The collected process data is analyzed to obtain business analysis results.

2. The method according to claim 1, characterized in that The step of determining a target host machine corresponding to the target range scene according to a configuration file of the target range scene of the network range and attribute information of a scene unit includes: Determine a virtual machine or virtual device corresponding to a target range scene in a network range according to a configuration file of the target range scene and attribute information of a scene unit; The host machine where the virtual machine or virtual device is located is determined, and the host machine is used as a target host machine corresponding to the target range scenario.

3. The method according to claim 1, characterized in that Determining the target acquisition strategy according to the network traffic situation information of the scene unit includes: Determine the content to be collected and the collection time according to the network traffic information of the scene unit; A target collection strategy is determined according to the content to be collected and the collection time.

4. The method according to claim 3, characterized in that The method for obtaining the network traffic situation information of the scene unit comprises the following steps: Based on the sFlow protocol of the switch, the network traffic of the virtual unit corresponding to the scene unit is sampled and collected through the sFlow proxy device; The network traffic of the virtual unit corresponding to the scene unit is analyzed to obtain network traffic situation information of the scene unit.

5. The method according to claim 4, characterized in that The switch is an SDN switch or an OpenvSwitch switch; the switch-based sFlow protocol, sampling and collecting network traffic of the virtual unit corresponding to the scene unit through an sFlow proxy device, includes: Based on the sFlow protocol of the switch, the network traffic of the virtual unit corresponding to the scene unit within a preset time period is sampled and collected through the sFlow proxy device; wherein the network traffic includes: source IP, target IP, source port, target port, protocol type and intercepted original message content; Accordingly, the analyzing the network traffic of the virtual unit corresponding to the scene unit to obtain the network traffic situation information of the scene unit includes: Performing dimensionality reduction analysis on the network traffic of the virtual unit corresponding to the scene unit within the preset time period to determine the network connection relationship corresponding to the scene unit; wherein the network connection relationship includes a network port and a protocol type; The business traffic situation information within the network connection relationship corresponding to the scene unit is used as the network traffic situation information of the scene unit.

6. The method according to claim 5, characterized in that The switch-based sFlow protocol, sampling and collecting the network traffic of the virtual unit corresponding to the scene unit within a preset time period through an sFlow proxy device, includes: By deploying an sFlow proxy device on the switch, the network interface of the virtual device / virtual machine for collecting traffic in the configuration file of the target host machine is loaded, and the traffic of the network interface is sampled and collected to obtain the network traffic of the virtual unit corresponding to the scene unit within a preset time period.

7. The method according to claim 1, characterized in that The interface information of the target network interface corresponding to the target range scenario includes a unique identifier of the target network interface, a network IP address, virtual switch access information, and scenario information.

8. A user traffic collection device based on a network range, characterized in that: The device is applied to a network range platform, and the device comprises: The first unit is used to determine a target host machine corresponding to the target range scene according to a configuration file of the target range scene of the network range and attribute information of the scene unit; The second unit is used to determine the target collection strategy according to the network traffic situation information of the scene unit; The third unit is used to send the interface information of the target network interface corresponding to the target acquisition strategy and the target range scene to the target host machine, so that the target host machine collects flow data of the target network interface according to the target acquisition strategy, and returns the collected flow data; The fourth unit is used to analyze the collected process data to obtain business analysis results.

9. A readable medium, characterized in that: It includes execution instructions. When a processor of an electronic device executes the execution instructions, the electronic device executes the method as claimed in any one of claims 1 to 7.

10. An electronic device, characterized in that: The electronic device includes a processor and a memory storing execution instructions. When the processor executes the execution instructions stored in the memory, the processor executes the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Network range data processing system and method, electronic equipment and storage medium

    CN120692182A

  • File management method and device

    CN121387206A