A network data classification method, system, electronic device and storage medium
By expanding the neighborhood range through activation diffusion algorithm and using cooperative reasoning method, the problem of only considering direct neighbor nodes in the existing technology is solved, which improves the accuracy and precision of network data classification, especially the class probability of unlabeled nodes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JILIN UNIVERSITY
- Filing Date
- 2023-03-27
- Publication Date
- 2026-05-08
AI Technical Summary
Existing network data classification methods are based on the first-order Markov assumption and only consider the information of direct neighbor nodes. This results in low classification accuracy for network data with low homogeneity and fails to effectively utilize the useful information of indirect neighbor nodes.
An activation diffusion algorithm is used to expand the neighborhood range, obtaining the first neighbor set of labeled nodes and the second neighbor set of unlabeled nodes. Combined with a collaborative reasoning method, the final class probability of unlabeled nodes is determined by adjusting and iterating the similarity between the reference vector and the class vector.
It improves the accuracy and precision of network data classification. By considering the information of indirect neighbor nodes, it enhances the homogeneity of nodes and further improves the accuracy of the category probability of unlabeled nodes.
Smart Images

Figure CN116186622B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network data classification, and in particular to a network data classification method, system, electronic device, and storage medium. Background Technology
[0002] With the development of internet information technology and various new data acquisition technologies, traditional classifiers for independent and uniformly distributed data entities can no longer meet the classification needs of relational network data. Traditional independent data entities include sales records and data within a single database form, while network data includes websites and hypertext. Classification is one of the main tasks in network data mining. Currently, most classification methods for network data are based on the homophily assumption, meaning that connected entities tend to belong to the same category. This phenomenon is prevalent in the observation and theory of social networks; for example, people often cluster according to their race or ethnicity. Numerous experiments have shown that the classification quality of relation classifiers suitable for network data depends on the homogeneity of the network data to be classified. Therefore, only by increasing the homogeneity of the network data can the error rate of the relation classifier be reduced. However, most relational methods based on the homogeneity assumption are simplified versions of the first-order Markov assumption. Furthermore, since considering the labels of all neighboring nodes of a node to be classified is impractical, relational methods based on the homogeneity assumption typically only consider the neighborhood directly connected to the data instance in the network data. This leads to limitations in information acquisition; unlabeled nodes can only be classified based on their directly connected neighbors. The first-order Markov assumption can be understood as estimating the category of a node in network data based solely on the labels of its directly connected neighbors, regardless of indirectly connected nodes.
[0003] Existing technologies primarily classify unlabeled nodes by combining a homogeneous relation classifier based on the first-order Markov assumption with a collaborative inference method. The probability of an unlabeled node belonging to each category is determined based on the labels of its directly connected neighbor nodes. Then, collaborative inference iterates through the category probabilities, simultaneously estimating multiple classification results to ultimately determine the unlabeled node's final category as the label corresponding to the maximum value in the category probability distribution. However, this approach still relies on the first-order Markov assumption and can only classify unlabeled nodes through directly connected neighbor nodes, which has significant limitations. Information useful for classification contained in indirectly connected neighbor nodes is ignored, and sufficient classification information cannot be obtained for network data with low homogeneity, resulting in relatively low accuracy of the final classification result. Summary of the Invention
[0004] The purpose of this invention is to provide a network data classification method, system, electronic device, and storage medium. By using an activation diffusion algorithm, the scope of the neighborhood is appropriately expanded when obtaining the neighbor set of a node in network data. This breaks the limitations of the direct neighborhood acquisition method based on the simplified processing of the first-order Markov assumption in network data classification. By changing the neighborhood acquisition method, the range of neighbor nodes considered when classifying nodes is expanded. Taking into account the information contained in indirect neighbor nodes that is beneficial to classification, nodes with a certain correlation with the node to be classified are selected. This results in obtaining more classification information when constructing reference vectors for each category, improving the homogeneity of nodes and improving classification accuracy. At the same time, combined with a collaborative reasoning method, the category probability of unlabeled nodes is iterated, further improving the accuracy of the final category probability of unlabeled nodes.
[0005] To address the aforementioned technical problems, this invention provides a network data classification method applied to a relation classifier, the method comprising:
[0006] Acquire network data, which includes labeled nodes and unlabeled nodes;
[0007] The marked nodes are processed using an activation diffusion algorithm to obtain a first neighbor set of the marked nodes, and a reference vector corresponding to the marked nodes is determined based on the first neighbor set. The reference vector is used to record the statistical category probability of each label corresponding to the marked nodes.
[0008] The unlabeled nodes are processed using the activation diffusion algorithm to obtain the second neighbor set of the unlabeled nodes, and the category vector corresponding to the unlabeled nodes is determined based on the second neighbor set. The category vector is used to record the estimated category probability of each label corresponding to the unlabeled nodes.
[0009] The similarity between the reference vector and the category vector is compared, and the current category probability of the unlabeled node is determined based on the similarity.
[0010] The current category probability is iterated using a collaborative reasoning method to determine the final category probability of the unlabeled node.
[0011] Preferably, determining the reference vector corresponding to the labeled node based on the first neighbor set includes:
[0012] The actual category probability of each label corresponding to the labeled node is determined based on the first neighbor set;
[0013] The average value of the actual category probabilities corresponding to the same label in each of the labeled nodes is determined as the statistical category probability corresponding to that label, so as to obtain the reference vector.
[0014] Preferably, after acquiring network data, the method further includes:
[0015] Obtain the labels of the marked nodes and calculate the probability distribution of the labels;
[0016] The labels of the unlabeled nodes are initialized to the labels corresponding to the highest probability in the probability distribution.
[0017] Preferably, the current category probability is iterated using a collaborative reasoning method, including:
[0018] The probability of the current category is adjusted according to a preset weight using a simulated annealing algorithm;
[0019] The adjusted current class probability is iteratively updated using a relaxed labeling method.
[0020] Preferably, the first neighbor set includes neighbor nodes adjacent to the marked node and weights corresponding to the neighbor nodes representing the degree of similarity to the marked node.
[0021] Preferably, acquiring network data includes:
[0022] To obtain the relationships between nodes in network data;
[0023] Obtain the labeled nodes and their labels from the network data, and obtain the unlabeled nodes from the network data.
[0024] Preferably, it further includes:
[0025] The pre-collected historical labeled nodes are divided into training and test sets;
[0026] The relation classifier is constructed using the historically labeled nodes and their labels in the training set and the historically labeled nodes in the test set.
[0027] To address the aforementioned technical problems, the present invention also provides an electronic device, comprising:
[0028] Memory, used to store computer programs;
[0029] A processor for implementing the steps of the network data classification method as described above.
[0030] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the network data classification method as described above.
[0031] To address the aforementioned technical problems, this invention also provides a network data classification system applied to a relation classifier, the system comprising:
[0032] A data acquisition module is used to acquire network data, which includes labeled nodes and unlabeled nodes;
[0033] The reference vector determination module is used to process the labeled nodes using the activation diffusion algorithm to obtain the first neighbor set of the labeled nodes, and to determine the reference vector corresponding to the labeled nodes based on the first neighbor set. The reference vector is used to record the statistical category probability of each label corresponding to the labeled nodes.
[0034] The category vector determination module is used to process the unlabeled nodes using the activation diffusion algorithm to obtain the second neighbor set of the unlabeled nodes, and to determine the category vector corresponding to the unlabeled nodes based on the second neighbor set. The category vector is used to record the estimated category probability of each label corresponding to the unlabeled nodes.
[0035] The comparison module is used to compare the similarity between the reference vector and the category vector, and determine the current category probability of the unlabeled node based on the similarity.
[0036] An iterative module is used to iterate the current class probability using a collaborative reasoning method to determine the final class probability of the unlabeled node.
[0037] This invention provides a network data classification method applied to a relation classifier. By employing an activation diffusion algorithm, it appropriately expands the neighborhood range when acquiring the neighbor set of nodes in network data. This overcomes the limitations of direct neighborhood acquisition based on the simplified first-order Markov assumption in network data classification, which hinders the acquisition of classification information. By changing the neighborhood acquisition method, it expands the range of neighboring nodes considered when classifying nodes. Taking into account the information beneficial to classification contained in indirect neighboring nodes, it filters out nodes with a certain correlation to the node to be classified. This results in acquiring more classification information when constructing reference vectors for each category, improving node homogeneity and classification accuracy. Furthermore, by combining this method with collaborative reasoning, it iterates the category probabilities of unlabeled nodes, further improving the accuracy of the final category probabilities obtained for unlabeled nodes.
[0038] The present invention also provides a network data classification system, an electronic device, and a computer-readable storage medium, which have the same beneficial effects as the network data classification method described above. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the prior art and embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 A flowchart illustrating a network data classification method provided by the present invention;
[0041] Figure 2 A flowchart illustrating another network data classification method provided by the present invention;
[0042] Figure 3 A schematic diagram of the structure of an electronic device provided by the present invention;
[0043] Figure 4 This is a schematic diagram of the structure of a network data classification system provided by the present invention. Detailed Implementation
[0044] The core of this invention is to provide a network data classification method, system, electronic device, and storage medium. By using an activation diffusion algorithm, the scope of the neighborhood is appropriately expanded when obtaining the neighbor set of a node in network data. This breaks the limitations of the direct neighborhood acquisition method based on the simplified processing of the first-order Markov assumption in network data classification, which is limited in terms of classification information acquisition. By changing the neighborhood acquisition method, the range of neighbor nodes considered when classifying nodes is expanded. Taking into account the information contained in indirect neighbor nodes that is beneficial to classification, nodes with a certain correlation with the node to be classified are selected. This results in obtaining more classification information when constructing reference vectors for each category, improving the homogeneity of nodes and the classification accuracy. At the same time, combined with a collaborative reasoning method, the category probability of unlabeled nodes is iterated, further improving the accuracy of the final category probability of unlabeled nodes.
[0045] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0046] The network data classification method provided by this invention is applied to relation classifiers, particularly to CDRN (class-distribution relational neighbor classifier), and can also be applied to other types of relation classifiers, such as WVRN (weighted-vote relational neighbor classifier), also known as PRN (probabilistic relational neighbor classifier) or simple relational classifier, NLB (network-only link-based classification), and NBC (network-only Bayes classifier). This application does not specifically limit the specific type of relation classifier or its implementation method. Detailed implementation methods are described below.
[0047] Please refer to Figure 1 , Figure 1 The present invention provides a flowchart of a network data classification method; to solve the above-mentioned technical problems, the present invention provides a network data classification method applied to a relation classifier, the method comprising:
[0048] S11: Obtain network data, which includes labeled nodes and unlabeled nodes;
[0049] It's important to note that, unlike traditional independent instances, networked data consists of interconnected entities. Examples include web pages linked by hyperlinks and papers connected by citation relationships. Networked data can be represented by graphs, where data instances are represented by nodes, and the relationships between them are represented by edges or links. While attribute-based classifiers exist for classifying independent instances, various relation classifiers, also known as network classifiers, exist by utilizing the relationships within networked data and treating it as a mathematical graph. Networked data classification is the process of matching the most appropriate label to unlabeled nodes in the networked data using the relationships and node information. The label represents the node's category, or, in other words, the process of predicting the category of unlabeled nodes based on the network and the categories of labeled nodes.
[0050] It is understandable that before classifying network data, it is necessary to acquire network data. There are multiple ways to acquire network data, such as pre-setting a preset location and acquiring only network data from that preset location; or directly acquiring all current network data of the host; or setting a preset time period and acquiring network data received by the host within that preset time period in real time. This application does not make any special restrictions on the specific methods of acquiring network data, nor does it make any special restrictions on the source and quantity of the specific network data. These can be set or selected in advance according to actual application needs.
[0051] S12: The marked nodes are processed using the activation diffusion algorithm to obtain the first neighbor set of the marked nodes, and the reference vector corresponding to the marked nodes is determined based on the first neighbor set. The reference vector is used to record the statistical category probability of each label corresponding to the marked nodes.
[0052] Specifically, it is necessary to determine the classification criteria for this classification process based on the labeled nodes. That is, the approximate probability distribution of the overall network data is determined by the statistical category probability of each label corresponding to the labeled nodes, so as to provide a classification benchmark or initialization basis for the classification process of unlabeled nodes.
[0053] Understandably, this invention employs an activation diffusion algorithm to process each labeled node. The activation diffusion algorithm is a recursive algorithm for local graph sorting, returning a weighted set of nodes reflecting their proximity. This expands the neighborhood range compared to methods based on the first-order Markov assumption for obtaining direct neighborhoods. By using the activation diffusion algorithm to determine the first neighbor set of a labeled node, this first neighbor set includes not only nodes directly connected to the labeled node but also, in conjunction with proximity, nodes indirectly connected to the labeled node. This broadens the scope of consideration, making the obtained reference vector more accurate and universal, further improving classification accuracy.
[0054] It should be noted that the reference vector is used to record the statistical category probability of each label corresponding to the labeled node. It represents the statistical category probability of each label for all labeled nodes as a whole. Starting from the overall labeled nodes, it reflects the approximate probability distribution of the network data as a whole. This application does not make any special restrictions on the specific implementation method and determination process of the reference vector. At the same time, this application does not make any special restrictions on the type and number of labeled nodes. They can be selected according to different situations in actual applications.
[0055] S13: Use the activation diffusion algorithm to process the unlabeled nodes to obtain the second neighbor set of the unlabeled nodes, and determine the category vector corresponding to the unlabeled nodes based on the second neighbor set. The category vector is used to record the estimated category probability of each label corresponding to the unlabeled node.
[0056] Specifically, the activation diffusion algorithm is used to determine the second neighbor set of unlabeled nodes, and the class vector of unlabeled nodes is determined by the nodes in the second neighbor set and their energy values. The energy value refers to the weight representing the similarity to labeled nodes. The estimated class probability of unlabeled nodes is initially determined by neighboring nodes.
[0057] It should be noted that the category vector is used to record the estimated category probability of each label corresponding to the unlabeled node, that is, to represent the probability distribution of the unlabeled node belonging to each label. This application does not make any special restrictions on the types and number of labeled nodes, and can be selected according to different situations in actual applications.
[0058] S14: Compare the similarity between the reference vector and the category vector, and determine the current category probability of the unlabeled node based on the similarity;
[0059] Understandably, once the reference vector is determined based on the labeled nodes and the preliminary category vectors of the unlabeled nodes are obtained, the category probabilities of the unlabeled nodes can be further adjusted by comparing the similarity between the reference vector and the category vectors, and then determined as the current category probabilities of the unlabeled nodes.
[0060] Specifically, similarity comparison can be performed using cosine similarity or other probabilistic similarity comparison methods. This application does not impose any particular limitations on the specific implementation of similarity comparison. The process of comparing similarity is also the process of comparing the similarity between the reference vector and the category vector. As a specific embodiment, if the probabilities corresponding to a certain label in the reference vector and the category vector are very similar, the probability of an unlabeled node belonging to that label will be further increased, and the probability of this label in the current category probability of the unlabeled node will be higher than that of the category vector. If the probabilities corresponding to a certain label in the reference vector and the category vector are far apart, the probability of an unlabeled node belonging to that label will be further decreased, and the probability of this label in the current category probability of the unlabeled node will be lower than that of the category vector.
[0061] Understandably, by further adjusting the category probability of unlabeled nodes by comparing similarity, and considering the impact of the probability distribution of the overall network data on the classification of unlabeled nodes based on the reference vector, the final determined current category probability can be more accurate and reliable.
[0062] S15: Use collaborative reasoning to iterate the current class probability to determine the final class probability of the unlabeled node.
[0063] It should be noted that collective inference refers to the phenomenon in network data where the category of one instance may influence the category of another related instance. Furthermore, instances that are not directly connected may be linked by a series of links, suggesting that inferring the categories of all instances simultaneously may be beneficial. Collective inference in network data is a method of simultaneously making statistical judgments about the categories of one or more nodes when the categories of multiple related instances are unknown. Combining collective inference methods with relation classifiers can achieve better classification accuracy. Methods such as RL (relaxation labeling), GS (Gibbs sampling), and IC (Iterative classification) can be selected. This application does not impose any specific limitations on the implementation methods and specific content of the collective inference methods used.
[0064] Understandably, by using collaborative reasoning to iterate the current class probability, the results of each iteration can be estimated simultaneously, and the classes of multiple instances can be inferred simultaneously to determine the final class probability of unlabeled nodes. Multiple iterations and collaborative reasoning can further improve classification accuracy and enhance the accuracy and reliability of classification results.
[0065] It should be noted that during the iteration process, when determining the category vector corresponding to the unlabeled node based on the second neighbor set, the influence of the category probability of the unlabeled node in the previous iteration on the category vector can also be considered. The category vector corresponding to the unlabeled node can be determined based on the second neighbor set and the current category probability of the unlabeled node, which further improves the accuracy of the category vector.
[0066] It is understandable that the execution entities corresponding to steps S11 to S15 can all be relation classifiers. In particular, the relation classifier can be a CDRN, which is a relation classifier for classifying network data. Modeling requires calculating category vectors and reference vectors. Specifically, this application does not impose any particular limitations on the number of labels corresponding to the network data, i.e., the specific number and type of each category. The exact number of categories and their corresponding content depends on the actual application.
[0067] In practical applications, the activation diffusion algorithm itself has configurable variable parameters. By adjusting these parameters, the degree of diffusion during the application process can be adjusted and selected, i.e., its convergence threshold and initial energy value. However, considering that exploring a larger neighborhood in network data may be useless and dangerous—because the useful information from a few labeled neighbor nodes might be canceled out by noise, or worse, strong but incorrect signals might be collected in the process, such as a large proportion of web pages pointing to well-known popular websites, even if the topics of these websites are completely irrelevant—experiments can be conducted beforehand to determine the specific values of the variable parameters suitable for network data classification. This ensures that during the classification process, a suitable range of neighbor sets can be determined for both labeled and unlabeled nodes, thus ensuring that more classification information is obtained while avoiding the introduction of excessive noise.
[0068] It is understood that category vectors or reference vectors are represented in array form, including categories and their corresponding probability values. This application does not impose specific limitations on the representation or arrangement of the category vectors or reference vectors; these can be selected and adjusted according to application requirements or implementation difficulty. Correspondingly, this application does not impose specific limitations on the content and representation of the first and second neighbor sets. Generally, a neighbor set includes adjacent neighbor nodes and their related information. It is understood that the estimated class probability, actual class probability, and final class probability mentioned above all refer to the distribution of class probabilities under different categories when a node is located in a different category.
[0069] It should be noted that the classification process may not only target a single unlabeled node. A process to determine whether all unlabeled nodes have been classified can be added during the classification process. The number of unlabeled nodes to be classified can be calculated in advance, and then steps S13 to S15 can be run repeatedly. If there are N unlabeled nodes, steps S13 to S15 can be run N times respectively. These N runs can be processed in parallel, or they can be performed in a single loop after each run. The specific processing method is not specifically limited in this application and depends on factors such as the data capacity and processing power of the relation classifier itself. Alternatively, unlabeled nodes can be directly detected. After completing the preset classification process for unlabeled nodes, it can be directly determined whether there are still unlabeled nodes in the acquired network data. If so, the classification process can be directly performed using steps S13 to S15; if not, the process can be terminated. The criteria and specific methods for determining whether all unlabeled nodes have been classified are not specifically limited in this application.
[0070] Specifically, after obtaining the final category probability, the operation of setting labels for unlabeled nodes can also be performed. The unlabeled nodes after classification are assigned corresponding labels based on the final category probability. This application does not make any special limitations on the specific operation and implementation of setting labels for unlabeled nodes.
[0071] This invention provides a network data classification method applied to a relation classifier. By employing an activation diffusion algorithm, it appropriately expands the neighborhood range when acquiring the neighbor set of nodes in network data. This overcomes the limitations of direct neighborhood acquisition based on the simplified first-order Markov assumption in network data classification, which hinders the acquisition of classification information. By changing the neighborhood acquisition method, it expands the range of neighboring nodes considered when classifying nodes. Taking into account the information beneficial to classification contained in indirect neighboring nodes, it filters out nodes with a certain correlation to the node to be classified. This results in acquiring more classification information when constructing reference vectors for each category, improving node homogeneity and classification accuracy. Furthermore, by combining this method with collaborative reasoning, it iterates the category probabilities of unlabeled nodes, further improving the accuracy of the final category probabilities obtained for unlabeled nodes.
[0072] Based on the above embodiments,
[0073] As a preferred embodiment, determining the reference vector corresponding to the labeled node based on the first neighbor set includes:
[0074] Determine the actual category probability of each label corresponding to the labeled node based on the first neighbor set;
[0075] The average value of the actual category probabilities corresponding to the same label in each labeled node is determined as the statistical category probability corresponding to that label, so as to obtain the reference vector.
[0076] Specifically, based on the first neighbor set, the actual class probability of each label corresponding to the labeled node is first determined. That is, similar to the unlabeled node, the class vector of the labeled node corresponding to each labeled node is first determined. After the class vector of each labeled node is determined, the average value of the actual class probabilities of each labeled node corresponding to the same label is determined as the statistical class probability of the label. That is, the reference vector corresponding to each label is determined one by one through the class vector of each labeled node.
[0077] It is understood that this embodiment achieves the statistical determination of the reference vector by averaging, but it can also be achieved by other statistical methods. Averaging can also be done by arithmetic average or weighted average. Specifically, the reference vector can be determined by weighted average of the energy values obtained from the first neighbor set. This application does not make any special limitations on the specific method for determining the reference vector.
[0078] The class vectors of each labeled node are determined by the first neighbor set, and then the reference vectors corresponding to each label are determined based on the class vectors of each labeled node. By fully considering each labeled node and performing statistical methods such as averaging, the probability distribution of the reference vectors with respect to the entire network data is realized, which ensures the accuracy and reliability of the reference vectors, so as to reliably implement the subsequent classification process of unlabeled nodes based on the reference vectors.
[0079] In a preferred embodiment, after acquiring network data, the method further includes:
[0080] Obtain the labels of the marked nodes and calculate the probability distribution of the labels;
[0081] Initialize the labels of unlabeled nodes to the labels corresponding to the highest probability in the probability distribution.
[0082] Considering that labels can be assigned to unlabeled nodes after the final category probabilities are determined, to further improve efficiency, the labels of unlabeled nodes can be initialized to the same label before classification. Subsequent adjustments can be made based on the specific category probabilities of the unlabeled nodes. To further reduce workload, the probability distribution of each label can be roughly determined based on the labels of the labeled nodes, and the label corresponding to the highest probability can be set as the initial label. When the probability corresponding to the initial label is high, it indicates that the unlabeled node has the highest probability of ultimately belonging to the initial label, which can reduce the workload of subsequent label adjustments and improve efficiency. Initializing labels also unifies the unlabeled nodes, facilitating the orderly progress of the classification process. It is understood that in this application, the label of a node refers to the category probability of that node, which is the probability distribution of the node belonging to different categories. This application does not specifically limit the specific implementation of the labels.
[0083] It should be noted that this application does not impose any special limitations on the specific operation process of the initialization process or the specific type of the initialization label. You can refer to the method provided in this embodiment, or you can perform other initialization operations; such as initializing the labels of unmarked nodes to the set blank labels, etc., which can be adjusted and selected according to the actual application situation and operating habits.
[0084] Considering the workload and efficiency of subsequent work, an initialization process for unlabeled nodes has been added. The labels of unlabeled nodes are initialized to preset labels in advance, which can reduce the workload of adjusting labels later and improve work efficiency. At the same time, the unified labeling method for unlabeled nodes is conducive to the orderly progress of subsequent classification processes, and the monitoring and judgment of unlabeled nodes are also easier to implement.
[0085] As a preferred embodiment, a collaborative reasoning method is used to iterate the current category probability, including:
[0086] The simulated annealing algorithm is used to adjust the probability of the current category according to a preset weight;
[0087] The adjusted current class probability is iteratively updated using a relaxed labeling method.
[0088] Specifically, the relaxed labeling method in collaborative inference is used to implement the iterative process of class probability of unlabeled nodes. Simulated annealing algorithm is introduced to further improve the accuracy of the iterative process. After determining the current class probability of unlabeled nodes, the weight of the iterative process is redistributed using simulated annealing algorithm. For example, more weight is given to the current estimate of the node itself, while less weight is given to the influence on its neighbors; or more weight is given to the current class probability obtained in this iteration, while less weight is given to the current class probability obtained in the previous iteration, etc. The specific setting method and implementation process of the preset weight are not particularly limited here. Then, the current class probability is adjusted according to the preset weight, and the relaxed labeling method is used to iterate on it again.
[0089] It's important to note that relaxation labeling is a collaborative reasoning method. It returns uncertainty, recording the current class probability of the unlabeled node set. Instead of updating the network data immediately after labeling each node, relaxation labeling freezes the current class probabilities. At iteration t+1, all nodes are updated based on the class probabilities from iteration t. Relaxation labeling does not assign a specific label "state" to the network data at each time point; it tracks the current probability estimate of unlabeled nodes, preserving uncertainty. The relation classifier must be able to use these estimates. Furthermore, instead of updating the network's label state immediately after predicting a node, relaxation labeling "freezes" the current estimate so that at step t+1, all nodes are updated based on the estimate from step t.
[0090] This invention combines an improved relation classifier with a collaborative reasoning method that incorporates simulated annealing and relaxed labeling. It mixes and matches the various working modules in a new way, and further improves the accuracy of the current category probability by adjusting weights and iteratively updating, so as to ensure the accuracy of the final category probability of unlabeled nodes and further improve the classification accuracy.
[0091] In a preferred embodiment, the first neighbor set includes neighboring nodes that are adjacent to the marked node and weights corresponding to the neighboring nodes that represent the degree of similarity to the marked node.
[0092] It is understandable that the neighbor set determined by the activation diffusion algorithm includes not only neighbor nodes but also weights representing the degree of similarity to the labeled nodes. Each node in a set of neighbor nodes has a corresponding weight representing different degrees of similarity, so that the influence of neighbor nodes on the labeled nodes in the classification process can be determined according to different weights. Correspondingly, the second neighbor set includes neighbor nodes adjacent to the unlabeled nodes and weights corresponding to the neighbor nodes representing the degree of similarity to the unlabeled nodes, so that the category vector of the unlabeled nodes can be determined according to these weights.
[0093] It should be noted that, in this embodiment, the neighboring nodes adjacent to the marked node not only refer to neighboring nodes directly connected to the marked node, but also include neighboring nodes indirectly connected to the marked node. The same applies to the second neighbor set, which will not be elaborated further here. This application does not impose any special limitations on the specific number and determination method of neighboring nodes in the first and second neighbor sets; they can be determined based on the convergence threshold and initial energy value defined in the activation diffusion algorithm.
[0094] Specifically, the neighborhood set determined by the activation diffusion algorithm includes not only neighbor nodes, but also weights representing the degree of similarity to the labeled nodes. By considering the similarity of neighbor nodes as an influencing factor in the process of determining the class probability of labeled or unlabeled nodes, more classification information is obtained, and the accuracy of classification is further improved by considering the different degrees of its influence, thus ensuring the reliability of the entire classification process.
[0095] As a preferred embodiment, acquiring network data includes:
[0096] To obtain the relationships between nodes in network data;
[0097] Retrieve labeled nodes and their labels from network data; retrieve unlabeled nodes from network data.
[0098] Unlike traditional independent instances, network data contains not only data instances but also relationships between nodes. Therefore, acquiring network data requires not only obtaining the data instances of the nodes themselves but also the relationships between them for subsequent neighbor set confirmation. Obtaining the labels of marked nodes is necessary for determining the reference vector. This application does not specifically limit the implementation process and specific details of network data acquisition.
[0099] Specifically, when acquiring network data, it is necessary to consider both the nodes and the relationships between them. Taking into account the various types of network data is beneficial to the effective implementation of the subsequent neighbor set determination process. At the same time, acquiring the labels of the labeled nodes is necessary for the subsequent reference vector determination process, which further ensures the complete implementation of the classification process.
[0100] Please refer to Figure 2 , Figure 2 A flowchart illustrating another network data classification method provided by the present invention;
[0101] As a preferred embodiment, it further includes:
[0102] The pre-collected historical labeled nodes are divided into training and test sets;
[0103] A relation classifier is constructed using historically labeled nodes and their labels in the training set and historically labeled nodes in the test set.
[0104] It should be noted that before a relation classifier is formally applied to a host or device, it needs to be constructed on that host or device based on its internal data. Different hosts or devices may use relation classifiers with different classification implementation processes. The entity executing the construction of the relation classifier can be the main processor or coprocessor on the host or device to which it is applied, etc., and this application does not make any special limitations here.
[0105] Specifically, in constructing the relation classifier, the pre-collected historically labeled nodes need to be divided into a training set and a test set. During construction, the labels of historically labeled nodes in the test set need to be ignored, and they are treated as unlabeled nodes for classification. That is, the historically labeled nodes in the training set are treated as labeled nodes in the application process. First, the relation classifier is trained using the historically labeled nodes in the training set. The activation diffusion algorithm is used to process the nodes in the training set to obtain the first neighbor set of each node, and a reference vector is determined based on the first neighbor set. Then, the activation diffusion algorithm is used to process the nodes in the test set to obtain the second neighbor set of each node, and a class vector is determined based on the second neighbor set. Subsequently, the similarity between the reference vector and the class vector is compared, and iterative processing is performed using collaborative reasoning to finally determine the class probability of the nodes in the test set. The accuracy of the constructed relation classifier is then tested by comparing the labels of the nodes in the test set with the determined class probabilities. Once the accuracy of the relation classifier meets the requirements, it is then deployed in the application.
[0106] As a specific embodiment, reference can be made to Figure 2 , Figure 2 This diagram illustrates the process of classifying network data during the construction of a relation classifier. The specific steps are described below.
[0107] The first step is to read in the network data, which includes nodes, their relationships, label information, and details on how the training and test sets are segmented. The second step is initialization, where the initial prior probability distribution of labels for unlabeled nodes in the test set is calculated based on the labels and attributes of the labeled nodes in the training set. Next is the training phase of the relation classifier based on the training set, also known as the learning phase. Unlabeled nodes in the test set are ignored, and activation diffusion is performed on each labeled node in the training set to obtain a set of neighboring nodes and weights representing the similarity to that labeled node. Based on the first neighbor set of diffusion activations calculated in the previous step, the class vector CV of each labeled node is calculated, which is the actual class probability of the labeled node. Finally, a reference vector RV for each class is calculated based on the class vectors of all labeled nodes obtained in the previous step. Then comes the prediction phase of the relation classifier based on the test set, also known as the classification phase, which involves activation diffusion for unlabeled nodes. Based on the second neighbor set of the diffusion activation obtained in the previous step and the current estimated probability distribution of the unlabeled neighbor nodes, the class vector CV' of the unlabeled node is calculated. The similarity between the class vector CV' and the reference vector RV calculated above is then used to obtain the current estimated probability distribution of the unlabeled node's class. Finally, a relaxed labeling collaborative inference method with simulated annealing is used to iterate the current estimated probability distribution of the unlabeled node's class for t iterations. Simulated annealing is performed on each subsequent iteration, giving more weight to the node's own current estimate and less weight to its influence on its neighbors. Relaxed labeling does not assign a specific label "state" to the network data at each time point; it tracks the current probability estimate of unlabeled nodes, preserving uncertainty. The relation classifier must be able to use these estimates. Furthermore, instead of immediately updating the network's label state after predicting a node, relaxed labeling "freezes" the current estimate so that at step t+1, all nodes will be updated according to the estimate at step t.
[0108] Considering that relation classifiers may vary depending on the host or device, it is necessary to build the relation classifier according to the specific situation of the host or device to be used before putting it into use. This ensures the accuracy of the relation classifier before its application, and further guarantees the accuracy and reliability of the relation classifier in the application process.
[0109] Please refer to Figure 3 , Figure 3 This invention provides a schematic diagram of the structure of an electronic device; to solve the above-mentioned technical problems, this invention also provides an electronic device, comprising:
[0110] Memory 1 is used to store computer programs;
[0111] Processor 2 is used to implement the steps of the network data classification method as described above.
[0112] The processor 2 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 2 may be implemented using at least one hardware form selected from DSP (Digital Signal Processor), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 2 may also include a main processor and a coprocessor. The main processor, also known as the central processing unit, is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 2 may integrate a GPU (graphics processing unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 2 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0113] The memory 1 may include one or more computer-readable storage media, which may be non-transitory. The memory 1 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 1 is used to store at least the following computer program, which, after being loaded and executed by the processor 2, is capable of implementing the relevant steps of the network data classification method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 1 may also include an operating system and data, and the storage method may be temporary or permanent storage. The operating system may include Windows, Unix, Linux, etc. The data may include, but is not limited to, data related to the network data classification method.
[0114] In some embodiments, the electronic device may further include a display screen, input / output interfaces, communication interfaces, a power supply, and a communication bus.
[0115] It will be understood by those skilled in the art that Figure 3 The structures shown do not constitute a limitation on electronic devices and may include more or fewer components than those shown.
[0116] For an introduction to the electronic device provided by this invention, please refer to the embodiments of the network data classification method described above; the invention will not be repeated here.
[0117] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the aforementioned network data classification method.
[0118] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of this application. Specifically, the computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, and portable hard drives, or any type of media or device suitable for storing instructions or data, etc., and this application does not make any special limitations here.
[0119] For an introduction to the computer-readable storage medium provided by the present invention, please refer to the embodiments of the network data classification method described above; the present invention will not be repeated here.
[0120] Please refer to Figure 4 , Figure 4 This is a schematic diagram of a network data classification system provided by the present invention. To solve the above-mentioned technical problems, the present invention also provides a network data classification system applied to a relation classifier, the system comprising:
[0121] Data acquisition module 21 is used to acquire network data, which includes labeled nodes and unlabeled nodes;
[0122] The reference vector determination module 22 is used to process the labeled nodes using the activation diffusion algorithm to obtain the first neighbor set of the labeled nodes, and to determine the reference vector corresponding to the labeled nodes based on the first neighbor set. The reference vector is used to record the statistical category probability of each label corresponding to the labeled nodes.
[0123] The category vector determination module 23 is used to process unlabeled nodes using the activation diffusion algorithm to obtain the second neighbor set of unlabeled nodes, and to determine the category vector corresponding to the unlabeled nodes based on the second neighbor set. The category vector is used to record the estimated category probability of each label corresponding to the unlabeled node.
[0124] The comparison module 24 is used to compare the similarity between the reference vector and the category vector, and to determine the current category probability of the unlabeled node based on the similarity.
[0125] Iteration module 25 is used to iterate the current class probability using a collaborative reasoning method to determine the final class probability of unlabeled nodes.
[0126] Specifically, the reference vector determination module 22 includes a first neighbor set acquisition module and a corresponding reference vector module. The first neighbor set acquisition module is used to process the marked nodes using an activation diffusion algorithm to obtain the first neighbor set of the marked nodes. The corresponding reference vector module is used to determine the reference vector corresponding to the marked nodes based on the first neighbor set.
[0127] In one preferred embodiment, the corresponding reference vector module includes:
[0128] The actual category probability determination module is used to determine the actual category probability of each label corresponding to the labeled node based on the first neighbor set.
[0129] The reference vector determination submodule is used to determine the average value of the actual category probabilities corresponding to the same label in each labeled node as the statistical category probability corresponding to that label, so as to obtain the reference vector.
[0130] As a preferred embodiment, it further includes:
[0131] The label acquisition module is used to acquire the labels of marked nodes and calculate the probability distribution of the labels;
[0132] The initialization module is used to initialize the labels of unlabeled nodes to the labels corresponding to the highest probability in the probability distribution.
[0133] In one preferred embodiment, the iteration module 25 includes:
[0134] The weight adjustment module is used to adjust the probability of the current class according to the preset weights using the simulated annealing algorithm;
[0135] The iterative submodule is used to iteratively update the adjusted current class probability using a relaxed annotation method.
[0136] In one preferred embodiment, the data acquisition module 21 includes:
[0137] The relationship acquisition module is used to acquire the relationships between nodes in network data;
[0138] The node acquisition module is used to acquire labeled nodes and their labels from network data, and to acquire unlabeled nodes from network data.
[0139] As a preferred embodiment, it further includes:
[0140] The partitioning module is used to divide the pre-collected historical labeled nodes into training and test sets;
[0141] The classifier construction module is used to build a relation classifier using historically labeled nodes and their labels in the training set and historically labeled nodes in the test set.
[0142] For an introduction to the network data classification system provided by this invention, please refer to the embodiments of the network data classification method described above; the invention will not be repeated here.
[0143] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0144] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0145] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0146] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0147] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for classifying network data, characterized in that, Applied to relation classifiers, the method includes: Obtain network data; the network data is network data constructed based on papers connected by citation relationships and represented by a graph, wherein the papers are represented by nodes in the network data, the citation relationships between papers are represented by edges in the network data, and the network data includes labeled papers and unlabeled papers; The labeled paper is processed using the activation diffusion algorithm to obtain the first neighbor set of the labeled paper, and the reference vector corresponding to the labeled paper is determined based on the first neighbor set. The reference vector is used to record the statistical category probability of each label corresponding to the labeled paper. The unlabeled paper is processed using the activation diffusion algorithm to obtain the second neighbor set of the unlabeled paper, and the category vector corresponding to the unlabeled paper is determined based on the second neighbor set. The category vector is used to record the estimated category probability of each label corresponding to the unlabeled paper. The similarity between the reference vector and the category vector is compared, and the current category probability of the unlabeled paper is determined based on the similarity. The current category probability is iterated using a collaborative reasoning method to determine the final category probability of the unlabeled paper; Determining the reference vector corresponding to the labeled paper based on the first neighbor set includes: The actual category probability of each tag corresponding to the labeled paper is determined based on the first neighbor set; The average value of the actual category probabilities corresponding to the same tag in each of the labeled papers is determined as the statistical category probability corresponding to that tag, so as to obtain the reference vector; The current category probability is iterated using a collaborative reasoning method, including: The probability of the current category is adjusted according to a preset weight using a simulated annealing algorithm; The adjusted current class probability is iteratively updated using a relaxed labeling method; The first neighbor set includes neighbor nodes adjacent to the labeled paper and weights corresponding to the neighbor nodes representing the similarity to the labeled paper.
2. The network data classification method as described in claim 1, characterized in that, After acquiring network data, the process also includes: Obtain the tags of the tagged papers and calculate the probability distribution of the tags; The labels of the unlabeled papers are initialized to the labels corresponding to the highest probability in the probability distribution.
3. The network data classification method as described in claim 1, characterized in that, Acquire network data, including: To obtain the relationships between nodes in network data; Obtain the tagged papers and their tags from the network data, and obtain the untagged papers from the network data.
4. The network data classification method according to any one of claims 1 to 3, characterized in that, Also includes: The pre-collected historically labeled papers are divided into training and test sets; The relation classifier is constructed using the historically labeled papers and their labels in the training set and the historically labeled papers in the test set.
5. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for implementing the steps of the network data classification method as described in any one of claims 1 to 4.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the network data classification method as described in any one of claims 1 to 4.
7. A network data classification system, characterized in that, Applied to relation classifiers, the system includes: A data acquisition module is used to acquire network data; the network data is network data constructed based on papers connected by citation relationships and represented by a graph, wherein the papers are represented by nodes in the network data, the citation relationships between papers are represented by edges in the network data, and the network data includes labeled papers and unlabeled papers. The reference vector determination module is used to process the labeled paper using the activation diffusion algorithm to obtain the first neighbor set of the labeled paper, and to determine the reference vector corresponding to the labeled paper based on the first neighbor set. The reference vector is used to record the statistical category probability of each label corresponding to the labeled paper. The category vector determination module is used to process the unlabeled paper using the activation diffusion algorithm to obtain the second neighbor set of the unlabeled paper, and to determine the category vector corresponding to the unlabeled paper based on the second neighbor set. The category vector is used to record the estimated category probability of each label corresponding to the unlabeled paper. The comparison module is used to compare the similarity between the reference vector and the category vector, and determine the current category probability of the unlabeled paper based on the similarity. An iterative module is used to iterate the current category probability using a collaborative reasoning method to determine the final category probability of the unlabeled paper; The module for determining the reference vector includes a module for obtaining a first neighbor set and a module for obtaining a corresponding reference vector. The module for obtaining a first neighbor set is used to process the labeled paper using an activation diffusion algorithm to obtain a first neighbor set of the labeled paper. The module for obtaining a corresponding reference vector is used to determine the reference vector corresponding to the labeled paper based on the first neighbor set. The corresponding reference vector module includes: The actual category probability determination module is used to determine the actual category probability of each tag corresponding to the labeled paper based on the first neighbor set. The reference vector determination submodule is used to determine the average value of the actual category probabilities corresponding to the same label in each of the labeled papers as the statistical category probability corresponding to that label, so as to obtain the reference vector; The iteration module includes: The weight adjustment module is used to adjust the probability of the current category according to a preset weight using a simulated annealing algorithm; The iterative submodule is used to iteratively update the adjusted current class probability using a relaxed annotation method; The first neighbor set includes neighbor nodes adjacent to the labeled paper and weights corresponding to the neighbor nodes representing the similarity to the labeled paper.