Node classifier generation method, and task allocation method and device of service network
By purifying the topological structure data of the service network and conducting adversarial training, a more robust node classifier is generated, which solves the problem of insufficient accuracy and robustness of the node classifier and improves the accuracy of task allocation and the stability of the service network.
Patent Information
- Application Number
- CN202510756789.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-06-06
AI Technical Summary
Existing node classifiers lack accuracy and robustness in service networks, making it difficult to meet the requirements of accurate classification and anti-attack, affecting task allocation accuracy and network stability.
By obtaining the first sample topology graph of the service network, the graph structure data is purified according to the node characteristics and the number of common neighbors, a graph neural network model is constructed, a node classifier is generated, and the robustness is improved through adversarial training.
It improves the classification accuracy and robustness of the node classifier, provides a reliable task allocation model, and enhances the stability and management efficiency of the service network.
Smart Images

Figure CN120670943A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a node classifier generation method, a service network task allocation method and a device. Background Art
[0002] With the rapid development of information technology, service networks are increasingly being used in a wide range of fields, including transportation, energy, and communications. Service networks have complex structures, generating massive amounts of data with low information density and sparse characteristics. Furthermore, during operation, service networks are highly susceptible to various subtle interferences. These characteristics make data extraction and analysis within service networks difficult, and pose 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 inaccurate node classifiers due to the unavoidable presence of excessive interference features in sample topology graphs, making them difficult to meet the actual service network's demand for precise classification. Furthermore, minor perturbations in the service network can significantly impact the node classifier's classification results, making it less robust against attacks. This, in turn, affects the accuracy of task allocation in the service network, severely restricting its stable operation and efficient management. Summary of the Invention
[0004] The present invention provides a node classifier generation method, a service network task allocation method and device, which are used to solve the defects of the current node classifier's insufficient accuracy and robustness, which affect the accuracy of service network task allocation.
[0005] In one aspect, the present invention provides a node classifier generation method, comprising: Obtaining a first sample topology map of the service network; Purifying the graph structure data of the first sample topology graph according to the node features of each type of node in the first sample topology graph to obtain a second sample topology graph; Determine the number of common neighbors between every two nodes in the first sample topology graph, and purify the graph structure data of the first sample topology graph based on the number of common neighbors to obtain a third sample topology graph; The second sample topology graph and / or the third sample topology graph are used as sample data to train and / or test the pre-built graph neural network model to obtain a node classifier.
[0006] 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 type of node in the first sample topology graph to obtain a second sample topology graph, including: Performing principal component analysis on node features of each type of node in the first sample topology graph to obtain feature distribution data of each type of node; Establishing a target feature matrix based on the feature distribution data of each type of node; The graph structure data of the first sample topology graph is purified according to the target feature matrix to obtain a second sample topology graph.
[0007] 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: Determine the number of times any two node features appear simultaneously in the feature distribution data of each type of node; The node features that appear at the same time more than the preset threshold are used as the key features of each type of node; The key features of all class nodes are constructed as the target feature matrix.
[0008] According to the node classifier generation method provided by the present invention, the graph structure data of the first sample topology graph is purified according to the target feature matrix to obtain the second sample topology graph, including: Determine 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; According to the comparison 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 to obtain a second sample topology graph.
[0009] 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: 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 node and the second node; Adding the first feature quantity, the second feature quantity, and the third feature quantity to obtain a feature quantity sum value; The third feature quantity is divided by the sum of the feature quantities to obtain the feature similarity between the first node and the second node.
[0010] According to the node classifier generation method provided by the present invention, based on the comparison result, re-determining the connection relationship between the corresponding two nodes in the first sample topology graph includes: If the comparison result shows that the feature similarity is higher than a preset similarity threshold, determining that a connection relationship exists between the corresponding two nodes in the first sample topology graph; If the comparison result shows that the feature similarity is below a preset similarity threshold, it is determined that there is no connection relationship between the corresponding two nodes in the first sample topology graph.
[0011] According to the node classifier generation method provided by the present invention, the graph structure data of the first sample topology graph is purified according to the number of common neighbors to obtain a 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 judgment result; According to 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 to obtain a third sample topology graph.
[0012] According to the node classifier generation method provided by the present invention, a pre-built graph neural network model is trained, including: Add a perturbation factor 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 including the perturbation hidden layer.
[0013] On the other hand, the present invention also provides a task allocation method for a service network, comprising: Each edge server in the service network is regarded as a node, and the slave device information corresponding to each edge server is used as the node feature to establish the actual topology map; Classifying nodes of the actual topology graph using a node classifier to obtain a subtask classification result corresponding to each node, wherein the node classifier is obtained based on any of the node classifier generation methods described above; According to the classification results of the subtasks corresponding to each node, the target total task is split and allocated to the corresponding edge servers.
[0014] In another aspect, the present invention further provides a task allocation device for a service network, comprising: A building module is used to build an actual topology map 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; A classification module, configured to classify nodes of the actual topology graph using a node classifier to obtain a subtask classification result corresponding to each node, wherein the node classifier is obtained based on any of the node classifier generation methods described above; The allocation module is used to split the target total task and allocate it to the corresponding edge server according to the classification result of the subtasks corresponding to each node.
[0015] The node classifier generation method, service network task allocation method, and device provided by the present invention obtain a first sample topology graph of the service network, purify the graph structure data of the first sample topology graph based on the node characteristics of each type of node in the first sample topology graph, obtain a second sample topology graph, determine the number of common neighbors between every two nodes in the first sample topology graph, purify the graph structure data of the first sample topology graph based on the number of common neighbors, obtain a third sample topology graph, and finally use the second sample topology graph and / or the third sample topology graph 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 characteristics and the graph structure's own characteristics (i.e., the number of common neighbors between every two nodes) during the node classifier generation process, the purified graph structure data can defend against structural perturbations, thereby improving the robustness and classification accuracy of the node classifier, thereby providing a reliable model basis for task allocation in the service network. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 1 is a flow chart of a method for generating a node classifier according to an embodiment of the present invention; Figure 2 1 is a flow chart of a method for allocating tasks in a service network according to an embodiment of the present invention; Figure 3 Schematic diagram of the structure of a task allocation device for a service network provided by an embodiment of the present invention; Figure 4 2 is a schematic structural diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0018] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0019] The following combination Figures 1 to 4 The detailed scheme of the node classifier generation method, service network task allocation method and device provided by the embodiments of the present invention is described.
[0020] Figure 1 It is a flowchart of a node classifier generation method provided by an embodiment of the present invention.
[0021] like Figure 1 As shown, the node classifier generation method provided by the embodiment of the present invention mainly includes the following steps: Step 110: Obtain a first sample topology map of the service network.
[0022] This embodiment constructs a multi-layered service network to facilitate network oversight. The top layer of the service network consists of core servers, the middle layer consists of edge servers, and the bottom layer consists of functional modules (i.e., underlying hardware devices) within the service network. The entire service network is overseen by the core servers (i.e., cloud servers). These core servers are responsible for receiving and processing data sent by edge servers, analyzing this data, and issuing subsequent task instructions to edge processors.
[0023] This embodiment constructs the last two layers of the service network as a topology graph, with each edge server acting as a node in the graph. The communication channels between edge servers are called edges. In addition to receiving instructions from the core server, edge servers can also interact with peer servers (i.e., other edge servers) as needed to achieve task collaboration.
[0024] 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 node corresponding to that edge server.
[0025] Since this embodiment solves the task allocation problem in the service network as a node classification problem, the classification method in the core server, which serves as the system supervisor, can be regarded as a node classifier, while the edge server layer serves as the topology graph to be learned, and the slave device layer appears as a graph feature. Table 1 below shows the correspondence between the service network and the graph neural network model, where the core server layer corresponds to the node classifier, the edge server layer corresponds to the topology graph, the edge servers are nodes in the topology graph, the interactions between edge servers correspond to the edges in the topology graph, and the slave device layer corresponds to the node features.
[0026] Table 1 Correspondence between service network and graph neural network model
[0027] It can be understood that the topological graph can be expressed as G = (V, E), where V = {v1, v2, ..., v N} is a node set, E={e1, e2, ..., e M} is the edge set, N is the number of nodes, and M is the number of edges. The topological graph can also be expressed as G=(A, X), where A is the adjacency matrix and the connection relationship between node i and node j can be expressed as a ij and a ji , X represents the node feature matrix.
[0028] The graph neural network model can be used as the basic network architecture of the node classifier to obtain the probability of a node being classified into each category. The classification result of the node classifier can generally be expressed as: (1) Where y represents the N×C classification result matrix, and C represents the number of categories.
[0029] The label of node i can be expressed as ∈{1,2,···,C}, according to the classification result y, the predicted category of node i can be obtained as ,if equal , it means that the classification result of node i is correct.
[0030] In practical applications, small perturbations can have a significant impact on the classification results of the node classifier. Perturbations usually occur in the adjacency matrix A and the node feature matrix X, as follows: (2) (3) Among them, A' represents the adjacency matrix after the disturbance, X' represents the node feature matrix after the disturbance, represents the perturbation of the input adjacency matrix, Represents the perturbation of the input node feature matrix.
[0031] Currently, there are solutions that use adversarial attack algorithms to reduce the effectiveness of node classifiers. These algorithms can significantly mislead the node classifier's analysis, resulting in incorrect classification results for some nodes to meet specific task allocation requirements. The adversarial defense algorithm proposed in this embodiment, however, has the opposite effect, aiming to improve the robustness of the node classifier.
[0032] Step 120: Purify the graph structure data of the first sample topology graph according to the node features of each type of node in the first sample topology graph to obtain a second sample topology graph.
[0033] It should be noted that this embodiment mainly constructs an adversarial defense algorithm from the perspective of purifying graph structure data.
[0034] When injecting the same amount of perturbation, 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 node category to a certain extent. Therefore, this embodiment purifies graph structure data based on node features.
[0035] Step 130: Determine the number of common neighbors between every two nodes in the first sample topology graph, and purify the graph structure data of the first sample topology graph based on the number of common neighbors to obtain a third sample topology graph.
[0036] It is understandable that since graph structure data may be disturbed, and such structural disturbance generally occurs between two nodes of different categories, this embodiment purifies the received graph structure data itself to achieve reconstruction of the graph structure data.
[0037] Furthermore, the more common neighbors two nodes have, the higher the feature similarity between the two nodes. To ensure concealment, the injected perturbations are usually limited. Therefore, it is more reliable to determine the connection between two nodes through indirect relationships such as the number of common neighbors. Accordingly, this embodiment purifies graph structure data based on the number of common neighbors.
[0038] 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.
[0039] In practical applications, the graph neural network model can be trained and tested based on at least one sample topology graph obtained after the two purification steps, or trained independently. Furthermore, if the node classifier is trained using clean topology graph sample data, the purified topology graph sample can be used as a test set to test the graph neural network model during testing to increase test 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 a certain extent.
[0040] In one embodiment, the graph structure data of the first sample topology graph is purified based on the node characteristics of each type of node in the first sample topology graph to obtain the second sample topology graph, specifically including: First, principal component analysis is performed on the node features of each type of node in the first sample topology graph to obtain feature distribution data of each type of node.
[0041] Considering that the node feature matrix is usually a high-dimensional sparse matrix, too large a dimension may affect the accuracy of feature analysis. Therefore, this embodiment can extract important features through principal component analysis to simplify the node feature matrix.
[0042] In the principal component analysis phase, the node feature matrix is first normalized as follows: (4) in, represents the normalized node feature matrix, and Represents the node feature matrix The mean vector and variance vector of , and the dimensions are consistent.
[0043] Therefore, the normalized node feature matrix can be obtained The covariance matrix is as follows: (5) in, represents a semi-positive definite matrix, a semi-positive definite matrix All eigenvalues in are non-negative.
[0044] After eigenvalue decomposition, the semi-positive definite matrix It can be expressed as , represents the matrix composed of node eigenvectors, represents a diagonal matrix consisting of eigenvalues.
[0045] In this embodiment, the three eigenvectors corresponding to the three largest eigenvalues can be selected as the principal components to represent the node feature matrix, and its coordinates can be calculated by the following formula: (6) Among them, Z represents the node feature matrix after principal component representation, and v3 represents the matrix composed of the above three eigenvectors.
[0046] Then, the target feature matrix is established based on the feature distribution data of each type of node.
[0047] In a specific implementation, a target feature matrix is established based on the feature distribution data of each type of node, specifically including: The first step is to determine the number of times any two node features appear simultaneously in the feature distribution data of each type of node.
[0048] It is understandable that the principal component analysis results of node feature vectors for each category of nodes are significantly different, so each category may have some features with high frequency. If a pair of features appears frequently in a certain category of nodes, it means that they are important features of that category of nodes and have a strong correlation.
[0049] 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: (7) in, X l Indicates the l Class Node The node feature matrix, that is, the feature distribution data, l The number of times any two node features appear simultaneously in the feature distribution data of the class node , Indicates the number of times the i-th node feature and the j-th node feature appear at the same time.
[0050] In the second step, the node features that appear simultaneously more than the preset threshold are used as the key features of each type of node.
[0051] In this embodiment, the node features that appear more than a preset threshold number of times are selected to obtain the key features of the node. In practical applications, the preset threshold number of times can be reasonably selected according to actual needs.
[0052] In the third step, the key features of all class nodes are constructed as the target feature matrix.
[0053] It is understandable that the key features of different categories are usually different. By integrating the key features of each category, a simplified target feature matrix can be obtained. According to the target feature matrix , the characteristics of each node are clearer, which makes it easier to reason about the existence of edges and the categories of nodes.
[0054] Finally, according to the target feature matrix, the graph structure data of the first sample topology graph is purified to obtain the second sample topology graph.
[0055] In a specific implementation, the graph structure data of the first sample topology graph is purified according to the target feature matrix to obtain the second sample topology graph, which specifically includes: The first step is to determine the feature similarity between any two nodes in the target feature matrix.
[0056] As a possible implementation method, the feature similarity between any two nodes in the target feature matrix is determined, specifically including: For any first node and second node in the target feature matrix, 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 node and the second node are determined.
[0057] The first feature quantity, the second feature quantity, and the third feature quantity are added together to obtain a feature quantity sum value.
[0058] The third feature quantity is divided by the sum of the feature quantities to obtain the feature similarity between the first node and the second node.
[0059] In this embodiment, the calculation formula of feature similarity is as follows: (8) in, Represents the feature similarity between node i and node j; represents the number of features that exist in node j but not in node i, that is, the number of first features; represents the number of features that exist in node i but not in node j, that is, the second feature number; Indicates the number of features that exist on two nodes at the same time, that is, the number of third features.
[0060] In the second step, the feature similarity is compared with the preset similarity threshold to obtain the comparison result.
[0061] The third step is to redetermine the connection relationship between the corresponding two nodes in the first sample topology graph based on the comparison result, so as to purify the graph structure data of the first sample topology graph and obtain the second sample topology graph.
[0062] In this embodiment, based on the comparison result, re-determining the connection relationship between the corresponding two nodes in the first sample topology graph specifically includes: If the comparison result shows that the feature similarity is higher than the preset similarity threshold, it is determined that there is a connection relationship between the corresponding two nodes in the first sample topology graph. In other words, node i and node j are considered to have an edge connection, that is, .
[0063] If the comparison result shows that the feature similarity is below the preset similarity threshold, it is determined that there is no connection relationship between the corresponding two nodes in the first sample topology graph. In other words, node i and node j are considered to have no edge connection, i.e. .
[0064] Based on this, the graph structure data can be purified through node features, and the purified graph structure data is recorded as .
[0065] It is understandable that in the structure purification phase, the number of common neighbors between every two nodes can be calculated using the following formula: (9) in, Represents the result matrix, in which each element represents the number of common neighbors between two nodes.
[0066] In one embodiment, the graph structure data of the first sample topology graph is purified based on the number of common neighbors to obtain the third sample topology graph, specifically including: First, it is determined whether the number of common neighbors between any two nodes is greater than or equal to 0, and a determination result is obtained.
[0067] Then, based on the above 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 to obtain a third sample topology graph.
[0068] It is understood that if the number of common neighbors between any two nodes is greater than 0, it is determined that there is a connection relationship 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, it is determined that there is no connection relationship between the corresponding two nodes in the first sample topology graph.
[0069] Based on this, we can get the graph structure data after structure purification, which is recorded as .
[0070] Subsequently, the second and third sample topology maps obtained by the above two purification methods can be used as sample data to train the graph neural network model respectively, with the objective functions being: (10) (11) in, represents the model parameters, represents the model output data obtained by taking the second sample topology graph as input, represents the model output data obtained by taking the third sample topology graph as input, Represents the probability value that node i belongs to the jth class.
[0071] The node classifier trained by the above training scheme can better defend against disturbances to graph structure data and is more robust.
[0072] In some embodiments, training a pre-built graph neural network model specifically includes: First, a perturbation factor is added to the initial hidden layer of the graph neural network model to obtain a perturbation hidden layer.
[0073] Then, based on the sample data, the graph neural network model containing the perturbation hidden layer is adversarially trained.
[0074] In order to further improve the training efficiency, this embodiment adds appropriate perturbations to the hidden layer of the model to train a more robust node classifier. 、 And the target feature matrix It can be used to train or test graph neural network models to improve the robustness and classification accuracy of the model. Specifically, adversarial training can be used to defend against adversarial attacks on graph structured data by injecting appropriate perturbations into the hidden layer. Therefore, by training a graph neural network model containing a perturbed hidden layer, a more robust node classifier can be obtained. The objective function of the adversarial training phase is: (12) in, represents the optimal model parameter value, H represents the output of the hidden layer, represents the disturbance factor, represents a hyperparameter.
[0075] To sum up, this embodiment purifies the graph structure of the first sample topology graph obtained initially through node features and the characteristics of the graph structure itself, which can better defend against structural disturbances, improve the robustness and accuracy of the node classifier, and provide reliable model support for the subsequent implementation of task allocation of the service network.
[0076] Based on the same general inventive concept, the present invention also protects a method and device for allocating tasks to a service network. The method and device for allocating tasks to a service network provided by the present invention are described below. The method and device for allocating tasks to a service network described below can be referenced to each other with the node classifier generation method described above.
[0077] like Figure 2 As shown, the task allocation method of the service network provided by the embodiment of the present invention specifically includes the following steps: Step 210: Each edge server in the service network is regarded as a node, and the slave device information corresponding to each edge server is used as a node feature to establish an actual topology map.
[0078] It should be noted that the actual topology graph in this embodiment may also be purified using the graph structure purification method implemented by using node features and graph structure features to further improve the accuracy of subsequent node classification results.
[0079] Step 220: Classify the nodes of the actual topology graph through a node classifier to obtain a subtask classification result corresponding to each node, wherein the node classifier is obtained based on the node classifier generation method provided in the above embodiments.
[0080] This embodiment solves the task allocation problem of the service network as a node classification problem. When the target total tasks need to be allocated, the actual topology corresponding to the service network can be obtained by any method. The actual topology describes the edge servers in the service network, the connections between edge servers, and the subordinate devices of each edge server.
[0081] It is understandable that the subtask classification result can represent the subtask category corresponding to the corresponding node. In practical applications, multiple subtask categories corresponding to the target overall task can be predetermined, and the node classifier can be used to further determine which subtask category each node corresponds to.
[0082] Step 230: Based on the classification results of the subtasks corresponding to each node, the target total task is split and allocated to the corresponding edge servers.
[0083] After determining the subtask categories corresponding to each node, the target overall task can be split into multiple subtasks. These subtasks can then be distributed among the edge servers within the service network in the same manner as the subtasks are assigned to edge servers corresponding to the subtask categories. The specific distribution method can be determined based on actual needs. For example, an edge server may be assigned one subtask or multiple subtasks. This specific distribution method is not limited here.
[0084] like Figure 3 As shown, an embodiment of the present invention further provides a task allocation device for a service network, the device specifically comprising: The establishment module 310 is used to establish an actual topology map by taking each edge server in the service network as a node and using the subordinate device information corresponding to each edge server as a node feature.
[0085] The classification module 320 is used to classify nodes in the actual topology graph through a node classifier to obtain a subtask classification result corresponding to each node, wherein the node classifier is obtained based on the node classifier generation method provided in the above embodiments.
[0086] The allocation module 330 is used to split the target total task and allocate it to the corresponding edge server according to the classification result of the subtasks corresponding to each node.
[0087] Regarding the apparatus in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments of the relevant methods and will not be elaborated on again here.
[0088] Figure 4 It is a structural diagram of an electronic device provided by an embodiment of the present invention.
[0089] like Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other via the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute a task allocation method for a service network, the method comprising: 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, to establish an actual topology map; classifying the nodes in the actual topology map by a node classifier to obtain a subtask 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 splitting the target total task according to the subtask classification result corresponding to each node and allocating it to the corresponding edge server.
[0090] Furthermore, the logic 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 portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0091] On the other hand, the present invention also provides a computer program product, which includes a computer program, which 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, which method includes: 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, to establish an actual topology map; classifying the nodes of the actual topology map through a node classifier to obtain a subtask classification result corresponding to each node, wherein the node classifier is obtained based on the node classifier generation method provided in the above embodiments; based on the subtask classification result corresponding to each node, the target total task is split and allocated to the corresponding edge server.
[0092] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which implements a task allocation method for a service network when executed by a processor, the method comprising: 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, to establish an actual topology map; performing node classification on the actual topology map through a node classifier to obtain a subtask 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 splitting the target total task according to the subtask classification result corresponding to each node and allocating it to the corresponding edge server.
[0093] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0094] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion 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, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.
[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A node classifier generation method, characterized in that: include: Obtaining a first sample topology map of the service network; Purifying the graph structure data of the first sample topology graph according to the node features of each type of node in the first sample topology graph to obtain a second sample topology graph; Determine the number of common neighbors between every two nodes in the first sample topology graph, and purify the graph structure data of the first sample topology graph based on the number of common neighbors to obtain a third sample topology graph; The second sample topology graph and / or the third sample topology graph are used as sample data to train and / or test the pre-built graph neural network model to obtain a node classifier.
2. The node classifier generation method according to claim 1, characterized in that: Purifying the graph structure data of the first sample topology graph according to the node features of each type of node in the first sample topology graph to obtain a second sample topology graph, including: Performing principal component analysis on node features of each type of node in the first sample topology graph to obtain feature distribution data of each type of node; Establishing a target feature matrix based on the feature distribution data of each type of node; The graph structure data of the first sample topology graph is purified according to the target feature matrix to obtain a second sample topology graph.
3. The node classifier generation method according to claim 2, characterized in that: According to the feature distribution data of each type of node, a target feature matrix is established, including: Determine the number of times any two node features appear simultaneously in the feature distribution data of each type of node; The node features that appear at the same time more than the preset threshold are used as the key features of each type of node; The key features of all class nodes are constructed as the target feature matrix.
4. The node classifier generation method according to claim 2, characterized in that: Purifying the graph structure data of the first sample topology graph according to the target feature matrix to obtain a second sample topology graph, including: Determine 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; According to the comparison 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 to obtain a second sample topology graph.
5. The node classifier generation method according to claim 4, 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 node and the second node; Adding the first feature quantity, the second feature quantity, and the third feature quantity to obtain a feature quantity sum value; The third feature quantity is divided by the sum of the feature quantities to obtain the feature similarity between the first node and the second node.
6. The node classifier generation method according to claim 4, characterized in that: Re-determining the connection relationship between two corresponding nodes in the first sample topology graph according to the comparison result includes: If the comparison result shows that the feature similarity is higher than a preset similarity threshold, determining that a connection relationship exists between the corresponding two nodes in the first sample topology graph; If the comparison result shows that the feature similarity is below a preset similarity threshold, it is determined that there is no connection relationship between the corresponding two nodes in the first sample topology graph.
7. The node classifier generation method according to claim 1, characterized in that: Purifying the graph structure data of the first sample topology graph according to the number of common neighbors to obtain a 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 judgment result; According to 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 to obtain a third sample topology graph.
8. The node classifier generation method according to claim 1, characterized in that: Train pre-built graph neural network models, including: Add a perturbation factor 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 including the perturbation hidden layer.
9. A task allocation method for a service network, characterized in that: include: Each edge server in the service network is regarded as a node, and the slave device information corresponding to each edge server is used as the node feature to establish the actual topology map; Classifying nodes of the actual topology graph by a node classifier to obtain a subtask classification result corresponding to each node, wherein the node classifier is obtained based on the node classifier generation method according to any one of claims 1 to 8; According to the classification results of the subtasks corresponding to each node, the target total task is split and allocated to the corresponding edge servers.
10. A task allocation device for a service network, characterized in that: include: A building module is used to build an actual topology map 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; a classification module, configured to classify nodes of the actual topology graph using a node classifier to obtain a subtask classification result corresponding to each node, wherein the node classifier is obtained based on the node classifier generation method according to any one of claims 1 to 8; The allocation module is used to split the target total task and allocate it to the corresponding edge server according to the classification result of the subtasks corresponding to each node.
Citation Information
Patent Citations
Knowledge graph node classification method and system
CN112559737A
Graph node classification method based on novel graph neural network
CN119026023A
Task decision-making method of service network and related device
CN119363594A
Service network function node identification method based on subgraph information bottleneck
CN119557748A
Unbalanced node classification method based on active oversampling and topology awareness
CN120804771A