Alarm method, device, electronic device and storage medium
By generating detailed alarm information, including processing priority and threat level, it solves the problem of unclear meaning of alarm information during API attacks, improves the processing efficiency of operation and maintenance personnel and improves the security of important interfaces.
Patent Information
- Application Number
- CN202210647322.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-09
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-06-09
AI Technical Summary
In the existing technology, when an API is attacked, the meaning of the alarm information is unclear, making it difficult for operation and maintenance personnel to process important interfaces in a timely manner, resulting in low operation and maintenance efficiency.
When abnormal traffic is identified, detailed alarm information is generated based on the target interface's own information and abnormal traffic information, including processing priority and threat level, and is output to operation and maintenance personnel to clarify processing priority and urgency.
It improves the awareness and efficiency of operation and maintenance personnel on interface emergency processing, ensures timely processing of important interfaces, and improves operation and maintenance efficiency.
Smart Images

Figure CN114884801B
Abstract
Description
Technical Field
[0001] The present application relates to the field of security technology, and in particular to an alarm method, device, electronic device and storage medium. Background Art
[0002] As an important interface for data interaction, the Application Programming Interface (API) provides data and services to users directly and purely. Therefore, more and more attention is paid to the data security, permission security, and user behavior security of the API.
[0003] When an API is attacked, in order to enable operation and maintenance personnel to handle it in time, the system will generally output alarm information. However, the meaning of the alarm information currently output is relatively general. For example, if the interface is frequently accessed, the operation and maintenance personnel often cannot clearly understand its specific meaning and easily ignore it, which may lead to delayed processing of some important interfaces that generate alarms and low operation and maintenance efficiency. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide an alarm method, device, electronic device and storage medium to improve the problem that the meaning of the alarm information output in the prior art is unclear, the operation and maintenance personnel cannot process some important interfaces in time, and the operation and maintenance efficiency is low.
[0005] In a first aspect, an embodiment of the present application provides an alarm method, the method comprising:
[0006] If abnormal traffic is identified from the target interface, an alarm message is generated according to the information of the target interface itself and / or the information of the abnormal traffic;
[0007] The alarm information for the target interface is output.
[0008] In the above implementation process, when the method identifies abnormal traffic from the target interface, it generates alarm information based on the information of the target interface itself and / or the information of the abnormal traffic, and outputs the alarm information. The alarm information generated in this way may include relevant description information of the interface and / or the abnormal traffic, thereby realizing more fine-grained alarms, so that the operation and maintenance personnel can know the emergency processing level of the interface based on the alarm information, and then take corresponding measures to deal with it in time, thereby effectively improving the operation and maintenance efficiency.
[0009] Optionally, the generating alarm information according to the information of the target interface itself and / or the information of the abnormal traffic includes:
[0010] Determining a processing priority for the target interface according to a service attribute of the target interface, and / or determining a threat level of the abnormal traffic according to an abnormal situation of the abnormal traffic;
[0011] Generate warning information according to the processing priority and / or the threat level, and the warning information includes the processing priority and / or the threat level.
[0012] In the above implementation process, the output alarm information includes processing priority and / or threat level, so that the meaning of the output alarm information is clearer. In this way, the operation and maintenance personnel can know which alarm information should be processed first and which alarm information can be processed later according to the processing priority and / or threat level, and then process the interfaces that need to be processed first, thereby improving the operation and maintenance efficiency.
[0013] Optionally, determining the threat level of the abnormal traffic according to the abnormal situation of the abnormal traffic includes:
[0014] Analyzing the attack category of the abnormal traffic;
[0015] The threat level of the abnormal traffic is determined according to the attack category.
[0016] In the above implementation process, the threat level is determined according to the attack category, so that different threat levels can be determined for different attack categories, so that the threat level of the current attack on the interface can be judged according to the actual attack suffered by the interface.
[0017] Optionally, determining a processing priority for processing the target interface according to a service attribute of the target interface includes:
[0018] According to the business attributes of the target interface, the processing priority corresponding to the business attributes in the priority mapping table is searched to obtain the processing priority for processing the target interface. Different processing priorities are set for the business attributes of the interface, so that the processing order can be selected according to the importance of the business. A higher processing priority can be set for some important interfaces, so that the security of these important interfaces can be effectively ensured during the operation and maintenance process.
[0019] Optionally, after determining the threat level of the abnormal traffic according to the abnormal situation of the abnormal traffic and before outputting the alarm information for the target interface, the method further includes:
[0020] The processing priority is adjusted based on the threat level to obtain an adjusted processing priority. In this way, the processing priority can be flexibly adjusted according to the attack level suffered by the interface, so that the processing priority can adapt to the current attack. For example, if the attack level is serious, the processing priority should be higher.
[0021] Optionally, adjusting the processing priority based on the threat level to obtain an adjusted processing priority includes:
[0022] Obtaining historical access information of the target interface;
[0023] The processing priority is adjusted according to the historical access information and the threat level to obtain an adjusted processing priority, so that a more appropriate processing priority can be determined according to the actual access situation of the interface.
[0024] Optionally, the service attribute of the target interface is obtained in the following manner, including:
[0025] Acquire interface information of the target interface, wherein the interface information includes interface name and / or interface parameters;
[0026] The service attribute of the target interface is acquired according to the interface information.
[0027] In the above implementation process, the business attributes of the interface can be quickly obtained through the interface name and / or interface parameters.
[0028] Optionally, the outputting the alarm information for the target interface includes:
[0029] The alarm information is sorted and output according to the processing priority or threat level of the alarm information. In this way, the operation and maintenance personnel can directly process it in the sorting order, eliminating the need for manual screening operations.
[0030] Optionally, whether the traffic received from the target interface is abnormal traffic is identified in the following manner:
[0031] The traffic received from the target interface is subjected to abnormality detection through a neural network model to determine whether the traffic is abnormal traffic, thereby achieving accurate detection of abnormal traffic.
[0032] In a second aspect, an embodiment of the present application provides an alarm device, the device comprising:
[0033] An alarm information generating module, configured to generate alarm information according to information of the target interface itself and / or information of the abnormal traffic if abnormal traffic is identified from the target interface;
[0034] An alarm information output module is used to output the alarm information for the target interface.
[0035] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method provided in the first aspect are performed.
[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the method provided in the first aspect are performed.
[0037] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising computer program instructions, which, when read and executed by a processor, execute the steps in the method provided in the first aspect.
[0038] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A flowchart of an alarm method provided in an embodiment of the present application;
[0041] Figure 2 A structural block diagram of an alarm device provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of the structure of an electronic device for executing an alarm method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present application.
[0044] It should be noted that the terms "system" and "network" in the embodiments of the present invention can be used interchangeably. "Multiple" means two or more. In view of this, in the embodiments of the present invention, "multiple" can also be understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / ", unless otherwise specified, generally indicates that the previously associated objects are in an "or" relationship.
[0045] An embodiment of the present application provides an alarm method. When abnormal traffic is identified from a target interface, the method generates alarm information based on information of the target interface itself and / or information of the abnormal traffic, and outputs the alarm information. The alarm information generated in this way may include relevant description information of the interface and / or the abnormal traffic, thereby achieving more fine-grained alarms, so that operation and maintenance personnel can know the emergency processing level of the interface based on the alarm information, and then take corresponding measures in time to handle it, thereby avoiding large losses caused by attacks on the interface. This solution can effectively improve operation and maintenance efficiency.
[0046] Please refer to Figure 1 , Figure 1 A flowchart of an alarm method provided in an embodiment of the present application, the method comprising the following steps:
[0047] Step S110: if abnormal traffic is identified from the target interface, alarm information is generated according to the information of the target interface itself and / or the information of the abnormal traffic.
[0048] The target interface may refer to any interface on the detection device, such as a gateway, switch, router, etc. The interfaces referred to in the embodiments of the present application may be understood as application program interfaces, i.e., APIs. In order to prevent the detection device from being illegally attacked and to ensure its security, security detection may be performed on the traffic entering and exiting each interface on the detection device, and corresponding alarms may be issued in the event of an abnormality, so that the operation and maintenance personnel may take corresponding measures to deal with it in a timely manner.
[0049] For example, for the traffic of a certain interface, its traffic can be detected for abnormality. If the traffic is identified as abnormal traffic, an alarm message can be generated based on the information of the interface itself and / or the information of the abnormal traffic. It can be understood here that the generated alarm message carries the relevant information of the interface itself and / or the relevant information of the abnormal traffic, so that the operation and maintenance personnel can know the abnormality degree of the interface, such as the degree of threat, after seeing the alarm message, and can directly choose whether to handle it urgently based on the alarm information.
[0050] Step S120: Output alarm information for the target interface.
[0051] Outputting alarm information here means outputting alarm information to operation and maintenance personnel, such as outputting alarm information to the terminal equipment of operation and maintenance personnel so that operation and maintenance personnel can see the alarm information. The alarm information may carry information of the target interface itself, such as the name and parameters of the target interface and other related information (so that operation and maintenance personnel can see this information and know whether this interface is an interface that needs emergency processing), and / or carry relevant information of abnormal traffic, such as abnormal conditions of abnormal traffic, including abnormal type, abnormal degree, etc. For example, for the login interface, its abnormal conditions may include too many login times, abnormal login IP, etc. For the data interface, the abnormal conditions may include sensitive data crawling, data attack, etc. Of course, the abnormal conditions of abnormal traffic received from different interfaces are different.
[0052] In the above implementation process, when the method identifies abnormal traffic from the target interface, it generates alarm information based on the information of the target interface itself and / or the information of the abnormal traffic, and outputs the alarm information. The alarm information generated in this way may include relevant description information of the interface and / or the abnormal traffic, thereby realizing more fine-grained alarms, so that the operation and maintenance personnel can know the emergency processing level of the interface based on the alarm information, and then take corresponding measures to deal with it in time, thereby effectively improving the operation and maintenance efficiency.
[0053] On the basis of the above-mentioned embodiment, alarm information is generated according to the information of the target interface itself and / or the information of abnormal traffic. It can be understood that the alarm information can be generated according to the information of the target interface itself, or according to the information of abnormal traffic, or according to the information of the target interface itself and the information of abnormal traffic.
[0054] Here, the information of the target interface itself may refer to the business attributes of the target interface. The business attributes may be understood as the business labels of the interface, such as the login interface, whose business attribute is login; the data download interface, whose business attribute is data download; and the sensitive data interface, whose business attribute is sensitive data. Different business attributes may be set accordingly for different interfaces. The business attributes here may be pre-set for each interface, that is, a business attribute table is constructed for each interface. The business attribute table stores the correspondence between the name or parameter of each interface and its business attributes. Therefore, when determining the business attributes of the target interface, the business attributes corresponding to the target interface may be directly found from the business attribute table.
[0055] The processing priority corresponding to the target interface can be determined according to the service attributes of the target interface. The processing priority here can also be pre-configured, such as configuring different processing priorities for different service attributes, and the correspondence between the service attributes and the processing priorities can be stored through a priority mapping table. For example, in some embodiments, the processing priority corresponding to the service attribute in the priority mapping table can be searched according to the service attribute of the target interface to obtain the processing priority for processing the target interface.
[0056] Different processing priorities can be configured for different interfaces. For example, for some important monitoring interfaces, such as data interfaces, data security is more important, so a higher processing priority can be set, while for some insignificant interfaces, a lower processing priority can be set. The processing priority can indicate the urgency of processing the interface. For example, if the traffic of multiple interfaces is abnormal, alarm information will be generated for these interfaces. A high processing priority indicates a high processing urgency, and a low processing priority indicates a low processing urgency. If the alarm information contains a processing priority, the operation and maintenance personnel can process it in the corresponding order according to the processing priority in the alarm information, such as processing high priority first, and processing low priority can be processed later.
[0057] In addition, the threat level of the abnormal traffic can be determined according to the abnormal situation of the abnormal traffic. The threat level here can indicate the threat degree of the abnormal traffic to the target interface. For example, a higher threat level indicates a higher threat degree, and a lower threat level indicates a lower threat degree.
[0058] The abnormal situation of abnormal traffic can be shown in the above examples. For example, for the login interface, the number of logins of the same IP can be counted. If the number of logins exceeds the set number, it is determined to be abnormal traffic, and its abnormal situation is that the number of logins is too many. Alternatively, it can also be determined whether the login IP is a blacklist IP. If so, it is determined to be abnormal traffic, and its abnormal situation is that the login IP is abnormal. Therefore, the traffic can be analyzed for abnormalities to obtain its abnormal situation. In practical applications, different analysis methods can be selected for abnormal analysis according to actual needs. Then the corresponding threat level can be determined according to the abnormal situation. For example, if the threat level corresponding to too many logins is high, the threat level corresponding to the abnormal login IP is low.
[0059] In some implementations, different threat levels may be pre-configured for different abnormal conditions of traffic on a certain interface, so that after determining that the target interface is abnormal traffic, the abnormal condition of the abnormal traffic may be analyzed, and then the corresponding threat level may be searched and obtained based on the abnormal condition.
[0060] It can be understood that the abnormal situation here may include an attack category, that is, the attack category of the abnormal traffic may be analyzed, and then the threat level of the abnormal traffic may be determined according to the attack category.
[0061] The attack category can be understood as an abnormal category, such as the above-mentioned excessive login times, abnormal login IP, etc. Since different interfaces have different business attributes, the attack categories they suffer may also be different. For example, for data interfaces, the attack categories they suffer may be sensitive data downloads, unauthorized data downloads, etc., so different threat levels can be set for different attack categories. Of course, the threat level here can be determined based on the threat level of a certain attack category to the interface. For example, for data interfaces, if sensitive data downloads are more important internally, the threat level to the data interface may be greater. When setting the threat level, the threat level of sensitive data downloads can be set higher than the threat level of unauthorized data downloads.
[0062] If the alarm information contains a threat level, the operation and maintenance personnel can judge the degree of threat to the interface based on the threat level in the alarm information, and then take appropriate measures to deal with it in a timely manner.
[0063] If the alarm information contains the processing priority and threat level, the operation and maintenance personnel can also choose whether to perform emergency processing according to the processing priority or threat level. In this way, this solution can realize the clear output of the alarm information, so that the operation and maintenance personnel can know the meaning of the alarm and the urgency of the alarm at the first time. Of course, in order to refine the alarm information so that the operation and maintenance personnel can more clearly understand the meaning of the alarm, the alarm information can also include the business attributes of the interface. For example, for the data interface, the alarm information example can be: the data interface is attacked by sensitive data download, threat level 1, and processing priority 1. Compared with general alarms for each interface, such as "high-frequency access to the interface", this solution can refine the alarms for each interface, so that the operation and maintenance personnel can know which alarms need to be processed first without screening themselves, thereby improving the operation and maintenance efficiency.
[0064] In the above implementation process, the output alarm information includes processing priority and / or threat level, so that the meaning of the output alarm information is clearer. In this way, operation and maintenance personnel can know which alarm information should be processed first and which alarm information can be processed later according to the processing priority and / or threat level, and then process the interfaces that need priority processing first, thereby improving operation and maintenance efficiency.
[0065] Based on the above embodiments, the business attributes of the target interface can also be determined in real time. For example, when the detection device identifies that the traffic received from the target interface is abnormal traffic, it obtains the interface information of the target interface, and the interface information includes interface naming and / or interface parameters, etc., and then the business attributes of the target interface can be obtained based on the interface information.
[0066] The interface name refers to the name of the interface, such as "login" can indicate a login interface, and interface parameters such as username, password and other fields can also indicate a login interface. By identifying the interface name and / or interface parameters, the business attributes of the interface can be known. For example, in the example, the business attribute of the interface is "login". Of course, combining the interface name and interface parameters can more accurately determine the business attributes of the interface.
[0067] Alternatively, the service attribute may be that the interface is identified after receiving traffic from the interface for the first time, and then the service attribute is marked for the interface, so that after the abnormal traffic of the interface is identified, the service attribute of the interface can be determined through the marked service attribute. Alternatively, the service attribute of the interface may be identified in advance through the interface name and / or interface parameters, and the corresponding service attribute is marked for the interface, so that the service attribute of the interface can be directly determined later.
[0068] Based on the above embodiment, the detection device can use some configured rules to identify whether the traffic received from the interface is abnormal traffic. For example, for a login interface, it can determine whether the number of logins exceeds the set number. If so, it is abnormal traffic, or determine whether the login IP is in the blacklist. If so, it is abnormal traffic. Otherwise, it is not abnormal traffic.
[0069] In order to detect abnormal traffic more accurately, the traffic received from the target interface can also be detected for abnormality through a neural network model to determine whether the traffic is abnormal traffic.
[0070] The type of neural network model here can be flexibly selected according to actual needs, such as long short-term memory network model, generative adversarial network model, etc. The neural network model can be pre-trained with a large amount of traffic. During the training process, the neural network model can learn the abnormal features in the traffic, thereby realizing anomaly detection. The specific detection process will not be described in detail here.
[0071] On the basis of the above embodiment, since the processing priority is pre-set manually according to the business attributes of the interface, it includes some subjective considerations. However, in actual situations, the degree of attack suffered by the interface is closely related to its processing priority. Therefore, after determining the processing priority of the target interface according to the business attributes and determining the threat level of the abnormal traffic according to the abnormal situation of the abnormal traffic, it can also include: adjusting the processing priority based on the threat level to obtain the adjusted processing priority.
[0072] It can be considered that the processing priority of the target interface determined based on the service attributes is the initial processing priority, and then the processing priority can be adjusted accordingly according to the actual threat level. For example, the initial processing priority is 5, which is a low level, indicating that the priority processing order of the target interface is low, and the threat level of the abnormal traffic is determined to be 1 according to the abnormal situation, which is a high threat level, indicating that the interface is under a relatively serious attack at this time and needs to be paid attention to by the operation and maintenance personnel. Therefore, the processing priority can be increased according to the threat level, such as adjusting the processing priority to 4 or 3, that is, increasing the priority level of the processing priority. If the threat level is also low, such as the threat level is 4, then it means that the attack level suffered by the interface is not serious, and the corresponding processing priority can be adjusted.
[0073] Alternatively, when making adjustments, it can be determined whether to make adjustments based on the degree of adaptation between the threat level and the processing priority. For example, the corresponding relationship between the threat level and the processing priority range can be preset. For example, the threat level 1 corresponds to a processing priority range of 1-2, which means that under normal circumstances, if the threat level is 1, its processing priority is 1 or 2. If the currently determined processing priority is not within this range, the current processing priority can be adjusted to this range. For example, if the currently determined processing priority is 4, the adjustment amount can be -2 or -3, that is, the processing priority is adjusted to 1 or 2. If the currently determined processing priority is within this range, no adjustment is made. Therefore, a corresponding processing priority range can be configured for each threat level, and then it is determined whether the processing priority determined according to the business attributes is within the processing priority range corresponding to the currently determined threat level. If so, no adjustment is made, that is, the adjustment amount is 0. If not, the current processing priority is adjusted to the processing priority range corresponding to the threat level.
[0074] It should be noted that the specific adjustment method can be flexibly set according to actual needs. The specific principle is that when the threat level is high but the processing priority is low, the processing priority is appropriately increased; when the threat level is low but the processing priority is high, the processing priority is appropriately lowered; when both are at medium levels, no adjustment is made.
[0075] In the above implementation process, the processing priority can be flexibly adjusted according to the attack severity suffered by the interface, so that the processing priority can adapt to the current attack. For example, if the attack severity is severe, the processing priority should be higher.
[0076] On the basis of the above embodiment, during adjustment, the access information of the interface may also be considered, such as obtaining the historical access information of the target interface, and then adjusting the processing priority according to the historical access information and the threat level to obtain the adjusted processing priority.
[0077] Its historical access information may include historical access volume, etc., and of course, it may also include data such as access mean, access variance, and access standard deviation within a period of time, which can indirectly reflect the historical access situation of the interface. For example, an adjustment amount may be determined based on historical access information and threat level. The adjustment amount may be determined by first mapping the historical access information to an initial priority, then performing a weighted sum of the initial priority and the threat level, and then determining an adjustment amount, and adjusting the currently determined processing priority according to the adjustment amount.
[0078] Among them, the mapping relationship between historical access information and initial priority can be pre-configured, such as different historical access volumes corresponding to corresponding initial priorities. A high historical access volume indicates that the interface is more important and its priority should be higher, so a higher initial priority can be configured. A low historical access volume indicates that the interface may not be important and a lower initial priority can be configured. Here, the configuration of the initial priority can be flexibly configured according to different historical access volume ranges. When the initial priority and the threat level are weighted and summed, the weight setting can be set according to actual needs, such as the weight of the threat level can be larger, and the weight of the initial priority can be relatively smaller. In this way, an adjustment amount can be calculated according to the threat level and the initial priority, and then the currently determined processing priority can be adjusted. Of course, when adjusting here, the principle of increasing or decreasing the processing priority according to the adjustment amount can be that the adjusted processing priority is positively correlated with the threat level, that is, the higher the threat level, the higher the adjusted processing priority should be, and the lower the threat level, the lower the adjusted processing priority.
[0079] For example, if the initial priority is 1, the threat level is 1, the weight of the initial priority is 0.6, and the weight of the threat level is 0.4, then the adjustment amount after weighted summation is 1. If the currently determined processing priority is 3, then the adjusted processing priority is 2, that is, the processing priority is increased. For another example, if the initial priority is 2 and the threat level is 1, then the adjustment amount after weighted summation is 1.6, and the currently determined processing priority is 3, then the adjusted processing priority is 1.4, which is rounded to 1. For another example, if the initial priority is 2 and the threat level is 3, then the adjustment amount after weighted summation is 2.4, and the currently determined processing priority is 2. Since the threat level is low at this time, the processing priority should be lowered, and the adjusted processing priority is 4.4, which is rounded to 4.
[0080] It should be noted that, in actual applications, the method of adjusting the processing priority according to historical access information and threat level is not limited to the above-mentioned example. The specific adjustment method can be flexibly set according to actual needs. The purpose of the adjustment is to make the adjusted processing priority adapt to its threat level and historical access information, so as to obtain a more appropriate processing priority.
[0081] Based on the above embodiment, after the alarm information is output to the operation and maintenance personnel, the operation and maintenance personnel can filter the alarm information according to the processing priority and / or threat level. Because the operation and maintenance personnel may receive a large amount of alarm information in a short period of time, by filtering the alarm information by processing priority and / or threat level, the alarm information that needs to be processed first can be quickly filtered out, and the interfaces that need to be processed first can be processed in a timely manner.
[0082] Of course, in order to reduce the screening operations of operation and maintenance personnel, when outputting alarm information, the alarm information can also be sorted and output according to the processing priority or threat level of the alarm information. For example, multiple alarm information can be sorted and output in order of processing priority from high to low, or multiple alarm information can be sorted and output in order of threat level from high to low. In this way, when handling alarm information, operation and maintenance personnel can directly handle it in the sorted order without screening themselves, because the ones in the front need to be handled first, which can further improve the operation and maintenance efficiency.
[0083] Please refer to Figure 2 , Figure 2 This is a structural block diagram of an alarm device 200 provided in an embodiment of the present application. The device 200 may be a module, program segment or code on an electronic device. It should be understood that the device 200 is similar to the above Figure 1 The method embodiment corresponds to and can be executed Figure 1 The various steps involved in the method embodiment and the specific functions of the device 200 can be found in the above description. To avoid repetition, the detailed description is appropriately omitted here.
[0084] Optionally, the device 200 includes:
[0085] The alarm information generating module 210 is used to generate alarm information according to the information of the target interface itself and / or the information of the abnormal traffic if abnormal traffic is identified from the target interface;
[0086] The alarm information output module 220 is used to output the alarm information for the target interface.
[0087] Optionally, the alarm information generation module 210 is used to determine the processing priority of the target interface according to the business attributes of the target interface; and / or determine the threat level of the abnormal traffic according to the abnormal situation of the abnormal traffic; generate alarm information according to the processing priority and / or the threat level, and the alarm information includes the processing priority and / or the threat level.
[0088] Optionally, the alarm information generating module 210 is used to analyze the attack category of the abnormal traffic; and determine the threat level of the abnormal traffic according to the attack category.
[0089] Optionally, the alarm information generating module 210 is used to search for a processing priority corresponding to the service attribute in a priority mapping table according to the service attribute of the target interface, so as to obtain a processing priority for processing the target interface.
[0090] Optionally, the device 200 further includes:
[0091] The priority adjustment module is used to adjust the processing priority based on the threat level to obtain an adjusted processing priority.
[0092] Optionally, the priority adjustment module is used to obtain historical access information of the target interface; adjust the processing priority according to the historical access information and the threat level to obtain an adjusted processing priority.
[0093] Optionally, the alarm information generating module 210 is used to obtain interface information of the target interface, where the interface information includes interface name and / or interface parameters; and obtain service attributes of the target interface according to the interface information.
[0094] Optionally, the alarm information output module 220 is used to sort and output the alarm information according to the processing priority or threat level of the alarm information.
[0095] Optionally, the alarm information generation module 210 is used to perform anomaly detection on the traffic received from the target interface through a neural network model to determine whether the traffic is abnormal traffic.
[0096] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0097] Please refer to Figure 3 , Figure 3A structural diagram of an electronic device for executing an alarm method provided in an embodiment of the present application, the electronic device may include: at least one processor 310, such as a CPU, at least one communication interface 320, at least one memory 330 and at least one communication bus 340. Among them, the communication bus 340 is used to realize direct connection and communication between these components. Among them, the communication interface 320 of the device in the embodiment of the present application is used to communicate signaling or data with other node devices. The memory 330 can be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 330 can optionally also be at least one storage device located away from the aforementioned processor. Computer-readable instructions are stored in the memory 330. When the computer-readable instructions are executed by the processor 310, the electronic device executes the above-mentioned Figure 1 The method process is shown.
[0098] Understandably, Figure 3 The structure shown is for illustration only, and the electronic device may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations shown. Figure 3 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0099] The present application embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the following is performed: Figure 1 The method process in the method embodiment shown is executed by the electronic device.
[0100] The present embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments, for example, including: if abnormal traffic is identified from a target interface, generating alarm information based on information of the target interface itself and / or information of the abnormal traffic; and outputting the alarm information for the target interface.
[0101] In summary, the embodiments of the present application provide an alarm method, device, electronic device and storage medium. When abnormal traffic is identified from a target interface, the method generates alarm information based on the information of the target interface itself and / or the information of the abnormal traffic, and outputs the alarm information. The alarm information generated in this way may include relevant description information of the interface and / or the abnormal traffic, thereby achieving more fine-grained alarms, so that operation and maintenance personnel can know the emergency processing level of the interface based on the alarm information, and then take corresponding measures to deal with it in time, thereby effectively improving operation and maintenance efficiency.
[0102] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0103] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0104] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0105] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0106] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An alarm method, characterized in that: The method comprises: If abnormal traffic is identified from the target interface, an alarm message is generated according to the information of the target interface itself and the information of the abnormal traffic; Outputting the alarm information for the target interface; The generating of alarm information according to the information of the target interface itself and the information of the abnormal traffic includes: Determining a processing priority for the target interface according to a service attribute of the target interface, and determining a threat level of the abnormal traffic according to an abnormal situation of the abnormal traffic; generating alarm information according to the processing priority and the threat level, the alarm information including the processing priority and the threat level; Wherein, after determining the threat level of the abnormal traffic according to the abnormal situation of the abnormal traffic and before outputting the alarm information for the target interface, the method further includes: Adjusting the processing priority based on the threat level to obtain an adjusted processing priority; The adjusting the processing priority based on the threat level to obtain the adjusted processing priority includes: Obtaining historical access information of the target interface; Adjusting the processing priority according to the historical access information and the threat level to obtain an adjusted processing priority; The adjusting the processing priority according to the historical access information and the threat level to obtain the adjusted processing priority includes: Determine an initial priority according to the historical access information, wherein a mapping relationship between the historical access information and the initial priority is pre-configured; Performing a weighted summation of the initial priority and the threat level to obtain an adjustment amount; The processing priority is adjusted according to the adjustment amount, wherein the adjusted processing priority is positively correlated with the threat level.
2. The method according to claim 1, characterized in that The determining the threat level of the abnormal traffic according to the abnormal situation of the abnormal traffic includes: Analyzing the attack category of the abnormal traffic; The threat level of the abnormal traffic is determined according to the attack category.
3. The method according to claim 1, characterized in that The determining, according to the service attribute of the target interface, a processing priority for processing the target interface includes: The processing priority corresponding to the service attribute in the priority mapping table is searched according to the service attribute of the target interface to obtain the processing priority for processing the target interface.
4. The method according to claim 1, characterized in that: The service attributes of the target interface are obtained by: Acquire interface information of the target interface, wherein the interface information includes interface name and / or interface parameters; The service attribute of the target interface is acquired according to the interface information.
5. The method according to claim 1, characterized in that The outputting the alarm information for the target interface includes: The alarm information is sorted and output according to its processing priority or threat level.
6. The method according to any one of claims 1 to 5, characterized in that: Whether the traffic received from the target interface is abnormal traffic is identified by: Anomaly detection is performed on the traffic received from the target interface through a neural network model to determine whether the traffic is abnormal traffic.
7. An alarm device, characterized in that: The device comprises: An alarm information generating module, configured to generate alarm information according to information of the target interface itself and information of the abnormal traffic if abnormal traffic is identified from the target interface; An alarm information output module, used to output the alarm information for the target interface; The alarm information generation module is specifically used to determine the processing priority of the target interface according to the service attributes of the target interface, and to determine the threat level of the abnormal traffic according to the abnormal situation of the abnormal traffic; generate alarm information according to the processing priority and the threat level, and the alarm information includes the processing priority and the threat level; Wherein, the device further comprises: A priority adjustment module, used to adjust the processing priority based on the threat level to obtain an adjusted processing priority; The priority adjustment module is specifically used to obtain the historical access information of the target interface; adjust the processing priority according to the historical access information and the threat level to obtain the adjusted processing priority; Among them, the priority adjustment module is specifically used to determine the initial priority according to the historical access information, wherein a mapping relationship between the historical access information and the initial priority is pre-configured; the initial priority and the threat level are weightedly summed to obtain an adjustment amount; the processing priority is adjusted according to the adjustment amount, wherein the adjusted processing priority is positively correlated with the threat level.
8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 6 is executed.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is performed.
