CN115297114A - Node allocation method, device, storage medium and electronic equipment - Google Patents

Node allocation method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115297114A
CN115297114A CN202210922483.5A CN202210922483A CN115297114A CN 115297114 A CN115297114 A CN 115297114A CN 202210922483 A CN202210922483 A CN 202210922483A CN 115297114 A CN115297114 A CN 115297114A
Authority
CN
China
Prior art keywords
node
centroid
cluster
nodes
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210922483.5A
Other languages
Chinese (zh)
Other versions
CN115297114B (en
Inventor
司玄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202210922483.5A priority Critical patent/CN115297114B/en
Priority claimed from CN202210922483.5A external-priority patent/CN115297114B/en
Publication of CN115297114A publication Critical patent/CN115297114A/en
Application granted granted Critical
Publication of CN115297114B publication Critical patent/CN115297114B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5003Managing SLA; Interaction between SLA and QoS

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure relates to the field of network security technologies, and in particular, to a node allocation method, apparatus, storage medium, and electronic device, where the node allocation method includes: when a first preset period is reached, obtaining the characteristic values of the nodes, and generating a characteristic matrix of the nodes according to the characteristic values of the nodes; adding a preset initial clustering centroid into the feature matrix, and performing clustering operation on the feature matrix according to the feature value of the initial clustering centroid to generate a node cluster; when an access request of a user is acquired, determining the security level of the access request according to the type of access service, and determining a target node cluster from the node cluster according to the security level; and determining a target node meeting the QoS requirement from the target node cluster, and distributing the target node to a user. The method and the device have the advantages that the safety of the user when the user accesses the network can be realized, the safety requirement of the user when the user accesses the network can be met, and the user experience can be improved.

Description

Node allocation method, device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of network security technologies, and in particular, to a node allocation method, an apparatus, a storage medium, and an electronic device.
Background
Currently, with the development of the internet, more and more users use User Equipment (UE) to access and access the network. Therefore, it is necessary to assign nodes from the network to the users in order for the users to access the internet.
In the prior art, when a user requests to access a network, a node meeting a Quality of Service (QoS) requirement is determined from the network according to the QoS requirement of the user and is allocated to the user, so that the user can access and access the network through the node. However, with the prior art, the node allocated to the user only meets the QoS requirement of the user, and does not consider the security requirement when the user accesses the network, which results in poor user experience.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to a node allocation method, apparatus, storage medium, and electronic device, so as to overcome, at least to some extent, the problems of low data acquisition efficiency and low computational efficiency due to the limitations and disadvantages of the related art.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to a first aspect of the present disclosure, there is provided a node allocation method, including:
when a first preset period is reached, obtaining a characteristic value of a node, and generating a characteristic matrix of the node according to the characteristic value of the node;
adding a preset initial clustering center of mass into the feature matrix, and performing clustering operation on the feature matrix according to the feature value of the initial clustering center of mass to generate a node cluster, wherein the center of mass of the node cluster is the initial clustering center of mass;
when an access request of a user is acquired, determining the security level of the access request according to the access service type, and determining a target node cluster from the node clusters according to the security level, wherein the access request comprises the access service type and QoS requirements;
and determining a target node meeting the QoS requirement from the target node cluster, and distributing the target node to a user.
In an exemplary embodiment of the present disclosure, the generating the feature matrix of the node according to the feature value includes:
generating a feature vector of the node according to the feature value of the node;
and forming the feature vectors of the nodes into a feature matrix of the nodes.
In an exemplary embodiment of the present disclosure, the performing a clustering operation on the feature matrix according to the feature value of the initial centroid of the cluster, and generating the node cluster includes:
generating a feature vector of the initial clustering center of mass according to the feature value of the initial clustering center of mass;
acquiring a first error square sum of the feature vector of the node in the feature matrix and the feature vector of the initial clustering center of mass, and determining a target node from the nodes according to the first error square sum, wherein the target node is the node with the minimum first error square sum with the initial clustering center of mass;
classifying the target node into a node cluster corresponding to the initial clustering center of mass;
and calculating second square error sums of other nodes and the node cluster, and classifying the other nodes into the node cluster with the minimum second square error sum, wherein the other nodes are nodes except the target node.
In an exemplary embodiment of the disclosure, before adding the clustered initial centroids to the feature matrix, the method further comprises:
acquiring a template node set corresponding to the service type, wherein the template node set comprises template nodes and characteristic values of the template nodes;
executing a first preset step, taking a second centroid determined after the first preset step is executed as the initial clustering centroid, and taking the security level corresponding to the characteristic value of the second centroid as the security level of the initial clustering centroid, wherein the first preset step is as follows:
and circularly executing a second preset step until a preset condition is met, wherein the second preset step comprises the following steps:
determining a first centroid from template nodes of the set of template nodes using a random algorithm;
performing clustering operation on the template nodes according to the characteristic values of the template nodes and the characteristic values of the first centroid so as to classify the template nodes into centroid clusters;
acquiring the second centroid of the centroid cluster, and determining a safety level corresponding to a characteristic value of the second centroid, wherein a sum of squared error sums in clusters corresponding to the second centroid is minimum, and the sum of the squared error sums in clusters is a sum of a characteristic value of a template node in the centroid cluster and a sum of squared error sums of characteristic values of the second centroid;
and if the preset condition is determined not to be met, executing the second preset step again.
In an exemplary embodiment of the present disclosure, the preset condition includes at least one of:
the first difference is smaller than or equal to a first preset threshold, the number of times of circularly executing the second preset step is larger than or equal to a first preset number of times, and the second difference is smaller than or equal to a second preset threshold; wherein the first difference is a difference between a feature value of the second centroid determined by currently executing the second preset step and a feature value of the second centroid determined by last executing the second preset step, and the second difference is a difference between a sum of squared intra-cluster errors corresponding to the second centroid determined by currently executing the second preset step and a sum of squared intra-cluster errors corresponding to the second centroid determined by last executing the second preset step.
In an exemplary embodiment of the present disclosure, the clustering the template nodes according to the feature values of the template nodes and the feature values of the first centroid to classify the template nodes into centroid clusters includes:
acquiring a third error square sum of the characteristic value of the template node and the characteristic value of the first centroid, and determining a target template node from the template nodes according to the third error square sum, wherein the target template node is the template node with the minimum third error square sum of the first centroid;
classifying the target template node into a centroid cluster corresponding to the first centroid;
and calculating second error square sums of other template nodes and the centroid cluster, and classifying the other template nodes to the centroid cluster with the minimum second error square sum, wherein the other template nodes are the template nodes except the target template node in the template nodes.
In an exemplary embodiment of the present disclosure, the method further comprises:
circularly executing the first preset step, and acquiring the characteristic value of the second centroid determined by executing the first preset step each time, wherein the number of times of circularly executing the first preset step is a second preset number of times;
calculating the average value of the characteristic values of the second mass centers of the second preset times obtained by circularly executing the first preset step;
and taking the average value as a characteristic value of the initial clustering centroid and taking a safety level corresponding to the average value as a safety level of the initial clustering centroid.
In an exemplary embodiment of the present disclosure, the determining a target node cluster from the node clusters according to the security level includes:
determining an initial centroid of a target cluster from the initial centroids of the clusters according to the security level; wherein the security level of the target initial clustering centroid is consistent with the security level corresponding to the access service type;
and taking the node cluster corresponding to the target initial clustering mass center as a target node cluster.
In an exemplary embodiment of the disclosure, the determining a target node from the target node cluster that meets the QoS requirement includes:
obtaining QoS parameters of each node in the target node cluster;
normalizing the QoS parameters of the nodes to generate QoS parameter values of the nodes;
and respectively calculating the weighted value of the QoS parameter value of each node, and determining a target node meeting the QoS requirement from each node according to the weighted value.
In an exemplary embodiment of the present disclosure, after performing a clustering operation on the feature matrix according to the feature value of the initial clustering center of mass and generating a node cluster, the method further includes:
when a second preset period is reached, the number of the first nodes with updated characteristic values is obtained, wherein the second preset period is smaller than the first preset period;
if the number is smaller than or equal to a preset number threshold, acquiring a characteristic value of the first node;
generating a feature vector of the first node according to the feature value of the first node;
and calculating a fifth error square sum of the feature vector of the first node and the node cluster, and classifying the first node into the node cluster with the minimum fifth error square sum.
In an exemplary embodiment of the present disclosure, the method further comprises:
if the number is larger than the preset number threshold, obtaining the characteristic value of each node, and generating a characteristic matrix of all nodes according to the characteristic value of each node;
and adding the initial clustering centroid into the feature matrix, and performing clustering operation on the feature matrix according to the feature value of the initial clustering centroid to generate a node cluster, wherein the centroid of the node cluster is the initial clustering centroid.
According to a second aspect of the present disclosure, there is provided a node allocation apparatus comprising:
the characteristic value acquisition module is used for acquiring the characteristic value of a node when a first preset period is reached and generating a characteristic matrix of the node according to the characteristic value;
the clustering operation module is used for adding a preset initial clustering centroid into the characteristic matrix, and performing clustering operation on the characteristic matrix according to the characteristic value of the initial clustering centroid to generate a node cluster, wherein the centroid of the node cluster is the initial clustering centroid;
the target node cluster determining module is used for determining the security level of an access request according to the type of the access service when the access request of a user is obtained, and determining a target node cluster from the node clusters according to the security level, wherein the access request comprises the type of the access service and the QoS (quality of service) requirement;
and the node distribution module is used for determining a target node meeting the QoS requirement from the target node cluster and distributing the target node to a user.
According to a third aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any one of the first aspects.
According to a fourth aspect of the present disclosure, there is provided an electronic apparatus comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the steps of the method of any one of the first aspect via execution of the executable instructions.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in summary, the method provided by the present disclosure can acquire the eigenvalue of a node when a first preset period is reached, and generate the feature matrix of the node according to the eigenvalue of the node; adding a preset initial clustering centroid into the feature matrix, and performing clustering operation on the feature matrix according to the feature value of the initial clustering centroid to generate a node cluster, wherein the centroid of the node cluster is the initial clustering centroid; when an access request of a user is acquired, determining the security level of the access request according to the type of the access service, and determining a target node cluster from the node clusters according to the security level, wherein the access request comprises the type of the access service and QoS requirements; determining a target node meeting the QoS requirement from the target node cluster, and allocating the target node to a user, wherein the node allocated to the user not only meets the QoS requirement of the user, but also can ensure the safety of the user when accessing the network, meets the safety requirement of the user when accessing the network, and improves the user experience; on the other hand, the method provided by the disclosure can avoid the instability of the clustering operation result caused by randomly selecting the clustering initial centroid by adopting the preset clustering initial centroid for clustering operation, and can ensure the stability of the clustering operation result; on the other hand, the security level of the nodes in the node cluster can be updated in real time by periodically acquiring the characteristic values of the nodes, generating a characteristic matrix and carrying out clustering operation on the characteristic matrix according to the characteristic values of the initial clustering center of mass, so that the security level of the nodes distributed to the user is more consistent with the actual network environment, and the access security of the user is further improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure. It should be apparent that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived by those of ordinary skill in the art without inventive effort.
Fig. 1 schematically illustrates a flow chart of a node assignment method in an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a schematic diagram of a node distribution system architecture in an exemplary embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of a node cluster generation method in an exemplary embodiment of the disclosure;
FIG. 4 is a schematic diagram illustrating a cluster of nodes in an exemplary embodiment of the present disclosure;
fig. 5 schematically illustrates a block diagram of a node assigning apparatus in an exemplary embodiment of the present disclosure;
FIG. 6 schematically illustrates a schematic diagram of a storage medium in an exemplary embodiment of the disclosure;
fig. 7 schematically shows a block diagram of an electronic device in an exemplary embodiment of the disclosure.
In the drawings, like or corresponding reference characters designate like or corresponding parts.
Detailed Description
The principles and spirit of the present invention will be described with reference to several exemplary embodiments. It is understood that these embodiments are given solely for the purpose of enabling those skilled in the art to better understand and to practice the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
In view of the defects in the prior art, the present exemplary embodiment first provides a node allocation method, where a node allocated to a user not only meets the QoS requirement of the user, but also can ensure the security of user access. Referring to fig. 1, the above-mentioned node allocation method may include the steps of:
s11, when a first preset period is reached, obtaining a characteristic value of a node, and generating a characteristic matrix of the node according to the characteristic value of the node;
s12, adding a preset initial clustering center of mass into the feature matrix, and performing clustering operation on the feature matrix according to the feature value of the initial clustering center of mass to generate a node cluster, wherein the center of mass of the node cluster is the initial clustering center of mass;
s13, when an access request of a user is obtained, determining the security level of the access request according to the access service type, and determining a target node cluster from the node cluster according to the security level, wherein the access request comprises the access service type and QoS requirements;
and S14, determining a target node meeting the QoS requirement from the target node cluster, and distributing the target node to a user.
In summary, in the method provided by the present disclosure, the node allocated to the user not only meets the QoS requirement of the user, but also ensures the security when the user accesses the network, meets the security requirement when the user accesses the network, and improves the user experience; on the other hand, the method provided by the disclosure can avoid the instability of the clustering operation result caused by randomly selecting the clustering initial centroid by adopting the preset clustering initial centroid for clustering operation, and can ensure the stability of the clustering operation result; on the other hand, the security level of the nodes in the node cluster can be updated in real time by periodically acquiring the characteristic values of the nodes, generating the characteristic matrix and carrying out clustering operation on the characteristic matrix according to the characteristic values of the initial clustering center of mass, so that the security level of the nodes distributed to the user is more consistent with the actual environment of the network, and the security of the user when accessing the network is further improved.
Hereinafter, each step in the node allocation method in this exemplary embodiment will be described in more detail with reference to the drawings and the embodiments.
In S11, when a first preset period is reached, a feature value of a node is obtained, and a feature matrix of the node is generated according to the feature value of the node.
In an exemplary embodiment of the present disclosure, referring to the system architecture shown in fig. 2, may include: the system comprises a user side mobile terminal device 201, a user side intelligent terminal device 204, a server 203 and the like. The user side mobile terminal 201, the user side intelligent terminal 204 and the server 203 can all perform data transmission through the network 202. The network can include various connection types, such as wired communication links, wireless communication links, and so forth. The node allocation method can be executed on a server side, a terminal device on a user side, or executed by the terminal device on the user side and the server side in a cooperation manner. Taking the above method executed at the server side as an example, the server may obtain the eigenvalue of the node when reaching the first preset period, and generate the eigenvalue of the node according to the eigenvalue of the node; adding a preset initial clustering center of mass into the feature matrix, and performing clustering operation on the feature matrix according to the feature value of the initial clustering center of mass to generate a node cluster, wherein the center of mass of the node cluster is the initial clustering center of mass; the user can upload an access request to the server side from the terminal device side, wherein the access request comprises the access service type and the QoS requirement. The server side can determine a target node cluster from the node clusters according to the security level; and determining a target node meeting the QoS requirement from the target node cluster, and allocating the target node to a user.
In an exemplary embodiment of the present disclosure, the characteristic parameters of the node are obtained every other first preset period, and the characteristic parameters are normalized to obtain the characteristic value of the node. The characteristic parameters are parameters representing the security performance of the node, such as an Internet Protocol (IP) address of the node, a common port, an average connection duration, an average connection frequency, a global traffic parameter, a security operation time, and a warning event frequency, and the characteristic parameters are not specifically limited here.
In an exemplary embodiment of the disclosure, the generating the feature matrix of the node according to the feature value includes: generating a feature vector of the node according to the feature value of the node; and forming the feature vectors of the nodes into a feature matrix of the nodes.
In S12, adding a preset initial clustering centroid into the feature matrix, and performing clustering operation on the feature matrix according to the feature value of the initial clustering centroid to generate a node cluster, wherein the centroid of the node cluster is the initial clustering centroid.
In an exemplary embodiment of the present disclosure, the feature matrix may be clustered by using K-Means (K Means) clustering, mean shift clustering, or other clustering algorithms, which is not specifically limited herein.
Based on the above, as shown in fig. 3, in an exemplary embodiment of the present disclosure, the performing a clustering operation on the feature matrix according to the feature value of the initial clustered centroid, and generating the node cluster includes:
s121, generating a feature vector of the initial clustering center of mass according to the feature value of the initial clustering center of mass;
s122, obtaining a first error square sum of the feature vector of the node in the feature matrix and the feature vector of the initial clustering center of mass, and determining a target node from the nodes according to the first error square sum, wherein the target node is the node with the minimum first error square sum with the initial clustering center of mass;
s123, classifying the target nodes into node clusters corresponding to the initial clustering centroids;
and S124, calculating a second sum of squares of errors of other nodes and the node cluster, and classifying the other nodes into the node cluster with the minimum second sum of squares of errors, wherein the other nodes are nodes except the target node.
Specifically, if the number of initial centroids of the cluster is N, the number of nodes is M, M and N have an integer greater than 1, and M is greater than N. And calculating a first error square sum of the feature vector of each node in the M nodes and the feature vector of each clustering centroid in the N clustering initial centroids, and determining N target nodes from the M nodes, wherein the N target nodes are the nodes with the minimum first error square sum with the N clustering initial centroids respectively.
For example, as shown in fig. 4, the number of initial centroids of the cluster is 2, a and b, respectively. The number of the nodes is 10, and the nodes are 1, 2 and 3, respectively, 8230; 10. If the node with the minimum first sum of squared errors of a is 2, classifying the node 2 into the first node cluster corresponding to a. If the node with the minimum first square error sum with b is 3, classifying the node 3 into the second node cluster corresponding to b.
In an exemplary embodiment of the present disclosure, the sum of the square errors of the other nodes and each node in the node cluster is calculated, and the minimum value is determined from the square errors corresponding to each node in the node cluster, and the minimum value is used as the second sum of the square errors of the other nodes and the node cluster.
For example, if the sum of the squared errors of node 6 and node 2 in the first cluster of nodes is the minimum, then the sum of the squared errors of node 6 and node 2 in the first cluster of nodes is taken as the second sum of the squared errors of node 6 and the first cluster of nodes. And the sum of the squared errors of the node 6 and the node 3 in the second node cluster is minimum, the sum of the squared errors of the node 6 and the node 3 in the first node cluster is taken as a second sum of the squared errors of the node 6 and the second node cluster. And the second sum of squared errors of the node 6 and the first node cluster is smaller than the second sum of squared errors of the node 6 and the second node cluster, classifying the node 6 into the first node cluster.
For another example, if the sum of squared errors between node 7 and node 2 in the first node cluster is the smallest, the sum of squared errors between node 7 and node 2 in the first node cluster is taken as the second sum of squared errors between node 7 and the first node cluster. For another example, if the sum of squared errors between node 7 and node b in the second node cluster is the minimum, the sum of squared errors between node 7 and node b in the second node cluster is taken as the second sum of squared errors between node 7 and the second node cluster. If the second sum of squared errors for node 7 and the second cluster of nodes is less than the second sum of squared errors for node 7 and the first cluster of nodes, then node 7 is classified into the second cluster of nodes.
Further, after the node 6 and the node 7 are classified into the first node cluster and the second node cluster respectively, second error square sums of other nodes except 2, 3, 6 and 7 in the 10 nodes and the first node cluster and the second node cluster respectively are sequentially calculated, and the other nodes are classified into the node cluster with the minimum second error square sum. For example, as shown in fig. 3, the classification result generates a first node cluster including 1, 2, 4, 5, 6, 8, and 9, and a second node cluster including 3 and 7.
Based on the above, in an exemplary embodiment of the disclosure, before adding the initial centroid of the cluster to the feature matrix, the method further includes:
s15, acquiring a template node set corresponding to the service type, wherein the template node set comprises template nodes and characteristic values of the template nodes;
s16, executing a first preset step, taking a second centroid determined after the first preset step is executed as the initial clustering centroid, and taking a safety level corresponding to the characteristic value of the second centroid as the safety level of the initial clustering centroid, wherein the first preset step is as follows:
s161, circularly executing a second preset step until a preset condition is met, wherein the second preset step comprises the following steps:
s162, determining a first centroid from the template nodes of the template node set by adopting a random algorithm;
s163, performing clustering operation on the template nodes according to the characteristic values of the template nodes and the characteristic values of the first centroid, so as to classify the template nodes into centroid clusters;
s164, obtaining the second centroid of the centroid cluster, and determining the safety level corresponding to the characteristic value of the second centroid, wherein the sum of the square sums of the errors in the cluster corresponding to the second centroid is the minimum, and the sum of the square sums of the errors in the cluster is the sum of the square sums of the errors of the characteristic values of the template nodes in the centroid cluster and the characteristic value of the second centroid;
and S165, if the preset condition is determined not to be met, executing the second preset step again.
For example, the centroid cluster includes 3 template nodes, which are respectively a, E, F, and the sum of the squares of the errors of the eigenvalues of E and the eigenvalues of a and the sum of the squares of the errors of the eigenvalues of E and F and the sum of the squares of the errors of the eigenvalues of a and the eigenvalues of F is a first sum, and the sum of the sums of the squares of the errors of the eigenvalues of a and E and the sums of the squares of the errors of the eigenvalues of F and the eigenvalues of E is a second sum. If the first sum is the smallest of the three sums, then A is taken as the second centroid of the cluster of centroids.
In an exemplary embodiment of the present disclosure, if the first preset step is that a preset condition is satisfied when the second preset step is executed 100 times in a loop, the second centroid determined by executing the second preset step 100 times is used as the initial clustering centroid and the security level corresponding to the feature value of the second centroid is used as the security level of the initial clustering centroid. In an exemplary embodiment of the present disclosure, a target centroid may be further determined from the second centroids, the target centroid is used as the initial clustering centroid, and the security level corresponds to the feature value of the target centroid. And the safety levels corresponding to the characteristic values of the target mass center are different.
For example, the number of the second centroids determined by performing the second preset step at the 100 th time is 3, and the second centroids are divided into a, B and C, the feature value of a corresponds to the security level 1, the feature value of B corresponds to the security level 2, and the feature value of C corresponds to the security level 1. And taking A and B as the initial centroids a and B of the cluster, and taking the security levels respectively corresponding to the characteristic values of A and B as the security levels of the initial centroids a and B of the cluster.
In an exemplary embodiment of the present disclosure, the performing a clustering operation on the template nodes according to the feature values of the template nodes and the feature value of the first centroid to classify the template nodes into centroid clusters includes:
s1631, obtaining a third error square sum of the characteristic value of the template node and the characteristic value of the first centroid, and determining a target template node from the template nodes according to the third error square sum, wherein the target template node is the template node with the minimum third error square sum with the first centroid;
s1632, classifying the target template node into a centroid cluster corresponding to the first centroid;
s1633, calculating a second square sum of errors of other template nodes and the centroid cluster, and classifying the other template nodes to the centroid cluster with the minimum second square sum of errors, wherein the other template nodes are the template nodes except the target template node.
The process of clustering the template nodes is similar to the process of clustering the nodes, and this embodiment is not described herein again.
In an exemplary embodiment of the present disclosure, the preset condition includes at least one of:
the first difference is smaller than or equal to a first preset threshold, the times of circularly executing the second preset step are larger than or equal to a first preset time, and the second difference is smaller than or equal to a second preset threshold; wherein the first difference is a difference between a feature value of the second centroid determined by the second preset step being currently executed and a feature value of the second centroid determined by the second preset step being executed last time, and the second difference is a difference between a sum of squared intra-cluster errors corresponding to the second centroid determined by the second preset step being currently executed and a sum of squared intra-cluster errors corresponding to the second centroid determined by the second preset step being executed last time.
Based on the above, in an exemplary embodiment of the present disclosure, the method further includes:
s166, circularly executing the first preset step, and acquiring the characteristic value of the second centroid determined by executing the first preset step each time, wherein the number of times of circularly executing the first preset step is a second preset number of times;
s167, calculating an average value of the feature values of the second mass centers of the second preset times obtained by circularly executing the first preset step;
and S168, taking the average value as the characteristic value of the initial clustering centroid and taking the safety level corresponding to the average value as the safety level of the initial clustering centroid.
For example, the second preset number of times is 3, the first execution of the first preset step is to execute the second preset step 100 times in a loop, and the second centroids determined by executing the first preset step for the first time are a, B, and C, respectively. And the second execution of the first preset step is to execute the second preset step for 101 times in a circulating manner, and the second centroids determined by executing the first preset step for the second time are respectively A, B and C. The third execution of the first preset step is to execute 99 times of second preset steps in a circulating manner, and the second centroids determined by the second execution of the first preset step are A, B and D respectively. The determined eigenvalues of the initial clustering centroid are respectively the eigenvalue of a, the eigenvalue of B, and (eigenvalue of C + 2+ d)/3, and the security levels of the initial clustering centroid are respectively the security level corresponding to the eigenvalue of a, the security level corresponding to the eigenvalue of B, and the security level corresponding to (eigenvalue of C + 2+ d)/3. By obtaining the average value of the characteristic values of the second centroid, the error caused by randomly selecting the centroid can be eliminated, and the accuracy of the operation result is further improved.
In step S13, when an access request of a user is obtained, determining a security level of the access request according to an access service type, and determining a target node cluster from the node clusters according to the security level, where the access request includes the access service type and the QoS requirement;
in an exemplary embodiment of the present disclosure, different access service types may correspond to different security levels, and the security level corresponding to the access service type is a security level of the access request. For example, when the access service type is to access the mailbox, the security level corresponding to the access service type is 2, and the security level of the access request is 2; when the access service type is the access video website, the security level corresponding to the access service type is 1, and the security level of the access request is 1.
Based on the above, in an exemplary embodiment of the disclosure, the determining a target node cluster from the node clusters according to the security levels includes:
s131, determining a target clustering initial centroid from the clustering initial centroids according to the security level; wherein the security level of the target initial clustering centroid is consistent with the security level corresponding to the access service type;
and S132, taking the node cluster corresponding to the target initial clustering mass center as a target node cluster.
For example, if the security levels of the initial clustering centroids a and b are 1 and 2, respectively, the access service type is access mailbox, and the corresponding security level is 2, then b is used as the initial clustering centroid of the target cluster, and the second node cluster corresponding to b is used as the target node cluster.
In step S14, a target node meeting the QoS requirement is determined from the target node cluster, and the target node is allocated to a user.
Specifically, if the second node cluster is a target node cluster, including nodes 3 and 7, if the QoS requirement met by the 7 users, the 7 nodes are allocated to the users, so that the users can access and access the network through the 7 nodes.
Based on the above, in an exemplary embodiment of the disclosure, the determining, from the target node cluster, a target node meeting the QoS requirement includes:
s141, obtaining QoS parameters of each node in the target node cluster;
s142, normalizing the QoS parameters of the nodes to generate QoS parameter values of the nodes.
In an exemplary embodiment of the present disclosure, the QoS parameters include QoS performance parameters such as node distance, node delay, bandwidth, packet loss rate, and the like. And normalizing each QoS parameter to obtain the QoS parameter value. When the node distance of the node 3 in the target node cluster is reduced, reducing the distance between the node 3 and the user to be the difference value of the node 3 minus the shortest distance node and dividing the difference value of the node 3 minus the shortest distance node by the difference value of the node with the longest distance; when the packet loss rate is determined, the packet loss rate may be determined as 0 when the packet loss rate is less than the preset packet loss rate, and the packet loss rate may be determined as 1 when the packet loss rate is greater than or equal to the preset packet loss rate. The process of normalizing other QoS parameters can be set according to actual requirements, and this embodiment is not described herein again.
And S143, respectively calculating weighted values of QoS parameter values of the nodes, and determining a target node meeting the QoS requirement from the nodes according to the weighted values.
Specifically, if the QoS requirement of the user is that the QoS performance is best, the node with the largest weighting value in the target node cluster is allocated to the user; and if the QoS requirement of the user is that the QoS performance is better, randomly selecting one node from the nodes of which the weighted value is greater than or equal to the preset threshold value in the target node cluster to distribute to the user.
In an exemplary embodiment of the present disclosure, the security level may be further classified as a QoS parameter, and participate in a weighting operation, so as to determine a target node meeting the QoS requirement from each node of a target node cluster according to a result of the weighting operation, and allocate the target node to a user.
For example, if the target node cluster is the second node cluster and the weighted value of the QoS parameter value of the node 3 is greater than the weighted value of the QoS parameter value of the node 7, the node 7 is allocated to the user.
In an exemplary embodiment of the present disclosure, if the determined number of the target node clusters is multiple, for example, the target node cluster further includes a third node cluster, the security level corresponding to the third node cluster is 3, and the weighted value of the parameter value of the node 11 in the third node cluster is the highest and is the same as the node 7, because the security level of the node 11 is higher, the node 11 is allocated to the user.
Based on the above, in an exemplary embodiment of the disclosure, after performing clustering operation on the feature matrix according to the feature value of the initial clustering center of mass and generating a node cluster, the method further includes:
s17, when a second preset period is reached, the number of the first nodes with updated characteristic values is obtained, wherein the second preset period is smaller than the first preset period;
s18, if the number is smaller than or equal to a preset number threshold, acquiring a characteristic value of the characteristic value updating node;
s19, generating a feature vector of the first node according to the feature value of the first node;
s20, calculating a fifth error square sum of the feature vector of the first node and the node cluster, and classifying the first node into the node cluster with the minimum fifth error square sum.
In an exemplary embodiment of the disclosure, the feature matrix is subjected to clustering operation according to the feature value of the initial clustering center of mass, and after a node cluster is generated, the number of first nodes with updated feature values is obtained every second preset period. And when the number is less than or equal to a preset number threshold, clustering the first nodes, classifying the first nodes to a node cluster with the minimum sum of squared errors, and determining the security level of the first nodes according to the level corresponding to the node cluster. And when the security level of the first node meets the requirement of the user and the weighted value of the QoS parameter value of the first node meets the requirement of the QoS of the user, allocating the first node to the user. Therefore, when the number of the nodes updated by the characteristic values is small, only the first node needs to be subjected to clustering operation, so that the safety is ensured, excessive operation caused by frequent clustering operation of all the nodes can be avoided, and further resource waste caused by the excessive operation is avoided.
Based on the above, in an exemplary embodiment of the present disclosure, the method further includes:
s21, if the number is larger than the preset number threshold, obtaining the characteristic value of each node, and generating a characteristic matrix of all nodes according to the characteristic value of each node;
s22, adding the initial clustering barycenter into the feature matrix, and carrying out clustering operation on the feature matrix according to the feature value of the initial clustering barycenter to generate a node cluster, wherein the barycenter of the node cluster is the initial clustering barycenter.
Specifically, if the number is greater than a preset number threshold, clustering operation is performed on all the nodes, and a node cluster is regenerated, so that the accuracy of a clustering operation result is improved. And then selecting a target node cluster from the regenerated node cluster and selecting a target node from the target node cluster to distribute to the user, so as to improve the safety of the user during access.
In summary, according to the method provided by the present disclosure, the node allocated to the user not only meets the QoS requirement of the user, but also ensures the security when the user accesses the network, meets the security requirement when the user accesses the network, and improves the user experience; on the other hand, the method provided by the disclosure can avoid the instability of the clustering operation result caused by randomly selecting the clustering initial centroid by adopting the preset clustering initial centroid for clustering operation, and can ensure the stability of the clustering operation result; on the other hand, the security level of the nodes in the node cluster can be updated in real time by periodically acquiring the characteristic values of the nodes, generating the characteristic matrix and carrying out clustering operation on the characteristic matrix according to the characteristic values of the initial clustering center of mass, so that the security level of the nodes distributed to the user is more consistent with the actual environment of the network, and the security of the user when accessing the network is further improved.
Having introduced the node allocation method according to an exemplary embodiment of the present invention, a node allocation apparatus according to an exemplary embodiment of the present invention will be described next with reference to fig. 5.
Referring to fig. 5, a node assigning apparatus 50 according to an exemplary embodiment of the present invention may include: a characteristic value obtaining module 501, a clustering operation module 502, a target node cluster determining module 503 and a node allocating module 504, wherein:
the eigenvalue obtaining module 501 is configured to obtain an eigenvalue of a node when a first preset period is reached, and generate a feature matrix of the node according to the eigenvalue;
a clustering operation module 502, configured to add a preset initial clustering centroid into the feature matrix, and perform clustering operation on the feature matrix according to a feature value of the initial clustering centroid, so as to generate a node cluster, where a centroid of the node cluster is the initial clustering centroid;
a target node cluster determining module 503, configured to determine, when an access request of a user is obtained, a security level of the access request according to an access service type, and determine a target node cluster from the node cluster according to the security level, where the access request includes the access service type and a QoS requirement;
a node allocating module 504, configured to determine a target node meeting the QoS requirement from the target node cluster, and allocate the target node to a user.
In an exemplary embodiment of the present disclosure, the feature value obtaining module includes:
a first feature vector generation unit configured to generate a feature vector of the node according to the feature value of the node;
and the feature matrix generation module is used for forming the feature vectors of the nodes into the feature matrix of the nodes.
In an exemplary embodiment of the present disclosure, the clustering operation module includes:
the second feature vector generating unit is used for generating a feature vector of the initial clustering center of mass according to the feature value of the initial clustering center of mass;
a target node determining unit, configured to obtain a first sum of squares of errors of the feature vectors of the nodes in the feature matrix and the feature vector of the initial centroid of the cluster, and determine a target node from the nodes according to the first sum of squares of errors, where the target node is a node with a smallest sum of squares of errors with the initial centroid of the cluster;
the target node classifying unit is used for classifying the target nodes into node clusters corresponding to the initial clustering centroids;
and the other node classifying unit is used for calculating a second sum of squares of errors of other nodes and the node cluster, and classifying the other nodes into the node cluster with the minimum second sum of squares of errors, wherein the other nodes are nodes except the target node in the nodes.
In an exemplary embodiment of the present disclosure, the apparatus further includes:
the initial clustering centroid determining module is used for acquiring a template node set corresponding to the service type, wherein the template node set comprises template nodes and characteristic values of the template nodes; executing a first preset step, taking a second centroid determined after the first preset step is executed as the initial clustering centroid, and taking the security level corresponding to the characteristic value of the second centroid as the security level of the initial clustering centroid, wherein the first preset step is as follows: and circularly executing a second preset step until a preset condition is met, wherein the second preset step comprises the following steps: determining a first centroid from template nodes of the set of template nodes using a random algorithm; performing clustering operation on the template nodes according to the characteristic values of the template nodes and the characteristic values of the first centroid so as to classify the template nodes into centroid clusters; acquiring the second centroid of the centroid cluster, and determining a safety level corresponding to a characteristic value of the second centroid, wherein a sum of squared error sums in clusters corresponding to the second centroid is minimum, and the sum of the squared error sums in clusters is a sum of a characteristic value of a template node in the centroid cluster and a sum of squared error sums of characteristic values of the second centroid; and if the preset condition is determined not to be met, executing the second preset step again.
In an exemplary embodiment of the present disclosure, the preset condition includes at least one of:
the first difference is smaller than or equal to a first preset threshold, the number of times of circularly executing the second preset step is larger than or equal to the first preset number of times, and the second difference is smaller than or equal to a second preset threshold; wherein the first difference is a difference between a feature value of the second centroid determined by the second preset step being currently executed and a feature value of the second centroid determined by the second preset step being executed last time, and the second difference is a difference between a sum of squared intra-cluster errors corresponding to the second centroid determined by the second preset step being currently executed and a sum of squared intra-cluster errors corresponding to the second centroid determined by the second preset step being executed last time.
In an exemplary embodiment of the present disclosure, the clustering initial centroid determining module includes:
a target template node determining unit, configured to obtain a third sum of squares of errors of the eigenvalues of the template nodes and the eigenvalue of the first centroid, and determine a target template node from the template nodes according to the third sum of squares of errors, where the target template node is a template node whose sum of squares of errors of the eigenvalues of the template nodes and the eigenvalue of the first centroid is minimum;
a target template node classification unit, configured to classify the target template node into a centroid cluster corresponding to the first centroid;
and the other template node classification unit is used for calculating a second error square sum of other template nodes and the centroid cluster, and classifying the other template nodes to the centroid cluster with the minimum second error square sum, wherein the other template nodes are the template nodes except the target template node in the template nodes.
In an exemplary embodiment of the present disclosure, the apparatus further includes:
the average value calculating unit is used for circularly executing the first preset step and acquiring the characteristic value of the second centroid determined by executing the first preset step each time, and the number of times of circularly executing the first preset step is a second preset number of times; calculating the average value of the characteristic values of the second mass centers of the second preset times obtained by circularly executing the first preset step; and taking the average value as the characteristic value of the initial clustering centroid and taking the safety level corresponding to the average value as the safety level of the initial clustering centroid.
In an exemplary embodiment of the present disclosure, the target node cluster determining module includes:
the target clustering initial centroid determining unit is used for determining a target clustering initial centroid from the clustering initial centroids according to the security level; the security level of the target initial clustering centroid is consistent with the security level corresponding to the access service type;
and the target node cluster determining unit is used for taking the node cluster corresponding to the target initial clustering centroid as the target node cluster.
In an exemplary embodiment of the present disclosure, the node allocation module includes:
a parameter obtaining unit, configured to obtain a QoS parameter of each node in the target node cluster;
a parameter normalization unit, configured to normalize the QoS parameters of each node, and generate a QoS parameter value of each node;
and the weighted value calculation unit is used for calculating the weighted value of the QoS parameter value of each node respectively and determining a target node meeting the QoS requirement from each node according to the weighted value.
In an exemplary embodiment of the present disclosure, the apparatus further includes:
the characteristic value updating node classifying module is used for acquiring the number of the first nodes updated by the characteristic value when a second preset period is reached, wherein the second preset period is smaller than the first preset period; if the number is smaller than or equal to a preset number threshold, acquiring a characteristic value of the first node; generating a feature vector of the first node according to the feature value of the first node; and calculating a fifth sum of squared errors of the feature vector of the first node and the node cluster, and classifying the first node into the node cluster with the minimum fifth sum of squared errors.
In an exemplary embodiment of the present disclosure, the apparatus further includes:
a node cluster generating module, configured to obtain a feature value of each node if the number is greater than the preset number threshold, and generate a feature matrix of all nodes according to the feature value of each node;
and adding the initial clustering centroid into the feature matrix, and performing clustering operation on the feature matrix according to the feature value of the initial clustering centroid to generate a node cluster, wherein the centroid of the node cluster is the initial clustering centroid.
Since each functional module of the node allocation apparatus according to the embodiment of the present invention is the same as that in the embodiment of the node allocation method according to the present invention, further description is omitted here.
Having described the node allocation method and the node allocation apparatus according to the exemplary embodiment of the present invention, a storage medium according to the exemplary embodiment of the present invention will be described with reference to fig. 6.
Referring to fig. 6, a program product 600 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Having described the storage medium of the exemplary embodiment of the present invention, next, an electronic apparatus of the exemplary embodiment of the present invention will be described with reference to fig. 7.
The electronic device 70 shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 7, the electronic device 70 is embodied in the form of a general purpose computing device. The components of electronic device 70 may include, but are not limited to: the at least one processing unit 710, the at least one memory unit 720, a bus 730 connecting different system components (including the memory unit 720 and the processing unit 710), and a display unit 740.
Wherein the memory unit stores program code that is executable by the processing unit 710 to cause the processing unit 710 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary method" of the present specification. For example, the processing unit 910 may perform steps S11 to S14 as shown in fig. 1.
The memory unit 720 may include volatile memory units such as a random access memory unit (RAM) 7201 and/or a cache memory unit 7202, and may further include a read only memory unit (ROM) 7203. The storage unit 720 may also include a program/utility 7204 having a set (at least one) of program modules 7205, such program modules 7205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may comprise an implementation of a network environment.
Bus 730 may include a data bus, an address bus, and a control bus.
The electronic device 70 may also communicate with one or more external devices 80 (e.g., keyboard, pointing device, bluetooth device, etc.), which may be through an input/output (I/O) interface 750. The electronic device 70 further comprises a display unit 740 connected to the input/output (I/O) interface 750 for displaying. Also, the electronic device 700 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet) via the network adapter 760. As shown, the network adapter 760 communicates with the other modules of the electronic device 70 via the bus 730. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 70, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, to name a few.
It should be noted that although in the above detailed description several modules or sub-modules of the node allocation arrangement are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Moreover, while the operations of the method of the invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
While the spirit and principles of the invention have been described with reference to several particular embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, nor is the division of aspects, which is for convenience only as the features in such aspects may not be combined to benefit. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (14)

1. A method for node allocation, comprising:
when a first preset period is reached, obtaining a characteristic value of a node, and generating a characteristic matrix of the node according to the characteristic value of the node;
adding a preset initial clustering centroid into the feature matrix, and performing clustering operation on the feature matrix according to the feature value of the initial clustering centroid to generate a node cluster, wherein the centroid of the node cluster is the initial clustering centroid;
when an access request of a user is acquired, determining the security level of the access request according to the access service type, and determining a target node cluster from the node cluster according to the security level, wherein the access request comprises the access service type and the QoS (quality of service) requirement;
and determining a target node meeting the QoS requirement from the target node cluster, and distributing the target node to a user.
2. The method of claim 1, wherein the generating the feature matrix of the node according to the feature values comprises:
generating a feature vector of the node according to the feature value of the node;
and forming the feature vectors of the nodes into a feature matrix of the nodes.
3. The method of claim 2, wherein the clustering the feature matrix according to the feature values of the initial centroid of the cluster, and generating the node cluster comprises:
generating a feature vector of the initial clustering center of mass according to the feature value of the initial clustering center of mass;
acquiring a first error square sum of the feature vector of the node in the feature matrix and the feature vector of the initial clustering center of mass, and determining a target node from the nodes according to the first error square sum, wherein the target node is the node with the minimum first error square sum with the initial clustering center of mass;
classifying the target node into a node cluster corresponding to the initial clustering center of mass;
and calculating second square error sums of other nodes and the node cluster, and classifying the other nodes into the node cluster with the minimum second square error sum, wherein the other nodes are nodes except the target node.
4. The method of claim 1, wherein prior to adding the clustered initial centroids to the feature matrix, the method further comprises:
acquiring a template node set corresponding to the service type, wherein the template node set comprises template nodes and characteristic values of the template nodes;
executing a first preset step, taking a second centroid determined after the first preset step is executed as the initial clustering centroid, and taking the security level corresponding to the characteristic value of the second centroid as the security level of the initial clustering centroid, wherein the first preset step is as follows:
and circularly executing a second preset step until a preset condition is met, wherein the second preset step comprises the following steps:
determining a first centroid from template nodes of the set of template nodes using a random algorithm;
performing clustering operation on the template nodes according to the characteristic values of the template nodes and the characteristic values of the first centroid so as to classify the template nodes into centroid clusters;
acquiring the second centroid of the centroid cluster, and determining a safety level corresponding to a characteristic value of the second centroid, wherein a sum of squared error sums in clusters corresponding to the second centroid is minimum, and the sum of the squared error sums in clusters is a sum of a characteristic value of a template node in the centroid cluster and a sum of squared error sums of characteristic values of the second centroid;
and if the preset condition is determined not to be met, executing the second preset step again.
5. The method of claim 4, wherein the preset condition comprises at least one of:
the first difference is smaller than or equal to a first preset threshold, the number of times of circularly executing the second preset step is larger than or equal to the first preset number of times, and the second difference is smaller than or equal to a second preset threshold; wherein the first difference is a difference between a feature value of the second centroid determined by the second preset step being currently executed and a feature value of the second centroid determined by the second preset step being executed last time, and the second difference is a difference between a sum of squared intra-cluster errors corresponding to the second centroid determined by the second preset step being currently executed and a sum of squared intra-cluster errors corresponding to the second centroid determined by the second preset step being executed last time.
6. The method of claim 4, wherein the clustering the template nodes according to the eigenvalues of the template nodes and the eigenvalue of the first centroid to classify the template nodes into centroid clusters comprises:
acquiring a third error square sum of the characteristic value of the template node and the characteristic value of the first centroid, and determining a target template node from the template nodes according to the third error square sum, wherein the target template node is the template node with the minimum third error square sum with the first centroid;
classifying the target template node into a centroid cluster corresponding to the first centroid;
and calculating second error square sums of other template nodes and the centroid cluster, and classifying the other template nodes to the centroid cluster with the minimum second error square sum, wherein the other template nodes are the template nodes except the target template node in the template nodes.
7. The method of claim 4, wherein the method further comprises:
circularly executing the first preset step, and acquiring the characteristic value of the second centroid determined by executing the first preset step each time, wherein the number of times of circularly executing the first preset step is a second preset number of times;
calculating the average value of the characteristic values of the second mass centers of the second preset times obtained by circularly executing the first preset step;
and taking the average value as a characteristic value of the initial clustering centroid and taking a safety level corresponding to the average value as a safety level of the initial clustering centroid.
8. The method according to claim 4, wherein said determining a target node cluster from the node clusters according to the security levels comprises:
determining a target clustering initial centroid from the clustering initial centroids according to the security level; the security level of the target initial clustering centroid is consistent with the security level corresponding to the access service type;
and taking the node cluster corresponding to the target initial clustering mass center as a target node cluster.
9. The method of claim 1, wherein the determining the target node from the target node cluster that meets the QoS requirement comprises:
obtaining QoS parameters of each node in the target node cluster;
normalizing the QoS parameters of the nodes to generate QoS parameter values of the nodes;
and respectively calculating the weighted value of the QoS parameter value of each node, and determining a target node meeting the QoS requirement from each node according to the weighted value.
10. The method of claim 1, wherein after performing a clustering operation on the feature matrix according to the feature value of the initial centroid of the cluster to generate a node cluster, the method further comprises:
when a second preset period is reached, the number of the first nodes with updated characteristic values is obtained, wherein the second preset period is smaller than the first preset period;
if the number is smaller than or equal to a preset number threshold, acquiring a characteristic value of the first node;
generating a feature vector of the first node according to the feature value of the first node;
and calculating a fifth error square sum of the feature vector of the first node and the node cluster, and classifying the first node into the node cluster with the minimum fifth error square sum.
11. The method of claim 10, further comprising:
if the number is larger than the preset number threshold, obtaining the characteristic value of each node, and generating a characteristic matrix of all nodes according to the characteristic value of each node;
and adding the initial clustering centroid into the feature matrix, and performing clustering operation on the feature matrix according to the feature value of the initial clustering centroid to generate a node cluster, wherein the centroid of the node cluster is the initial clustering centroid.
12. A node allocation apparatus, comprising:
the characteristic value acquisition module is used for acquiring the characteristic value of a node when a first preset period is reached and generating a characteristic matrix of the node according to the characteristic value;
the clustering operation module is used for adding a preset initial clustering centroid into the characteristic matrix, and performing clustering operation on the characteristic matrix according to the characteristic value of the initial clustering centroid to generate a node cluster, wherein the centroid of the node cluster is the initial clustering centroid;
the target node cluster determining module is used for determining the security level of an access request according to the type of the access service when the access request of a user is obtained, and determining a target node cluster from the node clusters according to the security level, wherein the access request comprises the type of the access service and the QoS (quality of service) requirement;
and the node distribution module is used for determining a target node meeting the QoS requirement from the target node cluster and distributing the target node to a user.
13. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 11.
14. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the steps of the method of any one of claims 1 to 11 via execution of the executable instructions.
CN202210922483.5A 2022-08-02 Node allocation method and device, storage medium and electronic equipment Active CN115297114B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210922483.5A CN115297114B (en) 2022-08-02 Node allocation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210922483.5A CN115297114B (en) 2022-08-02 Node allocation method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN115297114A true CN115297114A (en) 2022-11-04
CN115297114B CN115297114B (en) 2024-07-02

Family

ID=

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104995870A (en) * 2012-11-21 2015-10-21 瑞典爱立信有限公司 Multi-objective server placement determination
CN105611600A (en) * 2016-02-02 2016-05-25 中国科学院上海微系统与信息技术研究所 QoE (Quality of Experience) requirement oriented secure routing method for Internet of Things
WO2017001624A1 (en) * 2015-06-30 2017-01-05 British Telecommunications Public Limited Company Model management in a dynamic qos environment
US9974043B1 (en) * 2017-05-31 2018-05-15 Aruba Networks, Inc. Assigning a subset of access points in a wireless network to a high priority
CN108156032A (en) * 2017-12-22 2018-06-12 中国人民解放军战略支援部队信息工程大学 The reference mode choosing method combined based on spectral clustering with random selection
CN108419249A (en) * 2018-03-02 2018-08-17 中南民族大学 3-D wireless sensor network cluster dividing covering method, terminal device and storage medium
CN109587144A (en) * 2018-12-10 2019-04-05 广东电网有限责任公司 Network security detection method, device and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104995870A (en) * 2012-11-21 2015-10-21 瑞典爱立信有限公司 Multi-objective server placement determination
WO2017001624A1 (en) * 2015-06-30 2017-01-05 British Telecommunications Public Limited Company Model management in a dynamic qos environment
CN105611600A (en) * 2016-02-02 2016-05-25 中国科学院上海微系统与信息技术研究所 QoE (Quality of Experience) requirement oriented secure routing method for Internet of Things
US9974043B1 (en) * 2017-05-31 2018-05-15 Aruba Networks, Inc. Assigning a subset of access points in a wireless network to a high priority
CN108156032A (en) * 2017-12-22 2018-06-12 中国人民解放军战略支援部队信息工程大学 The reference mode choosing method combined based on spectral clustering with random selection
CN108419249A (en) * 2018-03-02 2018-08-17 中南民族大学 3-D wireless sensor network cluster dividing covering method, terminal device and storage medium
CN109587144A (en) * 2018-12-10 2019-04-05 广东电网有限责任公司 Network security detection method, device and electronic equipment

Similar Documents

Publication Publication Date Title
WO2022262167A1 (en) Cluster resource scheduling method and apparatus, electronic device and storage medium
US20180113742A1 (en) Cognitive scheduler
US11128668B2 (en) Hybrid network infrastructure management
US20140089509A1 (en) Prediction-based provisioning planning for cloud environments
TW201820165A (en) Server and cloud computing resource optimization method thereof for cloud big data computing architecture
US11429434B2 (en) Elastic execution of machine learning workloads using application based profiling
CN111181770B (en) Resource allocation method, system, electronic equipment and storage medium
US10997113B1 (en) Method and system for a resource reallocation of computing resources in a resource pool using a ledger service
US20210012187A1 (en) Adaptation of Deep Learning Models to Resource Constrained Edge Devices
CN112261135A (en) Node election method, system, device and equipment based on consistency protocol
US11283860B2 (en) Apparatus and method for adjusting resources in cloud system
US10977153B1 (en) Method and system for generating digital twins of resource pools and resource pool devices
CN115766875A (en) Edge computing power resource scheduling method, device, system, electronic equipment and medium
US8819239B2 (en) Distributed resource management systems and methods for resource management thereof
US20230125308A1 (en) Data compression based on co-clustering of multiple parameters for ai training
CN114020469A (en) Edge node-based multi-task learning method, device, medium and equipment
CN115802398A (en) Interference optimization method and device, storage medium and electronic equipment
WO2022003435A1 (en) Annotating unlabeled data using classifier error rates
US11663504B2 (en) Method and system for predicting resource reallocation in a resource pool
CN115297114B (en) Node allocation method and device, storage medium and electronic equipment
CN115297114A (en) Node allocation method, device, storage medium and electronic equipment
CN113590274A (en) Task allocation method and device and task processing system
WO2024021467A1 (en) Cluster resource planning method, device, apparatus, and medium
US20220284243A1 (en) Ensemble voting classifiers using adjusted thresholds
CN115834689A (en) Micro-service distribution method, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant