Method and storage medium for concurrent filtering of big data based on bitmap lock

Through the bitmap lock-based method, the problem of difficulty in obtaining action attributes in high-speed concurrency and multi-core processing is solved, efficient data filtering and retrieval performance are improved, and the error rate is reduced. It is suitable for big data collection and analysis and network traffic service quality. Wait for the scene.

CN115766488BActive Publication Date: 2024-09-24ANHUI WANTONG POSTS & TELECOMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211663341.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-23
Publication Date
2024-09-24
Estimated Expiration
2042-12-23

AI Technical Summary

Technical Problem

In high-speed concurrency and CPU multi-core parsing, multi-core concurrency conflicts and large matching table sizes make it difficult for the existing technology to effectively parse concurrent processing and quickly obtain action attributes, resulting in high index space consumption and high error rates.

Method used

Using a bitmap lock-based method, by defining data characteristics to filter the semantic library and bitmap index generation algorithm, use bit operation algorithms (remainder, left shift, and right shift) to locate the operation bit within the bitmap and set the operation status value , implement lock protection mechanism to avoid data redundancy and mishandling.

Benefits of technology

It effectively reduces index space consumption, improves data filtering and retrieval performance, and reduces the error rate of multi-processor high-speed concurrent processing of big data. It is suitable for multi-core concurrent processing scenarios and avoids redundancy and error processing caused by data re-entry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115766488B
    Figure CN115766488B
Patent Text Reader

Abstract

The present invention discloses a method and storage medium for implementing concurrent filtering of big data based on bitmap locks. The method comprises defining a data feature filtering semantic library and a bitmap index generation algorithm that meet the requirements of big data collection and analysis, network traffic service quality and routing forwarding; extracting field values ​​that meet the feature filtering semantic library for data or network traffic to be processed, and calling an algorithm to generate a bitmap index; using a bit operation algorithm to set an operation status value; if the operation status is a "lock" status, attempting to obtain operation authority; after the lock is released, comparing the operation status value to determine the action on the data or network traffic; the scheme of the present invention converts complex retrieval and filtering conditions into an index through an algorithm, sets the status value of the data bit pointed to by the index, and forms a lock protection mechanism, which can effectively reduce index space consumption, improve data filtering and retrieval performance, and reduce errors in high-speed concurrent processing of big data by multiple processors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer network data communication, and in particular to a method and a storage medium for implementing concurrent filtering of large data based on a bitmap lock. Background Art

[0002] In big data collection and analysis, network traffic service quality, and routing forwarding, it is necessary to parse the fields of network messages and obtain action attributes after matching the policy table. However, in high-speed concurrency and CPU multi-core parsing, multi-core concurrency conflicts and large matching table sizes may occur. Therefore, it is necessary to provide a processing algorithm that can parse concurrent multi-core processing conflicts, consume less space in the matching table, and quickly obtain action attributes. Summary of the invention

[0003] The present invention proposes a method for implementing concurrent filtering of large data based on bitmap locks, which can effectively reduce index space consumption, improve data filtering and retrieval performance, and reduce errors in high-speed concurrent processing of large data by multiple processors.

[0004] To achieve the above object, the present invention adopts the following technical solutions:

[0005] A method for implementing concurrent filtering of big data based on bitmap locks comprises the following steps:

[0006] Step 1: Define a data feature filtering semantic library that meets the requirements of big data collection and analysis, network traffic service quality, and routing forwarding;

[0007] Step 2, define a bitmap index generation algorithm that meets the requirements of big data collection and analysis, network traffic service quality, and routing forwarding;

[0008] Step 3: For the data or network traffic to be processed, extract the field values ​​that meet the feature filtering semantic library, and call the algorithm to generate a bitmap index;

[0009] Step 4, using the bit operation algorithm (remainder, left shift and right shift), locate the operation bit indexed in the bitmap and set the operation status value;

[0010] If the operation status is "locked", try to obtain the operation permission; after the lock is released, compare the operation status value and decide on the action to be taken on the data or network traffic;

[0011] Thus, high-speed filtering of concurrent large-capacity data by operation locks is achieved based on bitmaps.

[0012] On the other hand, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the above method.

[0013] It can be seen from the above technical scheme that the method of implementing concurrent filtering of big data based on bitmap lock of the present invention aims to provide a field for customizing filtering network messages, select a combination of several fields such as source IP address, destination IP address, source MAC, destination MAC, Class of Service, source port number, destination port number, session ID, etc. based on different application needs, and convert them into indexes through algorithms such as SHA128 and SHA256 as bitmap indexes; at the same time, define the storage information in the bitmap as a data operation lock, and borrow the lock mechanism to avoid data redundancy and mishandling in the case of big data concurrency and reentry. The scheme of the present invention converts complex retrieval and filtering conditions into indexes through algorithms, sets the state value of the data bit pointed to by the index, and forms a lock protection mechanism, which can effectively reduce the consumption of index space, improve data filtering and retrieval performance, and reduce the errors of multi-processor high-speed concurrent processing of big data.

[0014] Through the patent of this invention, complex retrieval and filtering conditions can be converted into an index through an algorithm, and the state value of the data bit pointed to by the index can be set to form a lock protection mechanism; at the same time, it can effectively reduce index space consumption, improve data filtering and retrieval performance, and reduce errors in high-speed concurrent processing of large data by multiple processors.

[0015] Specifically, the beneficial effects of the present invention include:

[0016] 1. Applicable to scenarios where it is necessary to distinguish data feature values ​​and determine different action attributes;

[0017] 2. It is suitable for multi-core concurrent processing scenarios, and can avoid redundancy and error processing caused by data re-entry based on lock operations;

[0018] 3. Storing action attributes in bitmap format and using remainder and shift algorithms enables high-speed processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 The bitmap lock provided by the embodiment of the present invention realizes the process of concurrent filtering of large data;

[0020] Figure 2 A schematic diagram of the structure and bit operation state attributes of a bitmap lock provided by an embodiment of the present invention;

[0021] Figure 3 is an example diagram of a bitmap lock according to an embodiment of the present invention;

[0022] Figure 4 The operation logic of the bitmap lock provided by the embodiment of the present invention;

[0023] Figure 5An abnormal protection mechanism of a bitmap lock in the traffic redundancy protection provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.

[0025] like Figure 1 As shown, the method for implementing concurrent filtering of big data based on bitmap locks described in this embodiment includes the following steps:

[0026] Step 1: Define a data feature filtering semantic library that meets the requirements of big data collection and analysis, network traffic quality of service, and routing forwarding;

[0027] Step 2, define a bitmap index generation algorithm that meets the requirements of big data collection and analysis, network traffic quality of service, and routing forwarding;

[0028] Step 3: For the data or network traffic to be processed, extract the field values ​​that meet the feature filtering semantic library, and call the algorithm to generate a bitmap index;

[0029] Step 4, using a bit operation algorithm, locate the operation bit indexed in the bitmap and set the operation status value;

[0030] If the operation status is "locked", try to obtain the operation permission; after the lock is released, compare the operation status value and decide on the action to be taken on the data or network traffic;

[0031] Thus, high-speed filtering of concurrent large-capacity data by operation locks is achieved based on bitmaps.

[0032] The following are specific instructions:

[0033] Step S101, defining a data feature filtering semantic library that meets the requirements of big data collection and analysis, network traffic service quality, and routing forwarding;

[0034] Step S102: defining a bitmap index generation algorithm that meets the requirements of big data collection and analysis, network traffic quality of service, and routing forwarding;

[0035] Step S103: The data features are filtered by the semantics of step S101 and indexed by the algorithm of step S102, located at the position of the bitmap lock, and the data is processed based on the attributes of the operation bit.

[0036] Figure 2 Describes the structure and bit operation state attributes of a bitmap lock, including:

[0037] Step 201, the bitmap lock is composed of operation attribute bits and data processing behavior description;

[0038] Step 202, taking 2 bits constituting the operation bit attribute as an example, the attribute value is described as follows:

[0039] 00--idle, idle attribute; 01--proceeding, the attribute bit is in operation, that is, lock protection; 10--working, the attribute bit is in working state, and there is a valid behavior description;

[0040] illustrate:

[0041] The bitmap lock attribute bit can be composed of multiple bits, and the lock attribute value can be defined as needed. Figure 3 is an example of the present invention;

[0042] Attribute bit value definition description:

[0043] 00: idle;

[0044] 01: proceeding is in progress; under lock protection;

[0045] 10: There are effective behavioral descriptions in working;

[0046] Figure 4 The operation logic of the bitmap lock provided by the embodiment of the present invention is described, including:

[0047] Step 301, define a data feature filtering semantic library that meets the requirements of big data collection and analysis, network traffic service quality, and routing forwarding;

[0048] Step 302: define a bitmap index generation algorithm that meets the requirements of big data collection and analysis, network traffic quality of service, and routing forwarding;

[0049] Step 303: import the data or network traffic to be processed, match the data feature filtering semantic library; extract the feature semantic value used for the bitmap index generation algorithm;

[0050] Step 304: input the feature semantic value and the bitmap algorithm index algorithm number to generate a positioning index in the bitmap lock;

[0051] Step 305: Use remainder and shift operations to locate the attribute bit of the index in the bitmap lock and obtain the attribute value.

[0052] If the operation attribute bit of the bit is in the idle state, the processing action of the written data, such as the scheduling queue ID of QoS or the data information taken;

[0053] If the operation attribute bit of the bit is in the lock protection state, it means that the data has been re-entered. After the current data is cached, try to obtain the attribute bit operation permission;

[0054] If the operation attribute bit of the bit is in working state, the behavior description corresponding to the attribute bit is directly obtained to process the data.

[0055] In traffic redundancy protection, the sending network element of the network device will transmit multiple copies of the same data to the receiving network element. The receiving network element needs to identify data duplication and ensure that only one copy of the data is received and processed. During the network traffic transmission process, packet loss may occur due to abnormalities. In order to avoid abnormal operation of attribute bits, bitmap lock maintenance is required. Figure 5 The abnormal protection mechanism of the bitmap lock in the traffic redundancy protection provided by the embodiment of the present invention is described, and the processing method includes:

[0056] Step 401: after semantic extraction and algorithm generation, an index is generated and located in the bitmap lock; if the attribute bit is idle, it means that the currently received network traffic is non-redundant data, and the behavior is described as "packet loss" to discard the same redundant network messages received subsequently;

[0057] Step 402: Assume that the current network message is at position M of the bitmap lock, and the capacity of the bitmap lock is N. After setting the attribute bit of the current network message on the bitmap lock, shift N / 2 and change the attribute bit at position M+N / 2 from "working" to "idle". In this process, the redundant message at position M+N / 2 is abnormally lost during transmission.

[0058] If M+N / 2 exceeds the upper capacity limit of the bitmap lock, the bitmap lock is shifted back to position 0.

[0059] In yet another aspect, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of any of the above methods.

[0060] On the other hand, the present invention further discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any of the above methods.

[0061] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the steps of any method in the above embodiments.

[0062] It is understandable that the system provided by the embodiment of the present invention corresponds to the method provided by the embodiment of the present invention, and the explanation, examples and beneficial effects of the relevant contents can refer to the corresponding parts in the above method.

[0063] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0064] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0065] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for concurrent filtering of large data based on bitmap locks. It is characterized in that Implement operation lock based on bitmap, The following steps are included: Step 1: Define a data feature filtering semantic library that meets the requirements of big data collection and analysis, network traffic quality of service, and routing forwarding; Step 2, define a bitmap index generation algorithm that meets the requirements of big data collection and analysis, network traffic quality of service, and routing forwarding; Step 3: For the data or network traffic to be processed, extract the field values ​​that meet the feature filtering semantic library, and call the algorithm to generate a bitmap index; Import the data or network traffic to be processed, match the data features to filter the semantic library; extract the feature semantic values ​​used for the bitmap index generation algorithm; Input the feature semantic value and the bitmap algorithm index algorithm number to generate the positioning index in the bitmap lock; A bitmap lock consists of an operation attribute bit and a description of the data processing behavior; Step 4: Use a bit operation algorithm to locate the operation attribute bit indexed in the bitmap and obtain the attribute value corresponding to the operation attribute bit; If the operation attribute value is in the "lock" state, try to obtain the operation permission; after the lock is released, compare the operation attribute value and decide the action on the data or network traffic based on the data processing behavior description; Thus, high-speed filtering of concurrent large-capacity data by operation locks is achieved based on bitmaps.

2. According to the method for implementing concurrent filtering of big data based on bitmap locks according to claim 1, Features: The structure of the bitmap operation lock specifically includes: The attribute value in the operation attribute bit consists of 2 bits, specifically: 00--idle, idle attribute; 01--proceeding, the attribute bit is in operation, that is, locked; 10--working, the attribute bit is in working state, and there is a valid behavior description.

3. According to the method for implementing concurrent filtering of big data based on bitmap locks according to claim 2, Features: The operations of the bitmap to implement the operation lock are specifically as follows: Use remainder and shift operations to locate the attribute bit of the index in the bitmap lock and obtain the attribute value; If the operation attribute bit of the bit is in the idle state, the processing action of the write data is; If the operation attribute bit of the bit is in the lock protection state, it means that the data has been re-entered. After the current data is cached, try to obtain the attribute bit operation permission; If the operation attribute bit of the bit is in working state, the behavior description corresponding to the attribute bit is directly obtained to process the data.

4. According to the method for implementing concurrent filtering of large data based on bitmap locks according to claim 3, Features: It also includes the steps of implementing the exception protection of the operation lock for the bitmap: Step 401: after semantic extraction and algorithm generation, an index is generated and located in the bitmap lock; if the attribute bit is idle, it means that the currently received network traffic is non-redundant data, and the behavior is described as "packet loss" to discard the same redundant network messages received subsequently; Step 402: Assume that the current network message is at position M of the bitmap lock, and the capacity of the bitmap lock is N. After setting the attribute bit of the current network message on the bitmap lock, shift N / 2 and change the attribute bit at position M+N / 2 from "working" to "idle". In this process, the redundant message at position M+N / 2 is abnormally lost during transmission. If M+N / 2 exceeds the upper capacity limit of the bitmap lock, the bitmap lock is shifted back to position 0.

5. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 4.