A message sampling method, device and related equipment

By creating multiple ACLs on network devices and configuring different sampling actions, the problem of existing technologies being unable to meet the requirements of rule sampling and full data collection is solved. This enables flexible sampling of different traffic packets, reduces the pressure on the Telemetry Stream processor, and ensures the stability of critical services.

CN122420149APending Publication Date: 2026-07-17NEW H3C TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2026-06-15
Publication Date
2026-07-17

Smart Images

  • Figure CN122420149A_ABST
    Figure CN122420149A_ABST
Patent Text Reader

Abstract

This application relates to the field of network communication technology, and in particular to a packet sampling method, apparatus, and related equipment. The method is applied to a controller and includes: receiving a user instruction, wherein the user instruction is used to instruct the creation of multiple Access Control Lists (ACLs) on a target network device, and for each created ACL, to create rules for matching a specific target flow, and to configure a corresponding sampling action for each created ACL; generating a corresponding configuration instruction based on the user instruction; and sending the configuration instruction to the target network device, so that the target network device creates the multiple ACLs within the same local configuration range based on the configuration instruction, and for each ACL, creates rules for matching a specific target flow, and configures a corresponding sampling action for each created ACL, wherein the sampling rules for different sampling actions are different, and the sampling actions include full sampling / rule sampling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication technology, and in particular to a message sampling method, apparatus and related equipment. Background Technology

[0002] To alleviate packet loss caused by excessive load on the Telemetry Stream processor due to a large number of raw packets, Telemetry Stream filters raw packets using ACLs (Access Control Lists). Packets matching the rules are copied, and a sampler is used to sample the target stream into the device's internal Telemetry Stream processor. The current controller and device configurations for ACLs and samplers can be applied to both device interfaces and the device globally.

[0003] However, whether applied to a device interface or globally, sampling is performed on packets matching a single ACL at a certain sampling rate; that is, the entire ACL rule is sampled. If a user wants to perform rule sampling on a large volume of traffic while collecting all other traffic, this is currently not possible. Summary of the Invention

[0004] This application provides a message sampling method, apparatus, and related equipment.

[0005] In a first aspect, this application provides a message sampling method applied to a controller, the method comprising: Receive user instructions, wherein the user instructions are used to instruct the creation of multiple access control lists (ACLs) on the target network device, and to create rules for each ACL to match a specific target flow, and to configure corresponding sampling actions for each ACL. Generate corresponding configuration instructions based on the user instructions; The configuration command is sent to the target network device so that the target network device can create the multiple ACLs within the same local configuration range based on the configuration command, and create rules for each ACL to match a specific target flow, and configure a corresponding sampling action for each created ACL. The sampling rules for different sampling actions are different, and the sampling actions include full sampling / rule sampling.

[0006] Optionally, the local same configuration range can be either the global range of the device or the range of a single physical interface.

[0007] Optionally, if the sampling action corresponding to a configured ACL is rule sampling, then the sampling action includes the corresponding sampling mode, sampling frequency and its associated sampler.

[0008] Secondly, this application provides a message sampling method applied to a target network device, the method comprising: The controller receives configuration instructions from the controller and sends the configuration instructions to the target network device. The controller receives user instructions and generates corresponding configuration instructions based on the user instructions. The user instructions are used to instruct the creation of multiple access control lists (ACLs) on the target network device, and to create rules for each ACL to match a specific target flow, and to configure corresponding sampling actions for each ACL. Based on the configuration instructions, the multiple ACLs are created within the same local configuration range, and rules for matching specific target flows are created for each ACL. A corresponding sampling action is configured for each created ACL. The sampling rules for different sampling actions are different, and the sampling actions include full sampling / rule sampling. Receive a target flow packet, determine a target ACL that matches the characteristics of the target flow packet, and determine the target sampling action corresponding to the target ACL; The target stream is sampled based on the target sampling action.

[0009] Optionally, the local same configuration range can be either the global range of the device or the range of a single physical interface.

[0010] Optionally, if the target sampling action corresponding to the configured target ACL is rule sampling, then the target sampling action includes the sampling mode, the sampling frequency and its associated sampler; The steps for sampling packets in the target flow based on the target sampling action include: The target stream is sampled by the sampler associated with the target sampling action, based on the sampling mode and sampling frequency included in the target sampling action.

[0011] Thirdly, this application provides a message sampling device applied to a controller, the device comprising: The receiving unit is used to receive user instructions, wherein the user instructions are used to instruct the creation of multiple access control lists (ACLs) on the target network device, and to create rules for matching a specific target flow for each created ACL, and to configure corresponding sampling actions for each created ACL; A generation unit is used to generate corresponding configuration instructions based on the user instructions; The issuing unit is used to issue the configuration command to the target network device, so that the target network device can create the multiple ACLs in the same local configuration range based on the configuration command, and create rules for matching specific target flows for each ACL, and configure corresponding sampling actions for each created ACL, wherein the sampling rules for different sampling actions are different, and the sampling actions include full sampling / rule sampling.

[0012] Optionally, the local same configuration range can be either the global range of the device or the range of a single physical interface.

[0013] Optionally, if the sampling action corresponding to a configured ACL is rule sampling, then the sampling action includes the corresponding sampling mode, sampling frequency and its associated sampler.

[0014] Fourthly, this application provides a message sampling device applied to a target network device, the device comprising: The first receiving unit is configured to receive configuration instructions issued by the controller and send the configuration instructions to the target network device; wherein, the controller receives user instructions and generates corresponding configuration instructions based on the user instructions, the user instructions are configured to instruct the creation of multiple access control lists (ACLs) on the target network device, and to create rules for matching specific target flows for each created ACL, and to configure corresponding sampling actions for each created ACL; The creation unit is used to create the multiple ACLs within the same local configuration range based on the configuration instructions, and to create rules for each ACL to match a specific target flow, and to configure corresponding sampling actions for each created ACL, wherein the sampling rules for different sampling actions are different, and the sampling actions include full sampling / rule sampling; The second receiving unit is used to receive target flow packets, determine the target ACL that matches the characteristics of the target flow packets, and determine the target sampling action corresponding to the target ACL; A sampling unit is used to sample packets in the target stream based on the target sampling action.

[0015] Optionally, the local same configuration range can be either the global range of the device or the range of a single physical interface.

[0016] Optionally, if the target sampling action corresponding to the configured target ACL is rule sampling, then the target sampling action includes the sampling mode, the sampling frequency and its associated sampler; When sampling packets from the target stream based on the target sampling action, the sampling unit is specifically used for: The target stream is sampled by the sampler associated with the target sampling action, based on the sampling mode and sampling frequency included in the target sampling action.

[0017] Fifthly, embodiments of this application provide a message sampling device, which includes: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method as described in any one of the first aspects above, according to the obtained program instructions.

[0018] In a sixth aspect, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for causing the computer to perform the steps of the method as described in any of the first aspects above.

[0019] Seventhly, embodiments of this application provide a message sampling device, which includes: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method as described in any one of the second aspects above, according to the obtained program instructions.

[0020] Eighthly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for causing the computer to perform the steps of the method as described in any of the second aspects above.

[0021] In summary, the packet sampling method provided in this application embodiment is applied to a controller. The method includes: receiving a user instruction, wherein the user instruction is used to instruct the creation of multiple Access Control Lists (ACLs) on a target network device, and to create rules for matching a specific target flow for each created ACL, and to configure a corresponding sampling action for each created ACL; generating a corresponding configuration instruction based on the user instruction; and sending the configuration instruction to the target network device, so that the target network device creates the multiple ACLs within the same local configuration range based on the configuration instruction, and creates rules for matching a specific target flow for each ACL, and configures a corresponding sampling action for each created ACL, wherein the sampling rules for different sampling actions are different, and the sampling actions include full sampling / rule sampling.

[0022] The packet sampling method provided in this application allows for filtering and uploading of different traffic packets carried by network devices or their interfaces through different ACLs and Actions. Different packet uploading rules are used for different traffic requirements, which can control costs without overlooking key issues. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments of this application or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings of the embodiments of this application.

[0024] Figure 1 A detailed flowchart of a message sampling method provided for an embodiment of this application; Figure 2 A schematic diagram of a sampling strategy configuration provided for an embodiment of the application; Figure 3 A detailed flowchart of another message sampling method provided in this application embodiment; Figure 4 This is a schematic diagram of the structure of a message sampling device provided in an embodiment of this application; Figure 5 A schematic diagram of another message sampling device provided in the embodiments of this application; Figure 6 A schematic diagram of the hardware architecture of a message sampling device provided in this application embodiment; Figure 7 This is a schematic diagram of the hardware architecture of another message sampling device provided in an embodiment of this application. Detailed Implementation

[0025] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “the,” and “the” as used in this application and claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to any and all possible combinations comprising one or more of the associated listed items.

[0026] It should be understood that although the terms first, second, third, etc., may be used to describe various information in embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" may also be interpreted as "when," "when," or "in response to a determination."

[0027] For example, see Figure 1 The diagram shown is a detailed flowchart of a message sampling method provided in an embodiment of this application. This method is applied to a controller and includes the following steps: Step 100: Receive user instructions.

[0028] In this embodiment of the application, the user instruction is used to instruct the creation of multiple access control lists (ACLs) on the target network device, and to create rules for each created ACL to match a specific target flow, and to configure a corresponding sampling action for each created ACL.

[0029] In practical applications, multiple independent Access Control Lists (ACLs) can be created through the controller management interface or device configuration interface. For each created ACL, rules can be created to match specific target flows, and corresponding sampling actions can be configured for each created ACL.

[0030] For example, users can configure the collection strategy for each traffic packet carried by the target network device through the controller management interface or device configuration interface. That is, based on the user's input instructions, multiple ACL instances are created on the target network device. At least one rule for matching a specific flow can be created in an ACL instance, and a corresponding sampling action can be configured for each ACL. In other words, an ACL instance is associated with a corresponding sampling action.

[0031] Step 110: Generate corresponding configuration instructions based on the user instructions.

[0032] Specifically, the controller generates a corresponding configuration file (configuration command) based on the user's input instructions. This configuration file is then sent to the target network device, enabling the target network device to configure the sampling strategy for each type of traffic based on the received configuration file.

[0033] Step 120: Send the configuration command to the target network device so that the target network device can create the multiple ACLs in the same local configuration range based on the configuration command, create rules for matching specific target flows for each ACL, and configure corresponding sampling actions for each created ACL.

[0034] In this embodiment of the application, the sampling rules for different sampling actions are different, and the sampling actions include full sampling / rule sampling.

[0035] For example, see Figure 2 The diagram illustrates a sampling strategy configuration provided in an embodiment of the application. It is assumed that ACL1, ACL2, and ACL3 are created on the target device. ACL1 contains Rule 11 for matching traffic 1, ACL2 contains Rule 21 for matching traffic 2, Rule 22 for matching traffic 3, and Rule 23 for matching traffic 4, and ACL3 contains Rule 31 for matching traffic 5. The sampling action configured for ACL1 is rule-based sampling with a sampling frequency of a, the sampling action configured for ACL2 is also rule-based sampling with a sampling frequency of b, and the sampling action configured for ACL3 is full sampling.

[0036] In this embodiment, the local same configuration range refers to either the global scope of the device or the scope of a single physical interface. That is, sampling policies can be configured separately for each type of traffic carried by the network device, or for each type of traffic carried by a single physical interface of the network device. In other words, sampling policies can be deployed on the network device itself or on each interface of the network device.

[0037] In this embodiment of the application, if the target sampling action corresponding to the configured target ACL is rule sampling, then the target sampling action includes the sampling mode, the sampling frequency and its associated sampler.

[0038] Still Figure 2The sampling actions configured for ACL1 and ACL2 are rule-based sampling, meaning the sampling mode of the sampling actions associated with ACL1 and ACL2 is rule-based sampling. The sampling frequency of the corresponding sampling action for ACL1 is 'a', and the sampling frequency of the corresponding sampling action for ACL2 is 'b'. Since the sampling mode of the sampling actions corresponding to ACL1 and ACL2 is frequency-based sampling, a sampler is needed to set the sampling frequency. The sampler performs frequency sampling on the traffic matching the rules contained in ACL1 and ACL2 and sends it to the analyzer (e.g., a Telemetry Stream processor) for processing. The sampling mode of the sampling action corresponding to ACL3 is full sampling; the traffic packets matching the rules contained in ACL3 are sent to the analyzer for processing.

[0039] In practical applications, rule-based sampling can be performed on large traffic volumes known to users, while full sampling can be performed on traffic volumes known to users that are of high business importance. This approach controls sampling and analysis costs, ensures the stability of important business operations, and avoids overlooking critical issues.

[0040] For example, see Figure 3 The diagram shown is a detailed flowchart of a message sampling method provided in an embodiment of this application. This method is applied to a target network device and includes the following steps: Step 300: Receive the configuration command issued by the controller and send the configuration command to the target network device.

[0041] In this embodiment of the application, the controller receives user instructions and generates corresponding configuration instructions based on the user instructions. The user instructions are used to instruct the creation of multiple access control lists (ACLs) on the target network device, and to create rules for matching specific target flows for each created ACL, and to configure corresponding sampling actions for each created ACL.

[0042] Step 310: Based on the configuration instructions, create the multiple ACLs within the same local configuration range, and create rules for each ACL to match a specific target flow, and configure the corresponding sampling action for each created ACL.

[0043] In this embodiment of the application, the sampling rules for different sampling actions are different, and the sampling actions include full sampling / rule sampling.

[0044] Step 320: Receive the target flow packet, determine the target ACL that matches the characteristics of the target flow packet, and determine the target sampling action corresponding to the target ACL.

[0045] Step 330: Sampling the target stream based on the target sampling action.

[0046] Based on the same inventive concept as the above-described method embodiments applied to controllers, see, for example, the following... Figure 4 The diagram shown is a structural schematic of a message sampling device provided in an embodiment of this application. This device is applied to a controller and includes: The receiving unit 40 is configured to receive user instructions, wherein the user instructions are configured to instruct the creation of multiple access control lists (ACLs) on the target network device, and to create rules for each ACL to match a specific target flow, and to configure corresponding sampling actions for each ACL. Generation unit 41 is used to generate corresponding configuration instructions based on the user instructions; The issuing unit 42 is used to issue the configuration instruction to the target network device, so that the target network device can create the multiple ACLs in the same local configuration range based on the configuration instruction, and create rules for matching specific target flows for each ACL, and configure corresponding sampling actions for each created ACL, wherein the sampling rules for different sampling actions are different, and the sampling actions include full sampling / rule sampling.

[0047] Optionally, the local same configuration range can be either the global range of the device or the range of a single physical interface.

[0048] Optionally, if the sampling action corresponding to a configured ACL is rule sampling, then the sampling action includes the corresponding sampling mode, sampling frequency and its associated sampler.

[0049] Based on the same inventive concept as the above-described method embodiments applied to network devices, see, for example, the following... Figure 5 The diagram shown is a structural schematic of a message sampling device provided in an embodiment of this application. This device is applied to a target network device and includes: The first receiving unit 50 is used to receive configuration instructions issued by the controller and send the configuration instructions to the target network device; wherein, the controller receives user instructions and generates corresponding configuration instructions based on the user instructions, the user instructions are used to instruct the creation of multiple access control lists (ACLs) on the target network device, and to create rules for matching specific target flows for each created ACL, and to configure corresponding sampling actions for each created ACL; The creation unit 51 is used to create the multiple ACLs in the same local configuration range based on the configuration instructions, and to create rules for matching specific target flows for each ACL, and to configure corresponding sampling actions for each created ACL, wherein the sampling rules for different sampling actions are different, and the sampling actions include full sampling / rule sampling. The second receiving unit 52 is used to receive target flow packets, determine the target ACL that matches the characteristics of the target flow packets, and determine the target sampling action corresponding to the target ACL; The sampling unit 53 is used to sample the target stream based on the target sampling action.

[0050] Optionally, the local same configuration range can be either the global range of the device or the range of a single physical interface.

[0051] Optionally, if the target sampling action corresponding to the configured target ACL is rule sampling, then the target sampling action includes the sampling mode, the sampling frequency and its associated sampler; When sampling packets of the target stream based on the target sampling action, the sampling unit 53 is specifically used for: The target stream is sampled by the sampler associated with the target sampling action, based on the sampling mode and sampling frequency included in the target sampling action.

[0052] These units can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when one of these units is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these units can be integrated together to form a system-on-a-chip (SOC).

[0053] Furthermore, regarding the message sampling device provided in this application embodiment, from a hardware perspective, the hardware architecture diagram of the message sampling device can be found in [reference needed]. Figure 6 As shown, the message sampling device may include: a memory 60 and a processor 61. The memory 60 is used to store program instructions; the processor 61 calls the program instructions stored in the memory 60 and executes the method embodiment applied to the controller according to the obtained program instructions. The specific implementation and technical effects are similar, and will not be described again here.

[0054] Optionally, this application also provides a controller, including at least one processing element (or chip) for performing the above-described method embodiments applied to the controller.

[0055] Optionally, this application also provides a program product, such as a computer-readable storage medium storing computer-executable instructions for causing the computer to perform the above-described method embodiments applied to the controller.

[0056] Furthermore, regarding the message sampling device provided in this application embodiment, from a hardware perspective, the hardware architecture diagram of the message sampling device can be found in [reference needed]. Figure 7 As shown, the message sampling device may include: a memory 70 and a processor 71. The memory 70 is used to store program instructions; the processor 71 calls the program instructions stored in the memory 70 and executes the method embodiment applied to the network device as described above according to the obtained program instructions. The specific implementation and technical effects are similar, and will not be described again here.

[0057] Optionally, this application also provides a controller, including at least one processing element (or chip) for performing the above-described method embodiments applied to a network device.

[0058] Optionally, this application also provides a program product, such as a computer-readable storage medium storing computer-executable instructions for causing the computer to perform the above-described method embodiments applied to a network device.

[0059] Here, a machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, a machine-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.

[0060] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.

[0061] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.

[0062] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0063] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0064] Furthermore, these computer program instructions can also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in the process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0065] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0066] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A message sampling method, characterized in that, Applied to a controller, the method includes: Receive user instructions, wherein the user instructions are used to instruct the creation of multiple access control lists (ACLs) on the target network device, and to create rules for each ACL to match a specific target flow, and to configure corresponding sampling actions for each ACL. Generate corresponding configuration instructions based on the user instructions; The configuration command is sent to the target network device so that the target network device can create the multiple ACLs within the same local configuration range based on the configuration command, and create rules for each ACL to match a specific target flow, and configure a corresponding sampling action for each created ACL. The sampling rules for different sampling actions are different, and the sampling actions include full sampling / rule sampling.

2. The method as described in claim 1, characterized in that, The local same configuration range can be either the global range of the device or the range of a single physical interface.

3. The method as described in claim 1, characterized in that, If the sampling action corresponding to a configured ACL is rule sampling, then the sampling action includes the corresponding sampling mode, sampling frequency and its associated sampler.

4. A message sampling method, characterized in that, Applied to a target network device, the method includes: The controller receives configuration instructions from the controller and sends the configuration instructions to the target network device; wherein the controller receives user instructions and generates corresponding configuration instructions based on the user instructions. The user instructions are used to instruct the creation of multiple access control lists (ACLs) on the target network device, and to create rules for matching specific target flows for each created ACL, and to configure corresponding sampling actions for each created ACL. Based on the configuration instructions, the multiple ACLs are created within the same local configuration range, and rules for matching specific target flows are created for each ACL. A corresponding sampling action is configured for each created ACL. The sampling rules for different sampling actions are different, and the sampling actions include full sampling / rule sampling. Receive a target flow packet, determine a target ACL that matches the characteristics of the target flow packet, and determine the target sampling action corresponding to the target ACL; The target stream is sampled based on the target sampling action.

5. The method as described in claim 4, characterized in that, The local same configuration range can be either the global range of the device or the range of a single physical interface.

6. The method as described in claim 4, characterized in that, If the target sampling action corresponding to the configured target ACL is rule sampling, then the target sampling action includes the sampling mode, the sampling frequency and its associated sampler; The steps for sampling packets in the target flow based on the target sampling action include: The target stream is sampled by the sampler associated with the target sampling action, based on the sampling mode and sampling frequency included in the target sampling action.

7. A message sampling device, characterized in that, Applied to a controller, the device includes: The receiving unit is used to receive user instructions, wherein the user instructions are used to instruct the creation of multiple access control lists (ACLs) on the target network device, and to create rules for matching a specific target flow for each created ACL, and to configure corresponding sampling actions for each created ACL; A generation unit is used to generate corresponding configuration instructions based on the user instructions; The issuing unit is used to issue the configuration command to the target network device, so that the target network device can create the multiple ACLs in the same local configuration range based on the configuration command, and create rules for matching specific target flows for each ACL, and configure corresponding sampling actions for each created ACL, wherein the sampling rules for different sampling actions are different, and the sampling actions include full sampling / rule sampling.

8. The apparatus as claimed in claim 7, characterized in that, The local same configuration range can be either the global range of the device or the range of a single physical interface.

9. The apparatus as claimed in claim 7, characterized in that, If the sampling action corresponding to a configured ACL is rule sampling, then the sampling action includes the corresponding sampling mode, sampling frequency and its associated sampler.

10. A message sampling device, characterized in that, Applied to a target network device, the apparatus includes: The first receiving unit is configured to receive configuration instructions issued by the controller and send the configuration instructions to the target network device; wherein, the controller receives user instructions, generates corresponding configuration instructions based on the user instructions, and the user instructions are used to instruct the creation of multiple access control lists (ACLs) on the target network device, and to create rules for matching specific target flows for each created ACL, and to configure corresponding sampling actions for each created ACL; The creation unit is used to create the multiple ACLs within the same local configuration range based on the configuration instructions, and to create rules for each ACL to match a specific target flow, and to configure corresponding sampling actions for each created ACL, wherein the sampling rules for different sampling actions are different, and the sampling actions include full sampling / rule sampling; The second receiving unit is used to receive target flow packets, determine the target ACL that matches the characteristics of the target flow packets, and determine the target sampling action corresponding to the target ACL; A sampling unit is used to sample packets in the target stream based on the target sampling action.

11. The apparatus as claimed in claim 10, characterized in that, The local same configuration range can be either the global range of the device or the range of a single physical interface.

12. The apparatus as claimed in claim 10, characterized in that, If the target sampling action corresponding to the configured target ACL is rule sampling, then the target sampling action includes the sampling mode, the sampling frequency and its associated sampler; When sampling packets from the target stream based on the target sampling action, the sampling unit is specifically used for: The target stream is sampled by the sampler associated with the target sampling action, based on the sampling mode and sampling frequency included in the target sampling action.

13. A message sampling device, characterized in that, The message sampling device includes: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method as described in any one of claims 1-6 according to the obtained program instructions.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing the computer to perform the steps of the method as described in any one of claims 1-6.