Node classifier generation method, service network task allocation method and apparatus
By purifying the topology of the service network, a node classifier with higher robustness and accuracy is generated, which solves the problem of insufficient accuracy and robustness of node classifiers in the existing technology and achieves more reliable task allocation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIHANG UNIV
- Filing Date
- 2025-06-06
- Publication Date
- 2026-06-05
AI Technical Summary
Existing node classifiers lack accuracy and robustness in service networks, making it difficult to meet the accuracy requirements of task allocation. They are also susceptible to minor disturbances, which can affect the stable operation of the network.
By acquiring sample topology graphs of the service network, cleaning them using node features and graph structure features, constructing a graph neural network model, generating a node classifier, and improving the robustness and accuracy of the classifier.
The purified graph structure data can defend against structural disturbances, improve the robustness and classification accuracy of the node classifier, and ensure the reliability of service network task allocation.
Smart Images

Figure CN120670943B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method for generating a node classifier, a method and apparatus for task allocation in a service network. Background Technology
[0002] With the rapid development of information technology, service networks are increasingly widely and deeply applied in many fields such as transportation, energy, and communications. Service networks have complex structures, and the data they generate exhibits massive volumes with low information density and sparsity. Furthermore, during operation, service networks are highly susceptible to various subtle interferences. These characteristics make data extraction and analysis within service networks difficult, posing significant challenges to system management.
[0003] In service networks, node classification is fundamental to achieving key functions such as task allocation and resource scheduling. However, existing node classifier generation processes suffer from insufficient accuracy due to the unavoidable presence of excessive interfering features in the sample topology graph, failing to meet the actual classification requirements of service networks. Furthermore, even minor perturbations in the service network can significantly impact the classification results, making the classifier less robust against attacks. This, in turn, affects the accuracy of task allocation in the service network, severely hindering its stable operation and efficient management. Summary of the Invention
[0004] This invention provides a node classifier generation method, a service network task allocation method and apparatus to address the shortcomings of current node classifiers in terms of accuracy and robustness, which affect the accuracy of service network task allocation.
[0005] On one hand, the present invention provides a method for generating a node classifier, comprising:
[0006] Obtain the first sample topology map of the service network;
[0007] Based on the node characteristics of each type of node in the first sample topology graph, the graph structure data of the first sample topology graph is purified to obtain the second sample topology graph.
[0008] The number of common neighbors of every two nodes in the first sample topology graph is determined. Based on the number of common neighbors, the graph structure data of the first sample topology graph is purified to obtain the third sample topology graph.
[0009] Using the second sample topology map and / or the third sample topology map as sample data, a pre-built graph neural network model is trained and / or tested to obtain a node classifier.
[0010] According to the node classifier generation method provided by the present invention, the graph structure data of the first sample topology graph is purified based on the node features of each class of nodes in the first sample topology graph to obtain a second sample topology graph, including:
[0011] Principal component analysis was performed on the node features of each type of node in the first sample topology graph to obtain the feature distribution data of each type of node.
[0012] Based on the feature distribution data of each type of node, a target feature matrix is established;
[0013] Based on the target feature matrix, the graph structure data of the first sample topology graph is purified to obtain the second sample topology graph.
[0014] According to the node classifier generation method provided by the present invention, a target feature matrix is established based on the feature distribution data of each type of node, including:
[0015] Determine the number of times any two node features appear simultaneously in the feature distribution data for each type of node;
[0016] The node features that appear more than a preset threshold number of times simultaneously are used as the key features of each type of node.
[0017] Construct the target feature matrix from the key features of all class nodes.
[0018] According to the node classifier generation method provided by the present invention, the graph structure data of the first sample topology graph is purified based on the target feature matrix to obtain the second sample topology graph, including:
[0019] Determine the feature similarity between any two nodes in the target feature matrix;
[0020] The feature similarity is compared with a preset similarity threshold to obtain the comparison result;
[0021] Based on the comparison results, the connection relationship between the corresponding two nodes in the first sample topology graph is re-determined to purify the graph structure data of the first sample topology graph and obtain the second sample topology graph.
[0022] According to the node classifier generation method provided by the present invention, determining the feature similarity between any two nodes in the target feature matrix includes:
[0023] For any first node and second node in the target feature matrix, determine the number of first features that appear in the first node but not in the second node, the number of second features that appear in the second node but not in the first node, and the number of third features that appear in both the first and second nodes.
[0024] Add the first feature count, the second feature count, and the third feature count to obtain the feature count sum.
[0025] The feature similarity between the first node and the second node is obtained by taking the quotient of the sum of the third feature count and the feature count.
[0026] According to the node classifier generation method provided by the present invention, based on the comparison result, the connection relationship between two corresponding nodes in the first sample topology graph is re-determined, including:
[0027] If the comparison result shows that the feature similarity is higher than a preset similarity threshold, then it is determined that there is a connection relationship between the corresponding two nodes in the first sample topology graph.
[0028] If the comparison result is that the feature similarity is below a preset similarity threshold, then it is determined that there is no connection between the corresponding two nodes in the first sample topology graph.
[0029] According to the node classifier generation method provided by the present invention, the graph structure data of the first sample topology graph is purified based on the number of common neighbors to obtain a third sample topology graph, including:
[0030] Determine whether the number of common neighbors between any two nodes is greater than or equal to 0, and obtain the result.
[0031] Based on the judgment result, the connection relationship between the corresponding two nodes in the first sample topology graph is re-determined to purify the graph structure data of the first sample topology graph and obtain the third sample topology graph.
[0032] According to the node classifier generation method provided by the present invention, training a pre-built graph neural network model includes:
[0033] A perturbation factor is added to the initial hidden layer of the graph neural network model to obtain a perturbation hidden layer;
[0034] Based on the sample data, adversarial training is performed on the graph neural network model containing the perturbation hidden layer.
[0035] On the other hand, the present invention also provides a task allocation method for a service network, comprising:
[0036] By treating each edge server in the service network as a node and using the slave device information corresponding to each edge server as a node feature, an actual topology map is established.
[0037] The actual topology graph is classified by a node classifier to obtain the subtask classification result corresponding to each node. The node classifier is obtained based on any of the node classifier generation methods described above.
[0038] Based on the subtask classification results corresponding to each node, the total target task is split and distributed to the corresponding edge servers.
[0039] On the other hand, the present invention also provides a task allocation device for a service network, comprising:
[0040] A module is established to treat each edge server in the service network as a node and the slave device information corresponding to each edge server as a node feature to establish an actual topology map.
[0041] The classification module is used to classify the nodes of the actual topology graph through a node classifier to obtain the subtask classification result corresponding to each node, wherein the node classifier is obtained based on any of the node classifier generation methods described above.
[0042] The allocation module is used to split the total target task and allocate it to the corresponding edge server based on the subtask classification results corresponding to each node.
[0043] The node classifier generation method, service network task allocation method, and apparatus provided by this invention obtain a first sample topology graph of the service network. Based on the node features of each type of node in the first sample topology graph, the graph structure data of the first sample topology graph is purified to obtain a second sample topology graph. The number of common neighbors between every two nodes in the first sample topology graph is determined. Based on the number of common neighbors, the graph structure data of the first sample topology graph is purified to obtain a third sample topology graph. Finally, the second and / or third sample topology graphs are used as sample data to train and / or test a pre-built graph neural network model to obtain a node classifier. Because the graph structure data of the first sample topology graph can be purified using node features and graph structure features (i.e., the number of common neighbors between every two nodes) in the node classifier generation stage, the purified graph structure data can defend against structural perturbations, thereby improving the robustness and classification accuracy of the node classifier, and thus providing a reliable model basis for task allocation in the service network. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0045] Figure 1 This is a flowchart illustrating the node classifier generation method provided in an embodiment of the present invention;
[0046] Figure 2 This is a flowchart illustrating the task allocation method for a service network provided in an embodiment of the present invention;
[0047] Figure 3 This is a schematic diagram of the structure of the task allocation device for the service network provided in an embodiment of the present invention;
[0048] Figure 4 This is a schematic diagram of the structure of the electronic device in an embodiment of the present invention. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0050] The following is combined with Figures 1 to 4 This invention describes the detailed schemes of the node classifier generation method, the service network task allocation method, and the apparatus provided in the embodiments of the present invention.
[0051] Figure 1 This is a flowchart illustrating the node classifier generation method provided in this embodiment of the invention.
[0052] like Figure 1 As shown, the node classifier generation method provided in this embodiment of the invention mainly includes the following steps:
[0053] Step 110: Obtain the first sample topology map of the service network.
[0054] This embodiment constructs the service network as a multi-layered structure to facilitate network monitoring. The top layer of the service network is the core server, the middle layer is the edge servers, and the bottom layer is the functional modules (i.e., the underlying hardware devices) in the service network. The entire service network is monitored by the core server (i.e., the cloud server). The core server is responsible for receiving and processing the data sent by the edge servers, analyzing the data, and then sending subsequent task instructions to the edge processors.
[0055] In this embodiment, the last two layers of the service network are constructed as a topology graph, with each edge server acting as a node in the graph, and communication channels between edge servers forming edges. Besides receiving instructions from the core server, edge servers can also interact with other edge servers (i.e., other edge servers) as needed to achieve collaborative task execution.
[0056] Furthermore, each edge server manages one or more functional modules, which are its subordinate modules (i.e., subordinate devices). Each edge server can send task instructions to its subordinate devices and receive their device information. The subordinate device information of each edge server constitutes the node characteristics of the corresponding node of that edge server.
[0057] Since this embodiment treats the task allocation problem in the service network as a node classification problem, the classification method in the core server, which acts as the system's regulator, can be considered a node classifier. The edge server layer represents the topology graph to be learned, and the subordinate device layer represents the graph features. Table 1 below shows the correspondence between the service network and the graph neural network model. In this table, the core server layer corresponds to the node classifier, the edge server layer corresponds to the topology graph, the edge servers are the nodes in the topology graph, the interactions between edge servers correspond to the edges in the topology graph, and the subordinate device layer corresponds to the node features.
[0058] Table 1. Correspondence between service networks and graph neural network models
[0059]
[0060] It is understandable that the topological graph can be represented as G = (V, E), where V = {v1, v2, ..., v}. N Let} be a set of nodes, E = {e1, e2, ..., e...} M Let} be the set of edges, N represent the number of nodes, and M represent the number of edges. The topological graph can also be represented as G=(A, X), where A represents the adjacency matrix, and the connection between node i and node j can be represented as a... ij and a ji X represents the node feature matrix.
[0061] Graph neural network models can serve as the basic network architecture for node classifiers, used to obtain the probability that a node is classified into each category. The classification result of a node classifier can generally be expressed as:
[0062] (1)
[0063] Where y represents an N×C classification result matrix, and C represents the number of categories.
[0064] The label of node i can be represented as ∈{1,2,...,C}, based on the classification result y, the predicted category of node i can be obtained as follows: ,if equal If the result is correct, it means that the classification result of node i is correct.
[0065] In practical applications, even small perturbations can significantly impact the classification results of a node classifier. These perturbations typically occur in the adjacency matrix A and the node feature matrix X, as follows:
[0066] (2)
[0067] (3)
[0068] Where A' represents the adjacency matrix after the perturbation, and X' represents the node feature matrix after the perturbation. This represents the perturbation amount of the input adjacency matrix. This represents the perturbation amount of the input node feature matrix.
[0069] Currently, there are solutions that reduce the effectiveness of node classifiers through adversarial attack algorithms. These algorithms can significantly mislead the analysis of the node classifier, causing incorrect classification results for some nodes to meet specific task assignment requirements. The adversarial defense algorithm proposed in this embodiment, however, plays the opposite role to adversarial attack algorithms, aiming to improve the robustness of the node classifier.
[0070] Step 120: Based on the node characteristics of each type of node in the first sample topology graph, the graph structure data of the first sample topology graph is purified to obtain the second sample topology graph.
[0071] It should be noted that this embodiment mainly constructs the adversarial defense algorithm from the perspective of purifying graph structure data.
[0072] When the same amount of perturbation is injected, structural attacks are generally more effective than feature attacks, so many attack methods tend to inject structural perturbations. Therefore, node features can be considered cleaner data. Furthermore, node features can reflect the category of nodes to some extent; accordingly, this embodiment cleanses graph structure data based on node features.
[0073] Step 130: Determine the number of common neighbors for every two nodes in the first sample topology graph. Based on the number of common neighbors, clean up the graph structure data of the first sample topology graph to obtain the third sample topology graph.
[0074] It is understandable that graph structure data may be disturbed, and such structural disturbances generally occur between two nodes of different categories. Therefore, this embodiment cleans up the received graph structure data to achieve the reconstruction of the graph structure data.
[0075] Furthermore, the more common neighbors two nodes share, the higher their feature similarity. To ensure concealment, injected perturbations are usually limited; therefore, determining the connection relationship between two nodes through indirect relationships such as the number of common neighbors is more reliable. Accordingly, this embodiment cleanses the graph structure data based on the number of common neighbors.
[0076] Step 140: Use the second sample topology graph and / or the third sample topology graph as sample data to train and / or test the pre-built graph neural network model to obtain a node classifier.
[0077] In practical applications, the graph neural network model can be trained and tested using at least one sample topology graph obtained after the two purification processes, or trained separately. Furthermore, if the node classifier is trained using clean topology graph sample data, the purified topology graph samples can be used as the test set to test the graph neural network model, thereby increasing the testing accuracy. Whether using purified sample topology graphs for model training or testing, the classification accuracy and robustness of the node classifier can be improved to some extent.
[0078] In one embodiment, based on the node characteristics of each type of node in the first sample topology graph, the graph structure data of the first sample topology graph is purified to obtain a second sample topology graph, specifically including:
[0079] First, principal component analysis is performed on the node features of each type of node in the first sample topology graph to obtain the feature distribution data of each type of node.
[0080] Considering that the node feature matrix is usually a high-dimensional sparse matrix, and that excessive dimensionality may affect the accuracy of feature analysis, this embodiment uses principal component analysis to extract important features in order to simplify the node feature matrix.
[0081] In the principal component analysis stage, the node feature matrix is first normalized, as follows:
[0082] (4)
[0083] in, This represents the normalized node feature matrix. and Representing the node feature matrices respectively The mean vector and variance vector are identical in dimension.
[0084] Therefore, the normalized node feature matrix can be obtained. The covariance matrix is as follows:
[0085] (5)
[0086] in, Represents a positive semi-definite matrix, a positive semi-definite matrix All eigenvalues are non-negative.
[0087] After eigenvalue decomposition, the positive semidefinite matrix It can be represented as , This represents a matrix composed of node eigenvectors. This represents a diagonal matrix composed of eigenvalues.
[0088] In this embodiment, the three eigenvectors corresponding to the three largest eigenvalues can be selected as the principal component representation node feature matrix, and their coordinates can be calculated using the following formula:
[0089] (6)
[0090] Where Z represents the node feature matrix after principal component representation, and v3 represents the matrix composed of the above three feature vectors.
[0091] Then, based on the feature distribution data of each type of node, a target feature matrix is established.
[0092] In a specific implementation, a target feature matrix is established based on the feature distribution data of each type of node, specifically including:
[0093] The first step is to determine the number of times any two node features appear simultaneously in the feature distribution data for each type of node.
[0094] Understandably, nodes of each category show significant differences in the principal component analysis results of their node feature vectors. Therefore, each category may contain some features with high frequency. If a pair of features appears frequently in a certain type of node, it indicates that they are important features of that type of node and have a strong correlation.
[0095] In this embodiment, the number of times any two node features appear simultaneously in the feature distribution data of each type of node can be calculated as follows:
[0096] (7)
[0097] in, X l Indicates the first l Node-like The node feature matrix, i.e., the feature distribution data, the th l The number of times any two node features appear simultaneously in the feature distribution data of class nodes. , This represents the number of times the i-th node feature and the j-th node feature appear simultaneously.
[0098] The second step is to use the node features that appear more than a preset threshold as the key features of each type of node.
[0099] In this embodiment, nodes whose simultaneous occurrences exceed a preset threshold are selected to obtain the key features of this type of node. In practical applications, the preset threshold can be reasonably selected according to actual needs.
[0100] The third step is to construct a target feature matrix from the key features of all class nodes.
[0101] It is understandable that the key features are usually different across different categories. Integrating the key features from each category together yields a simplified target feature matrix. Based on the target feature matrix Each node has more clearly defined characteristics, making it easier to infer the existence of edges and the category of nodes.
[0102] Finally, based on the target feature matrix, the graph structure data of the first sample topology graph is purified to obtain the second sample topology graph.
[0103] In one specific implementation, based on the target feature matrix, the graph structure data of the first sample topology graph is cleaned to obtain the second sample topology graph, specifically including:
[0104] The first step is to determine the feature similarity between any two nodes in the target feature matrix.
[0105] As one possible implementation, determining the feature similarity between any two nodes in the target feature matrix specifically includes:
[0106] For any first node and second node in the target feature matrix, determine the number of first features that appear in the first node but not in the second node, the number of second features that appear in the second node but not in the first node, and the number of third features that appear in both the first and second nodes.
[0107] Add the number of the first feature, the number of the second feature, and the number of the third feature to obtain the sum of the feature counts.
[0108] The feature similarity between the first node and the second node is obtained by taking the quotient of the sum of the number of third features and the number of features.
[0109] In this embodiment, the formula for calculating feature similarity is as follows:
[0110] (8)
[0111] in, This represents the feature similarity between node i and node j; This represents the number of features that exist in node j but not in node i, i.e., the number of first features; This represents the number of features that exist in node i but not in node j, i.e., the number of second features; This represents the number of features that exist simultaneously on two nodes, i.e., the number of third features.
[0112] The second step is to compare the feature similarity with the preset similarity threshold to obtain the comparison result.
[0113] The third step is to redetermine the connection relationship between the corresponding two nodes in the first sample topology graph based on the comparison results, so as to purify the graph structure data of the first sample topology graph and obtain the second sample topology graph.
[0114] In this embodiment, based on the comparison results, the connection relationship between two corresponding nodes in the first sample topology graph is re-determined, specifically including:
[0115] If the comparison result shows that the feature similarity is higher than the preset similarity threshold, then it is determined that there is a connection between the corresponding two nodes in the first sample topology graph. That is, node i and node j are considered to have a connection. .
[0116] If the comparison result shows that the feature similarity is below the preset similarity threshold, then it is determined that there is no connection between the corresponding two nodes in the first sample topology graph. That is, node i and node j are considered to have no connection. .
[0117] Therefore, graph structure data can be purified using node features, and the purified graph structure data is denoted as . .
[0118] Understandably, in the structural cleanup phase, the number of common neighbors between any two nodes can be calculated using the following formula:
[0119] (9)
[0120] in, This represents the result matrix, where each element represents the number of common neighbors between two nodes.
[0121] In one embodiment, the graph structure data of the first sample topology graph is cleaned based on the number of common neighbors to obtain the third sample topology graph, specifically including:
[0122] First, determine whether the number of common neighbors between any two nodes is greater than or equal to 0, and obtain the result.
[0123] Then, based on the above judgment results, the connection relationship between the corresponding two nodes in the first sample topology graph is re-determined in order to purify the graph structure data of the first sample topology graph and obtain the third sample topology graph.
[0124] It is understandable that if the number of common neighbors between any two nodes is greater than 0, then a connection is determined to exist between the corresponding two nodes in the first sample topology graph. If the number of common neighbors between any two nodes is equal to 0, then there is no connection between the corresponding two nodes in the first sample topology graph.
[0125] Based on this, the graph structure data after structural purification can be obtained, denoted as... .
[0126] Subsequently, the second and third sample topology graphs obtained from the two purification methods above can be used as sample data to train the graph neural network model, with objective functions as follows:
[0127] (10)
[0128] (11)
[0129] in, Indicates model parameters, This represents the model output data obtained by taking the second sample topology graph as input. This represents the model output data obtained by taking the third sample topology graph as input. This represents the probability that node i belongs to the j-th class.
[0130] The node classifier trained using the above training scheme can better defend against perturbations to graph-structured data and is more robust.
[0131] In some embodiments, training a pre-built graph neural network model specifically includes:
[0132] First, a perturbation factor is added to the initial hidden layer of the graph neural network model to obtain the perturbation hidden layer.
[0133] Then, based on the sample data, adversarial training is performed on the graph neural network model containing perturbation hidden layers.
[0134] To further improve training efficiency, this embodiment adds appropriate perturbations to the hidden layers of the model, which can train a node classifier with better robustness. (Cleaned graph structure data) , and target feature matrix It can be used to train or test graph neural network models to improve their robustness and classification accuracy. Specifically, adversarial training can be employed, injecting appropriate perturbations into the hidden layers to defend against adversarial attacks on graph-structured data. Therefore, by training a graph neural network model with perturbed hidden layers, a more robust node classifier can be obtained. The objective function of the adversarial training stage is:
[0135] (12)
[0136] in, H represents the optimal model parameter values, and H represents the output of the hidden layer. This represents the disturbance factor. This represents hyperparameters.
[0137] In summary, this embodiment performs graph structure purification on the initially obtained first sample topology graph through node features and graph structure features, which can better defend against structural disturbances, improve the robustness and accuracy of the node classifier, and thus provide reliable model support for subsequent task allocation in the service network.
[0138] Based on the same general inventive concept, this invention also protects a task allocation method and apparatus for a service network. The task allocation method and apparatus for a service network provided by this invention will be described below. The task allocation method and apparatus for a service network described below can be referred to in correspondence with the node classifier generation method described above.
[0139] like Figure 2 As shown, the task allocation method for a service network provided in this embodiment of the invention specifically includes the following steps:
[0140] Step 210: Establish an actual topology map by treating each edge server in the service network as a node and the slave device information corresponding to each edge server as a node feature.
[0141] It should be noted that the actual topology graph in this embodiment can also be purified using the graph structure purification method described above, which is implemented through node features and graph structure features, in order to further improve the accuracy of subsequent node classification results.
[0142] Step 220: Classify the nodes of the actual topology graph using a node classifier to obtain the subtask classification result corresponding to each node. The node classifier is obtained based on the node classifier generation method provided in the above embodiments.
[0143] This embodiment treats the task allocation problem of the service network as a node classification problem. When it is necessary to allocate the total target tasks to be allocated, the actual topology map corresponding to the service network can be obtained in any way. The actual topology map describes the edge servers in the service network, the connections between edge servers, and the slave devices of each edge server.
[0144] Understandably, the subtask classification results can represent the subtask category corresponding to each node. In practical applications, multiple subtask categories corresponding to the overall target task can be predetermined, and a node classifier can be used to further determine which subtask category each node corresponds to.
[0145] Step 230: Based on the subtask classification results corresponding to each node, the total target task is split and distributed to the corresponding edge servers.
[0146] Once the subtask categories corresponding to each node are determined, the overall target task can be broken down into multiple subtasks. These subtasks can then be distributed among edge servers within the service network, following the principle of assigning subtasks to edge servers corresponding to their respective subtask categories. The specific distribution method can be determined based on actual needs; for example, an edge server may be assigned one or more subtasks. No specific limitations are imposed on the distribution method here.
[0147] like Figure 3 As shown, this embodiment of the invention also provides a task allocation device for a service network, which specifically includes:
[0148] Module 310 is used to establish an actual topology map by taking each edge server in the service network as a node and taking the subordinate device information corresponding to each edge server as a node feature.
[0149] The classification module 320 is used to classify the nodes of the actual topology graph through a node classifier to obtain the subtask classification result corresponding to each node. The node classifier is obtained based on the node classifier generation method provided in the above embodiments.
[0150] The allocation module 330 is used to split the total target task and allocate it to the corresponding edge server based on the subtask classification results of each node.
[0151] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments of the relevant methods, and will not be elaborated further here.
[0152] Figure 4 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention.
[0153] like Figure 4 As shown, the electronic device may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, communications interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a task allocation method for the service network. This method includes: establishing an actual topology map by treating each edge server in the service network as a node and using the subordinate device information corresponding to each edge server as node features; classifying the nodes in the actual topology map using a node classifier to obtain the sub-task classification result corresponding to each node, wherein the node classifier is obtained based on the node classifier generation method provided in the above embodiments; and dividing the target total task and allocating it to the corresponding edge servers based on the sub-task classification result corresponding to each node.
[0154] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a 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 includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0155] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute a task allocation method for a service network. The method includes: establishing an actual topology map by taking each edge server in the service network as a node and taking the subordinate device information corresponding to each edge server as a node feature; classifying the nodes in the actual topology map by a node classifier to obtain the sub-task classification result corresponding to each node, wherein the node classifier is obtained based on the node classifier generation method provided in the above embodiments; and dividing the target total task and allocating it to the corresponding edge server according to the sub-task classification result corresponding to each node.
[0156] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements a task allocation method for a service network. The method includes: establishing an actual topology map by taking each edge server in the service network as a node and taking the subordinate device information corresponding to each edge server as a node feature; classifying the nodes in the actual topology map by a node classifier to obtain the sub-task classification result corresponding to each node, wherein the node classifier is obtained based on the node classifier generation method provided in the above embodiments; and dividing the target total task and allocating it to the corresponding edge server according to the sub-task classification result corresponding to each node.
[0157] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0158] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating a node classifier, characterized in that, include: Obtain the first sample topology map of the service network; Based on the node features of each type of node in the first sample topology graph, the graph structure data of the first sample topology graph is purified to obtain a second sample topology graph. This includes: performing principal component analysis on the node features of each type of node in the first sample topology graph to obtain feature distribution data for each type of node; determining the frequency of simultaneous occurrence of any two node features in the feature distribution data for each type of node; identifying node features whose frequency of simultaneous occurrence exceeds a preset threshold as key features for each type of node; constructing a target feature matrix from the key features of all types of nodes; determining the feature similarity between any two nodes in the target feature matrix; comparing the feature similarity with a preset similarity threshold to obtain a comparison result; and, based on the comparison result, re-determining the connection relationship between corresponding two nodes in the first sample topology graph to purify the graph structure data of the first sample topology graph and obtain a second sample topology graph. The number of common neighbors of every two nodes in the first sample topology graph is determined. Based on the number of common neighbors, the graph structure data of the first sample topology graph is purified to obtain the third sample topology graph. Using the second sample topology map and / or the third sample topology map as sample data, a pre-built graph neural network model is trained and / or tested to obtain a node classifier.
2. The node classifier generation method according to claim 1, characterized in that, Determining the feature similarity between any two nodes in the target feature matrix includes: For any first node and second node in the target feature matrix, determine the number of first features that appear in the first node but not in the second node, the number of second features that appear in the second node but not in the first node, and the number of third features that appear in both the first and second nodes. Add the first feature count, the second feature count, and the third feature count to obtain the feature count sum. The feature similarity between the first node and the second node is obtained by taking the quotient of the sum of the third feature count and the feature count.
3. The node classifier generation method according to claim 1, characterized in that, Based on the comparison results, the connection relationship between two corresponding nodes in the first sample topology graph is re-determined, including: If the comparison result shows that the feature similarity is higher than a preset similarity threshold, then it is determined that there is a connection relationship between the corresponding two nodes in the first sample topology graph. If the comparison result is that the feature similarity is below a preset similarity threshold, then it is determined that there is no connection between the corresponding two nodes in the first sample topology graph.
4. The node classifier generation method according to claim 1, characterized in that, Based on the number of common neighbors, the graph structure data of the first sample topology graph is cleaned to obtain the third sample topology graph, including: Determine whether the number of common neighbors between any two nodes is greater than or equal to 0, and obtain the result. Based on the judgment result, the connection relationship between the corresponding two nodes in the first sample topology graph is re-determined to purify the graph structure data of the first sample topology graph and obtain the third sample topology graph.
5. The node classifier generation method according to claim 1, characterized in that, Training a pre-built graph neural network model includes: A perturbation factor is added to the initial hidden layer of the graph neural network model to obtain a perturbation hidden layer; Based on the sample data, adversarial training is performed on the graph neural network model containing the perturbation hidden layer.
6. A task allocation method for a service network, characterized in that, include: By treating each edge server in the service network as a node and using the slave device information corresponding to each edge server as a node feature, an actual topology map is established. The actual topology graph is classified by a node classifier to obtain the subtask classification result corresponding to each node, wherein the node classifier is obtained based on the node classifier generation method as described in any one of claims 1 to 5; Based on the subtask classification results corresponding to each node, the total target task is split and distributed to the corresponding edge servers.
7. A task allocation device for a service network, characterized in that, include: A module is established to treat each edge server in the service network as a node and the slave device information corresponding to each edge server as a node feature to establish an actual topology map. A classification module is used to classify the nodes of the actual topology graph using a node classifier to obtain the subtask classification result corresponding to each node, wherein the node classifier is obtained based on the node classifier generation method as described in any one of claims 1 to 5; The allocation module is used to split the total target task and allocate it to the corresponding edge server based on the subtask classification results corresponding to each node.