Threat detection model generation method and device

By encapsulating data acquisition, processing and output instructions into operators and combining them to generate threat detection models, the problems of manpower consumption and low efficiency caused by frequent compilation in the prior art are solved, and efficient model generation and update are achieved.

CN119071005APending Publication Date: 2024-12-03QI AN XIN TECHNOLOGY GROUP INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310644904.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-01
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The existing threat detection model needs to be generated frequently, resulting in high labor consumption and recompilation when the scenario or requirements change, affecting efficiency.

Method used

The data acquisition instructions, data processing instructions and data output instructions are encapsulated into different operators, and a threat detection model is generated according to the threat detection process, which supports dynamic adjustment and update of the model through the preset interactive interface.

Benefits of technology

It reduces the compilation process required due to changes in scenarios or requirements, improves the generation efficiency and update efficiency of threat detection models, avoids manpower consumption, and realizes modular detection model construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071005A_ABST
    Figure CN119071005A_ABST
Patent Text Reader

Abstract

The invention discloses a threat detection model generation method and device, and relates to the technical field of security. The method comprises the following steps: packaging a data acquisition instruction into different data acquisition operators according to a data source; packaging the data processing instruction into different data processing operators according to a processing mode; packaging the data output instruction into different data output operators according to output targets; and combining the data acquisition operator, the data processing operator, the data output operator and the threat detection operator according to a threat detection process to obtain a threat detection model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of security technology, and in particular to a method and device for generating a threat detection model. Background Art

[0002] With the continuous development of technology, people are gradually paying attention to the detection of network threats. In the process of threat detection, it is generally necessary to use threat detection models for detection. Since different threat detection models have specific application scenarios or meet different needs of users, in this case, it is necessary to compile corresponding detection codes based on different scenarios and needs to realize the generation of threat detection models.

[0003] At present, the generation process of threat detection models is generally based on different business scenarios and user detection requirements to compile codes, so as to obtain threat detection models corresponding to business scenarios or user detection requirements. However, in actual applications, in the generation process of existing threat detection models, each time the business scenario or user detection requirements are different, the detection code needs to be recompiled, which results in a large amount of manpower required to compile the code during the generation process of the threat detection model, resulting in a problem of high manpower consumption. Summary of the invention

[0004] The embodiments of the present application provide a method and device for generating a threat detection model, the main purpose of which is to implement a method for generating a threat detection model to solve the problem that the existing method for generating security threat detection models consumes a lot of manpower.

[0005] In order to solve the above technical problems, the embodiments of the present application provide the following technical solutions:

[0006] In a first aspect, the present application provides a method for generating a threat detection model, the method comprising:

[0007] Encapsulate data acquisition instructions into different data acquisition operators according to data sources;

[0008] Encapsulate data processing instructions into different data processing operators according to the processing methods;

[0009] Encapsulate data output instructions into different data output operators according to output targets;

[0010] The data acquisition operator, the data processing operator, the data output operator and the threat detection operator are combined according to the threat detection process to obtain a threat detection model.

[0011] Optionally, encapsulating the data acquisition instruction into different data acquisition operators according to the data source includes:

[0012] Determining the corresponding data source based on a threat source, wherein the threat source includes at least one of a message queue, a message queue topic, a search engine, and a database;

[0013] Encapsulating the data acquisition instructions corresponding to each of the data sources into a data acquisition operator corresponding to the data source, wherein the data acquisition operator includes at least one of a message queue acquisition operator, a message queue topic acquisition operator, a search engine acquisition operator, and a database acquisition operator;

[0014] The message queue acquisition operator is used to acquire data from multiple message queues according to message queue identifiers;

[0015] The message queue topic acquisition operator is used to acquire data in the message queue according to the message queue topic;

[0016] The search engine acquisition operator is used to acquire data from multiple search engines according to search engine identifiers;

[0017] The database acquisition operator is used to acquire data from multiple databases according to database identifiers.

[0018] Optionally, encapsulating the data processing instructions into different data processing operators according to the processing methods includes:

[0019] Determine different processing methods for the data processing instructions according to business scenarios;

[0020] Based on the processing method, the plurality of data processing instructions are divided to obtain data processing instructions corresponding to different processing methods, and the data processing instructions are encapsulated into data processing operators corresponding to the processing methods.

[0021] Optionally, the processing method includes at least one of noise reduction processing, merging processing and enrichment processing;

[0022] The dividing the plurality of data processing instructions based on the processing mode to obtain data processing instructions corresponding to different processing modes, and encapsulating the data processing instructions into data processing operators corresponding to the processing modes, includes at least one of the following:

[0023] Obtaining a data processing instruction for performing noise reduction processing from the multiple data processing instructions, and encapsulating the data processing instruction for performing noise reduction processing into a noise reduction data processing operator, wherein the noise reduction data processing operator is used to clear empty data, data with missing key fields, and data with abnormal formats;

[0024] Acquire a data processing instruction for performing merge processing from the multiple data processing instructions, and encapsulate the data processing instruction for performing merge processing into a merge type data processing operator, wherein the merge type data processing operator is used to merge multiple data into one piece of data according to a target field or a target period;

[0025] A data processing instruction for performing enrichment processing is obtained from the multiple data processing instructions, and the data processing instruction for performing enrichment processing is encapsulated into an enrichment-type data processing operator, wherein the enrichment-type data processing operator is used to complete or correct missing content in the data.

[0026] Optionally, the processing method further includes format processing and field specification processing;

[0027] The dividing the plurality of data processing instructions based on the processing mode to obtain data processing instructions corresponding to different processing modes, and encapsulating the data processing instructions into data processing operators corresponding to the processing modes, includes at least one of the following:

[0028] Acquire a data processing instruction for performing format processing from the multiple data processing instructions, and encapsulate the data processing instruction for performing format processing into a format-type data processing operator, wherein the format-type data processing operator is used to convert the content of each data into a target format;

[0029] A data processing instruction for performing field specification processing is obtained from the multiple data processing instructions, and the data processing instruction for performing field specification processing is encapsulated into a field specification type data processing operator, wherein the field specification type data processing operator is used to convert fields with the same meaning and different identifiers in multiple data into the same field identifier.

[0030] Optionally, encapsulating the data output instruction into different data output operators according to the output target includes:

[0031] The data output instructions are divided according to different output targets, and the data output instructions corresponding to the different output targets are obtained and encapsulated to obtain data output operators corresponding to the different output targets, wherein the output target includes at least one of a message queue, a message queue topic, a search engine, and a database.

[0032] Optionally, after combining the data acquisition operator, the data processing operator, the data output operator, and the threat detection operator according to the threat detection process to obtain the threat detection model, the method further includes:

[0033] Model information is generated based on the threat detection model and output through a preset interactive interface, wherein the model information is used to display the threat detection model in a manner of combining operator modules according to the threat detection process, and the operator modules are modular graphs of the data acquisition operator, the data processing operator, the data output operator, and the threat detection operator.

[0034] Optionally, after generating model information based on the threat detection model and outputting it through a preset interactive interface, the method further includes:

[0035] After the drag instruction is collected through the preset interactive interface, the instruction type is determined based on the drag instruction, and the instruction type includes at least one of adding an operator, deleting an operator, and modifying an operator;

[0036] When it is determined that the instruction type of the drag instruction is the newly added operator, obtaining the first operator newly added in the model information, and determining the logical relationship between the first operator and other operators in the model information based on the position of the first operator in the preset interactive interface and the layout of the model information in the preset interactive interface, to obtain the updated first model;

[0037] When it is determined that the instruction type of the drag instruction is the deletion operator, a deleted second operator is determined, and the second operator is deleted in the logical relationship between the multiple operators in the threat model, and the logical relationship between the remaining operators is determined to obtain an updated second model;

[0038] When it is determined that the instruction type of the drag instruction is the modification operator, a third operator of the operator to be replaced is determined based on the drag instruction, and the operator to be replaced is replaced with the third operator in the logical relationship of the threat model to obtain an updated third model.

[0039] In a second aspect, the present application also provides a device for generating a threat detection model, the device comprising:

[0040] A first encapsulation unit, used to encapsulate the data acquisition instruction into different data acquisition operators according to the data source;

[0041] A second encapsulation unit, used for encapsulating the data processing instructions into different data processing operators according to the processing methods;

[0042] A third encapsulation unit is used to encapsulate the data output instruction into different data output operators according to the output target;

[0043] A generating unit is used to combine the data acquisition operator, the data processing operator, the data output operator and the threat detection operator according to the threat detection process to obtain a threat detection model.

[0044] Optionally, the first packaging unit includes:

[0045] A determination module, configured to determine the corresponding data source based on a threat source, wherein the threat source includes at least one of a message queue, a message queue topic, a search engine, and a database;

[0046] An encapsulation module, used for encapsulating the data acquisition instructions corresponding to each of the data sources into a data acquisition operator corresponding to the data source, wherein the data acquisition operator includes at least one of a message queue acquisition operator, a message queue topic acquisition operator, a search engine acquisition operator, and a database acquisition operator;

[0047] The message queue acquisition operator is used to acquire data from multiple message queues according to message queue identifiers;

[0048] The message queue topic acquisition operator is used to acquire data in the message queue according to the message queue topic;

[0049] The search engine acquisition operator is used to acquire data from multiple search engines according to search engine identifiers;

[0050] The database acquisition operator is used to acquire data from multiple databases according to database identifiers.

[0051] Optionally, the second packaging unit includes:

[0052] A determination module, used to determine different processing methods for the data processing instructions according to business scenarios;

[0053] The encapsulation module is used to divide the multiple data processing instructions based on the processing method to obtain data processing instructions corresponding to different processing methods, and encapsulate the data processing instructions into data processing operators corresponding to the processing method.

[0054] Optionally, the processing method includes at least one of noise reduction processing, merging processing and enrichment processing;

[0055] The packaging module comprises:

[0056] A first encapsulation submodule is used to obtain a data processing instruction for performing noise reduction processing from the multiple data processing instructions, and encapsulate the data processing instruction for performing noise reduction processing into a noise reduction data processing operator, wherein the noise reduction data processing operator is used to clear empty data, data with missing key fields, and data with abnormal formats;

[0057] a second encapsulation submodule, configured to obtain a data processing instruction for performing a merge process from the plurality of data processing instructions, and encapsulate the data processing instruction for performing the merge process into a merge type data processing operator, wherein the merge type data processing operator is configured to merge the plurality of data into one piece of data according to a target field or a target cycle;

[0058] The third encapsulation submodule is used to obtain data processing instructions for performing enrichment processing from the multiple data processing instructions, and encapsulate the data processing instructions for performing enrichment processing into enriched data processing operators, wherein the enriched data processing operators are used to complete or correct missing content in the data.

[0059] Optionally, the processing method further includes format processing and field specification processing;

[0060] The packaging module further includes:

[0061] a fourth encapsulation submodule, configured to obtain a data processing instruction for performing format processing from the plurality of data processing instructions, and encapsulate the data processing instruction for performing format processing into a format-type data processing operator, wherein the format-type data processing operator is configured to convert the content of each data into a target format;

[0062] The fifth encapsulation submodule is used to obtain data processing instructions for performing field specification processing from the multiple data processing instructions, and encapsulate the data processing instructions for performing field specification processing into field specification type data processing operators, wherein the field specification type data processing operators are used to convert fields with the same meaning and different identifiers in multiple data into the same field identifier.

[0063] Optionally, the third encapsulation unit is specifically used to divide multiple data output instructions according to different output targets, obtain data output instructions corresponding to different output targets and encapsulate them, and obtain data output operators corresponding to different output targets, wherein the output target includes at least one of a message queue, a message queue topic, a search engine, and a database.

[0064] Optionally, the device further comprises:

[0065] A display unit is used to generate model information based on the threat detection model and output it through a preset interactive interface, wherein the model information is used to display the threat detection model in a manner of combining operator modules according to the threat detection process, and the operator modules are modular graphics of the data acquisition operator, the data processing operator, the data output operator, and the threat detection operator.

[0066] Optionally, the device further comprises:

[0067] An instruction determination unit, configured to determine an instruction type based on a drag instruction after the drag instruction is collected through the preset interactive interface, wherein the instruction type includes at least one of adding an operator, deleting an operator, and modifying an operator;

[0068] a first modifying unit, configured to, when determining that the instruction type of the drag instruction is the newly added operator, obtain the first operator newly added in the model information, and determine the logical relationship between the first operator and other operators in the model information based on the position of the first operator in the preset interactive interface and the layout of the model information in the preset interactive interface, so as to obtain an updated first model;

[0069] a second modifying unit, configured to, when determining that the instruction type of the drag instruction is the deletion operator, determine the second operator to be deleted, delete the second operator in the logical relationship between the plurality of operators in the threat model, and determine the logical relationship between the remaining operators to obtain an updated second model;

[0070] The third modification unit is used to determine a third operator of the operator to be replaced based on the drag instruction when it is determined that the instruction type of the drag instruction is the modification operator, and replace the operator to be replaced with the third operator in the logical relationship of the threat model to obtain an updated third model.

[0071] In a third aspect, an embodiment of the present application provides a threat detection method based on a threat detection model, wherein the threat detection model is obtained based on the method for generating the threat detection model according to the first aspect, and the threat detection model includes a data acquisition operator, a data processing operator, a data output operator, and a threat detection operator, wherein the method includes:

[0072] Acquiring the data to be detected from the data source through the data acquisition operator;

[0073] Processing the data to be detected by the data processing operator to obtain processed data;

[0074] Performing threat detection on the processed data by using the threat detection operator to obtain a detection result;

[0075] The detection result is output through the data output operator.

[0076] In a fourth aspect, an embodiment of the present application provides a storage medium, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the method for generating a threat detection model of a terminal device described in the first aspect.

[0077] In a fifth aspect, an embodiment of the present application provides a device for generating a threat detection model, the device comprising a storage medium; and one or more processors, the storage medium being coupled to the processor, the processor being configured to execute program instructions stored in the storage medium; when the program instructions are executed, the method for generating a threat detection model for a terminal device described in the first aspect is executed.

[0078] By means of the above technical solution, the technical solution provided by this application has at least the following advantages:

[0079] The present application provides a method and device for generating a threat detection model. The present application can first encapsulate data acquisition instructions into different data acquisition operators according to data sources; then, encapsulate data processing instructions into different data processing operators according to processing methods; thereafter, encapsulate data output instructions into different data output operators according to output targets; finally, the data acquisition operator, the data processing operator, the data output operator and the threat detection operator are combined according to the threat detection process to obtain a threat detection model, thereby realizing the generation function of the threat detection model. Compared with the prior art, since the present application no longer compiles the model code separately for different scenarios in the process of generating the threat detection model, but encapsulates the instructions of different stages into corresponding operators based on different instructions in the three stages of acquisition, processing, and output, and then selects the corresponding operators based on the threat detection process to combine them to obtain the threat detection model, this realizes the function of building the detection model in an operator "modular" way, that is, as long as the operators corresponding to different stages are pre-encapsulated for each different scenario, the model can be generated in the process of generating the threat detection model by combining the required operators, thereby avoiding the need for additional instruction code compilation process each time the scenario is different or the requirements are different, thereby effectively solving the human cost caused by the process of recompiling the model code when the scenario, requirements, etc. of the threat detection model in the prior art. At the same time, since each operator in the threat detection model can be encapsulated based on different stages, when a certain detection scenario changes, there is no need to compile the code again, but to replace the operator, which can also improve the update efficiency of the threat detection model.

[0080] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0082] Figure 1 A flow chart of a method for generating a threat detection model provided in an embodiment of the present application is shown;

[0083] Figure 2 A flow chart of another method for generating a threat detection model provided in an embodiment of the present application is shown;

[0084] Figure 2-A A schematic diagram of a threat detection model during the implementation of another method for generating a threat detection model provided in an embodiment of the present application is shown;

[0085] Figure 3 A block diagram of a device for generating a threat detection model provided in an embodiment of the present application is shown;

[0086] Figure 4 A block diagram of another device for generating a threat detection model provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0087] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0088] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.

[0089] The present application provides a method for generating a threat detection model, specifically: Figure 1 As shown, the method includes:

[0090] 101. Encapsulate the data acquisition instructions into different data acquisition operators according to the data source.

[0091] In the embodiment of the present application, the data source, as the name implies, is the source of data in the detection process. Since different threats appear or are identified from different sources during the threat detection process, in this case, in the process of acquiring data from different sources, different data acquisition instructions are actually required, wherein the data acquisition instruction may be a functional function or a service instruction. That is to say, for different data sources, the data acquisition function will have different functions or services to be implemented in the implementation process, and the codes based on these functional functions or service instructions are different. In this embodiment, based on the difference in data sources, different data acquisition functions or services can be encapsulated in the form of data acquisition instructions to obtain a data acquisition operator. The data acquisition operator can be understood as a "tool" with the function of acquiring data from a certain data source. In this way, in the subsequent use, as long as the data source is determined, the data acquisition operator corresponding to the current data source can be selected from multiple encapsulated data acquisition operators based on the difference in data sources.

[0092] 102. Encapsulate the data processing instructions into different data processing operators according to the processing methods.

[0093] Based on the above description of the data acquisition operator, it can be seen that since the data needs to be acquired based on functional functions or service instructions, the processing after data acquisition also needs to be carried out in this way. Therefore, in this process, the data processing instructions need to be encapsulated into corresponding data processing operators. In this process, based on different data processing requirements, data is processed in different ways. Each processing method has corresponding functional functions and service instructions. Therefore, in this process, different data processing instructions need to be encapsulated according to each different processing method.

[0094] 103. Encapsulate the data output instructions into different data output operators according to the output targets.

[0095] As described in the above steps, in the process of threat detection, the function of outputting the detection results is actually required. If the target to which the user needs to output the result is different, the data output instruction can be encapsulated in the manner of the output target. For example, when the output target is a database, it is necessary to select a function function or service instruction that can output data to the database as the data output instruction, and encapsulate the data output instruction. Then, the data output operator obtained is an operator with the function of outputting data to the database. Specifically, the type of the output target is not limited here, and it can be selected based on actual user needs.

[0096] 104. The data acquisition operator, the data processing operator, the data output operator, and the threat detection operator are combined according to the threat detection process to obtain a threat detection model.

[0097] After the data acquisition operator, data processing operator and data output operator are determined, it is actually determined that all functions from data acquisition to data processing and then to data output are complete. Then they can be combined with the set threat detection operator to obtain a threat detection model. Of course, the threat detection model needs to be combined according to the threat detection process. This ensures that the generated threat detection model selects different operators in a certain order when executing the threat detection, thereby ensuring that the threat detection model detection process complies with the threat detection process, thereby ensuring the accuracy of the threat detection model.

[0098] The present application provides a method for generating a threat detection model. In an embodiment of the present application, data acquisition instructions can be first encapsulated into different data acquisition operators according to the data source; then, data processing instructions can be encapsulated into different data processing operators according to the processing method; thereafter, data output instructions can be encapsulated into different data output operators according to the output target; finally, the data acquisition operator, the data processing operator, the data output operator and the threat detection operator are combined according to the threat detection process to obtain a threat detection model, thereby realizing the generation function of the threat detection model. Compared with the prior art, since the present application no longer compiles the model code separately for different scenarios in the process of generating the threat detection model, but encapsulates the instructions of different stages into corresponding operators based on different instructions in the three stages of acquisition, processing, and output, and then selects the corresponding operators based on the threat detection process to combine them to obtain the threat detection model, this realizes the function of building the detection model in an operator "modular" way, that is, as long as the operators corresponding to different stages are pre-encapsulated for each different scenario, the model can be generated in the process of generating the threat detection model by combining the required operators, thereby avoiding the need for additional instruction code compilation process each time the scenario is different or the requirements are different, thereby effectively solving the human cost caused by the process of recompiling the model code when the scenario, requirements, etc. of the threat detection model in the prior art. At the same time, since each operator in the threat detection model can be encapsulated based on different stages, when a certain detection scenario changes, there is no need to compile the code again, but to replace the operator, which can also improve the update efficiency of the threat detection model.

[0099] To explain in more detail below, the present application embodiment provides another method for generating a threat detection model, as follows: Figure 2 As shown, the method includes:

[0100] 201. Encapsulate the data acquisition instructions into different data acquisition operators according to the data source.

[0101] Specifically, in this step, the data acquisition instruction is encapsulated into different data acquisition operators according to the data source, which may include:

[0102] Determining the corresponding data source based on a threat source, wherein the threat source includes at least one of a message queue, a message queue topic, a search engine, and a database;

[0103] Encapsulating the data acquisition instructions corresponding to each of the data sources into a data acquisition operator corresponding to the data source, wherein the data acquisition operator includes at least one of a message queue acquisition operator, a message queue topic acquisition operator, a search engine acquisition operator, and a database acquisition operator;

[0104] The message queue acquisition operator is used to acquire data from multiple message queues according to message queue identifiers;

[0105] The message queue topic acquisition operator is used to acquire data in the message queue according to the message queue topic;

[0106] The search engine acquisition operator is used to acquire data from multiple search engines according to search engine identifiers;

[0107] The database acquisition operator is used to acquire data from multiple databases according to database identifiers.

[0108] In this embodiment, each data source is actually determined based on the threat source. In this process, the threat source can be the following:

[0109] 1. Message queue, such as Kafka queue;

[0110] 2. Message queue topics, for example, different topics (topic information) in the Kafka queue;

[0111] 3. Search engines, for example, Elasticsearch engine;

[0112] 4. Database, for example, relational database Postgres.

[0113] Since the data sources determined by different threat sources have different program instructions in the data acquisition process, for example, the data acquisition instructions for executing the acquisition behavior from the Kafka queue are different from the data acquisition instructions for executing the acquisition behavior from the relational database Postgres. Therefore, in this step, it is necessary to select the corresponding data acquisition instructions for different specific threat sources for encapsulation, so as to ensure that the obtained data acquisition operators are operators for different threat sources. These include message queue acquisition operators specifically for message queues as the threat source; message queue acquisition operators specifically for each topic in the message queue; search engine acquisition operators specifically for search engines as the threat source; and database acquisition operators specifically for databases as the threat source.

[0114] 202. Encapsulate the data processing instructions into different data processing operators according to the processing methods.

[0115] Specifically, in this step, encapsulating the data processing instructions into different data processing operators according to the processing methods may include:

[0116] Determine different processing methods for the data processing instructions according to business scenarios;

[0117] Based on the processing method, the plurality of data processing instructions are divided to obtain data processing instructions corresponding to different processing methods, and the data processing instructions are encapsulated into data processing operators corresponding to the processing methods.

[0118] In this embodiment, since the data processing process needs to be carried out based on different processing methods, and the difference in processing methods is mainly determined based on business scenarios, in this process, the way in which different data processing instructions actually process data, that is, the processing method, can be determined based on the business scenario, and then these data processing instructions are divided according to the processing method. Each group obtained after the division is a data processing instruction for a certain data processing method. Next, the data processing instructions of this group can be encapsulated to obtain the data processing operator corresponding to this data processing method. The data quantity operator has a complete function specifically for the data processing required by a certain business scenario, so that each data processing function can be encapsulated into a "module" in the form of an operator, and can be directly selected based on the needs of the user in the subsequent use process.

[0119] Further, the processing method includes at least one of noise reduction processing, merging processing and enrichment processing;

[0120] Based on this, the data processing instructions are divided based on the processing mode to obtain data processing instructions corresponding to different processing modes, and the data processing instructions are encapsulated into data processing operators corresponding to the processing modes, which are respectively executed according to the above-mentioned processing modes during execution, including:

[0121] On the one hand, data processing instructions for performing noise reduction processing are obtained from the multiple data processing instructions, and the data processing instructions for performing noise reduction processing are encapsulated into noise reduction data processing operators, wherein the noise reduction data processing operators are used to clear empty data, data with missing key fields, and data with abnormal formats.

[0122] In this way, when it is determined that the processing method is noise reduction processing, the instructions that are also noise reduction processing can be screened out from the numerous data processing instructions according to the function based on this processing method. In this way, it is ensured that in the process of subsequent encapsulation into the corresponding operator, instructions with other functions are avoided from being encapsulated in such operators, and the accuracy of the encapsulation of the noise reduction type data processing operator is determined. Of course, in this embodiment, the noise reduction processing can be understood as after obtaining the data from the data source, the data itself has some empty data, data with missing key fields, or data with abnormal format. Then such data is likely to have abnormal data in the process of data transmission and storage. If such data is directly detected by the subsequent threat detection operator, it is likely to cause subsequent operation errors and other problems. At the same time, such data is meaningless for threat detection, such as empty data with only data identification but no data content. Therefore, by encapsulating the instructions with such noise reduction processing function to obtain the noise reduction type data processing operator, it can be ensured that the detection model produced subsequently has the function of filtering and denoising unnecessary data.

[0123] On the other hand, a data processing instruction for performing merge processing is obtained from the multiple data processing instructions, and the data processing instruction for performing merge processing is encapsulated into a merge-type data processing operator, wherein the merge-type data processing operator is used to merge multiple data into one piece of data according to a target field or a target cycle.

[0124] Since in actual applications, many of the data obtained by the data source may have the same characteristics, there is no need to identify these data one by one during the subsequent threat detection process. Instead, these data can be merged into one piece of data, which can reduce the pressure on the threat detection model. For example, suppose the current customer conducts a security exercise, such as red-blue confrontation. In this process, a large amount of weak password data will be generated, but it actually belongs to a category of data, and analysts actually focus on the number of attacks. In this case, these data can be merged according to certain rules, such as merging by source IP, destination IP and alarm name. If the same weak password attack is received 100 times in one day, 100 pieces of the same weak password attack data will be obtained. After this type of data is merged, only one piece of data "attribute field-number of attacks is recorded as 100" will be output. Of course, in this embodiment, the purpose of merging such data instructions is to encapsulate the data processing instructions with merge processing into operators with merge functions, that is, merge-type data processing operators. If you want to merge the same type of data obtained in the threat detection process later, you can do it based on the merge-type data processing operator, thereby avoiding the data recognition pressure caused by analyzing the same data in the subsequent detection process.

[0125] On the other hand, a data processing instruction for performing enrichment processing is obtained from the multiple data processing instructions, and the data processing instruction for performing enrichment processing is encapsulated into an enrichment-type data processing operator, wherein the enrichment-type data processing operator is used to complete or correct the missing content in the data. In this step, since some data may have some missing or erroneous content after being obtained, it is necessary to complete and correct these data in this process. Therefore, for this type of data processing method, it is necessary to encapsulate the corresponding instructions to obtain the corresponding enrichment-type data processing operator.

[0126] In this embodiment, corresponding data processing instructions are selected for the above three data processing methods for division and encapsulation, and noise reduction data processing operators, merging data processing operators and enrichment data processing operators are obtained respectively, thereby ensuring the generation of special operators for noise reduction processing, merging processing and enrichment processing, laying a foundation for selecting corresponding operators for processing the above scenarios and needs in the subsequent generation of threat detection models.

[0127] Furthermore, after the data is acquired, there may be differences between the various data, or there may be different representation forms between the fields included. Based on this, in the process of data processing, the processing method also includes format processing and field specification processing;

[0128] Based on this, the data processing instructions are divided based on the processing mode to obtain data processing instructions corresponding to different processing modes, and the data processing instructions are encapsulated into data processing operators corresponding to the processing mode, including at least one of the following:

[0129] On the one hand, a data processing instruction for performing format processing is obtained from the multiple data processing instructions, and the data processing instruction for performing format processing is encapsulated into a format-type data processing operator, wherein the format-type data processing operator is used to convert the content of each data into a target format;

[0130] On the other hand, data processing instructions for performing field specification processing are obtained from the multiple data processing instructions, and the data processing instructions for performing field specification processing are encapsulated into field specification type data processing operators, wherein the field specification type data processing operators are used to convert fields with the same meaning and different identifiers in multiple data into the same field identifier.

[0131] Since the data processing process also includes the need to format the data content as a whole and to normalize the fields, in this process, it is necessary to encapsulate the data processing instructions that can convert the data into a certain format as required to obtain a data processing operator. The data processing operator can convert the data content of the data obtained by other operators into the target format when the user needs it, thereby realizing the conversion of the data content format of the data. In some cases, multiple data may be obtained from different data sources, and the fields with the same meaning contained in each data may have differences in name identification. In order to facilitate unified analysis in the subsequent processing process, in this embodiment, the data processing instructions that can convert fields with the same meaning and different identifications into the same field identification can be encapsulated into field specification type data processing operators.

[0132] 203. Encapsulate the data output instructions into different data output operators according to the output targets.

[0133] Specifically, in this step, the data output instruction is encapsulated into different data output operators according to the output target, including:

[0134] The data output instructions are divided according to different output targets, and the data output instructions corresponding to the different output targets are obtained and encapsulated to obtain data output operators corresponding to the different output targets, wherein the output target includes at least one of a message queue, a message queue topic, a search engine, and a database.

[0135] Since the final result of the detection needs to be output after the data is processed and detected using operators according to certain rules, it is necessary to divide these data output instructions with output functions based on different output targets in this process. In this embodiment, the output targets include message queues, message queue topics, search engines, and databases. Of course, these output targets in this step are the same as the threat sources of the aforementioned data acquisition operators, that is, users can determine the corresponding output targets according to the detection results based on their own needs, and different output targets actually correspond to different instructions. Therefore, in this step, it is also necessary to divide and encapsulate these data output instructions according to the different output targets to obtain the corresponding data output operators.

[0136] 204. Combine the data acquisition operator, the data processing operator, the data output operator, and the threat detection operator according to the threat detection process to obtain a threat detection model.

[0137] After the aforementioned steps have respectively encapsulated the data acquisition operator, the data processing operator and the data output operator, the required operators can be acquired and combined in this step. Of course, since the purpose of this embodiment is to realize the generation of a threat detection model, the threat detection operator also needs to be acquired during the generation process, and these operators are combined based on the overall process and sequence of threat detection. That is to say, the data acquisition operator, the data processing operator, the data output operator and the threat detection operator are combined according to the threat detection process, so as to obtain a threat detection model including the stages of data acquisition, data processing, data threat detection, and detection result output.

[0138] 205. Generate model information based on the threat detection model and output it through a preset interactive interface.

[0139] Among them, the model information is used to display the threat detection model in a manner of combining operator modules according to the threat detection process, and the operator module is a modular graph of the data acquisition operator, the data processing operator, the data output operator and the threat detection operator.

[0140] In this embodiment, after the threat detection model is produced, the user may actually need to display the model. In this step, the threat detection model can be output based on a preset interactive interface. Of course, the display is actually performed through model information. The model information can be understood as a kind of information that arranges multiple operators in a "module" form in the order of the threat detection process. Figure 2-AAs shown, in the threat detection model, the data acquisition operator, i.e., operator A, the data output operator, i.e., operator E, and the threat detection operator, i.e., operator X, are determined based on the needs of the user. In the case where only noise reduction and merging processing are required during the data processing, only the corresponding operators B and C are required. In this way, the threat detection model obtained actually starts with operator A for data acquisition, then operator B for noise reduction processing, operator C for merging processing, and then the processed data is transmitted to operator X for threat detection. The obtained detection results can be transmitted to operator E for output. In this process, operators A to X are all displayed in a "module" manner, so that users can easily analyze the threat detection process.

[0141] Furthermore, in the process of display, the process of modifying and adjusting the model may also be involved. Then, after the model information is generated based on the threat detection model in the aforementioned step 205 and outputted through a preset interactive interface, the threat detection model may also be modified based on instructions issued by the user through the preset interactive interface. Based on this, the method may further include:

[0142] After the drag instruction is collected through the preset interactive interface, the instruction type is determined based on the drag instruction, and the instruction type includes at least one of adding an operator, deleting an operator, and modifying an operator;

[0143] When it is determined that the instruction type of the drag instruction is the newly added operator, obtaining the first operator newly added in the model information, and determining the logical relationship between the first operator and other operators in the model information based on the position of the first operator in the preset interactive interface and the layout of the model information in the preset interactive interface, to obtain the updated first model;

[0144] When it is determined that the instruction type of the drag instruction is the deletion operator, a deleted second operator is determined, and the second operator is deleted in the logical relationship between the multiple operators in the threat model, and the logical relationship between the remaining operators is determined to obtain an updated second model;

[0145] When it is determined that the instruction type of the drag instruction is the modification operator, a third operator of the operator to be replaced is determined based on the drag instruction, and the operator to be replaced is replaced with the third operator in the logical relationship of the threat model to obtain an updated third model.

[0146] In this process, since the preset interactive interface has displayed the situations between the various operators of the current threat detection model, just like "modules", the user can directly drag these operators to realize the dynamic adjustment function of the threat detection model. Among them, since the dragging process is divided into several situations, namely, adding an operator to the original threat detection model, dragging an operator out of the threat detection model, or replacing an original operator in the threat detection model with an operator. Based on this, the user is actually issuing three different drag instructions during the dragging process, that is, the three types of drag instructions mentioned above are adding operators, deleting operators, and replacing operators. Then, when it is detected that the user has issued a drag instruction, the corresponding operations can be performed for these three situations respectively. Among them, when the newly added operator described in the drag instruction is detected, it is necessary to determine which one the newly added operator is, that is, the first operator, and then based on the position where the first operator is dragged to the threat detection model displayed in the preset interactive interface and the layout of the model information of the model in this interface, determine what the relationship between the first operator set by the current user and other operators in the model is, that is, redetermine the logical relationship between the operators of the current threat detection model after the first operator is added, so as to obtain the updated model, that is, the updated first model.

[0147] Similarly, when it is determined that the instruction type of the drag instruction is the deletion operator, it means that the user wants to delete an operator in the threat detection model. In this case, it is necessary to determine which second operator is deleted, and then delete the second operator in the logical relationship between multiple operators in the threat model, and determine the logical relationship between the remaining operators, that is, redetermine what the logic between other operators of the model is after deleting the second operator, and then obtain a new model, that is, the updated second model. When it is determined that the instruction type of the drag instruction is the modification operator, it can actually be understood as replacing an operator among the multiple operators in the model with another operator. Then, it is only necessary to determine which two operators are to be replaced and the third operator used to replace this operator based on the drag instruction, and then replace the latter with the former in the logical relationship of the threat model to obtain the updated third model.

[0148] In this way, when the user needs to update and adjust the threat detection model, he can directly drag and drop commands to add, delete and replace the various operators displayed by the threat detection model, so that the threat detection model can be modified and updated more conveniently in a visual way.

[0149] Furthermore, as a response to the above Figure 1 and Figure 2In order to realize the method shown in the figure, another embodiment of the present application also provides a device for generating a threat detection model. The embodiment of the device for generating a threat detection model corresponds to the aforementioned method embodiment. For ease of reading, the embodiment of the device for generating a threat detection model will no longer repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Specifically, Figure 3 As shown, the device comprises:

[0150] A first encapsulation unit 31 may be used to encapsulate data acquisition instructions into different data acquisition operators according to data sources;

[0151] A second encapsulation unit 32 may be used to encapsulate the data processing instructions into different data processing operators according to the processing modes;

[0152] The third encapsulation unit 33 may be used to encapsulate the data output instruction into different data output operators according to the output target;

[0153] The generating unit 34 may be used to combine the data acquisition operator, the data processing operator, the data output operator and the threat detection operator according to the threat detection process to obtain a threat detection model.

[0154] Further, such as Figure 4 As shown, the first packaging unit 31 includes:

[0155] The determination module 311 may be used to determine the corresponding data source based on a threat source, wherein the threat source includes at least one of a message queue, a message queue topic, a search engine, and a database;

[0156] The encapsulation module 312 may be used to encapsulate the data acquisition instruction corresponding to each data source into a data acquisition operator corresponding to the data source, wherein the data acquisition operator includes at least one of a message queue acquisition operator, a message queue topic acquisition operator, a search engine acquisition operator, and a database acquisition operator;

[0157] The message queue acquisition operator may be used to acquire data from multiple message queues according to message queue identifiers;

[0158] The message queue topic acquisition operator can be used to acquire data in the message queue according to the message queue topic;

[0159] The search engine acquisition operator can be used to acquire data from multiple search engines according to search engine identifiers;

[0160] The database acquisition operator may be used to acquire data from multiple databases according to database identifiers.

[0161] Further, such as Figure 4 As shown, the second packaging unit 32 includes:

[0162] The determination module 321 may be used to determine different processing methods for the data processing instructions according to business scenarios;

[0163] The encapsulation module 322 can be used to divide the multiple data processing instructions based on the processing method to obtain data processing instructions corresponding to different processing methods, and encapsulate the data processing instructions into data processing operators corresponding to the processing method.

[0164] Further, such as Figure 4 As shown, the processing method includes at least one of noise reduction processing, merging processing and enrichment processing;

[0165] The packaging module 322 includes:

[0166] The first encapsulation submodule 3221 may be used to obtain a data processing instruction that can be used to perform noise reduction processing from the multiple data processing instructions, and encapsulate the data processing instruction that can be used to perform noise reduction processing into a noise reduction data processing operator, wherein the noise reduction data processing operator may be used to clear empty data, data with missing key fields, and data with abnormal formats;

[0167] The second encapsulation submodule 3222 may be used to obtain a data processing instruction that can be used to perform a merge process from the multiple data processing instructions, and encapsulate the data processing instruction that can be used to perform a merge process into a merge type data processing operator, wherein the merge type data processing operator may be used to merge multiple data into one piece of data according to a target field or a target period;

[0168] The third encapsulation submodule 3223 can be used to obtain data processing instructions that can be used to perform enrichment processing from the multiple data processing instructions, and encapsulate the data processing instructions that can be used to perform enrichment processing into enriched data processing operators, wherein the enriched data processing operators can be used to complete or correct missing content in the data.

[0169] Further, such as Figure 4 As shown, the processing method also includes format processing and field specification processing;

[0170] The packaging module 322 further includes:

[0171] The fourth encapsulation submodule 3224 may be used to obtain a data processing instruction that can be used to perform format processing from the multiple data processing instructions, and encapsulate the data processing instruction that can be used to perform format processing into a format-type data processing operator, wherein the format-type data processing operator may be used to convert the content of each data into a target format;

[0172] The fifth encapsulation submodule 3225 can be used to obtain data processing instructions that can be used to perform field specification processing from the multiple data processing instructions, and encapsulate the data processing instructions that can be used to perform field specification processing into field specification type data processing operators, wherein the field specification type data processing operators can be used to convert fields with the same meaning and different identifiers in multiple data into the same field identifier.

[0173] Further, such as Figure 4 As shown, the third encapsulation unit 33 can be specifically used to divide multiple data output instructions according to different output targets, obtain data output instructions corresponding to different output targets and encapsulate them, and obtain data output operators corresponding to different output targets, wherein the output target includes at least one of a message queue, a message queue topic, a search engine, and a database.

[0174] Further, such as Figure 4 As shown, the device also includes:

[0175] The display unit 35 can be used to generate model information based on the threat detection model and output it through a preset interactive interface, wherein the model information can be used to display the threat detection model based on the operator module in a manner of combining the threat detection process, and the operator module is a modular graph of the data acquisition operator, the data processing operator, the data output operator and the threat detection operator.

[0176] Further, such as Figure 4 As shown, the device also includes:

[0177] The instruction determination unit 36 ​​may be configured to determine an instruction type based on the drag instruction after the drag instruction is collected through the preset interactive interface, wherein the instruction type includes at least one of adding an operator, deleting an operator, and modifying an operator;

[0178] The first modifying unit 37 may be configured to, when determining that the instruction type of the drag instruction is the newly added operator, obtain the first operator newly added in the model information, and determine the logical relationship between the first operator and other operators in the model information based on the position of the first operator in the preset interactive interface and the layout of the model information in the preset interactive interface, to obtain an updated first model;

[0179] The second modifying unit 38 may be configured to, when determining that the instruction type of the drag instruction is the deletion operator, determine the deleted second operator, delete the second operator in the logical relationship between the multiple operators in the threat model, and determine the logical relationship between the remaining operators to obtain an updated second model;

[0180] The third modification unit 39 can be used to determine a third operator of the operator to be replaced based on the drag instruction when it is determined that the instruction type of the drag instruction is the modification operator, and replace the operator to be replaced with the third operator in the logical relationship of the threat model to obtain an updated third model.

[0181] Furthermore, the present application also provides a threat detection method based on a threat detection model, wherein the threat detection model is obtained based on the method for generating the threat detection model described in the foregoing embodiment, and the threat detection model includes a data acquisition operator, a data processing operator, a data output operator, and a threat detection operator. Specifically, the method may include:

[0182] Acquiring the data to be detected from the data source through the data acquisition operator;

[0183] Processing the data to be detected by the data processing operator to obtain processed data;

[0184] Performing threat detection on the processed data by using the threat detection operator to obtain a detection result;

[0185] The detection result is output through the data output operator.

[0186] In this method, in the process of threat detection through the threat detection model, the data to be detected can be obtained from various data sources based on the data acquisition operator, and then the data to be detected is processed by the data processing operator, wherein the processing process is different based on the specific data processing operator, such as processing the data format, cleaning the data content, extracting parameters or information from the data to be processed, etc., of course, these processing processes are actually determined by the operator selected based on the threat detection model. After the processed data is obtained based on the data processing operator, the threat detection operator can be used to perform threat detection on the processed data. Since the threat detection operator is actually obtained based on any existing threat detection algorithm, the processed data will be detected and analyzed based on these algorithms to determine the detection result. After obtaining the detection result, these data can be output based on the data output operator contained in the threat detection model. Of course, the output target is also different from the specific type of the data output operator contained in the model. For example, when the data output operator is constructed based on the instruction sent to the message queue, then when the data output operator is used for output, the detection result will be output to the message queue. In this way, by utilizing the threat detection method based on the threat detection model, the function of realizing threat detection on the data to be detected by using the various ready-made operators in the model is realized.

[0187] The embodiment of the present application provides a method and device for generating a threat detection model. In the embodiment of the present application, data acquisition instructions can be first encapsulated into different data acquisition operators according to the data source; then, data processing instructions can be encapsulated into different data processing operators according to the processing method; thereafter, data output instructions can be encapsulated into different data output operators according to the output target; finally, the data acquisition operator, the data processing operator, the data output operator and the threat detection operator are combined according to the threat detection process to obtain a threat detection model, thereby realizing the generation function of the threat detection model. Compared with the prior art, since the present application no longer compiles the model code separately for different scenarios in the process of generating the threat detection model, but encapsulates the instructions of different stages into corresponding operators based on different instructions in the three stages of acquisition, processing, and output, and then selects the corresponding operators based on the threat detection process to combine them to obtain the threat detection model, this realizes the function of building the detection model in an operator "modular" way, that is, as long as the operators corresponding to different stages are pre-encapsulated for each different scenario, the model can be generated in the process of generating the threat detection model by combining the required operators, thereby avoiding the need for additional instruction code compilation process each time the scenario is different or the requirements are different, thereby effectively solving the human cost caused by the process of recompiling the model code when the scenario, requirements, etc. of the threat detection model in the prior art. At the same time, since each operator in the threat detection model can be encapsulated based on different stages, when a certain detection scenario changes, there is no need to compile the code again, but to replace the operator, which can also improve the update efficiency of the threat detection model.

[0188] An embodiment of the present application provides a storage medium, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the above-mentioned method for generating a threat detection model.

[0189] The storage medium 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, and the memory includes at least one storage chip.

[0190] An embodiment of the present application also provides a device for generating a threat detection model, the device comprising a storage medium; and one or more processors, the storage medium is coupled to the processor, and the processor is configured to execute program instructions stored in the storage medium; when the program instructions are executed, the method for generating a threat detection model described above is executed.

[0191] An embodiment of the present application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: encapsulating data acquisition instructions into different data acquisition operators according to data sources; encapsulating data processing instructions into different data processing operators according to processing methods; encapsulating data output instructions into different data output operators according to output targets; and combining the data acquisition operator, the data processing operator, the data output operator, and the threat detection operator according to a threat detection process to obtain a threat detection model.

[0192] Furthermore, the data acquisition instruction is encapsulated into different data acquisition operators according to the data source, including:

[0193] Determining the corresponding data source based on a threat source, wherein the threat source includes at least one of a message queue, a message queue topic, a search engine, and a database;

[0194] Encapsulating the data acquisition instructions corresponding to each of the data sources into a data acquisition operator corresponding to the data source, wherein the data acquisition operator includes at least one of a message queue acquisition operator, a message queue topic acquisition operator, a search engine acquisition operator, and a database acquisition operator;

[0195] The message queue acquisition operator is used to acquire data from multiple message queues according to message queue identifiers;

[0196] The message queue topic acquisition operator is used to acquire data in the message queue according to the message queue topic;

[0197] The search engine acquisition operator is used to acquire data from multiple search engines according to search engine identifiers;

[0198] The database acquisition operator is used to acquire data from multiple databases according to database identifiers.

[0199] Furthermore, the data processing instructions are encapsulated into different data processing operators according to the processing mode, including:

[0200] Determine different processing methods for the data processing instructions according to business scenarios;

[0201] Based on the processing method, the plurality of data processing instructions are divided to obtain data processing instructions corresponding to different processing methods, and the data processing instructions are encapsulated into data processing operators corresponding to the processing methods.

[0202] Furthermore, the processing method includes at least one of noise reduction processing, merging processing and enrichment processing;

[0203] The dividing the plurality of data processing instructions based on the processing mode to obtain data processing instructions corresponding to different processing modes, and encapsulating the data processing instructions into data processing operators corresponding to the processing modes, includes at least one of the following:

[0204] Obtaining a data processing instruction for performing noise reduction processing from the multiple data processing instructions, and encapsulating the data processing instruction for performing noise reduction processing into a noise reduction data processing operator, wherein the noise reduction data processing operator is used to clear empty data, data with missing key fields, and data with abnormal formats;

[0205] Acquire a data processing instruction for performing merge processing from the multiple data processing instructions, and encapsulate the data processing instruction for performing merge processing into a merge type data processing operator, wherein the merge type data processing operator is used to merge multiple data into one piece of data according to a target field or a target period;

[0206] A data processing instruction for performing enrichment processing is obtained from the multiple data processing instructions, and the data processing instruction for performing enrichment processing is encapsulated into an enrichment-type data processing operator, wherein the enrichment-type data processing operator is used to complete or correct missing content in the data.

[0207] Furthermore, the processing method also includes format processing and field specification processing;

[0208] The dividing the plurality of data processing instructions based on the processing mode to obtain data processing instructions corresponding to different processing modes, and encapsulating the data processing instructions into data processing operators corresponding to the processing modes, includes at least one of the following:

[0209] Acquire a data processing instruction for performing format processing from the multiple data processing instructions, and encapsulate the data processing instruction for performing format processing into a format-type data processing operator, wherein the format-type data processing operator is used to convert the content of each data into a target format;

[0210] A data processing instruction for performing field specification processing is obtained from the multiple data processing instructions, and the data processing instruction for performing field specification processing is encapsulated into a field specification type data processing operator, wherein the field specification type data processing operator is used to convert fields with the same meaning and different identifiers in multiple data into the same field identifier.

[0211] Furthermore, the step of encapsulating the data output instruction into different data output operators according to the output target includes:

[0212] The data output instructions are divided according to different output targets, and the data output instructions corresponding to the different output targets are obtained and encapsulated to obtain data output operators corresponding to the different output targets, wherein the output target includes at least one of a message queue, a message queue topic, a search engine, and a database.

[0213] Further, after combining the data acquisition operator, the data processing operator, the data output operator, and the threat detection operator according to the threat detection process to obtain the threat detection model, the method further includes:

[0214] Model information is generated based on the threat detection model and output through a preset interactive interface, wherein the model information is used to display the threat detection model in a manner of combining operator modules according to the threat detection process, and the operator modules are modular graphs of the data acquisition operator, the data processing operator, the data output operator, and the threat detection operator.

[0215] Furthermore, after generating model information based on the threat detection model and outputting it through a preset interactive interface, the method further includes:

[0216] After the drag instruction is collected through the preset interactive interface, the instruction type is determined based on the drag instruction, and the instruction type includes at least one of adding an operator, deleting an operator, and modifying an operator;

[0217] When it is determined that the instruction type of the drag instruction is the newly added operator, obtaining the first operator newly added in the model information, and determining the logical relationship between the first operator and other operators in the model information based on the position of the first operator in the preset interactive interface and the layout of the model information in the preset interactive interface, to obtain the updated first model;

[0218] When it is determined that the instruction type of the drag instruction is the deletion operator, a deleted second operator is determined, and the second operator is deleted in the logical relationship between the multiple operators in the threat model, and the logical relationship between the remaining operators is determined to obtain an updated second model;

[0219] When it is determined that the instruction type of the drag instruction is the modification operator, a third operator of the operator to be replaced is determined based on the drag instruction, and the operator to be replaced is replaced with the third operator in the logical relationship of the threat model to obtain an updated third model.

[0220] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program code that initializes the following method steps: encapsulating data acquisition instructions into different data acquisition operators according to data sources; encapsulating data processing instructions into different data processing operators according to processing methods; encapsulating data output instructions into different data output operators according to output targets; and combining the data acquisition operator, the data processing operator, the data output operator and the threat detection operator according to the threat detection process to obtain a threat detection model.

[0221] 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 in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0222] 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.

[0223] 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 comprising 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.

[0224] 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 1A step that specifies a function in one or more boxes.

[0225] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0226] 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.

[0227] 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.

[0228] 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.

[0229] 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 in combination with 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.) that contain computer-usable program code.

[0230] 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 method for generating a threat detection model, characterized in that: The method comprises: Encapsulate data acquisition instructions into different data acquisition operators according to data sources; Encapsulate data processing instructions into different data processing operators according to the processing methods; Encapsulate data output instructions into different data output operators according to output targets; The data acquisition operator, the data processing operator, the data output operator and the threat detection operator are combined according to the threat detection process to obtain a threat detection model.

2. The method according to claim 1, characterized in that The data acquisition instructions are encapsulated into different data acquisition operators according to the data source, including: Determining the corresponding data source based on a threat source, wherein the threat source includes at least one of a message queue, a message queue topic, a search engine, and a database; Encapsulating the data acquisition instructions corresponding to each of the data sources into a data acquisition operator corresponding to the data source, wherein the data acquisition operator includes at least one of a message queue acquisition operator, a message queue topic acquisition operator, a search engine acquisition operator, and a database acquisition operator; The message queue acquisition operator is used to acquire data from multiple message queues according to message queue identifiers; The message queue topic acquisition operator is used to acquire data in the message queue according to the message queue topic; The search engine acquisition operator is used to acquire data from multiple search engines according to search engine identifiers; The database acquisition operator is used to acquire data from multiple databases according to database identifiers.

3. The method according to claim 1, characterized in that The data processing instructions are encapsulated into different data processing operators according to the processing mode, including: Determine different processing methods for the data processing instructions according to business scenarios; Based on the processing method, the plurality of data processing instructions are divided to obtain data processing instructions corresponding to different processing methods, and the data processing instructions are encapsulated into data processing operators corresponding to the processing methods.

4. The method according to claim 3, characterized in that The processing method includes at least one of noise reduction processing, merging processing and enrichment processing; The dividing the plurality of data processing instructions based on the processing mode to obtain data processing instructions corresponding to different processing modes, and encapsulating the data processing instructions into data processing operators corresponding to the processing modes, includes at least one of the following: Obtaining a data processing instruction for performing noise reduction processing from the multiple data processing instructions, and encapsulating the data processing instruction for performing noise reduction processing into a noise reduction data processing operator, wherein the noise reduction data processing operator is used to clear empty data, data with missing key fields, and data with abnormal formats; Acquire a data processing instruction for performing merge processing from the multiple data processing instructions, and encapsulate the data processing instruction for performing merge processing into a merge type data processing operator, wherein the merge type data processing operator is used to merge multiple data into one piece of data according to a target field or a target period; A data processing instruction for performing enrichment processing is obtained from the multiple data processing instructions, and the data processing instruction for performing enrichment processing is encapsulated into an enrichment-type data processing operator, wherein the enrichment-type data processing operator is used to complete or correct missing content in the data.

5. The method according to claim 4, characterized in that The processing method also includes at least one of format processing and field specification processing; The dividing the plurality of data processing instructions based on the processing mode to obtain data processing instructions corresponding to different processing modes, and encapsulating the data processing instructions into data processing operators corresponding to the processing modes, includes at least one of the following: Acquire a data processing instruction for performing format processing from the multiple data processing instructions, and encapsulate the data processing instruction for performing format processing into a format-type data processing operator, wherein the format-type data processing operator is used to convert the content of each data into a target format; A data processing instruction for performing field specification processing is obtained from the multiple data processing instructions, and the data processing instruction for performing field specification processing is encapsulated into a field specification type data processing operator, wherein the field specification type data processing operator is used to convert fields with the same meaning and different identifiers in multiple data into the same field identifier.

6. The method according to claim 1, characterized in that The step of encapsulating the data output instruction into different data output operators according to the output target includes: The data output instructions are divided according to different output targets, and the data output instructions corresponding to the different output targets are obtained and encapsulated to obtain data output operators corresponding to the different output targets, wherein the output target includes at least one of a message queue, a message queue topic, a search engine, and a database.

7. The method according to any one of claims 1 to 6, characterized in that After combining the data acquisition operator, the data processing operator, the data output operator, and the threat detection operator according to the threat detection process to obtain a threat detection model, the method further includes: Model information is generated based on the threat detection model and output through a preset interactive interface, wherein the model information is used to display the threat detection model in a manner of combining operator modules according to the threat detection process, and the operator modules are modular graphs of the data acquisition operator, the data processing operator, the data output operator, and the threat detection operator.

8. The method according to claim 7, characterized in that After generating model information based on the threat detection model and outputting it through a preset interactive interface, the method further includes: After the drag instruction is collected through the preset interactive interface, the instruction type is determined based on the drag instruction, and the instruction type includes at least one of adding an operator, deleting an operator, and modifying an operator; When it is determined that the instruction type of the drag instruction is the newly added operator, obtaining the first operator newly added in the model information, and determining the logical relationship between the first operator and other operators in the model information based on the position of the first operator in the preset interactive interface and the layout of the model information in the preset interactive interface, to obtain the updated first model; When it is determined that the instruction type of the drag instruction is the deletion operator, a deleted second operator is determined, and the second operator is deleted in the logical relationship between the multiple operators in the threat model, and the logical relationship between the remaining operators is determined to obtain an updated second model; When it is determined that the instruction type of the drag instruction is the modification operator, a third operator of the operator to be replaced is determined based on the drag instruction, and the operator to be replaced is replaced with the third operator in the logical relationship of the threat model to obtain an updated third model.

9. A threat detection method based on a threat detection model, characterized in that: The threat detection model is obtained based on the method for generating the threat detection model according to any one of claims 1 to 7, and the threat detection model includes a data acquisition operator, a data processing operator, a data output operator and a threat detection operator, wherein the method includes: Acquiring the data to be detected from the data source through the data acquisition operator; Processing the data to be detected by the data processing operator to obtain processed data; Performing threat detection on the processed data by using the threat detection operator to obtain a detection result; The detection result is output through the data output operator.

10. A device for generating a threat detection model, characterized in that: The device comprises: A first encapsulation unit, used to encapsulate the data acquisition instruction into different data acquisition operators according to the data source; A second encapsulation unit, used for encapsulating the data processing instructions into different data processing operators according to the processing methods; A third encapsulation unit is used to encapsulate the data output instruction into different data output operators according to the output target; A generating unit is used to combine the data acquisition operator, the data processing operator, the data output operator and the threat detection operator according to the threat detection process to obtain a threat detection model.

11. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the method for generating a threat detection model according to any one of claims 1 to 8.

12. A device for generating a threat detection model, characterized in that: The device includes a storage medium; and one or more processors, the storage medium is coupled to the processor, and the processor is configured to execute program instructions stored in the storage medium; when the program instructions are executed, the method for generating a threat detection model described in any one of claims 1 to 8 is executed.

Citation Information

Patent Citations

  • Detection method and device based on multi-source security detection framework

    CN111865959A

  • Network threat detection method and device

    CN114124586A

  • Data association analysis system and data association analysis method

    CN115964711A