A threat detection method, device and storage medium

By storing the encrypted form of threat data in the cuckoo filter and using a hash algorithm for matching, the problem of low threat detection efficiency in the existing technology is solved, rapid identification and efficient storage are achieved, and the detection efficiency and efficiency of network security are improved. Security.

CN114021113BActive Publication Date: 2024-08-27BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111289642.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-02
Publication Date
2024-08-27
Estimated Expiration
2041-11-02

AI Technical Summary

Technical Problem

Existing threat detection technology results in low detection efficiency through feature matching, making it difficult to quickly identify network attacks.

Method used

The cuckoo filter is used to store the encrypted data of threat data, and during detection, the data to be detected is converted into encrypted data for matching to improve the data matching efficiency, and the hash algorithm and hash table are used to achieve flexible management and rapid storage of data.

Benefits of technology

It improves the efficiency of threat detection, avoids the risk of data leakage, enhances data security, and enables rapid identification and storage of threat data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114021113B
    Figure CN114021113B
Patent Text Reader

Abstract

The present application provides a threat detection method, device, and storage medium. The threat detection method includes: obtaining data to be detected; determining encrypted data corresponding to the data to be detected; judging whether there is encrypted data matching the encrypted data corresponding to the data to be detected in the encrypted data stored by the preset cuckoo filter; the stored encrypted data is encrypted data corresponding to the preset threat data; if so, determining that the data to be detected is threat data. The method is used to improve the efficiency of threat detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and more specifically, to a threat detection method and device, and a storage medium. Background Art

[0002] With the rapid development of the Internet, cyber attacks and fraud are increasing, especially in high-speed network environments, network security products need to quickly identify attacks.

[0003] Existing threat detection technology stores some threat features, such as IP (Internet Protocol) addresses, URLs (Uniform Resource Locator), etc., in Bloom filters or data tables, and then compares the currently detected data with the threat features in the Bloom filters or data tables to identify threat data.

[0004] In this way, a feature matching method is adopted, and the matching efficiency is low, which leads to low detection efficiency. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a threat detection method and device, and a storage medium to improve the efficiency of threat detection.

[0006] In a first aspect, an embodiment of the present application provides a threat detection method, including: obtaining data to be detected; determining encrypted data corresponding to the data to be detected; judging whether there is matching encrypted data corresponding to the encrypted data of the data to be detected in the encrypted data stored by a preset cuckoo filter; the stored encrypted data is encrypted data corresponding to preset threat data; and if so, determining that the data to be detected is threat data.

[0007] In the embodiment of the present application, compared with the prior art, a cuckoo filter is used to store encrypted data corresponding to threat data; when performing threat detection, the data to be detected is first converted into encrypted data, and then matched with the stored encrypted data to determine whether the data to be detected is threat data. On the one hand, the encrypted data corresponding to the threat data is stored by a cuckoo filter. Based on the characteristics of the cuckoo filter, flexible management of the encrypted data corresponding to the threat data can be achieved, such as adding, deleting, etc. On the other hand, when performing threat detection, feature matching is no longer used, but encrypted data matching is used, which can improve the efficiency of data matching, thereby improving the efficiency of threat detection; and, through data encryption, the risk of data leakage can also be avoided and the security of data can be improved.

[0008] As a possible implementation manner, determining the encrypted data corresponding to the data to be detected includes: performing a hash calculation on the data to be detected according to a hash algorithm corresponding to a data type of the data to be detected to obtain the encrypted data corresponding to the data to be detected.

[0009] In the embodiment of the present application, the encrypted data corresponding to the data to be detected is effectively and quickly determined by using a hash algorithm corresponding to the data type of the data to be detected.

[0010] As a possible implementation manner, the threat detection method also includes: obtaining threat data to be processed; determining encrypted data corresponding to the threat data to be processed; determining a storage location of the encrypted data in a cuckoo filter; and storing the encrypted data in a corresponding storage location.

[0011] In an embodiment of the present application, threat data is acquired, corresponding encrypted data is determined, and then a storage location is determined, thereby achieving effective and rapid storage of encrypted data corresponding to the threat data based on the storage location.

[0012] As a possible implementation, the cuckoo filter includes: a first hash table and a second hash table, and determining the storage location of the encrypted data in the cuckoo filter includes: determining the first storage location of the encrypted data; the first storage location is the storage location in the first hash table; determining the second storage location of the encrypted data; the second storage location is the storage location in the second hash table; and determining the final storage location based on the first storage location and the second storage location.

[0013] In an embodiment of the present application, a first storage location and a second storage location of encrypted data are determined respectively, and based on the first storage location and the second storage location, an effective and rapid determination of a final storage location is achieved.

[0014] As a possible implementation manner, the second storage location is an XOR value of the first storage location and the encrypted data.

[0015] In the embodiment of the present application, the second storage location is the XOR value of the first storage location and the encrypted data, so that the second storage location can be determined effectively and quickly.

[0016] As a possible implementation manner, determining the final storage location based on the first storage location and the second storage location includes: if the first storage location and the second storage location are both empty locations, comparing the load sizes of the first hash table and the second hash table; if the load of the first hash table is greater than the load of the second hash table, determining that the final storage location is the second storage location; if the load of the first hash table is less than the load of the second hash table, determining that the final storage location is the first storage location.

[0017] In the embodiment of the present application, if the first storage location and the second storage location are both empty locations, the final storage location can be effectively and quickly determined by comparing the load sizes of the hash tables corresponding to the two storage locations.

[0018] As a possible implementation manner, the threat detection method also includes: if the first storage location is an empty location and the second storage location is not an empty location, determining the final storage location to be the first storage location; if the first storage location is not an empty location and the second storage location is an empty location, determining the final storage location to be the second storage location.

[0019] In an embodiment of the present application, if there is only one empty position between the first storage position and the second storage position, the empty position is determined as the final storage position, thereby achieving effective and rapid determination of the final storage position.

[0020] As a possible implementation method, the threat detection method also includes: if neither the first storage location nor the second storage location is an empty location, kicking out the data stored in the first storage location or the second storage location, and determining the storage location after the kicked-out data is the final storage location; determining the storage location of the kicked-out data, and storing the kicked-out data in the corresponding storage location.

[0021] In an embodiment of the present application, if neither the first storage location nor the second storage location is an empty location, the data stored in the first storage location or the second storage location is kicked out to ensure the determination of the final storage location; and the corresponding storage location is determined for the kicked out data to ensure the integrity of the data stored in the cuckoo filter; and flexible management of the stored data is achieved.

[0022] In a second aspect, an embodiment of the present application provides a threat detection device, including: various functional modules for implementing the threat detection method described in the first aspect and any possible implementation manner of the first aspect.

[0023] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computer, the threat detection method described in the first aspect and any possible implementation of the first aspect is executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0025] Figure 1 A flowchart of a threat detection method provided in an embodiment of the present application;

[0026] Figure 2 A schematic diagram of the structure of a threat detection device provided in an embodiment of the present application.

[0027] Icon: 200 - threat detection device; 210 - acquisition module; 220 - processing module. DETAILED DESCRIPTION

[0028] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0029] The technical solution provided in the embodiments of the present application can be applied to various application scenarios that require threat detection, for example: an Internet security protection platform, performing threat detection on Internet data; another example: an enterprise security protection platform, performing threat detection on enterprise data, etc.

[0030] Based on various application scenarios, the hardware operating environment corresponding to the technical solution provided in the embodiments of the present application may be a platform for implementing threat detection, such as the aforementioned Internet security protection platform and enterprise security protection platform.

[0031] Among these platforms, some are in server form, some are in server + client form, and some are in server + browser form. Accordingly, the hardware operating environment used in the technical solution of the embodiment of the present application can be a server, a server + client, or a server + browser, which is not limited in the embodiment of the present application.

[0032] In the embodiment of the present application, the data type of the threat data detected may include: intrusion detection feature string, malicious URL and malicious IP address. Among them, the malicious URL may be a URL in a preset malicious URL library; the malicious IP address may be an IP address in a preset IP blacklist library.

[0033] Of course, in addition to the three data types mentioned above, other data types may also be used, which are not limited in the embodiments of the present application.

[0034] Based on the above application scenarios, please refer to Figure 1 , is a flowchart of a threat detection method provided in an embodiment of the present application, the threat detection method comprising:

[0035] Step 110: Obtain data to be detected.

[0036] Step 120: Determine the encrypted data corresponding to the data to be detected.

[0037] Step 130: Determine whether there is encrypted data matching the encrypted data corresponding to the to-be-detected data in the encrypted data stored in the preset cuckoo filter. The stored encrypted data is encrypted data corresponding to the preset threat data.

[0038] Step 140: If yes, determine that the data to be detected is threat data.

[0039] In the embodiment of the present application, compared with the prior art, a cuckoo filter is used to store encrypted data corresponding to threat data; when performing threat detection, the data to be detected is first converted into encrypted data, and then matched with the stored encrypted data to determine whether the data to be detected is threat data. On the one hand, the encrypted data corresponding to the threat data is stored by a cuckoo filter. Based on the characteristics of the cuckoo filter, flexible management of the encrypted data corresponding to the threat data can be achieved, such as adding, deleting, etc. On the other hand, when performing threat detection, feature matching is no longer used, but encrypted data matching is used, which can improve the efficiency of data matching, thereby improving the efficiency of threat detection; and, through data encryption, the risk of data leakage can also be avoided and the security of data can be improved.

[0040] Next, the detailed implementation of the threat detection method is introduced.

[0041] In step 110, the data to be detected may be data that may contain threats and is currently captured in real time by the security protection platform; or it may be data obtained from other platforms and needs to be judged whether there is a threat.

[0042] Combined with the introduction of the data types of threat data mentioned above, the data to be detected may be: feature strings, URLs and IP addresses, or other types of data.

[0043] After the data to be detected is obtained in step 110 , in step 120 , the encrypted data corresponding to the data to be detected is determined.

[0044] As an optional implementation, step 120 includes: performing hash calculation on the data to be detected to obtain corresponding encrypted data.

[0045] Since the data to be detected may be of different data types, as another optional implementation, step 120 includes: performing hash calculation on the data to be detected according to a hash algorithm corresponding to the data type of the data to be detected to obtain encrypted data corresponding to the data to be detected.

[0046] Among them, the hash algorithm corresponding to each data type can be reasonably selected in combination with the actual application scenario, and the specific hash algorithm is not limited in the embodiments of the present application.

[0047] The hash algorithms corresponding to different data types may be the same or different. As an optional implementation, the hash algorithms corresponding to the above three data types are all different.

[0048] After performing hash calculation based on the hash algorithm, the corresponding hash value can be obtained, and the hash value is the encrypted data corresponding to the data to be detected.

[0049] In the embodiment of the present application, the encrypted data corresponding to the data to be detected is effectively and quickly determined by using a hash algorithm corresponding to the data type of the data to be detected.

[0050] In some embodiments, in order to increase the complexity of data and improve the security of data, the hash calculation method can be flexibly changed, for example: calculating the hash value multiple times; selecting specific data to calculate the hash value, etc.

[0051] After the encrypted data corresponding to the data to be detected is determined in step 120, it is matched with the encrypted data stored in the preset cuckoo filter to determine whether there is matching encrypted data.

[0052] In the preset cuckoo filter, the stored encrypted data is the encrypted data corresponding to the preset threat data, where the preset threat data may be the aforementioned intrusion detection feature string, malicious URL, malicious IP address, and the like.

[0053] In order to facilitate understanding of the technical solution of the embodiment of the present application, the implementation method of data storage of the preset cuckoo filter is introduced below.

[0054] As an optional implementation, the storage process of encrypted data corresponding to threat data includes: obtaining the threat data to be processed; determining the encrypted data corresponding to the threat data to be processed; determining the storage location of the encrypted data in the cuckoo filter; and storing the encrypted data in the corresponding storage location.

[0055] In an embodiment of the present application, threat data is acquired, corresponding encrypted data is determined, and then a storage location is determined, thereby achieving effective and rapid storage of encrypted data corresponding to the threat data based on the storage location.

[0056] In this embodiment, the threat data to be processed is the preset threat data. The process of determining the encrypted data may include: performing a hash calculation on the threat data to be processed according to a hash algorithm corresponding to the data type of the threat data to be processed to obtain the encrypted data corresponding to the threat data to be processed.

[0057] It is understood that in order to match the encrypted data corresponding to the data to be detected with the encrypted data stored in the cuckoo filter, the hash algorithm used for data of the same data type should be consistent. For example: if the IP address in the data to be detected uses hash algorithm 1, then the IP address in the threat data to be processed also uses hash algorithm 1.

[0058] Furthermore, in the aforementioned embodiment, the hash algorithm corresponding to the data to be detected may refer to the hash algorithm corresponding to the threat data of the same data type in the cuckoo filter.

[0059] After the encrypted data corresponding to the threat data to be processed is determined, its storage location in the cuckoo filter is determined. As an optional implementation, the cuckoo filter includes: a first hash table and a second hash table.

[0060] Both the first hash table and the second hash table include multiple storage locations, and the address of each storage location is also represented by a hash value obtained by hash calculation. The encrypted data is also obtained based on the hash algorithm. Therefore, the corresponding storage location can be determined based on the encrypted data combined with the hash algorithm.

[0061] Furthermore, the storage location determination process may include: determining a first storage location of the encrypted data; the first storage location is a storage location in a first hash table; determining a second storage location of the encrypted data; the second storage location is a storage location in a second hash table; and determining a final storage location based on the first storage location and the second storage location.

[0062] In an embodiment of the present application, a first storage location and a second storage location of encrypted data are determined respectively, and based on the first storage location and the second storage location, an effective and rapid determination of a final storage location is achieved.

[0063] As an optional implementation, the process of determining the first storage location includes: using a new hash algorithm to perform hash calculation on the encrypted data, and the obtained hash value is the first storage location.

[0064] As an optional implementation, the process of determining the second storage location includes: performing XOR operation on the first storage location and the encrypted data, and the obtained XOR value is the second storage location. That is, the second storage location is the XOR value of the first storage location and the encrypted data.

[0065] In the embodiment of the present application, the second storage location is the XOR value of the first storage location and the encrypted data, so that the second storage location can be determined effectively and quickly.

[0066] After the first storage location and the second storage location are determined, the final storage location may be determined by combining the storage conditions of the two storage locations.

[0067] As an optional implementation, the process of determining the final storage location includes: if the first storage location and the second storage location are both empty locations, comparing the load sizes of the first hash table and the second hash table; if the load of the first hash table is greater than the load of the second hash table, determining that the final storage location is the second storage location; if the load of the first hash table is less than the load of the second hash table, determining that the final storage location is the first storage location.

[0068] In this embodiment, if both the first storage location and the second storage location are empty locations, that is, no data is stored in the first storage location and the second storage location, then the load sizes of the first hash table and the second hash table are compared. The load sizes of the first hash table and the second hash table can be determined by the amount of data currently stored. The more the amount of data currently stored, the greater the load, and the less the amount of data currently stored, the smaller the load.

[0069] Furthermore, if the load of the first hash table is greater than the load of the second hash table, it means that the first hash table currently stores more data, and the second storage position in the second hash table is used as the final storage position. If the load of the first hash table is less than the load of the second hash table, it means that the second hash table currently stores more data, and the first storage position in the first hash table is used as the final storage position.

[0070] If the load of the first hash table is equal to the load of the second hash table, any one of the first storage location and the second storage location is used as the final storage location.

[0071] In the embodiment of the present application, if the first storage location and the second storage location are both empty locations, the final storage location can be effectively and quickly determined by comparing the load sizes of the hash tables corresponding to the two storage locations.

[0072] As another optional implementation, if the first storage location is an empty location and the second storage location is not an empty location, the final storage location is determined to be the first storage location; if the first storage location is not an empty location and the second storage location is an empty location, the final storage location is determined to be the second storage location.

[0073] In an embodiment of the present application, if there is only one empty position between the first storage position and the second storage position, the empty position is determined as the final storage position, thereby achieving effective and rapid determination of the final storage position.

[0074] As another optional implementation, if neither the first storage location nor the second storage location is an empty location, the data stored in the first storage location or the second storage location is kicked out, and the storage location after the data is kicked out is determined to be the final storage location; the storage location of the kicked data is determined, and the kicked data is stored in the corresponding storage location.

[0075] In this implementation, since neither the first storage location nor the second storage location is an empty location, the storage of the data currently required to be stored is ensured first. Therefore, the data stored in the first storage location or the second storage location can be kicked out first, and then the storage location of the kicked out data is determined as the final storage location.

[0076] For the kicked data, it is also necessary to determine the storage location for it. The method for determining the storage location of the kicked data is the same as the method for determining the storage location of the encrypted data, and will not be repeated here.

[0077] In an embodiment of the present application, if neither the first storage location nor the second storage location is an empty location, the data stored in the first storage location or the second storage location is kicked out to ensure the determination of the final storage location; and the corresponding storage location is determined for the kicked out data to ensure the integrity of the data stored in the cuckoo filter; and flexible management of the stored data is achieved.

[0078] After the final storage location is determined, the encrypted data is stored in the corresponding storage location. For example, if the final storage location is the first storage location, the encrypted data is stored in the first storage location.

[0079] Furthermore, in step 130, the encrypted data corresponding to the data to be detected is matched one-to-one with the encrypted data stored in the cuckoo filter, and the one-to-one matching can be performed according to the order of the hash addresses of the hash table.

[0080] If the same encrypted data is matched, the same encrypted data is the matching encrypted data, that is, there is matching encrypted data. If the same encrypted data is not matched, then there is no matching encrypted data.

[0081] If there is matching encrypted data, it may indicate that the data to be detected is threat data; if there is no matching encrypted data, it may indicate that the data to be detected may not be threat data.

[0082] Therefore, in step 140 , if the above-mentioned determination result is yes, it is determined that the data to be detected is threat data.

[0083] After determining that the data to be detected is threat data, a corresponding detection result may be generated and fed back to the user so that the user can process the threat data.

[0084] Alternatively, after determining that the data to be detected is threat data, a processing method for the threat data is determined, and then the threat data is processed according to the processing method.

[0085] The processing method of the threat data may be preset. Specifically, the processing methods corresponding to different threat data may be preset. After the threat data is determined, it is compared with each preset threat data. After the corresponding preset threat data is determined, the processing method of the corresponding preset threat data is used as the processing method of the threat data.

[0086] In addition, if there is no matching encrypted data, it can only mean that according to the current detection method, it can be temporarily determined that the data to be detected is not threat data, but it cannot be guaranteed that it is not threat data. Therefore, in this case, other threat data judgment methods can be used to further judge the data to be detected to determine the final detection result.

[0087] For other judgment methods, mature and more accurate judgment methods in the art can be used, which will not be described in detail in the embodiments of this application.

[0088] Based on the same invention concept, please refer to Figure 2 In an embodiment of the present application, a threat detection device is also provided, including: an acquisition module 210 and a processing module 220.

[0089] The acquisition module 210 is used to: acquire the data to be detected. The processing module 220 is used to: determine the encrypted data corresponding to the data to be detected; determine whether there is matching encrypted data corresponding to the encrypted data of the data to be detected in the encrypted data stored by the preset cuckoo filter; the stored encrypted data is the encrypted data corresponding to the preset threat data; if so, determine that the data to be detected is threat data.

[0090] In the embodiment of the present application, the processing module 220 is specifically used to: perform hash calculation on the data to be detected according to the hash algorithm corresponding to the data type of the data to be detected, so as to obtain encrypted data corresponding to the data to be detected.

[0091] In an embodiment of the present application, the acquisition module 210 is also used to: acquire the threat data to be processed; the processing module 220 is also used to: determine the encrypted data corresponding to the threat data to be processed; determine the storage location of the encrypted data in the cuckoo filter; and store the encrypted data in the corresponding storage location.

[0092] In an embodiment of the present application, the processing module 220 is specifically used to: determine a first storage location of the encrypted data; the first storage location is a storage location in the first hash table; determine a second storage location of the encrypted data; the second storage location is a storage location in the second hash table; determine a final storage location based on the first storage location and the second storage location.

[0093] In the embodiment of the present application, the processing module 220 is specifically used to: if the first storage location and the second storage location are both empty locations, compare the load sizes of the first hash table and the second hash table; if the load of the first hash table is greater than the load of the second hash table, determine that the final storage location is the second storage location; if the load of the first hash table is less than the load of the second hash table, determine that the final storage location is the first storage location.

[0094] In an embodiment of the present application, the processing module 220 is also specifically used to: if the first storage location is an empty location and the second storage location is not an empty location, determine that the final storage location is the first storage location; if the first storage location is not an empty location and the second storage location is an empty location, determine that the final storage location is the second storage location.

[0095] In an embodiment of the present application, the processing module 220 is specifically used to: if neither the first storage location nor the second storage location is an empty location, kick out the data stored in the first storage location or the second storage location, and determine the storage location after the kicked-out data as the final storage location; determine the storage location of the kicked-out data, and store the kicked-out data in the corresponding storage location.

[0096] The threat detection device 200 corresponds to the threat detection method in the aforementioned embodiment, and each functional module corresponds to each step one by one. Therefore, the implementation method of each functional module refers to the implementation method of the aforementioned threat detection method and will not be repeated here.

[0097] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a computer, the threat detection method described in the foregoing embodiment is executed.

[0098] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0099] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0100] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0101] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

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

Claims

1. A threat detection method, characterized in that: include: Obtain the data to be tested; Determine the encrypted data corresponding to the data to be detected; Determine whether there is matching encrypted data corresponding to the encrypted data to be detected in the encrypted data stored in the preset cuckoo filter; The stored encrypted data is encrypted data corresponding to the preset threat data; If so, determining that the data to be detected is threat data; The cuckoo filter includes: a first hash table and a second hash table, and determining the storage location of the encrypted data in the cuckoo filter includes: Performing a hash calculation on the encrypted data, and determining a first storage location of the encrypted data in the first hash table according to the hash value obtained by the calculation, wherein the first storage location is the hash value obtained by the calculation; Performing an XOR operation on the first storage location and the encrypted data, and determining a second storage location of the encrypted data in the second hash table according to the obtained XOR value; determining a final storage location according to the first storage location and the second storage location; Wherein, determining the final storage location according to the first storage location and the second storage location includes: If both the first storage location and the second storage location are empty locations, comparing the load sizes of the first hash table and the second hash table; If the load of the first hash table is greater than the load of the second hash table, determining the final storage location to be the second storage location; If the load of the first hash table is less than the load of the second hash table, the final storage location is determined to be the first storage location.

2. The threat detection method according to claim 1, characterized in that: The step of determining the encrypted data corresponding to the data to be detected includes: The data to be detected is hashed according to a hash algorithm corresponding to the data type of the data to be detected to obtain encrypted data corresponding to the data to be detected.

3. The threat detection method according to claim 1, characterized in that: The threat detection method further includes: Obtain threat data to be processed; Determining encrypted data corresponding to the threat data to be processed; Determining a storage location of the encrypted data in a cuckoo filter; The encrypted data is stored in a corresponding storage location.

4. The threat detection method according to claim 1, characterized in that: The second storage location is an exclusive OR value of the first storage location and the encrypted data.

5. The threat detection method according to claim 1, characterized in that: The threat detection method further includes: If the first storage location is an empty location and the second storage location is not an empty location, determining the final storage location to be the first storage location; If the first storage location is not an empty location and the second storage location is an empty location, the final storage location is determined to be the second storage location.

6. The threat detection method according to claim 1, characterized in that: The threat detection method further includes: If both the first storage location and the second storage location are not empty locations, the data stored in the first storage location or the second storage location is kicked out, and the storage location after the data is kicked out is determined as the final storage location; Determine the storage location of the kicked data, and store the kicked data in the corresponding storage location.

7. A threat detection device, characterized in that: include: An acquisition module is used to acquire the data to be detected; Processing modules for: Determining the encrypted data corresponding to the data to be detected; Determine whether there is matching encrypted data corresponding to the encrypted data to be detected in the encrypted data stored in the preset cuckoo filter; The stored encrypted data is encrypted data corresponding to the preset threat data; If so, determining that the data to be detected is threat data; The cuckoo filter includes: a first hash table and a second hash table, and determining the storage location of the encrypted data in the cuckoo filter includes: Performing a hash calculation on the encrypted data, and determining a first storage location of the encrypted data in the first hash table according to the hash value obtained by the calculation, wherein the first storage location is the hash value obtained by the calculation; Performing an XOR operation on the first storage location and the encrypted data, and determining a second storage location of the encrypted data in the second hash table according to the obtained XOR value; determining a final storage location according to the first storage location and the second storage location; Wherein, determining the final storage location according to the first storage location and the second storage location includes: If both the first storage location and the second storage location are empty locations, comparing the load sizes of the first hash table and the second hash table; If the load of the first hash table is greater than the load of the second hash table, determining the final storage location to be the second storage location; If the load of the first hash table is less than the load of the second hash table, the final storage location is determined to be the first storage location.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the threat detection method according to any one of claims 1 to 6 is executed.