Smart grid fine-grained flow measurement method and system for realizing multi-objective fusion
By using SRAM for online data screening and hash technology screening in smart grids, fine-grained traffic measurement of multi-objective fusion in smart grids is achieved, which solves the problem that existing technology cannot simultaneously measure different types of traffic and achieves real-time Stream size and stream cardinality estimation.
Patent Information
- Application Number
- CN202410933196.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-07-12
AI Technical Summary
Existing technology is difficult to achieve fine-grained traffic measurement of multi-objective fusion in smart grids, especially when measuring network traffic of different types or levels at the same time, which cannot meet actual needs.
In each measurement cycle, a continuous memory space is opened on SRAM for online data screening and information capture, virtual elements are screened and sampled through hashing technology, packet information is fused according to task definition, and network flow size and flow cardinality are estimated.
It realizes real-time online data screening and capture, and can simultaneously measure the flow size and flow base types under different definitions, meeting the needs of multi-objective integration in smart grids.
Smart Images

Figure CN118487973B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network flow measurement, and in particular to a smart grid fine-grained flow measurement method and system for realizing multi-objective fusion. Background Art
[0002] Real-time network traffic measurement can provide basic data support for important functional modules such as optimal resource scheduling, network management, and network security of smart grids, thereby improving the basic service performance and operational safety of power communication networks. According to actual measurement requirements, a group of data packets with the same flow label are usually abstracted as a flow, and data packets with the same identifier in the flow are further abstracted as an element. Then the traffic measurement task can be divided into flow size measurement (i.e., measuring the number of data packets in the flow) and network flow cardinality measurement (i.e., measuring the number of different elements in the network flow). Among them, network flow labels and network flow elements can be flexibly defined according to application requirements. For example, data packets sent to the same destination address are abstracted as a flow, and the source address is abstracted as the identifier of the element. Then the destination address is the flow label of the flow, and each different source address is one of the elements. On each core gateway in the smart grid, real-time measurement of fine-grained traffic information such as the size and cardinality of each flow that can be monitored can provide decision-making basis for key network functions such as load balancing and attack detection.
[0003] In the actual smart grid operation environment, the core gateway needs to simultaneously implement network performance monitoring, event detection, and attack identification, and different functions require different types or levels of network traffic measurement. For example, load balancing needs to use the combination of source and destination addresses as flow labels to measure the size of each flow, while scanning attack detection needs to use the source address as the flow label to abstract the flow and measure the cardinality of the flow. However, existing measurement technologies are usually designed for specific measurement tasks, and their data structures and task types are tightly coupled. In this case, to achieve multi-target measurement tasks at the same time, multiple independent measurement modules need to be deployed at the same time. Although there are a few technologies that can achieve fusion measurement of some measurement tasks, most of them only support the fusion of measurement tasks of the same type, such as the fusion of flow cardinality measurement tasks under different definitions, which still cannot meet the actual multi-target, fine-grained flow fusion measurement needs. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a smart grid fine-grained flow measurement method and system that realizes multi-objective fusion. The method can simultaneously realize flow measurement of flow size classes and flow cardinality classes under different definitions through one-time real-time online data screening and capture.
[0005] In order to achieve the above object, an embodiment of the present invention provides a smart grid fine-grained flow measurement method for realizing multi-objective fusion, including:
[0006] In each measurement cycle, a continuous memory space is opened on the SRAM to perform online data screening and information capture on the arriving data packets;
[0007] Receive and store the captured information, and fuse the sampled information according to the task definition to obtain the estimated value of network flow size and network flow cardinality;
[0008] The SRAM resets the opened continuous memory space after the measurement cycle ends, and returns to execute the steps of online data screening and information capture for new data packets.
[0009] Optionally, the step of opening up a continuous memory space on the SRAM in each measurement cycle to perform online data screening and information capture on the arriving data packets includes:
[0010] Acquire the data packet, and map fine-grained information of the data packet to a virtual element;
[0011] The virtual elements are screened by hashing technology and each different virtual element is captured with a predefined probability.
[0012] Optionally, the receiving and storing of captured information, and fusing the sampled information according to the task definition to obtain estimated values of network flow size and network flow cardinality include:
[0013] Receiving the virtual element and corresponding data packet information;
[0014] Fuse the fine-grained information of the packet information according to the task definition and obtain an estimate of the flow size;
[0015] The fine-grained information of the packet information is fused according to the task definition and an estimate of the flow cardinality is obtained.
[0016] Optionally, obtaining the data packet and mapping the fine-grained information of the data packet to a virtual element includes:
[0017] A decimal between [0,1] is randomly generated for each incoming data packet. ,in The fine-grained flow label information of a data packet is a five-tuple. All data packets with the same five-tuple are abstracted as a flow. Each flow corresponds to a The virtual space of a bitmap, The bitmap is recorded as , whose length is , the hash probability is ;
[0018] According to the fraction of the data packet The interval To determine the sequence number of the bitmap to which it belongs ,in, Indicates the parameters, Indicates The hash probability of a bitmap;
[0019] According to the sequence number to which the data packet belongs The bitmap Randomly generate a [ , ] ;
[0020] According to the sequence number to which the data packet belongs and the corresponding integer Generate virtual elements .
[0021] Optionally, screening the virtual elements by using a hashing technique and capturing each different virtual element with a predefined probability includes:
[0022] Acquire compressed information of the virtual element and the corresponding quintuple;
[0023] Initialize continuous memory space All bits in are 0;
[0024] According to formula (1), the length of a block in the SRAM where the virtual element and its five-tuple are mapped is: Continuous memory space The mapping result is:
[0025] Formula (1)
[0026] in, is the mapping result mapped in continuous memory space, is the sequence number of the virtual element mapped in the continuous memory space, For any random hash function, It is a bitwise XOR operation. is a five-tuple flow label, is a virtual element, Represents continuous memory space The length parameter of
[0027] Determine the mapping result Is it 1 or 0?
[0028] In the mapping results When it is 1, the operation ends;
[0029] In the mapping results When it is 0, the mapping result Set to 1;
[0030] Increment the value of a counter by one, wherein the counter is used to record the number of bits whose median value is 1 in the continuous memory space;
[0031] Obtaining the sampling probability of the virtual element according to formula (2);
[0032] Formula (2)
[0033] in, is the sampling probability of the virtual element, is the probability of no repeated sampling, is the number of bits with a value of 1 in the counter record;
[0034] The virtual element is sampled according to a sampling probability to obtain information about the sampled virtual element and a quintuple corresponding to the virtual element.
[0035] Optionally, fusing the fine-grained flow information of the data packet information according to the task definition and obtaining an estimated value of the flow size includes:
[0036] Get each collected virtual element and the corresponding quintuple;
[0037] Each of the five-tuples corresponds to a counter, and multiple counters are recorded as ;
[0038] For each counter , get satisfaction The minimum sequence number of the condition and the corresponding counter , and the length of the virtual space of the corresponding quintuple bitmap ;
[0039] A rough estimate of the size of the quintuple is calculated according to formula (3):
[0040] Formula (3)
[0041] in, is a rough estimate of the size of a quintuple.
[0042] Optionally, fusing the fine-grained flow information of the data packet information according to the task definition and obtaining an estimated value of the flow size includes:
[0043] According to formula (4), the flow is calculated in The sampling probability of a bitmap is:
[0044] Formula (4)
[0045] in, For the flow The sampling probability of a bitmap, For the flow Compression ratio on
[0046] The overall sampling probability of each bitmap is calculated according to formula (4);
[0047] Get the bitmap with the highest overall sampling probability: , and estimate the size of the five-tuple of sampled traffic information according to formula (5):
[0048] Formula (5)
[0049] in, is an estimate of the size of the quintuple;
[0050] For each flow defined according to the task, determine the set of five-tuples belonging to the same label;
[0051] The total flow size of the five-tuples belonging to the same set is determined according to formula (6):
[0052] Formula (6)
[0053] in, Indicates that the tag contains An estimate of the size of the stream, Indicates that all tags contain A set of sub-flows consisting of five tuples.
[0054] Optionally, fusing the fine-grained information of the data packet information according to the task definition and obtaining an estimated value of the flow cardinality includes:
[0055] For each flow defined according to the task, determine the set of five-tuples of elements belonging to the same label and flow;
[0056] Get the label as The flow is determined according to formula (7) An element in The sampling probability of:
[0057] Formula (7)
[0058] in, For elements The sampling probability of Indicates that the tag contains and The sub-flow set consisting of the five-tuple of ;
[0059] According to formula (8), the flow An estimate of the cardinality of :
[0060] Formula (8).
[0061] On the other hand, the present invention also provides a smart grid fine-grained flow measurement system for realizing multi-objective fusion, comprising:
[0062] An online coding part, which is used for real-time online data screening and fine-grained traffic information capture;
[0063] The offline estimation part is used to receive and store the captured fine-grained flow information, fuse the flow information according to the deployed measurement tasks, and estimate the flow size class tasks and flow cardinality class measurement tasks respectively.
[0064] Optionally, the online encoding part includes a traffic compression module for generating virtual elements; a non-resampling module for removing duplicate virtual elements and sampling different virtual elements and corresponding fine-grained traffic information with a constant probability; the offline estimation part includes: flow size estimation, which is used for the deployed flow size class task definition to fuse the fine-grained traffic information and provide an estimated value of the flow size; flow cardinality estimation, which is used for the deployed flow cardinality class task definition to fuse the fine-grained traffic information and provide an estimated value of the flow cardinality.
[0065] Through the above technical scheme, the fine-grained flow measurement method and system for smart grids that realize multi-target fusion provided by the present invention can open up a continuous memory space on SRAM in each measurement cycle to perform online data screening and information capture on the arriving data packets, and then receive and store the captured information. After obtaining the information, the sampled information can be fused according to the task definition, so that the estimated values of the network flow size and the network flow cardinality can be obtained. After the measurement cycle ends, the SRAM resets the opened continuous memory space, and can re-perform online data screening and information capture on new data packets. This method can perform real-time online data screening and capture, and simultaneously realize flow measurement of flow size classes and flow cardinality classes under different definitions.
[0066] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0068] Figure 1 is a flow chart of a smart grid fine-grained flow measurement method for realizing multi-objective fusion according to an embodiment of the present invention;
[0069] Figure 2 It is a flow chart of online screening and information capture of data packets in a smart grid fine-grained flow measurement method for realizing multi-objective fusion according to an embodiment of the present invention;
[0070] Figure 3 It is a flow chart of obtaining estimated values of network flow size and network end of a smart grid fine-grained flow measurement method for realizing multi-objective fusion according to an embodiment of the present invention;
[0071] Figure 4 is a flow chart of generating virtual elements of a smart grid fine-grained flow measurement method for realizing multi-objective fusion according to an embodiment of the present invention;
[0072] Figure 5 is a flow chart of obtaining virtual elements of a fine-grained flow measurement method for a smart grid that realizes multi-objective fusion according to an embodiment of the present invention;
[0073] Figure 6 is a first flow chart of obtaining an estimated value of a flow size of a smart grid fine-grained flow measurement method for realizing multi-objective fusion according to an embodiment of the present invention;
[0074] Figure 7 is a second flow chart of obtaining an estimated value of a flow size of a smart grid fine-grained flow measurement method for realizing multi-objective fusion according to an embodiment of the present invention;
[0075] Figure 8 The present invention is a flowchart of obtaining an estimated value of a flow cardinality in a fine-grained flow measurement method for a smart grid that implements multi-objective fusion according to an embodiment of the present invention. DETAILED DESCRIPTION
[0076] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.
[0077] Figure 1 1 is a flow chart of a method for fine-grained flow measurement of a smart grid for realizing multi-objective fusion according to an embodiment of the present invention. The process of the method may include:
[0078] In step S1, a continuous memory space is opened on the SRAM in each measurement cycle to perform online data screening and information capture on the arriving data packets.
[0079] In step S2, the captured information is received and stored, and the sampled information is fused according to the task definition to obtain estimated values of the network flow size and the network flow cardinality.
[0080] In step S3, the SRAM resets the opened continuous memory space after the measurement cycle ends, and returns to execute the steps of online data screening and information capture for new data packets.
[0081] In the present invention, the method may include two parts: online coding and offline estimation. The online coding operation is performed on the SRAM of each core gateway in the smart grid, including two parts: traffic compression and non-repetitive sampling. In each measurement cycle, a continuous memory space is opened on the SRAM for non-repetitive sampling. When a data packet arrives, the traffic compression maps the fine-grained information of the data packet to a virtual element, and the non-repetitive sampling records the virtual element into the opened continuous memory space using hash technology to delete the repeated virtual elements, and capture each different virtual element and the corresponding data packet information with a predefined probability. Thus, the fine-grained information of the traffic will be sampled to the server for recording, so that the offline estimation operation can fuse and estimate the traffic information according to the measurement task requirements of the system. After a measurement cycle is completed, the SRAM will reset the opened continuous memory space. The offline estimation operation is implemented on the server. For each deployed measurement task, the fine-grained information obtained by sampling is fused according to the task definition, so as to obtain the estimated value of the network flow size and the network flow cardinality according to the estimation formula.
[0082] In one embodiment of the present invention, Figure 2 As shown in the figure, the process of online filtering and information capture of data packets includes:
[0083] In step S4, a data packet is obtained, and fine-grained information of the data packet is mapped to a virtual element.
[0084] In step S5, the virtual elements are screened by hashing technology and each different virtual element is captured with a predefined probability.
[0085] In the present invention, when online data screening and information capture are performed on a data packet, the data packet can be first obtained, and the fine-grained information of the data packet can be mapped to a virtual element. The virtual element can be screened by hash technology and each different virtual element can be captured with a predefined probability.
[0086] In one embodiment of the present invention, Figure 3 As shown, the process of obtaining an estimate of the network flow size and the network end may include:
[0087] In step S6, the virtual element and the corresponding data packet information are received.
[0088] In step S7, the fine-grained information of the data packet information is fused according to the task definition, and an estimated value of the flow size is obtained.
[0089] In step S8, the fine-grained information of the data packet information is fused according to the task definition, and an estimated value of the flow cardinality is obtained.
[0090] In the present invention, after obtaining the virtual element, the data packet information corresponding to the virtual element can be obtained, and then the fine-grained information of the data packet information can be fused according to the task definition, and the estimated value of the flow size and the estimated value of the flow cardinality can be obtained.
[0091] In one embodiment of the present invention, Figure 4 As shown in the figure, the process of generating virtual elements includes:
[0092] In step S9, a decimal number between [0,1] is randomly generated for each incoming data packet. ,in The fine-grained flow label information of a data packet is a five-tuple. All data packets with the same five-tuple are abstracted as a flow. Each flow corresponds to a The virtual space of a bitmap, The bitmap is recorded as , whose length is , the hash probability is .
[0093] In step S10, according to the decimal point of the data packet The interval To determine the sequence number of the bitmap to which it belongs ,in, Indicates the parameters, Indicates The hash probability of a bitmap.
[0094] In step S11, according to the sequence number of the data packet The bitmap Randomly generate a [ , ] .
[0095] In step S12, according to the sequence number to which the data packet belongs and the corresponding integer Generate virtual elements .
[0096] In the present invention, all data packets with the same five-tuple can be abstracted as a stream, and the data packets can be elements. The elements in each stream can be mapped to a virtual element in the virtual space. When mapping, a decimal between [0,1] can be randomly generated for each data packet. , and then according to its said interval Determine the bitmap to which it belongs . According to the sequence number of the data packet The bitmap You can randomly generate a [ , ] The virtual element can be generated by the sequence number to which the data packet belongs and the corresponding integer.
[0097] In one embodiment of the present invention, Figure 5 As shown, the process of obtaining virtual elements may include:
[0098] In step S13, the compressed virtual element and the corresponding quintuple information are obtained.
[0099] In step S14, the continuous memory space is initialized All bits in are 0.
[0100] In step S15, the length of a block of virtual elements and their five-tuple mappings in SRAM is obtained according to formula (1): Continuous memory space The mapping result is:
[0101] Formula (1)
[0102] in, is the mapping result mapped in continuous memory space, is the sequence number of the virtual element mapped in the continuous memory space, For any random hash function, It is a bitwise XOR operation. is a five-tuple flow label, is a virtual element, Represents continuous memory space The length parameter.
[0103] In step S16, the mapping result is determined. Is 1 or 0.
[0104] In step S17, in the mapping result When it is 1, the operation ends.
[0105] In step S18, in the mapping result When it is 0, the mapping result Set to 1.
[0106] In step S19, the value of the counter is increased by one, and the counter is used to record the number of bits with a median value of 1 in the continuous memory space.
[0107] In step S20, the sampling probability of the virtual element is obtained according to formula (2);
[0108] Formula (2)
[0109] in, is the sampling probability of the virtual element, is the probability of no repeated sampling, is the number of bits with a value of 1 in the counter record.
[0110] In step S21, the virtual elements are sampled according to the sampling probability to obtain information of the sampled virtual elements and the quintuples corresponding to the virtual elements.
[0111] In the present invention, the compressed elements can be sampled without repetition. At the beginning of each measurement cycle, the power grid core gateway will open a block of length 100 on the SRAM. Continuous memory space Used to filter traffic information to remove repeated elements. Initially, set All bits in are 0. The probability of no resampling is denoted by .counter For recording The number of bits with a median value of 1. For each compressed virtual element, the mapping result of the virtual element and its five-tuple in the continuous memory space can be obtained according to formula (1). After obtaining the mapping result, if If is 1, no action is taken and the next data packet is processed. If it is 0, set this position to 1, and the counter The value of is increased by one, and the probability Sampling the virtual elements. The sampling probability of the virtual elements can be obtained by formula (2). After sampling the virtual elements by the sampling probability, the sampled virtual elements and the corresponding five-tuple information can be obtained, and the information can be sent to the server for storage, so that it can be used for subsequent offline estimation.
[0112] In one embodiment of the present invention, Figure 6 As shown, a first process of obtaining an estimated value of a flow size may include:
[0113] In step S22, each collected virtual element and the corresponding quintuple are obtained.
[0114] In step S23, each quintuple corresponds to a counter, and multiple counters are recorded as .
[0115] In step S24, for each counter , get satisfaction The minimum sequence number of the condition and the corresponding counter , and the length of the virtual space of the corresponding quintuple bitmap .
[0116] In step S25, a rough estimate of the size of the quintuple is calculated according to formula (3):
[0117] Formula (3)
[0118] in, is a rough estimate of the size of the quintuple, The length of the virtual space of the bitmap of the corresponding quintuple.
[0119] In the present invention, after obtaining each virtual element and the corresponding quintuple, the size of the quintuple can be roughly estimated. , respectively record the number of virtual elements sampled by each bitmap of the stream during the measurement period. and the corresponding counter After that, the size of the corresponding quintuple can be roughly estimated according to formula (3).
[0120] In one embodiment of the present invention, Figure 7 As shown, the second process of obtaining an estimated value of the flow size may include:
[0121] In step S26, the flow is calculated according to formula (4). The sampling probability of a bitmap is:
[0122] Formula (4)
[0123] in, For the flow The sampling probability of a bitmap, For the flow The compression ratio on .
[0124] In step S27, the overall sampling probability of each bitmap is calculated according to formula (4).
[0125] In step S28, the bitmap with the largest overall sampling probability is obtained as , and estimate the size of the five-tuple of sampled traffic information according to formula (5):
[0126] Formula (5)
[0127] in, is an estimate of the size of a quintuple.
[0128] In step S29, for each flow defined according to the task, a set of five-tuples belonging to the same label is determined.
[0129] In step S30, the total flow size of the five-tuples belonging to the same set is determined according to formula (6):
[0130] Formula (6)
[0131] in, Indicates that the tag contains An estimate of the size of the stream, Indicates that all tags contain A set of sub-flows consisting of five tuples.
[0132] In the present invention, the flow is calculated by formula (4) After calculating the sampling probability of each bitmap, the overall sampling probability of the stream in each bitmap can be calculated again according to formula (4). In order to achieve the highest estimation accuracy, the bitmap with the largest overall sampling probability can be selected as The sampled flow information estimates the size of the five-tuple, that is, the size of the five-tuple is obtained by formula (5). For the measurement of the flow size, the sizes of the five-tuples with the same label can be summed according to the flow definition to obtain the estimated value of the flow size. , first determine the set , then the total flow size of the five-tuples belonging to the same set can be determined by formula (6). The total flow size can be an estimated value of the required flow size.
[0133] In one embodiment of the present invention, Figure 8 As shown, the process of obtaining an estimated value of the stream cardinality may include:
[0134] In step S31 , for each flow defined according to the task, a set of five-tuples of elements belonging to the same label and flow is determined.
[0135] In step S32, the tag is obtained. The flow is determined according to formula (7) An element in The sampling probability of:
[0136] Formula (7)
[0137] in, For elements The sampling probability of Indicates that the tag contains and The sub-flow set consisting of the five-tuple of For the flow The sampling probability of a bitmap.
[0138] In step S33, the flow is calculated according to formula (8). An estimate of the cardinality of :
[0139] Formula (8).
[0140] In the present invention, when obtaining the estimated value of the cardinality of a flow, the five-tuple set of elements belonging to the same label and flow can be determined according to its flow definition. For the elements of all flows belonging to the same flow, the actual sampling probability of each element can be calculated according to the determined five-tuple set and formula (7). For each flow, the estimated value of the cardinality of the flow can be obtained according to the elements contained in the flow, the sampling probability of each element and formula (8).
[0141] On the other hand, the present invention also provides a smart grid fine-grained flow measurement system for realizing multi-objective fusion, which can include an online coding part and an offline estimation part. The online coding part is used for real-time online data screening and fine-grained flow information capture. The offline estimation part can be used to receive and store the captured fine-grained flow information, and fuse the flow information according to the deployed measurement tasks, and estimate the flow size class tasks and the flow cardinality class measurement tasks respectively.
[0142] In one embodiment of the present invention, the online encoding part may include a traffic compression module and a non-resampling module. The traffic compression module may be used to generate virtual elements. The non-resampling module may be used to remove duplicate virtual elements and sample different virtual elements and corresponding fine-grained traffic information with a constant probability. The offline estimation part includes flow size estimation and flow cardinality estimation. The flow size estimation may be used for the deployed flow size class task definition to fuse the fine-grained traffic information and provide an estimated value of the flow size. The flow cardinality estimation may be used for the deployed flow cardinality class task definition to fuse the fine-grained traffic information and provide an estimated value of the flow cardinality.
[0143] Through the above technical scheme, the fine-grained flow measurement method and system for smart grids that realize multi-target fusion provided by the present invention can open up a continuous memory space on SRAM in each measurement cycle to perform online data screening and information capture on the arriving data packets, and then receive and store the captured information. After obtaining the information, the sampled information can be fused according to the task definition, so that the estimated values of the network flow size and the network flow cardinality can be obtained. After the measurement cycle ends, the SRAM resets the opened continuous memory space, and can re-perform online data screening and information capture on new data packets. This method can perform real-time online data screening and capture, and simultaneously realize flow measurement of flow size classes and flow cardinality classes under different definitions.
[0144] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt 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 codes.
[0145] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0146] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0147] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0148] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0149] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0150] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0151] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0152] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A smart grid fine-grained flow measurement method for realizing multi-objective fusion, characterized in that: include: In each measurement cycle, a continuous memory space is opened on the SRAM to perform online data screening and information capture on the arriving data packets; Receive and store the captured information, and fuse the sampled information according to the task definition to obtain the estimated value of network flow size and network flow cardinality; The SRAM resets the opened continuous memory space after the measurement cycle ends, and returns to execute the steps of online data screening and information capture for new data packets; In each measurement cycle, a continuous memory space is opened on the SRAM to perform online data screening and information capture on the arriving data packets, including: Acquire the data packet, and map fine-grained information of the data packet to a virtual element; The virtual elements are screened by hashing technology and each different virtual element is captured with a predefined probability; Receive and store the captured information, and fuse the sampled information according to the task definition to obtain the estimated values of network flow size and network flow cardinality, including: Receiving the virtual element and corresponding data packet information; Fuse the fine-grained information of the packet information according to the task definition and obtain an estimate of the flow size; Fuse the fine-grained information of the packet information according to the task definition and obtain an estimate of the flow cardinality; According to the task definition, the fine-grained flow information of the packet information is integrated and the estimated value of the flow size is obtained, including: Get each collected virtual element and the corresponding quintuple; Each of the five-tuples corresponds to a counter, and multiple counters are recorded as ; For each counter , get satisfaction The minimum sequence number of the condition and the corresponding counter , and the length of the virtual space of the corresponding quintuple bitmap ; A rough estimate of the size of the quintuple is calculated according to formula (3): Formula (3) in, is a rough estimate of the size of the quintuple, is the length of the virtual space of the corresponding quintuple bitmap, is the probability of no repeated sampling; According to the task definition, the fine-grained information of the packet information is integrated and the estimated value of the flow cardinality is obtained, including: For each flow defined according to the task, determine the set of five-tuples of elements belonging to the same label and flow; Get the label as The flow is determined according to formula (7) An element in The sampling probability of: Formulas (7) in, For elements The sampling probability of Indicates that the tag contains and The sub-flow set consisting of the five-tuple of For the flow The sampling probability of a bitmap; According to formula (8), the flow An estimate of the cardinality of : Official(8).
2. The method according to claim 1, characterized in that The obtaining of the data packet and mapping the fine-grained information of the data packet to a virtual element comprises: A decimal between [0,1] is randomly generated for each incoming data packet. ,in The fine-grained flow label information of a data packet is a five-tuple. All data packets with the same five-tuple are abstracted as a flow. Each flow corresponds to a The virtual space of a bitmap, The bitmap is recorded as , whose length is , the hash probability is ; According to the fraction of the data packet The interval To determine the sequence number of the bitmap to which it belongs ,in, Indicates the parameters, Indicates The hash probability of a bitmap; According to the sequence number to which the data packet belongs The bitmap Randomly generate a [ , ] ; According to the sequence number to which the data packet belongs and the corresponding integer Generate virtual elements .
3. The method according to claim 2, characterized in that The screening of the virtual elements by using the hashing technology and capturing each different virtual element with a predefined probability comprises: Acquire compressed information of the virtual element and the corresponding quintuple; Initialize continuous memory space All bits in are 0; According to formula (1), the length of a block in the SRAM where the virtual element and its five-tuple are mapped is: Continuous memory space The mapping result is: Formula (1) in, is the mapping result mapped in continuous memory space, is the sequence number of the virtual element mapped in the continuous memory space, For any random hash function, It is a bitwise XOR operation. is a five-tuple flow label, is a virtual element, Represents continuous memory space The length parameter of Determine the mapping result Is it 1 or 0? In the mapping results When it is 1, the operation ends; In the mapping results When it is 0, the mapping result Set to 1; Increment the value of a counter by one, wherein the counter is used to record the number of bits whose median value is 1 in the continuous memory space; Obtaining the sampling probability of the virtual element according to formula (2); Formula (2) in, is the sampling probability of the virtual element, is the probability of no repeated sampling, is the number of bits with a value of 1 in the counter record; The virtual element is sampled according to a sampling probability to obtain information about the sampled virtual element and a quintuple corresponding to the virtual element.
4. The method according to claim 1, characterized in that: The fusing of the fine-grained flow information of the data packet information according to the task definition and obtaining an estimated value of the flow size includes: According to formula (4), the flow is calculated in The sampling probability of a bitmap is: Formula (4) in, For the flow The sampling probability of a bitmap, For the flow Compression ratio on The overall sampling probability of each bitmap is calculated according to formula (4); Get the bitmap with the highest overall sampling probability: , and estimate the size of the five-tuple of sampled traffic information according to formula (5): Formula (5) in, is an estimate of the size of the quintuple; For each flow defined according to the task, determine the set of five-tuples belonging to the same label; The total flow size of the five-tuples belonging to the same set is determined according to formula (6): Formula(6) in, Indicates that the tag contains An estimate of the size of the stream, Indicates that all tags contain A set of sub-flows consisting of five tuples.
5. A smart grid fine-grained flow measurement system that realizes multi-objective fusion, characterized in that: include: An online coding part, which is used for real-time online data screening and fine-grained traffic information capture; The offline estimation part is used to receive and store the captured fine-grained flow information, and fuse the flow information according to the deployed measurement tasks. It estimates the flow size tasks and flow cardinality measurement tasks respectively. The estimated values of the flow size include: Get each collected virtual element and the corresponding quintuple; Each quintuple corresponds to a counter, and multiple counters are denoted by labels. ; For each counter , get satisfaction The minimum sequence number of the condition and the corresponding counter , and the length of the virtual space of the corresponding quintuple bitmap ; A rough estimate of the size of the quintuple is calculated according to formula (3): Formula (3) in, is a rough estimate of the size of the quintuple, The length of the virtual space of the bitmap of the corresponding quintuple; Estimates of the cardinality of the flow include: For each flow defined according to the task, determine the set of five-tuples of elements belonging to the same label and flow; Get the label as The flow is determined according to formula (7) An element in The sampling probability of: Formulas (7) in, For elements The sampling probability of Indicates that the tag contains and The sub-flow set consisting of the five-tuple of For the flow The sampling probability of a bitmap; According to formula (8), the flow An estimate of the cardinality of : Official(8).
6. The system according to claim 5, characterized in that The online encoding part includes a traffic compression module for generating virtual elements; The non-resampling module is used to remove duplicate virtual elements and sample different virtual elements and corresponding fine-grained traffic information with a constant probability; The offline estimation part includes: flow size estimation, which is used for the deployed flow size class task definition to fuse fine-grained flow information and provide an estimated value of the flow size; Flow cardinality estimation is used for the deployed flow cardinality task definition to fuse fine-grained traffic information and provide an estimate of the flow cardinality.
Citation Information
Patent Citations
Multi-target network flow cardinal number fusion measurement method and system
CN117792961A
Systems and methods for detecting large network flows
US11805034B1
