CN113839891B - Stream classification management method and device, electronic equipment and storage medium - Google Patents

Stream classification management method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113839891B
CN113839891B CN202111121565.1A CN202111121565A CN113839891B CN 113839891 B CN113839891 B CN 113839891B CN 202111121565 A CN202111121565 A CN 202111121565A CN 113839891 B CN113839891 B CN 113839891B
Authority
CN
China
Prior art keywords
flow
classification
class
flow classification
stream
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111121565.1A
Other languages
Chinese (zh)
Other versions
CN113839891A (en
Inventor
李光
严进波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202111121565.1A priority Critical patent/CN113839891B/en
Publication of CN113839891A publication Critical patent/CN113839891A/en
Application granted granted Critical
Publication of CN113839891B publication Critical patent/CN113839891B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2441Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a stream classification management method, a stream classification management device, electronic equipment and a storage medium, wherein a configuration instruction of a target stream classification set is obtained; matching the target flow classification identification with the CLASS ID of each flow classification to determine each flow classification to be managed; and carrying out operation corresponding to the operation instruction on a plurality of streams to be managed in a classified manner. After the configuration instruction of the target flow classification set is obtained, matching is carried out according to the target flow classification identification in the configuration instruction and the CLASS ID of each flow classification, the flow classification to be managed is determined by matching a plurality of flow classifications, then the operation corresponding to the operation instruction to be managed is executed, which is obtained by matching, so that the plurality of flow classifications can be matched by obtaining the configuration instruction of one target flow classification set, the operation corresponding to the operation instruction is executed on the plurality of flow classifications which are obtained by matching, the configuration instruction corresponding to each flow classification does not need to be received, and the number of ACLs in flow classification management is reduced.

Description

Stream classification management method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of information technologies, and in particular, to a method and an apparatus for stream classification management, an electronic device, and a storage medium.
Background
Currently, when performing flow classification management, each route is mapped to a CLASS ID, and when performing flow classification management, the corresponding CLASS ID (flow classification ID) is looked up through a routing table to perform flow control, as shown in fig. 1.
However, according to the prior art, when issuing an operation instruction to a route, an Access Control List (ACL) is issued for the CLASS ID of each route, and when a plurality of routes need to be configured, a plurality of ACLs need to be sent, which results in large ACL consumption.
Disclosure of Invention
An embodiment of the present application aims to provide a method and an apparatus for flow classification management, an electronic device, and a storage medium, so as to solve the problem of large ACL consumption when performing flow classification management. The specific technical scheme is as follows:
in a first aspect of the embodiments of the present application, a method for managing flow classification is provided, where the method includes:
acquiring a configuration instruction of a target stream classification set, wherein the target stream classification set comprises a plurality of streams to be managed, the configuration instruction of the target stream classification set comprises a target stream classification identifier and a plurality of operation instructions corresponding to the streams to be managed, and the target stream classification identifier is determined according to the same part of CLASS IDs of the streams to be managed;
matching the target flow classification identification with the CLASS ID of each flow classification to determine each flow classification to be managed;
and carrying out operation corresponding to the operation instruction on a plurality of streams to be managed in a classified manner.
Optionally, the obtaining of the configuration instruction of the target stream classification set includes:
obtaining operation instructions for a plurality of applications to be processed, wherein the number of the applications to be processed in the plurality of applications to be processed is a first number;
selecting a first number of continuous idle stream classifications from a preset stream classification;
respectively creating CLASS ID of each selected flow classification;
creating a one-to-one mapping relation between a plurality of applications to be processed and the selected various flow classes;
determining a target flow classification identifier according to the selected CLASS ID of each flow classification according to a preset rule;
and generating a configuration instruction according to the target flow classification identification and the operation instruction.
Optionally, after creating the CLASS IDs of the selected stream classes, the method further includes:
creating a flow classification group corresponding to the CLASS ID of each selected flow classification, wherein the size of the flow classification group is a first number, and the CLASS ID of the initial flow classification of the flow classification group is the minimum value of the CLASS ID of each flow classification;
matching the target flow classification identification with the CLASS ID of each flow classification, and determining each flow classification to be managed, wherein the method comprises the following steps:
and aiming at each flow classification in the flow classification group, matching the target flow classification identification with the CLASS ID of each flow classification, and determining each flow classification to be managed.
Optionally, before generating the configuration instruction according to the target flow classification identifier and the operation instruction, the method further includes:
binding the CLASS ID of each flow CLASS in the flow CLASS group with a plurality of routes to obtain a routing table, wherein the CLASS ID of each flow CLASS in the routing table corresponds to one route;
the method comprises the following steps of executing operation corresponding to the operation instruction for a plurality of streams to be managed in a classified manner, wherein the operation comprises the following steps:
and determining the route corresponding to the CLASS ID of each to-be-managed flow CLASS according to the routing table, and executing the operation corresponding to the operation instruction on the plurality of to-be-managed flow classes.
Optionally, the obtaining of the configuration instruction of the target stream classification set includes:
selecting a second number of continuous idle stream classifications from the preset stream classifications;
respectively creating CLASS ID of each selected flow classification;
obtaining operation instructions for a plurality of applications to be handled, wherein the number of the applications to be handled in the plurality of applications to be handled is a third number;
selecting a third number of CLASS IDs of the flow classes from the CLASS IDs of the flow classes, and creating a one-to-one mapping relation between a plurality of applications to be processed and the selected flow classes;
determining a target flow classification identifier according to the selected CLASS ID of each flow classification according to a preset rule;
and generating a configuration instruction according to the target flow classification identification and the operation instruction.
Optionally, the creating, for the operation instructions of the multiple applications to be processed as different types of operation instructions for the multiple applications to be processed, a stream classification group corresponding to the CLASS ID of each selected stream classification includes:
for each type of operation instruction, selecting CLASS ID of a stream classification corresponding to the current operation instruction to create a stream classification group;
generating a configuration instruction according to the target flow classification identification and the operation instruction, wherein the configuration instruction comprises the following steps:
aiming at each type of operation instruction, generating a configuration instruction according to a target stream classification identifier of a stream classification corresponding to the current operation instruction and the current operation instruction;
the method for classifying and executing the operation corresponding to the operation instruction on the multiple streams to be managed comprises the following steps:
and aiming at each type of operation instruction, searching and executing the operation corresponding to the current type of operation instruction on a plurality of streams to be managed in a classified manner.
Optionally, the CLASS ID includes a fixed identifier and a digital identifier, and the CLASS IDs of the selected stream classes are respectively created, including:
and respectively creating the fixed identifications of the selected flow classes and the digital identifications of the binary representation, wherein the digital identifications of the binary representation of the selected flow classes are continuous, and the fixed identifications of the selected flow classes are the same.
In a second aspect of the embodiments of the present application, there is provided a flow classification management apparatus, where the apparatus includes:
the instruction acquisition module is used for acquiring a configuration instruction of a target stream classification set, wherein the target stream classification set comprises a plurality of streams to be managed, the configuration instruction of the target stream classification set comprises a target stream classification identifier and an operation instruction corresponding to the plurality of streams to be managed, and the target stream classification identifier is determined according to the same part of CLASS IDs of the plurality of streams to be managed;
the identification matching module is used for matching the target flow classification identification with the CLASS ID of each flow classification and determining each flow classification to be managed;
and the operation execution module is used for carrying out the operation corresponding to the operation instruction on the plurality of streams to be managed in a classified manner.
Optionally, the instruction obtaining module includes:
the operation instruction obtaining sub-module is used for obtaining operation instructions for a plurality of applications to be processed, wherein the number of the applications to be processed in the plurality of applications to be processed is a first number;
the flow classification selection submodule is used for selecting continuous idle flow classifications of a first quantity from preset flow classifications;
the identifier creating submodule is used for respectively creating the CLASS ID of each selected flow classification;
the mapping creation submodule is used for creating a one-to-one mapping relation between a plurality of applications to be processed and the selected various stream classes;
the identification determining submodule is used for determining a target flow classification identification according to the selected CLASS ID of each flow classification according to a preset rule;
and the instruction generation submodule is used for generating a configuration instruction according to the target flow classification identification and the operation instruction.
Optionally, the apparatus further comprises:
the flow classification group creating submodule is used for creating flow classification groups corresponding to the CLASS IDs of the selected flow classifications, wherein the size of the flow classification groups is a first number, and the CLASS ID of the initial flow classification of the flow classification groups is the minimum value of the CLASS IDs of the flow classifications;
and the identification matching module is specifically used for matching the target flow classification identification with the CLASS ID of each flow classification aiming at each flow classification in the flow classification group and determining each flow classification to be managed.
Optionally, the apparatus further comprises:
the routing binding submodule is used for binding the CLASS ID of each flow CLASS in the flow CLASS group with a plurality of routes to obtain a routing table, wherein the CLASS ID of each flow CLASS in the routing table corresponds to one route;
and the operation execution module is specifically used for determining the route corresponding to the CLASS ID of each to-be-managed flow CLASS according to the routing table and executing the operation corresponding to the operation instruction on the plurality of to-be-managed flow classes.
Optionally, the instruction obtaining module includes:
an idle stream selection submodule for selecting a second number of consecutive idle stream classes from the preset stream classes;
the identification selection submodule is used for respectively creating the CLASS ID of each selected flow classification;
the application instruction acquisition submodule is used for acquiring operation instructions for a plurality of applications to be processed, wherein the number of the applications to be processed in the plurality of applications to be processed is a third number;
the mapping selection submodule is used for selecting the CLASS IDs of a third number of flow classes from the CLASS IDs of the flow classes and creating a one-to-one mapping relation between a plurality of applications to be processed and the selected flow classes;
the rule selection submodule is used for determining a target flow classification identifier according to the selected CLASS ID of each flow classification according to a preset rule;
and the configuration instruction generation submodule is used for generating a configuration instruction according to the target flow classification identifier and the operation instruction.
Optionally, the operation instructions for the plurality of applications to be handled are different types of operation instructions for the plurality of applications to be handled,
the flow classification group creating submodule is specifically used for selecting the CLASS ID of the flow classification corresponding to the current operation instruction to create a flow classification group aiming at each type of operation instruction;
the instruction generation submodule is specifically used for generating a configuration instruction according to the target stream classification identification of the stream classification corresponding to the current operation instruction and the current operation instruction aiming at each type of operation instruction;
and the operation execution module is specifically used for searching and executing the operation corresponding to the operation instruction of the current type for the multiple streams to be managed in a classified manner aiming at the operation instruction of each type.
Optionally, the CLASS ID includes a fixed identifier and a digital identifier, and the identifier creating sub-module is specifically configured to create the fixed identifier of each selected stream CLASS and the digital identifier of the binary representation, where the digital identifiers of the binary representation of each selected stream CLASS are consecutive, and the fixed identifiers of each selected stream CLASS are the same.
In another aspect of the embodiments of the present application, an electronic device is provided, which includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the flow classification management method when executing the program stored in the memory.
In another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, and when the computer program is executed by a processor, the method for managing flow classification as described above is implemented.
Embodiments of the present application further provide a computer program product containing instructions, which when run on a computer, cause the computer to perform any of the above-mentioned flow classification management methods.
The embodiment of the application has the following beneficial effects:
according to the method, the device, the electronic equipment and the storage medium for stream classification management, a configuration instruction of a target stream classification set is obtained, wherein the target stream classification set comprises a plurality of streams to be managed, the configuration instruction of the target stream classification set comprises a target stream classification identifier and a plurality of operation instructions corresponding to the streams to be managed, and the target stream classification identifier is determined according to the same part of CLASS IDs of the streams to be managed; matching the target flow classification identification with the CLASS ID of each flow classification to determine each flow classification to be managed; and carrying out operation corresponding to the operation instruction on a plurality of streams to be managed in a classified manner. According to the method, after the configuration instruction of the target flow classification set is obtained, the target flow classification identification in the configuration instruction is matched with the CLASS ID of each flow classification, the flow classification to be managed is determined by matching the plurality of flow classifications, and then the operation corresponding to the operation instruction to be managed is executed, so that the plurality of flow classifications can be matched only by obtaining the configuration instruction of the target flow classification set, the operation corresponding to the operation instruction is executed on the plurality of flow classifications obtained by matching, and the configuration instruction corresponding to each flow classification does not need to be received, so that the number of ACLs in flow classification management is reduced, and the problem of large consumption of ACLs in flow classification management is solved.
Of course, it is not necessary for any product or method of the present application to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and it is also obvious for a person skilled in the art to obtain other embodiments according to the drawings.
FIG. 1 is a schematic diagram of flow control for flow classification provided by the prior art;
fig. 2 is a schematic flowchart of a first flow classification management method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a second flow classification management method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a configuration instruction according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a third flow classification management method according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a stream classification group provided by an embodiment of the present application;
fig. 7 is a schematic flowchart of a fourth flow classification management method according to an embodiment of the present application;
fig. 8 is a schematic flowchart of a fifth flow classification management method according to an embodiment of the present application;
fig. 9 is a schematic flowchart of a sixth flow classification management method according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a first flow classification management apparatus according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a second flow classification management device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a third flow classification management apparatus according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a fourth flow classification management apparatus according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of a fifth flow classification management device according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the description herein are intended to be within the scope of the present disclosure.
In a first aspect of the embodiments of the present application, first, a method for stream classification management is provided, where the method includes:
acquiring a configuration instruction of a target stream classification set, wherein the target stream classification set comprises a plurality of streams to be managed, the configuration instruction of the target stream classification set comprises a target stream classification identifier and a plurality of operation instructions corresponding to the streams to be managed, and the target stream classification identifier is determined according to the same part of CLASS IDs of the streams to be managed;
matching the target flow classification identification with the CLASS ID of each flow classification to determine each flow classification to be managed;
and carrying out operation corresponding to the operation instruction on a plurality of streams to be managed in a classified manner.
By the method, the flow classes to be managed can be determined according to the matching of the flow classes, and then the operation corresponding to the operation instruction to be managed and executed is obtained through matching, so that the flow classes can be matched only by obtaining the configuration instruction of the target flow class set, the operation corresponding to the operation instruction is executed on the flow classes obtained through matching, the configuration instruction corresponding to each flow class does not need to be received, the number of ACLs in flow class management is reduced, and the problem of large ACL consumption in flow class management is solved.
Specifically, referring to fig. 2, the method includes:
and step S21, acquiring a configuration instruction of the target stream classification set.
The target flow classification set comprises a plurality of to-be-managed flow classifications, the configuration instruction of the target flow classification set comprises a target flow classification identifier and operation instructions corresponding to the plurality of to-be-managed flow classifications, and the target flow classification identifier is determined according to the same part of the CLASS IDs of the plurality of to-be-managed flow classifications.
The operation instruction corresponding to the flow classification to be managed may be an operation of an access right of the flow classification to be managed, for example, the flow classification to be managed is limited not to allow the server to be accessed or the flow classification to be managed is allowed to access the server.
Wherein the CLASS ID of the flow CLASS to be managed may comprise a number portion, such as HARD CLASS ID, HARD CLASS ID, HARD CLASS ID, HARD CLASS ID, and the like. The number part of the CLASS ID may be represented by binary during actual use, e.g., HARD CLASS ID 00000001000, HARD CLASS ID 00000001001, HARD CLASS ID 00000001010, HARD CLASS ID 00000001011. The target stream classification identification may be determined by binary representation of the digital part of the CLASS ID and then by the same part of the CLASS ID.
The method of the embodiment of the application is applied to the intelligent terminal, and the intelligent terminal can be a terminal for managing flow classification, such as a switch, a router and the like.
And S22, matching the target flow classification identification with the CLASS ID of each flow classification, and determining each flow classification to be managed.
Wherein, the target flow classification identification is determined according to the same part of the CLASS ID of the plurality of flow classifications to be managed. Therefore, by matching the target flow classification identifier with the CLASS IDs of each flow classification, the CLASS IDs of a plurality of to-be-managed flow classifications for determining the target flow classification identifier, that is, each to-be-managed flow classification, can be obtained by matching.
For example, if the configuration instruction is that HARD CLASS ID and HARD CLASS ID are not allowed to access the server, after the representation by the two-level system, the target flow classification identifications determined by the same parts of HARD CLASS ID 00000001000 and HARD CLASS ID 00000001001 are matched from HARD CLASS ID 00000001000, HARD CLASS ID 00000001001, HARD CLASS ID 00000001010 and HARD CLASS ID 00000001011 to obtain HARD CLASS ID 00000001000 and HARD CLASS ID 00000001001. In particular, the target streams identified from the plurality of HARD CLASS ID may be sorted according to HARD CLASS ID 00000001000 and HARD CLASS ID 00000001001 in the same section 0000000100.
And step S23, classifying and executing the operation corresponding to the operation instruction on the plurality of streams to be managed.
The operation corresponding to the operation instruction may be executed on the multiple to-be-managed stream classes obtained by matching the target stream CLASS identifier with the CLASS ID of each stream CLASS and determining each to-be-managed stream CLASS.
For example, according to the target flow classification identification, matching of HARD CLASS ID 00000001000, HARD CLASS ID 00000001001, HARD CLASS ID 00000001010 and HARD CLASS ID 00000001011 results in HARD CLASS ID 00000001000 and HARD CLASS ID 00000001001, which are then set not to be allowed to access the server.
By the method, the flow classes to be managed can be determined according to the matching of the flow classes, and then the operation corresponding to the operation instruction to be managed and executed is obtained through matching, so that the flow classes can be matched only by obtaining the configuration instruction of the target flow class set, the operation corresponding to the operation instruction is executed on the flow classes obtained through matching, the configuration instruction corresponding to each flow class does not need to be received, the number of ACLs in flow class management is reduced, and the problem of large ACL consumption in flow class management is solved.
Optionally, referring to fig. 3, the step S21 obtains a configuration instruction of the target stream classification set, including:
step S211, obtaining operation instructions for a plurality of applications to be processed, wherein the number of the applications to be processed in the plurality of applications to be processed is a first number;
step S212, selecting continuous idle stream classes of a first quantity from preset stream classes;
step S213, respectively creating CLASS ID of each selected stream classification;
step S214, establishing a one-to-one mapping relation between a plurality of applications to be processed and each selected flow classification;
step S215, according to a preset rule, determining a target flow classification identifier according to the selected CLASS ID of each flow classification;
and step S216, generating a configuration instruction according to the target flow classification identification and the operation instruction.
The obtained operation instructions for the plurality of applications to be treated may be operation instructions sent by the user, for example, the user may input that some applications are not allowed or are allowed to access the server.
The method comprises the steps of selecting continuous idle stream classes of a first quantity from preset stream classes, and selecting continuous idle stream classes of the first quantity from the idle stream classes according to the first quantity. For example, when the number of applications to be handled is 8, 8 consecutive HARD CLASS ID can be selected from HARD CLASS ID (flow classes that ACL can match).
In a possible embodiment, the CLASS ID includes a fixed identifier and a digital identifier, and the creating the CLASS ID of each selected stream CLASS respectively may include: respectively creating fixed identifications of the selected flow classifications and digital identifications of binary representation, wherein the digital identifications of the binary representation of the selected flow classifications are continuous, and the fixed identifications of the selected flow classifications are the same.
In one example, the same fixed identifier is created for each selected stream classification; and creating a first number of numerical identifiers of binary representation according to a mode of increasing the numerical value by one, and respectively obtaining the numerical identifiers of the binary representation of each selected flow classification.
For example, the fixed identifier is HARD CLASS ID, and when 8 begins to create 8 CLASS IDs, HARD CLASS ID-15 is obtained by incrementing by one, the corresponding binary represented CLASS IDs are HARD CLASS ID 00000001000, HARD CLASS ID 00000001001, HARD CLASS ID 00000001010, HARD CLASS ID 00000001011 … … HARD CLASS ID 00000001111, respectively.
Creating a one-to-one mapping relationship between a plurality of applications to be treated and selected flow classes, and creating a mapping between the CLASS IDs of the created flow classes and the CLASS IDs of the applications to be treated, i.e. a mapping between SOFT CLASS IDs (user configured flow classes) and HARD CLASS ID, for example, sequentially creating a mapping relationship between SOFT CLASS IDs 0 and HARD CLASS ID8, SOFT CLASS IDs 1 and HARD CLASS ID, SOFT CLASS IDs 2 and HARD CLASS ID, SOFT CLASS IDs 3 and HARD CLASS ID 11 … … SOFT CLASS IDs 7 and HARD CLASS ID.
According to a preset rule, determining a target flow classification identifier according to the selected CLASS ID of each flow classification, and calculating the target flow classification identifier corresponding to the CLASS ID of each flow classification by using a preset mask rule. For example, according to a preset mask rule, the CLASS ID of the selected stream CLASS is HARD CLASS ID-8, and the corresponding target stream CLASS identifier can be represented as x3f8 by the preset rule. Or by the original establishment, the CLASS ID of the flow classification can be the corresponding relation between the target flow classification identifications, and when the target flow classification identification is determined according to the selected CLASS ID of each flow classification, the target flow classification identification corresponding to the CLASS ID of the flow classification is directly determined according to the corresponding relation. The target stream classification identifier may also be determined by comparing the same parts of the CLASS IDs of the selected stream classifications, for example, HARD CLASS ID 00000001000 and HARD CLASS ID 00000001001 in HARD CLASS ID 00000001000, HARD CLASS ID 00000001001, HARD CLASS ID 00000001010, HARD CLASS ID 00000001011 are selected, if the same parts are compared, the target stream classification identifier may be obtained according to a masking rule, that is, a mask is 11111111111100, where a first 9 of the mask is 1, which means that only a first 9 of the digital identifiers is used for matching when matching, and a second two of the mask is 0, which means whether the last two bits are the same when matching.
And generating a configuration instruction according to the target flow classification identifier and the operation instruction, and combining the target flow classification identifier and the operation instruction to obtain the configuration instruction. For example, referring to fig. 4, the target flow CLASS identifier is a match CLASS ID8, the mask obtained by presetting the mask rule is 0x3f8, and the operation instruction is to allow access to the server.
It can be seen that, by the method of the embodiment of the present application, the operation instructions for a plurality of applications to be processed can be obtained, and by selecting a first number of consecutive idle stream classes from the preset stream classes, and respectively creating CLASS IDs of the selected stream classes, and further creating a one-to-one mapping relationship between the plurality of applications to be processed and the selected stream classes, a target stream CLASS identifier is determined according to the CLASS IDs of the selected stream classes according to a preset rule, and a configuration instruction is generated according to the target stream CLASS identifier and the operation instructions, so that configuration of the plurality of applications to be processed can be implemented by one configuration instruction, and the number of ACLs in stream CLASS management is reduced.
Optionally, referring to fig. 5, after the step S213 respectively creates CLASS IDs of the selected stream classes, the method further includes:
and S51, creating a flow classification group corresponding to the CLASS ID of each selected flow classification.
Step S22, matching the target flow classification identification with the CLASS ID of each flow classification, and determining each flow classification to be managed, wherein the step S comprises the following steps:
step S52, aiming at each flow classification in the flow classification group, matching the target flow classification identification with the CLASS ID of each flow classification, and determining each flow classification to be managed.
Wherein the size of the stream classification group is the first number, and the CLASS ID of the starting stream classification of the stream classification group is the minimum value of the CLASS IDs of the respective stream classifications. And creating a flow classification group corresponding to the CLASS ID of each selected flow classification, and setting the CLASS ID of the initial flow classification of the flow classification group and the size of the flow classification group. For example, referring to fig. 6, CLASS GROUP ID of the created stream classification GROUP: 0; the size of the flow classification group is MASK3, which indicates that the CLASS ID group has the length of 3 bits, namely 8 continuous HARD CLASS ID from a certain base; the CLASS ID of the start stream classification is CLASS ID8.
Since the CLASS ID of each selected flow CLASS is passed when creating the flow CLASS group, and the corresponding flow CLASS group is created, the CLASS ID of each selected flow CLASS is inevitably in the group. Therefore, when the target flow classification identifier is matched with the CLASS ID of each flow classification, the target flow classification identifier can be matched with the CLASS ID of each flow classification in the created flow classification group for each flow classification in the flow classification group, and each flow classification to be managed can be determined.
Therefore, by the method of the embodiment of the application, the flow classification group corresponding to the CLASS ID of each selected flow classification can be created, so that when the target flow classification identifier is matched with the CLASS ID of each flow classification, the target flow classification identifier can be matched with the CLASS ID of each flow classification only for each flow classification in the flow classification group, and each to-be-managed flow classification is determined, thereby improving the matching efficiency.
Optionally, referring to fig. 7, before generating the configuration instruction according to the target flow classification identifier and the operation instruction in step S216, the method further includes:
step S71, binding the CLASS ID of each flow classification in the flow classification group with a plurality of routes to obtain a route table;
step S23 executes an operation corresponding to the operation instruction for multiple streams to be managed in a classified manner, including:
step S72, according to the routing table, determining the route corresponding to the CLASS ID of each to-be-managed flow CLASS, and executing the operation corresponding to the operation instruction on the plurality of to-be-managed flow classes.
Wherein, the CLASS ID of each flow CLASS in the routing table corresponds to a route. See in particular fig. 4. CLASS ID corresponding to the route 10.10.0.1/32 in the routing table is HARD CLASS ID, and CLASS ID corresponding to the route 10.10.0.2/32 is HARD CLASS ID.
When determining the route corresponding to the CLASS ID of each to-be-managed flow CLASS, the corresponding route may be searched from the routing table according to the CLASS ID of the to-be-managed flow CLASS, for example, when the searched CLASS ID is HARD CLASS ID, the corresponding route may be searched as 10.10.0.2/32 through the routing table.
Therefore, by the method of the embodiment of the application, the CLASS ID of each flow CLASS in the flow CLASS group can be bound with the plurality of routes to obtain the routing table, so that when the operation corresponding to the operation instruction is executed, the route corresponding to the CLASS ID of each flow CLASS to be managed is determined according to the routing table, the operation corresponding to the operation instruction is executed on the plurality of flow classes to be managed, and the execution of the operation instruction is realized.
Optionally, referring to fig. 8, the step S21 obtains a configuration instruction of the target stream classification set, including:
step S217, selecting a second number of continuous idle stream classifications from preset stream classifications;
step S218, respectively creating CLASS IDs of selected various stream classifications;
step S219, obtaining operation instructions for a plurality of applications to be processed, where the number of the applications to be processed in the plurality of applications to be processed is a third number;
step S220, selecting a third number of CLASS IDs of the flow classes from the CLASS IDs of the flow classes, and creating a one-to-one mapping relation between a plurality of applications to be processed and the selected flow classes;
step S221, according to a preset rule, determining a target flow classification identifier according to the selected CLASS ID of each flow classification;
step S222, generating a configuration instruction according to the target flow classification identification and the operation instruction.
The method in the embodiment of the present application is similar to the embodiment corresponding to fig. 3, except that after the embodiment corresponding to fig. 3 obtains the operation instructions for the multiple applications to be processed, the CLASS ID of the stream CLASS is created according to the operation instructions of the multiple applications to be processed, a one-to-one mapping relationship between the multiple applications to be processed and the selected stream classes is established, and then the target stream CLASS identifier is determined according to the CLASS ID of the selected stream CLASS, and the configuration instruction is generated according to the target stream CLASS identifier and the operation instructions. In the embodiment of the application, firstly, the CLASS IDs of the flow classes are created, after the operation instructions for a plurality of applications to be processed are obtained, the CLASS IDs of the corresponding number of flow classes are selected, a one-to-one mapping relationship between the plurality of applications to be processed and the selected flow classes is created, then, the target flow CLASS identifier is determined according to the selected CLASS ID of each flow CLASS, and the configuration instruction is generated according to the target flow CLASS identifier and the operation instructions.
It can be seen that, with the method according to the embodiment of the present application, a second number of consecutive idle stream classes are selected from preset stream classes, CLASS IDs of the selected stream classes are respectively created, after operation instructions for a plurality of applications to be processed are obtained, a third number of CLASS IDs of the stream classes are selected from the CLASS IDs of the stream classes, a one-to-one mapping relationship between the plurality of applications to be processed and the selected stream classes is created, a target stream CLASS identifier is determined according to the selected CLASS IDs of the stream classes according to a preset rule, a configuration instruction is generated according to the target stream CLASS identifier and the operation instructions, and thus implementation of the configuration instructions of the plurality of applications to be processed is achieved by executing the configuration instruction.
Optionally, referring to fig. 9, the operation instructions for the multiple applications to be processed are different types of operation instructions for the multiple applications to be processed, and step S51 creates a stream classification group corresponding to the CLASS ID of each selected stream classification, including:
step S91, aiming at each type of operation instruction, selecting CLASS ID of the stream classification corresponding to the current operation instruction to create a stream classification group;
step S216 generates a configuration instruction according to the target flow classification identifier and the operation instruction, including:
step S92, aiming at each type of operation instruction, generating a configuration instruction according to a target flow classification identifier of the flow classification corresponding to the current operation instruction and the current operation instruction;
step S23 executes an operation corresponding to the operation instruction for multiple streams to be managed in a classified manner, including:
and step S93, aiming at each type of operation instruction, searching and executing the operation corresponding to the current type of operation instruction on a plurality of streams to be managed in a classified manner.
In the actual use process, the operation instructions for the multiple applications to be treated may include multiple types of operation instructions, for example, in the multiple applications to be treated, the operation instructions corresponding to some two applications to be treated are allowed to access the server, and the operation instructions corresponding to the other three applications to be treated are not allowed to access the server. The pending application that is allowed to access the server may be chosen to correspond to CLASS ID: HARD CLASS ID8 and HARD CLASS ID create a stream classification GROUP, resulting in CLASS GROUP ID 0. Then, selecting the CLASS ID corresponding to the application to be processed which is not allowed to access the server: HARD CLASS ID 10, HARD CLASS ID, HARD CLASS ID creates a stream classification GROUP, resulting in CLASS GROUP ID 1.
When generating a configuration instruction, generating a configuration instruction for CLASS GROUP ID0, where a corresponding operation corresponding to the configuration instruction is to allow access to the server; then, a configuration instruction is generated for CLASS GROUP ID1, wherein the corresponding operation of the configuration instruction is disallowing access to the server.
When the operation corresponding to the operation instruction is executed, for each type of operation instruction, multiple classes to be managed may be searched and searched, for example, corresponding classes to be managed are searched for HARD CLASS ID and HARD CLASS ID from CLASS GROUP ID0, and then the operation corresponding to the operation instruction of the current type is executed for the searched classes to be managed, that is, the operation allowing the server to be accessed is configured. Searching corresponding to-be-managed stream classes HARD CLASS ID, HARD CLASS ID and HARD CLASS ID from the CLASS GROUP ID1, and then executing the operation corresponding to the operation instruction of the current type aiming at the searched to-be-managed stream classes, namely configuring the to-be-managed stream classes not to allow the server to be accessed.
Therefore, by the method of the embodiment of the application, for each type of operation instruction, the CLASS ID of the flow CLASS corresponding to the current operation instruction can be selected to create a flow CLASS group, and for each type of operation instruction, a configuration instruction is generated according to the target flow CLASS identifier of the flow CLASS corresponding to the current operation instruction and the current operation instruction, so that when the configuration instruction is executed, the operation corresponding to the current type of operation instruction can be searched and executed for a plurality of flow classes to be managed, and the execution of the plurality of types of configuration instructions can be realized at the same time.
To illustrate the above examples, the following description is given in conjunction with specific examples, example 1:
1. a CLASS GROUP is created. In the form of CLASS GROUP 0, MASK3, where MASK3 indicates that the CLASS ID GROUP is 3 bits long, i.e., 8 consecutive HARD CLASS ID from a certain base. The SOFT CLASS ID where the key GROUP 0 is the starting CLASS GROUP can be dynamically mapped to a base HARD CLASS ID of 0 to 1023, but must be bounded by the power of 3 of 2. Thus obtaining CLASS GROUP 0, wherein SOFT CLASS 0-7, and HARD CLASS ID is that continuous 8 CLASS IDs starting from 8 are all under the management of the GROUP.
In the actual use process, continuous 8 HARD CLASS ID may be occupied by discretely configured CLASS ID, and by dynamic mapping of SOFT CLASS ID and HARD CLASS ID, the whole 1024 CLASS IDs may be searched with 8-bit boundaries until 8 continuous free HARD CLASS ID is found.
2. CLASS IDs 0-7 are created as needed. Because the interval CLASS GROUP 0 falls inside, HARD CLASS ID is not needed to be allocated from the resource pool again, the interval is directly shifted from HARD CLASS ID, and corresponding HARD CLASS ID is 8-15 respectively.
3. Bind CLASS ID and route, for example:
10.10.0.1/32 HARD CLASS ID 8
10.10.0.2/32 HARD CLASS ID 9
10.10.0.3/32 HARD CLASS ID 10
10.10.0.4/32 HARD CLASS ID 11
10.10.0.5/32 HARD CLASS ID 12
10.10.0.6/32 HARD CLASS ID 13
10.10.0.7/32 HARD CLASS ID 14
10.10.0.8/32 HARD CLASS ID 15
4. and setting a rule to match the CLASS GROUP. In the ACL, HARD CLASS ID is set, the lower 3 bits of the mask are 0 (1024 CLASS IDs, which is 10 bits in total, and 0X3F8 if the lower 3 bits are masked), and the traffic of 10.10.0.1 to 10.10.0.8 can be matched by the ACL.
5. If an IP has higher priority policy processing, the priority can be adjusted in the ACL according to the mask of CLASS ID by matching the entire CLASS ID corresponding to the IP.
6. When CLASS GROUP needs to be further divided, for example, 10.10.0.1-10.10.0.2 needs to increase the service priority, smaller GROUPs do not need to be configured separately, and only a mask of 0x3fe needs to be set in the ACL and masked off (i.e., the last bit is ignored), and the action is to modify the priority.
Example 2:
1. a CLASS ID is created.
2. When creating CLASS GROUP, where SOFT CLASS and HARD CLASS ID are dynamic, HARD CLASS ID may be found from CLASS GROUP to remap the SOFT CLASS mapping, as: first, create SOFT CLASS ID1, which maps HARD CLASS ID to 100, and set HARD CLASS ID in route 10.10.0.2 to 100.
3. CLASS GROUP 0, MASK3, in which HARD CLASSS ID-15 were created. Wherein, in the range of CLASS GROUP 0, the SOFT CLASS ID1 needs to be adjusted to be corresponding to HARD CLASS ID, and the SOFT CLASS ID1 is 1 relative to CLASS GROUP 0, then 1 is added on the basis of HARD CLASS ID of the starting of CLASS GROUP 0 to obtain a new HARD CLASS ID, and then the CLASS ID corresponding to the route 10.10.0.2 is updated to be 9.
4. When the CLASS GROUP 0 is deleted, the SOFT CLASS ID1 does not need to be remapped, and only needs to delete the other 7 HARD CLASS ID occupied by the SOFT CLASS ID 1. CLASS ID is not necessarily dependent on CLASS GROUP 0, and may be present alone.
In a second aspect of the embodiments of the present application, referring to fig. 10, there is provided a flow classification management apparatus, including:
the instruction obtaining module 101 is configured to obtain a configuration instruction of a target flow classification set, where the target flow classification set includes multiple to-be-managed flow classifications, the configuration instruction of the target flow classification set includes a target flow classification identifier and an operation instruction corresponding to the multiple to-be-managed flow classifications, and the target flow classification identifier is determined according to the same part of CLASS IDs of the multiple to-be-managed flow classifications;
the identifier matching module 102 is configured to match the target flow classification identifier with CLASS IDs of each flow classification, and determine each to-be-managed flow classification;
and the operation execution module 103 is configured to execute operations corresponding to the operation instructions for multiple streams to be managed in a classified manner.
Optionally, referring to fig. 11, the instruction obtaining module 101 includes:
an operation instruction obtaining sub-module 1011, configured to obtain operation instructions for a plurality of applications to be processed, where the number of the applications to be processed in the plurality of applications to be processed is a first number;
a stream classification selection submodule 1012 for selecting a first number of consecutive idle stream classifications from the preset stream classifications;
an identifier creating sub-module 1013 for creating CLASS IDs of the selected flow classes, respectively;
a mapping creating sub-module 1014 for creating a one-to-one mapping relationship between the plurality of applications to be disposed and the selected flow classes;
an identifier determining submodule 1015, configured to determine, according to a preset rule, a target flow classification identifier according to the CLASS ID of each selected flow classification;
the instruction generating submodule 1016 is configured to generate a configuration instruction according to the target stream classification identifier and the operation instruction.
Optionally, referring to fig. 12, the apparatus further includes:
the flow classification group creating submodule 121 is configured to create a flow classification group corresponding to the CLASS ID of each selected flow classification, where the size of the flow classification group is a first number, and the CLASS ID of the initial flow classification of the flow classification group is the minimum value of the CLASS ID of each flow classification;
the identifier matching module 102 is specifically configured to match, for each flow CLASS in the flow CLASS group, a target flow CLASS identifier with a CLASS ID of each flow CLASS, and determine each flow CLASS to be managed.
Optionally, referring to fig. 13, the apparatus further includes:
the route binding submodule 131 is configured to bind the CLASS ID of each flow CLASS in the flow CLASS group with multiple routes to obtain a routing table, where the CLASS ID of each flow CLASS in the routing table corresponds to one route;
the operation executing module 103 is specifically configured to determine, according to the routing table, a route corresponding to the CLASS ID of each to-be-managed flow CLASS, and execute an operation corresponding to the operation instruction on multiple to-be-managed flow classes.
Optionally, referring to fig. 14, the instruction obtaining module 101 includes:
an idle stream selection submodule 1017, configured to select a second number of consecutive idle stream classifications from the preset stream classifications;
an identifier selecting submodule 1018 for respectively creating CLASS IDs of the selected streams;
an application instruction obtaining submodule 1019, configured to obtain an operation instruction for a plurality of applications to be processed, where the number of the applications to be processed in the plurality of applications to be processed is a third number;
a mapping selecting sub-module 1020, configured to select CLASS IDs of a third number of flow classes from the CLASS IDs of the flow classes, and create a one-to-one mapping relationship between multiple applications to be processed and the selected flow classes;
a rule selecting submodule 1021 for determining a target flow classification identifier according to the selected CLASS ID of each flow classification according to a preset rule;
the configuration instruction generating sub-module 1022 is configured to generate a configuration instruction according to the target stream classification identifier and the operation instruction.
Optionally, the operation instructions for the plurality of applications to be handled are different types of operation instructions for the plurality of applications to be handled,
the stream classification group creating submodule 121 is specifically configured to select, for each type of operation instruction, the CLASS ID of the stream classification corresponding to the current operation instruction to create a stream classification group;
the instruction generation submodule 1016 is specifically configured to generate, for each type of operation instruction, a configuration instruction according to the target stream classification identifier of the stream classification corresponding to the current operation instruction and the current operation instruction;
the operation execution module 103 is specifically configured to, for each type of operation instruction, search and execute an operation corresponding to the current type of operation instruction for multiple streams to be managed in a classified manner.
Optionally, the identifier creating sub-module 1013 is specifically configured to create the fixed identifiers and the digital identifiers of the binary representations of the selected flow categories, where the digital identifiers of the binary representations of the selected flow categories are consecutive, and the fixed identifiers of the selected flow categories are the same.
Through the device of the embodiment of the application, the flow classification to be managed can be determined according to the matching of the flow classifications, and then the operation corresponding to the operation instruction to be managed and executed is obtained through matching, so that the multiple flow classifications can be matched only by obtaining the configuration instruction of a target flow classification set, the operation corresponding to the operation instruction is executed on the multiple flow classifications obtained through matching, the configuration instruction corresponding to each flow classification does not need to be received, the number of ACLs in the flow classification management is reduced, and the problem of large consumption of the ACLs in the flow classification management is solved.
The embodiment of the present application further provides an electronic device, as shown in fig. 15, which includes a processor 1501, a communication interface 1502, a memory 1503, and a communication bus 1504, wherein the processor 1501, the communication interface 1502, and the memory 1503 complete communication with each other through the communication bus 1504,
a memory 1503 for storing a computer program;
the processor 1501, when executing the program stored in the memory 1503, implements the following steps:
acquiring a configuration instruction of a target stream classification set, wherein the target stream classification set comprises a plurality of streams to be managed, the configuration instruction of the target stream classification set comprises a target stream classification identifier and a plurality of operation instructions corresponding to the streams to be managed, and the target stream classification identifier is determined according to the same part of CLASS IDs of the streams to be managed;
matching the target flow classification identification with the CLASS ID of each flow classification to determine each flow classification to be managed;
and carrying out operation corresponding to the operation instruction on a plurality of streams to be managed in a classified manner.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above flow classification management methods.
In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the flow classification management methods of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the storage medium and the computer program product embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (16)

1. A method for flow classification management, the method comprising:
acquiring a configuration instruction of a target stream classification set, wherein the target stream classification set comprises a plurality of streams to be managed, the configuration instruction of the target stream classification set comprises a target stream classification identifier and an operation instruction corresponding to the plurality of streams to be managed, and the target stream classification identifier is determined according to the same part of CLASSID of the plurality of streams to be managed;
matching the target flow classification identification with the CLASSID of each flow classification to determine each flow classification to be managed;
and classifying the plurality of streams to be managed to execute the operation corresponding to the operation instruction.
2. The method of claim 1, wherein the obtaining the configuration instructions of the target stream classification set comprises:
obtaining operation instructions for a plurality of applications to be treated, wherein the number of the applications to be treated in the plurality of applications to be treated is a first number;
selecting a first number of continuous idle stream classifications from a preset stream classification;
respectively creating CLASSID of each selected stream classification;
creating a one-to-one mapping relation between the plurality of applications to be processed and the selected flow classes;
determining a target flow classification identifier according to the selected CLASSID of each flow classification according to a preset rule;
and generating the configuration instruction according to the target flow classification identification and the operation instruction.
3. The method of claim 2, wherein after separately creating the classsid for the selected flow classes, the method further comprises:
creating a flow classification group corresponding to the selected CLASSID of each flow classification, wherein the size of the flow classification group is the first number, and the CLASSID of the initial flow classification of the flow classification group is the minimum value of the CLASSID of each flow classification;
the step of matching the target flow classification identifier with the CLASSID of each flow classification to determine each flow classification to be managed comprises the following steps:
and aiming at each flow classification in the flow classification group, matching the target flow classification identification with the CLASSID of each flow classification, and determining each flow classification to be managed.
4. The method of claim 3, wherein before generating the configuration instruction according to the target flow classification identifier and the operation instruction, the method further comprises:
binding CLASSID of each flow classification in the flow classification group with a plurality of routes to obtain a routing table, wherein the CLASSID of each flow classification in the routing table corresponds to one route;
the executing the operation corresponding to the operation instruction on the multiple streams to be managed in a classified manner comprises the following steps:
and determining the route corresponding to the CLASSID of each to-be-managed flow class according to the routing table, and executing the operation corresponding to the operation instruction on the plurality of to-be-managed flow classes.
5. The method of claim 1, wherein the obtaining the configuration instructions of the target stream classification set comprises:
selecting a second number of continuous idle stream classifications from the preset stream classifications;
respectively creating CLASSID of each selected stream classification;
obtaining operation instructions for a plurality of applications to be treated, wherein the number of the applications to be treated in the plurality of applications to be treated is a third number;
selecting a third number of CLASSIDs of the flow classification from the CLASSIDs of the flow classification, and creating a one-to-one mapping relation between the plurality of applications to be processed and the selected flow classification;
determining a target flow classification identifier according to the selected CLASSID of each flow classification according to a preset rule;
and generating the configuration instruction according to the target flow classification identification and the operation instruction.
6. The method according to claim 3, wherein the operation instructions for the multiple applications to be treated are different types of operation instructions for the multiple applications to be treated, and the creating of the flow classification group corresponding to the CLASSID of the selected flow classifications includes:
for each type of operation instruction, selecting CLASSID of a stream classification corresponding to the current operation instruction to create a stream classification group;
generating the configuration instruction according to the target flow classification identifier and the operation instruction, wherein the generating of the configuration instruction comprises:
aiming at each type of operation instruction, generating a configuration instruction according to a target stream classification identifier of a stream classification corresponding to a current operation instruction and the current operation instruction;
the executing the operation corresponding to the operation instruction on the multiple streams to be managed in a classified manner comprises the following steps:
and searching and executing the operation corresponding to the operation instruction of the current type for the plurality of streams to be managed in a classified manner aiming at the operation instruction of each type.
7. The method according to claim 2, wherein the classsid comprises a fixed identifier and a digital identifier, and the separately creating the classsid for the selected flow classes comprises:
respectively creating fixed identifications of the selected flow classifications and digital identifications of binary representation, wherein the digital identifications of the binary representation of the selected flow classifications are continuous, and the fixed identifications of the selected flow classifications are the same.
8. An apparatus for flow class management, the apparatus comprising:
the instruction acquisition module is used for acquiring a configuration instruction of a target stream classification set, wherein the target stream classification set comprises a plurality of streams to be managed, the configuration instruction of the target stream classification set comprises a target stream classification identifier and an operation instruction corresponding to the plurality of streams to be managed, and the target stream classification identifier is determined according to the same part of CLASSID of the streams to be managed;
the identification matching module is used for matching the target flow classification identification with the CLASSID of each flow classification to determine each flow classification to be managed;
and the operation execution module is used for executing the operation corresponding to the operation instruction to the plurality of streams to be managed in a classified manner.
9. The apparatus of claim 8, wherein the instruction fetch module comprises:
the operation instruction acquisition submodule is used for acquiring operation instructions for a plurality of applications to be processed, wherein the number of the applications to be processed in the plurality of applications to be processed is a first number;
the flow classification selection submodule is used for selecting continuous idle flow classifications of a first quantity from preset flow classifications;
the identifier creating submodule is used for respectively creating the CLASSID of each selected stream classification;
the mapping creating submodule is used for creating a one-to-one mapping relation between the plurality of applications to be processed and the selected various stream classes;
the identification determining submodule is used for determining a target flow classification identification according to the selected CLASSID of each flow classification according to a preset rule;
and the instruction generation sub-module is used for generating the configuration instruction according to the target flow classification identifier and the operation instruction.
10. The apparatus of claim 9, further comprising:
a flow classification group creating submodule, configured to create a flow classification group corresponding to the selected classsid of each flow classification, where the size of the flow classification group is the first number, and the classsid of a starting flow classification of the flow classification group is a minimum value of the classsid of each flow classification;
the identifier matching module is specifically configured to match, for each flow class in the flow class group, the target flow class identifier with the classsid of each flow class, and determine each flow class to be managed.
11. The apparatus of claim 10, further comprising:
the routing binding submodule is used for binding the CLASSID of each flow classification in the flow classification group with a plurality of routes to obtain a routing table, wherein the CLASSID of each flow classification in the routing table corresponds to one route;
the operation execution module is specifically configured to determine, according to the routing table, a route corresponding to the classsid of each to-be-managed flow class, and execute, on the multiple to-be-managed flow classes, an operation corresponding to the operation instruction.
12. The apparatus of claim 8, wherein the instruction fetch module comprises:
an idle stream selection submodule for selecting a second number of consecutive idle stream classes from the preset stream classes;
the identification selection submodule is used for respectively creating the CLASSID of each selected stream classification;
the application instruction acquisition submodule is used for acquiring operation instructions for a plurality of applications to be processed, wherein the number of the applications to be processed in the plurality of applications to be processed is a third number;
a mapping selection submodule, configured to select a third number of clasdsids of the flow classes from the clasdsids of the flow classes, and create a one-to-one mapping relationship between the multiple applications to be processed and the selected flow classes;
the rule selection submodule is used for determining a target flow classification identifier according to the selected CLASSID of each flow classification according to a preset rule;
and the configuration instruction generation sub-module is used for generating the configuration instruction according to the target flow classification identification and the operation instruction.
13. The apparatus of claim 10, wherein the operational instructions for the plurality of applications to be handled are different types of operational instructions for a plurality of applications to be handled,
the stream classification group creating submodule is specifically used for selecting CLASSID (class identifier set identifier) of the stream classification corresponding to the current operation instruction to create a stream classification group aiming at each type of operation instruction;
the instruction generation submodule is specifically used for generating a configuration instruction according to a target stream classification identifier of a stream classification corresponding to a current operation instruction and the current operation instruction for each type of operation instruction;
the operation execution module is specifically configured to search for and execute, for each type of operation instruction, an operation corresponding to the operation instruction of the current type for the multiple streams to be managed in a classified manner.
14. The apparatus according to claim 9, wherein the classsid comprises a fixed identifier and a digital identifier, and the identifier creation sub-module is specifically configured to create the fixed identifier and the digital identifier of the binary representation of each selected flow class, respectively, wherein the digital identifiers of the binary representation of each selected flow class are consecutive, and the fixed identifiers of each selected flow class are the same.
15. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 7 when executing a program stored in the memory.
16. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN202111121565.1A 2021-09-24 2021-09-24 Stream classification management method and device, electronic equipment and storage medium Active CN113839891B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111121565.1A CN113839891B (en) 2021-09-24 2021-09-24 Stream classification management method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111121565.1A CN113839891B (en) 2021-09-24 2021-09-24 Stream classification management method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113839891A CN113839891A (en) 2021-12-24
CN113839891B true CN113839891B (en) 2023-02-21

Family

ID=78969796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111121565.1A Active CN113839891B (en) 2021-09-24 2021-09-24 Stream classification management method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113839891B (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1897564B (en) * 2005-07-11 2010-04-14 中兴通讯股份有限公司 Strategic routing matching method based on recursive-flow category algorithm
CN105099917B (en) * 2014-05-08 2018-09-28 华为技术有限公司 The retransmission method and device of service message
US9769290B2 (en) * 2014-05-23 2017-09-19 Intel Corporation Packet flow classification
CN107547432B (en) * 2017-08-28 2019-09-06 新华三信息安全技术有限公司 A kind of flow control methods and device
CN109688126B (en) * 2018-12-19 2021-08-17 迈普通信技术股份有限公司 Data processing method, network equipment and computer readable storage medium
CN111628939B (en) * 2020-05-20 2023-06-13 新华三信息安全技术有限公司 Stream classification processing method and device
CN111654491A (en) * 2020-05-29 2020-09-11 新华三信息安全技术有限公司 ACL sharing method, device, equipment and machine readable storage medium
CN113079097B (en) * 2021-03-24 2022-03-22 新华三信息安全技术有限公司 Message processing method and device

Also Published As

Publication number Publication date
CN113839891A (en) 2021-12-24

Similar Documents

Publication Publication Date Title
CN112799584B (en) Data storage method and device
CN111506602B (en) Data query method, device, equipment and storage medium
CN107465687B (en) Method, device and terminal for realizing permission configuration
CN111124476A (en) Business rule configuration and creation method and device
US11102145B2 (en) Resource sharing method, computer device, and storage medium
WO2020024898A1 (en) Method and apparatus for searching blockchain data, and storage medium
CN112468415A (en) Protocol message processing method, device, equipment and medium
CN110659459A (en) Software code processing method and device, electronic equipment and storage medium
CN110555144A (en) stream clustering method and device, electronic equipment and medium
CN109063200A (en) Resource search method and its device, electronic equipment, computer-readable medium
CN114641771A (en) Cluster security based on virtual machine content
CN111679919A (en) Data interaction method, device, equipment and storage medium
CN113839891B (en) Stream classification management method and device, electronic equipment and storage medium
CN111694992A (en) Data processing method and device
CN117216758B (en) Application security detection system and method
CN112733510A (en) Financial certificate generation method, device, equipment and computer readable storage medium
CN112286968A (en) Service identification method, equipment, medium and electronic equipment
CN111259429A (en) Resource operation authority control method and device and electronic equipment
CN115455425B (en) Protection patch generation method, system, equipment and storage medium
CN108897581B (en) Service deployment method and device and electronic equipment
CN116886626A (en) Service data flow limiting method and device, computer equipment and storage medium
CN112463814A (en) Data query method and device
CN113438245B (en) Information updating and message security detection method and device
CN111427692B (en) Function configuration method, device, electronic equipment and medium
CN113132261B (en) Traffic data packet classification method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant