The application claims priority to Chinese patent application No. 202311401950.0, filed on Oct. 27, 2023, the entire contents of which are incorporated herein by reference.
The present invention belongs to the technical field of industrial network data security, and particularly relates to a method and system for detecting abnormal nodes in industrial Internet, and a medium and a device.
This statement merely provides background art information related to the present invention and does not necessarily constitute the prior art.
Detection of abnormal nodes in industrial Internet is to abstract local partial data of each data holder in the industrial Internet into graphic data and then detect abnormal nodes in the graphic data. The abnormal nodes in the industrial Internet of Things usually contain fraud, false and even harmful information that endangers the security of the industrial Internet, causing inestimable security accidents to user economy and platform development in the industrial Internet of Things. Therefore, detecting such abnormal nodes is of great significance for the healthy development of the industrial Internet.
With the development of the Industrial Internet of Things, various graphic data is also increasing, but the graphic data is controlled by different data holders, and it is very difficult to integrate all the graphic data. Besides, due to a privacy protection problem in the industrial Internet, it is not allowed to directly and universally load a large amount of the graphic data on GNN for training. As a new distributed machine learning paradigm, federated learning allows clients to collaborate in a decentralized way to train globally shared or personalized models without contributing their own local data. Such characteristic enables federated learning to be applied to the graphic data to mitigate data isolation problems and keep each client owning safe graphic data.
The inventor found that most traditional federation graph learning paradigms use FedAvg when the server performs client parameter aggregation. FedAvg can well achieve distributed GNN model training, but it does not consider the influence of partial parameters of different clients on weights of all client model training. In fact, during a process of federation graph learning, data parameters uploaded by each client have different influences, and it does not consider how to pre-process a large amount of data possessed by the clients. Therefore, there are errors in obtained detection results.
In order to solve at least one technical problem existing in the above background art, the present invention provides a method and system for detecting abnormal nodes in industrial Internet, a medium and a device, which consider the influence of partial parameters of different clients on the weights of model training of all the clients. During an actual federation graph learning process, data parameters uploaded by each client have different influences, and during parameter aggregation, the server learns parameters of different clients to different degrees according to different weights, which improves the accuracy of detection results.
To achieve the above objective, the present invention adopts the following technical solutions:
A first aspect of the present invention provides a method for detecting abnormal nodes in industrial Internet, applied to the server, where the method includes the following steps:
A second aspect of the present invention provides a method for detecting abnormal nodes in industrial Internet, applied to clients, where the method includes the following steps:
A third aspect of the present invention provides a method for detecting abnormal nodes in industrial Internet, where the method includes the following steps:
A fourth aspect of the present invention provides a system for detecting abnormal nodes in industrial Internet, applied to a server, where the system includes:
A fifth aspect of the present invention provides a system for detecting abnormal nodes in industrial Internet, applied to the clients, where the system includes:
A sixth aspect of the present invention provides a system for detecting abnormal nodes in industrial Internet, where the system includes:
A seventh aspect of the present invention provides a computer-readable storage medium.
A computer-readable storage medium with a computer program stored thereon, where when executed by a processor, the program implements the steps of the method for detecting abnormal nodes in industrial Internet in the first aspect or the second aspect or the third aspect.
An eighth aspect of the present invention provides a computer device.
The computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the method in the first aspect or the second aspect or the third aspect when executing the program.
Compared with the prior art, the present invention has the beneficial effects:
The accompanying drawings of the specification which constitute a part of the present invention provide further understanding of the present invention. The schematic embodiments of the present invention and description thereof are intended to explain the present invention and are not intended to constitute an improper limit to the present invention.
The present invention is described in more detail with reference to the accompanying drawings and embodiments.
It should be noted that the following detailed description is exemplary and aims to further describe the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those generally understood by a person of ordinary skill in the art to which the present invention belongs.
It should be noted that the terms used herein are only for describing the embodiments rather than for limiting the exemplary embodiments of the present invention. As used herein, unless otherwise stated clearly in the context, a singular form is intended to include a plural form thereof. In addition, it should be understood that the terms “comprise” and/or “include” as used herein indicate the presence of features, steps, operations, components, assemblies, and/or combinations thereof.
The present invention has an overall idea: firstly, in the industrial Internet, different data holders firstly transform their own local node data into graphic data. Before local model training, the data holders firstly use a spectral clustering algorithm to perform certain clustering operations on local data, cluster the node data of the same category into the same cluster, and then perform local model training on a clustered result to obtain better partial aggregation features. Secondly, the trained partial features are uploaded to a trusted third-party server for global feature aggregation. Through an attention mechanism, the server assigns different weights for partial features uploaded by different data holders, and then the aggregated global features are delivered to each data holder for a new round of training. Therefore, abnormal nodes are classified from normal nodes, besides, different risk levels of the abnormal nodes are obtained, and industrial Internet managers can immediately take different measures to maintain data security of the industrial Internet.
Further, in S102, the server assigns, through an adaptive attention mechanism according to the training efficiency of the partial parameters, different weights for the partial parameters uploaded by different clients, higher weights are assigned for the parameters with better training effects, on the contrary, lower weights are assigned for the parameters with poor training effects, and in this way, the clients with better training effects can drive the clients with poor training effects.
The server aggregates, through the attention mechanism, parameters uploaded by the clients, through the attention mechanism, different aggregation weights are assigned for the parameters uploaded by each client according to the contribution degree to server aggregation, after obtaining aggregation parameters of different weights, the server aggregates, through different weight parameters, parameters uploaded by the current client and other clients, an objective function can be represented as:
In this process, the server will perform weighting processing on the aggregation parameters αi,βi, . . . ,δi,i=(1,2, . . . , n) obtained by different clients and partial feature parameters Zi,i=(1, 2, . . . , n) uploaded by target clients and other clients, to obtain the global parameters Zci,i=(1, 2, . . . , n) of the target clients.
Through such mechanism, the clients with good training effects can possess parameters with large weights during aggregation, to drive the clients with poor training effects, and thus improving the overall training effects. Even if each client has the same training effects, the server will shift to a weighted average aggregation strategy.
S104: the detection result of the nodes is compared with a set threshold to obtain a risk level of abnormal nodes.
After obtaining the detection result of the nodes, it is also necessary to execute different processing for different node attributes. If the nodes are normal in the node attributes, it is only necessary to periodically detect the target nodes and repeat the operations of S101-S105. In this embodiment, the detection period is 15 days;
In the embodiment, the first threshold is 0.15, and the second threshold is 0.4.
It is also necessary to judge detection result attributes of the nodes and assess the risk level:
Herein, in the embodiment, the range of the first risk level is 0-0.15, and the range of the second risk level is 0.15-0.4; if the risk level is greater than 0.4, it is judged as the third risk level; and the first risk level is a low risk, the second risk level is a medium risk, and the third risk level is a high risk.
In S201, local node data sets are clustered to obtain partial feature parameters, which specifically includes:
The data holders obtain initial graphic data after graph construction and processing according to their node data sets Di. Gi represents the initial graphic data of the ith data holder, where G=(V,E,X), V is a set V={v1, v2, . . . , vn} of N nodes, E is a set of edges, X={x1, x2, . . . , xn} represents a feature matrix of the nodes, and xi is an eigenvector of the node vi. The initial graphic data is constructed and processed through an adjacency matrix to obtain an initial adjacency matrix.
S202: a clustering operation is performed on the obtained initial adjacency matrix by using a spectral clustering algorithm, nodes which are close in distances are aggregated into a cluster and nodes which are far in distances are aggregated into another cluster to obtain an initial clustered result set, and feature processing is performed on the clustered result set to obtain the partial feature parameters.
In S202, the clients regard owned industrial Internet data nodes as points in space, which can be connected by false edges, where weights between the nodes which are close in distances are high, and weights between the nodes which are far in distances are low.
S2021: firstly, a similarity matrix W is constructed, and a distance between two sample points is calculated by using a Euclidean distance; all the sample points are traversed by using a KNN algorithm, k points closest to each sample are taken as a neighbor, only wij>0 among the k points that are closest to the sample while only two points are k neighbors to each other, wij is retained, the similarity matrix W is constructed in this way; an objective function can be represented as:
Where II gi-gjII22 is a Euclidean distance between the two sample points, σ is a scale parameter, and w changes along with changes of a σ value.
S2022: a degree matrix D is constructed, for two sample points gi and gj which are related, wij>0, for two sample points gi and gj which are not related, wij=0, and therefore for any one sample point gi in a set, the degree di of the sample point can be defined as the sum of all the weights associated with a target sample point. The degree matrix D can be obtained by using the definition of the degree of each sample point, D is a diagonal matrix, and only a main diagonal has a value.
S2023: a Laplacian matrix and a standardized Laplacian matrix are constructed by using the constructed similarity matrix W and the constructed degree matrix D, the Laplacian matrix L and the standardized Laplacian matrix {tilde over (L)} are calculated, the objective function can be represented as:
where L is the Laplacian matrix, and {tilde over (L)} is the standardized Laplacian matrix. Eigenvalues of {tilde over (L)} are calculated, the eigenvalues are sorted from small to large, first k eigenvalues are taken, eigenvectors of the eigenvalues are calculated, the k eigenvectors form a matrix U=(u1, u2, . . . , uk), and U∈Rn*k forms a new solution space. Clustering is performed on the new solution space by using a K-means algorithm, and then a clustered result is mapped to an original solution space to be used as an input for the next task.
Finally, feature processing is performed by using a graph convolutional network (GCN) to obtain partial feature parameters, the objective function can be represented as:
where H(1) is a representation matrix of nodes in an l layer, W(l) is a trainable parameter matrix, Ã=A+IN represents an adjacency matrix containing self-connection, and σ represents a nonlinear activation function.
The gradient of a model trained by the clients is solved by using a loss function, to be used as a partial aggregation feature parameter to be uploaded to the server.
In S202, when the partial feature parameters are transmitted to the server, in this process, in order to protect security of data and prevent security influence caused by data leakage,
In S203, a process of updating local model training according to the global feature parameters includes:
In the embodiment, the local aggregation parameters are uploaded to the server by using the global differential privacy strategy.
The clients continue to perform local model training according to the updated parameters, which is an iterative process. In order to obtain better training effects, multiple iterative training processes are generally performed to obtain the best training effects. This process keeps looping, the number of rounds of loops is set to 30, and then the best result is selected from the results of each round of training.
In S203, feature classification is performed on the basis of higher-order representation of different nodes to obtain detection results of the nodes.
In the embodiment, high-order neighbor features are processed by using a semi-supervised node classification method, the high-order neighbor features are classified by using a softmax activation function, a predicted node label Z is outputted, Z is represented in a matrix form, and values in the matrix are only 0 and 1, where 0 represents the normal nodes and 1 represents the abnormal nodes.
The embodiment provides a method for detecting abnormal nodes in industrial Internet, where the method includes the following steps:
The embodiment provides a system for detecting abnormal nodes in industrial Internet, applied to a server, where the system includes:
The embodiment provides an apparatus for detecting abnormal nodes in industrial Internet, applied to clients, where the system includes:
The embodiment provides a system for detecting abnormal nodes in industrial Internet, including:
a partial feature extracting module, configured to cluster local node data sets to obtain partial feature parameters, and transmit the partial feature parameters to a server;
The embodiment provides a computer-readable storage medium with a computer program stored thereon, when executed by a processor, the program implements the steps of the method for detecting abnormal nodes in industrial Internet as described above.
The embodiment provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where when executing the program, the processor implements the steps of the method for detecting abnormal nodes in industrial Internet as described above.
The foregoing is merely illustrative of the preferred embodiments of the present invention and is not intended to limit the present invention, and various changes and modifications may be made by those skilled in the art. Any modifications, equivalent replacements, improvements, and the like made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
202311401950.0 | Oct 2023 | CN | national |
Number | Name | Date | Kind |
---|---|---|---|
11418526 | Bertiger | Aug 2022 | B2 |
11734384 | Kalantzis | Aug 2023 | B2 |
20150067857 | Symons | Mar 2015 | A1 |
20200336500 | Urmanov | Oct 2020 | A1 |
20230098447 | Raza | Mar 2023 | A1 |
20230342426 | Kramer | Oct 2023 | A1 |
20230342428 | Kramer | Oct 2023 | A1 |
Number | Date | Country |
---|---|---|
113516249 | Oct 2021 | CN |
114595396 | Jun 2022 | CN |
115567269 | Jan 2023 | CN |
116628554 | Aug 2023 | CN |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2024/126348 | Oct 2024 | WO |
Child | 19061523 | US |