A method, system and storage medium for identifying malicious nodes
By calculating the weighted security degree and a subset of risk patterns in real time, malicious nodes in the decentralized network can be quickly identified, solving the problems of insufficient real-time and accuracy in the existing technology, and improving the efficiency and applicability of network security protection.
Patent Information
- Application Number
- CN202410658930.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-05-27
AI Technical Summary
Existing decentralized network security protection algorithms have shortcomings in real-time performance and accuracy. Especially when the computing performance of nodes is limited, it is difficult to quickly identify malicious nodes, and they rely heavily on the selection of data sets, which limits their effectiveness. Universality.
By obtaining the cumulative security degree of the target data packet in real time, calculating the weighted security degree, extracting risk pattern subsets and dominant risk factors, and combining potential malicious nodes and risk nodes, the target malicious node can be quickly identified to achieve real-time network security protection.
It achieves rapid and accurate identification of malicious nodes in decentralized networks, improves system operation efficiency, is suitable for scenarios with large network scale and average node computing performance, and improves real-time and automation levels.
Smart Images

Figure CN118250094B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of malicious node identification, and in particular to a malicious node identification method, system and storage medium. Background Art
[0002] With the increasing popularity of low-cost smart hardware, the scale of device networking is getting larger and larger. The traditional Internet is expected to develop towards the trend of the Internet of Everything, and the network topology has also evolved from the original centralization to decentralization. The typical feature of a decentralized network is that the security of the entire network is maintained by all nodes, rather than controlled by a few central nodes. Under this network structure, each node needs to identify and protect the network requests of other nodes locally, so it is necessary to study an effective general network security protection method.
[0003] Currently, the commonly used security protection algorithms are mainly based on machine learning model training based on labeled network interaction data sets, and then obtain prediction results on whether a node's request operation is safe to perform network protection. The advantage of this algorithm is that when the data set is large, relatively accurate prediction results can usually be obtained. The disadvantage is that it lacks real-time performance and the model training time is too long, especially when the node is a mobile device with limited computing performance. In addition, the selection of the data set has a great impact on the accuracy and convergence of the model, which limits the universality of this type of algorithm.
[0004] Therefore, it is necessary to design a malicious node identification algorithm that takes into account both security and real-time performance. Summary of the invention
[0005] In order to solve the above technical problems, the present application provides a malicious node identification method, system and storage medium.
[0006] Specifically, the present application provides a method for identifying malicious nodes, comprising the following steps:
[0007] S100: Acquire a target data packet in real time to calculate a cumulative safety degree based on the target data packet.
[0008] S200: Determine in real time whether the number of the target data packets is greater than a preset threshold. If so, calculate the weighted security based on the accumulated security, obtain potential malicious nodes based on the weighted security, and proceed to step S300; otherwise, return to step S100.
[0009] S300: extracting a risk pattern subset based on the target data packet, and obtaining a dominant risk factor of a strong pattern according to the risk pattern subset.
[0010] S400: Acquire risk nodes based on the dominant risk factor of the strong pattern, and acquire target malicious nodes according to the risk nodes and the potential malicious nodes.
[0011] The step S100 includes:
[0012] A network data packet is received in real time, wherein the network data packet includes at least a node public key, an operation set, a data set, and a signature.
[0013] Perform a signature verification operation on the network data packet to obtain a target data packet that has passed the signature verification, and push the target data packet into a local sequence; wherein the local sequence at least includes the target data packet and its corresponding network request execution time and accumulated security.
[0014] The measured safety degree is acquired in real time, and the accumulated safety degree is updated based on the measured safety degree.
[0015] The step S200 of obtaining a potential malicious node includes:
[0016] The public keys of all computing nodes are the sum of the cumulative security of the preset public keys to obtain the weighted security.
[0017] A first variance of the weighted security is calculated, and a second variance of the weighted security when the node public key is eliminated as a preset public key is calculated.
[0018] Nodes corresponding to the first variance being greater than the first value, the second variance being less than the second value, and the weighted safety degree being less than the third value are obtained as potential malicious nodes.
[0019] The step S300 includes:
[0020] The local sequence is traversed, and a risk pattern center is obtained based on the accumulated safety degree, so as to obtain a risk pattern subset according to the risk pattern center.
[0021] A risk factor is obtained based on the risk pattern subset, and a risk factor whose sum of the risk factor and the risk factor is greater than a preset ratio is obtained as a dominant risk factor.
[0022] The step S300 further includes:
[0023] When the number of times the dominant risk factor appears in each risk pattern subset is greater than a preset number, the dominant risk factor is recorded as the dominant risk factor of the strong pattern; otherwise, it is recorded as the dominant risk factor of the weak pattern.
[0024] The step S300 further includes:
[0025] Each time a leading risk factor is classified as a weak mode, the weak mode count is incremented by one.
[0026] When the weak mode count is greater than a preset count, the dominant risk factor is converted into a dominant risk factor of a strong mode.
[0027] The step S400 includes:
[0028] All the dominant risk factors of strong patterns are imported into the clustering classifier to train the risk model, and the training is terminated when the stop condition is met.
[0029] Get the corresponding nodes that meet the shutdown conditions as risk nodes.
[0030] When a node is both a risk node and a potential malicious node, the node is recorded as a target malicious node.
[0031] The step S400 further includes:
[0032] Broadcast the target malicious node to the entire network, reject the network data packet corresponding to the target malicious node, and jump to step S100.
[0033] Based on the same concept, the present application provides a malicious node identification system, the system comprising:
[0034] The calculation module is used to obtain the target data packet in real time to calculate the cumulative safety degree based on the target data packet.
[0035] The first acquisition module is used to determine in real time whether the number of the target data packets is greater than a preset threshold. If so, a weighted security degree is calculated based on each accumulated security degree, and potential malicious nodes are obtained based on the weighted security degree, and then transferred to the second acquisition module; otherwise, it returns to the calculation module.
[0036] The second acquisition module is used to extract a risk pattern subset based on the target data packet, and acquire a dominant risk factor of a strong pattern according to the risk pattern subset.
[0037] The identification module is used to obtain risk nodes based on the dominant risk factors of the strong pattern, and to obtain target malicious nodes based on the risk nodes and the potential malicious nodes.
[0038] Based on the same concept, the present application provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the malicious node identification method when running.
[0039] Compared with the prior art, the beneficial effects of this application are:
[0040] This application determines the potential malicious nodes in the decentralized network by calculating the weighted security of the nodes, and obtains the potential malicious data and operations in the network request based on the risk model calculation, and finally quickly determines the malicious nodes in the network, thereby realizing a real-time network security protection algorithm, which is suitable for decentralized networks with large network scales and general node computing performance. Currently, the commonly used decentralized security protection algorithms often require a large number of manually labeled network interaction data sets, which are not real-time enough, and the prediction accuracy is highly dependent on the data set selection method, which is not suitable for decentralized network scenarios with high real-time requirements and automation. The main algorithm steps of this application, such as the potential malicious node identification method and the risk pattern identification method, are not computationally intensive, which helps to quickly and accurately identify malicious nodes, thereby improving the operating efficiency of the entire system. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a flow chart of the malicious node identification method described in this application.
[0042] Figure 2 for Figure 1 A system framework diagram of the malicious node identification method. DETAILED DESCRIPTION
[0043] The following is a further detailed description of a malicious node identification method, system and storage medium of the present application in conjunction with specific embodiments and drawings. Example
[0044] See also Figure 1 , the present application provides a malicious node identification method, comprising the following steps:
[0045] S100: Acquire a target data packet in real time to calculate a cumulative safety degree based on the target data packet.
[0046] The step S100 includes:
[0047] A network data packet is received in real time, wherein the network data packet includes at least a node public key, an operation set, a data set, and a signature.
[0048] Perform a signature verification operation on the network data packet to obtain a target data packet that has passed the signature verification, and push the target data packet into a local sequence; wherein the local sequence at least includes the target data packet and its corresponding network request execution time and accumulated security.
[0049] In this embodiment, the local node receives The network packets are ,
[0050] in is the node public key of the node sending the network data packet, is the node public key The set of operations that need to be performed by the local node, is the data set that needs to be operated on. is the node public key Tuple Signature.
[0051] All network data packets with signature fields must undergo a signature verification operation. If the signature does not correspond to the signed data, the network data packet will be discarded; only when the signature corresponds to the signed data can the network data packet be used as the target data packet.
[0052] It should be noted that the time when network nodes send network data packets is random, and different network data packets It can be sent by the same node, and the node public key at this time It's the same.
[0053] The local node at time Execute network node Network requests for the dataset Execute Operation Set ), and then use the network packet as the target packet Push the local sequence Q Elements middle,
[0054] in Is the local node executing the network node The cumulative security calculated after the network request is made. When the network request is just executed and no data measurement has been performed, its initial value is set to the same default value.
[0055] The measured safety degree is acquired in real time, and the accumulated safety degree is updated based on the measured safety degree.
[0056] In this embodiment, the local node performs a security check on its own operating status at regular intervals, and records the actual measured security level at time t. , at this time the number of elements in the local sequence Q is N, then update all the cumulative safety ,in, , is a natural exponential function. In general, the later sequence elements have a greater impact on the current measured security of the local node, so the above update strategy is adopted.
[0057] If the actual safety degree measured at this time If the values of the measured safety degree of the consecutive M>1 nodes are all less than the default negative value, the local node will Cumulative safety within the scope Make further adjustments. .in, is a positive integer, the typical value is ; is the mean of the above continuous M>1 measured safety degrees, .
[0058] S200: Determine in real time whether the number of the target data packets is greater than a preset threshold. If so, calculate the weighted security based on the accumulated security, obtain potential malicious nodes based on the weighted security, and proceed to step S300; otherwise, return to step S100.
[0059] The step S200 of obtaining a potential malicious node includes:
[0060] The public keys of all computing nodes are the sum of the cumulative security of the preset public keys to obtain the weighted security.
[0061] In this embodiment, when the number of new network data packets received by the local node exceeds the default value, the cumulative security of each network node is calculated and recorded as the weighted security, that is, the public key The weighted safety of nodes is equal to K. .
[0062] A first variance of the weighted security is calculated, and a second variance of the weighted security when the node public key is eliminated as a preset public key is calculated.
[0063] In this embodiment, the first variance of the weighted security of all network nodes is , the second variance after removing the network nodes whose public key is K is .
[0064] Nodes corresponding to the first variance being greater than the first value, the second variance being less than the second value, and the weighted safety degree being less than the third value are obtained as potential malicious nodes.
[0065] In this embodiment, if is greater than the first value and is smaller than the second value, and the weighted safety If it is smaller than the third value, the node is a potential malicious node.
[0066] S300: extracting a risk pattern subset based on the target data packet, and obtaining a dominant risk factor of a strong pattern according to the risk pattern subset.
[0067] The step S300 includes:
[0068] The local sequence is traversed, and a risk pattern center is obtained based on the accumulated safety degree, so as to obtain a risk pattern subset according to the risk pattern center.
[0069] In this embodiment, all elements of the sequence Q are traversed in sequence , find all the and Risk Model Center .
[0070] Get the risk pattern subset. That is, take the center of each risk pattern of As a benchmark, find a subset that satisfies the following conditions at the same time :
[0071]
[0072]
[0073]
[0074]
[0075] in, , , The risk pattern subsets that meet the above conditions contain potentially identical risk data and risk operations.
[0076] A risk factor is obtained based on the risk pattern subset, and a risk factor whose sum of the risk factor and the risk factor is greater than a preset ratio is obtained as a dominant risk factor.
[0077] In this embodiment, if the risk pattern subset A combination of data and operations in the subset element The frequency of occurrence in , ,and The target data packet The weighted security of the sending node is recorded as , then the risk factor of the combination is recorded as .
[0078] Record in this risk pattern subset The sum of the risk factors of all data and operations in is G, if If the ratio of G exceeds the preset ratio, the risk factor is called the risk model subset. leading risk factor.
[0079] The step S300 further includes:
[0080] When the number of times the dominant risk factor appears in each risk pattern subset is greater than a preset number, the dominant risk factor is recorded as the dominant risk factor of the strong pattern; otherwise, it is recorded as the dominant risk factor of the weak pattern.
[0081] In this embodiment, if a dominant risk factor appears in each risk pattern subset more than a preset number of times, the risk pattern is a strong pattern; if it does not exceed the default value, it is a weak pattern.
[0082] The step S300 further includes:
[0083] Each time a leading risk factor is classified as a weak mode, the weak mode count is incremented by one.
[0084] When the weak mode count is greater than a preset count, the dominant risk factor is converted into a dominant risk factor of a strong mode.
[0085] In this embodiment, each time the weak mode is classified as a weak mode, the weak mode count increases by 1. When the weak mode count exceeds a preset count, the weak mode is converted to a strong mode.
[0086] S400: Acquire risk nodes based on the dominant risk factor of the strong pattern, and acquire target malicious nodes according to the risk nodes and the potential malicious nodes.
[0087] The step S400 includes:
[0088] All the dominant risk factors of strong patterns are imported into the clustering classifier to train the risk model, and the training is terminated when the stop condition is met.
[0089] Get the corresponding nodes that meet the shutdown conditions as risk nodes.
[0090] In this embodiment, the local node sends the statistical features of all nodes that send overly strong patterns to the k-means clustering classifier (k is set to 2). After the algorithm ends, if the shutdown condition is met, the model training ends;
[0091] Otherwise, the k-means algorithm is re-executed until the stopping condition is met.
[0092] The stopping condition is that the number of nodes in a class with fewer nodes is less than the default value.
[0093] The statistical characteristics of a node can generally be expressed by the following parameters: the total number of network request transmissions, the average transmission interval, the maximum transmission interval, the minimum transmission interval, the proportion of data in the node's transmission requests by the dominant factor, etc.
[0094] When a node is both a risk node and a potential malicious node, the node is recorded as a target malicious node.
[0095] In this embodiment, if a node is both a potential malicious node and a node of the type with a relatively small number of nodes in the risk model, it is a target malicious node.
[0096] The step S400 further includes:
[0097] Broadcast the target malicious node to the entire network, reject the network data packet corresponding to the target malicious node, and jump to step S100. Example
[0098] See also Figure 2 The present application provides a malicious node identification system, the system comprising:
[0099] The calculation module is used to obtain the target data packet in real time to calculate the cumulative safety degree based on the target data packet.
[0100] The first acquisition module is used to determine in real time whether the number of the target data packets is greater than a preset threshold. If so, a weighted security degree is calculated based on each accumulated security degree, and potential malicious nodes are obtained based on the weighted security degree, and then transferred to the second acquisition module; otherwise, it returns to the calculation module.
[0101] The second acquisition module is used to extract a risk pattern subset based on the target data packet, and acquire a dominant risk factor of a strong pattern according to the risk pattern subset.
[0102] The identification module is used to obtain risk nodes based on the dominant risk factors of the strong pattern, and to obtain target malicious nodes based on the risk nodes and the potential malicious nodes. Example
[0103] The present application provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the malicious node identification method when running.
[0104] In summary, the present application provides a malicious node identification method, system and storage medium; first, the target data packet is acquired in real time to calculate the cumulative safety degree based on the target data packet; then, when the number of the target data packet is greater than the preset threshold, the weighted safety degree is calculated based on each cumulative safety degree, and the potential malicious node is acquired based on the weighted safety degree; further, a risk pattern subset is extracted based on the target data packet, and the dominant risk factor of the strong pattern is acquired according to the risk pattern subset; finally, the risk node is acquired based on the dominant risk factor of the strong pattern, and the target malicious node is acquired according to the risk node and the potential malicious node. The present application can quickly determine the malicious nodes in the network, thereby realizing real-time network security protection, and is suitable for decentralized networks with large network scale and general node computing performance, and the computational complexity of the algorithm of the present application is not large, which helps to quickly and accurately identify malicious nodes, thereby improving the operating efficiency of the entire system.
[0105] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely exemplary and are not intended to limit the scope of the present application to this. Those of ordinary skill in the art may make various changes and modifications therein without departing from the scope and spirit of the present application. All these changes and modifications are intended to be included within the scope of the present application as required by the appended claims.
[0106] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0107] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.
[0108] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some modules according to the embodiments of the present application. The application can also be implemented as a device program (e.g., computer program and computer program product) for executing a part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0109] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0110] Although the description of the present application is carried out in conjunction with the above specific embodiments, it is obvious that those skilled in the art can make many substitutions, modifications and changes based on the above content. Therefore, all such substitutions, improvements and changes are included in the spirit and scope of the appended claims.
Claims
1. A malicious node identification method, characterized in that: The following steps are involved: S100: acquiring a target data packet in real time, and pressing the target data packet into a local sequence, so as to calculate a cumulative safety degree based on the target data packet; Among them, the cumulative safety ,in, , is a natural exponential function, i is the order of the target data packet, and N is the number of the target data packets; Perform security checks on the running status of the target data packet at regular intervals and record the actual security level at time t. ; S200: determining in real time whether the number of the target data packets is greater than a preset threshold, if so, calculating a weighted security degree based on each accumulated security degree, and obtaining a potential malicious node based on the weighted security degree, and proceeding to step S300; otherwise, returning to step S100; S300: extracting a risk pattern subset based on the target data packet, and obtaining a dominant risk factor of a strong pattern according to the risk pattern subset; Wherein, the S300 includes: Traversing the local sequence, and obtaining a risk pattern center based on the accumulated safety degree, so as to obtain a risk pattern subset according to the risk pattern center; Obtain the risk model center, including: traversing the local sequence in sequence to obtain the cumulative safety degree and Risk Model Center ; in, , is the target data packet pushed into the local sequence, Is executing the network node The network request execution time, Is the local node executing the network node The cumulative security calculated after the network request; The risk model subset ,satisfy: ; ; ; ; in, is an element of the risk pattern subset, , , ; x, i, y, N, All are positive integers; S400: Acquire risk nodes based on the dominant risk factor of the strong pattern, and acquire target malicious nodes according to the risk nodes and the potential malicious nodes.
2. The malicious node identification method according to claim 1, characterized in that: The step S100 includes: Receiving a network data packet in real time, wherein the network data packet includes at least a node public key, an operation set, a data set, and a signature; Performing a signature verification operation on the network data packet to obtain a target data packet that has passed the signature verification, and pressing the target data packet into a local sequence; wherein the local sequence at least includes the target data packet and its corresponding network request execution time and accumulated security degree; The measured safety degree is acquired in real time, and the accumulated safety degree is updated based on the measured safety degree.
3. The malicious node identification method according to claim 2, characterized in that: The step S200 of obtaining a potential malicious node includes: The public keys of all the computing nodes are the sum of the cumulative security of the preset public keys to obtain the weighted security; Calculating a first variance of the weighted security, and calculating a second variance of the weighted security when the node public key is eliminated as a preset public key; Nodes corresponding to the first variance being greater than the first value, the second variance being less than the second value, and the weighted safety degree being less than the third value are obtained as potential malicious nodes.
4. The malicious node identification method according to claim 3, characterized in that: The step S300 includes: A risk factor is obtained based on the risk pattern subset, and a risk factor whose sum of the risk factor and the risk factor is greater than a preset ratio is obtained as a dominant risk factor.
5. The malicious node identification method according to claim 4, characterized in that: The step S300 further includes: When the number of times the dominant risk factor appears in each risk pattern subset is greater than a preset number, the dominant risk factor is recorded as the dominant risk factor of the strong pattern; otherwise, it is recorded as the dominant risk factor of the weak pattern.
6. The malicious node identification method according to claim 5, characterized in that: The step S300 further includes: Whenever a dominant risk factor is classified as a weak mode, the weak mode count increases by one; When the weak mode count is greater than a preset count, the dominant risk factor is converted into a dominant risk factor of a strong mode.
7. The malicious node identification method according to claim 6, characterized in that: The step S400 includes: Import all the dominant risk factors of strong patterns into the clustering classifier to train the risk model, and terminate the training when the stop condition is met; Get the corresponding nodes that meet the shutdown conditions as risk nodes; When a node is both a risk node and a potential malicious node, the node is recorded as a target malicious node.
8. The malicious node identification method according to claim 7, characterized in that: The step S400 further includes: Broadcast the target malicious node to the entire network, reject the network data packet corresponding to the target malicious node, and jump to step S100.
9. A system using the malicious node identification method according to any one of claims 1 to 8, characterized in that: The system comprises: A calculation module is used to obtain a target data packet in real time and push the target data packet into a local sequence to calculate a cumulative safety degree based on the target data packet; wherein the cumulative safety degree ,in, , is a natural exponential function, i is the order of the target data packet, and N is the number of the target data packets; Perform security checks on the running status of the target data packet at regular intervals and record the actual security level at time t. ; The first acquisition module is used to determine in real time whether the number of the target data packets is greater than a preset threshold. If so, a weighted security degree is calculated based on each accumulated security degree, and a potential malicious node is obtained based on the weighted security degree, and the process is transferred to the second acquisition module; otherwise, the process returns to the calculation module; A second acquisition module, configured to extract a risk pattern subset based on the target data packet, and acquire a dominant risk factor of a strong pattern according to the risk pattern subset; Obtain the risk model center, including: traversing the local sequence in sequence to obtain the cumulative safety degree and Risk Model Center ; in, , is the target data packet pushed into the local sequence, Is executing the network node The network request execution time, Is the local node executing the network node The cumulative security calculated after the network request; Among them, the risk pattern subsets extracted include: Traversing the local sequence, and obtaining a risk pattern center based on the accumulated safety degree, so as to obtain a risk pattern subset according to the risk pattern center; The risk model subset ,satisfy: ; ; ; ; in, is an element of the risk pattern subset, , , ; x, i, y, N, All are positive integers; The identification module is used to obtain risk nodes based on the dominant risk factors of the strong pattern, and to obtain target malicious nodes based on the risk nodes and the potential malicious nodes.
10. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the malicious node identification method according to any one of claims 1 to 8 when running.
