CN114466022B - Method, device and medium for obtaining server seed nodes in cluster - Google Patents

Method, device and medium for obtaining server seed nodes in cluster Download PDF

Info

Publication number
CN114466022B
CN114466022B CN202111676468.9A CN202111676468A CN114466022B CN 114466022 B CN114466022 B CN 114466022B CN 202111676468 A CN202111676468 A CN 202111676468A CN 114466022 B CN114466022 B CN 114466022B
Authority
CN
China
Prior art keywords
current
node
seed node
value
seed
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.)
Active
Application number
CN202111676468.9A
Other languages
Chinese (zh)
Other versions
CN114466022A (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111676468.9A priority Critical patent/CN114466022B/en
Publication of CN114466022A publication Critical patent/CN114466022A/en
Application granted granted Critical
Publication of CN114466022B publication Critical patent/CN114466022B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1023Server selection for load balancing based on a hash applied to IP addresses or costs
    • 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
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1021Server selection for load balancing based on client or server locations
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a method, a device and a medium for acquiring server seed nodes based on clusters, wherein one seed node is acquired from a set corresponding to a current Ks value, the seed node is taken as a current seed node to be put into a seed node set, the distance between other nodes and the current seed node is acquired, a distance list is updated to be taken as a current distance list, the node farthest from the current seed node is selected from the set corresponding to the next Ks value of the current Ks value, the node is put into the current seed node set, whether the number of the nodes in the seed node set is equal to the preset number is finally judged, and whether the acquisition is continued or ended is selected according to the result. Therefore, according to the method, seed nodes are acquired from the corresponding sets of the Ks values through the distance list, so that the efficiency of server path searching is improved, analysis of potential nodes is guaranteed, the problem of node concentration is avoided, and the problems of high node repeatability and low efficiency in processing tasks are avoided.

Description

Method, device and medium for obtaining server seed nodes in cluster
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method, an apparatus, and a medium for obtaining a server seed node in a cluster.
Background
The rapid growth of streaming diversified network services and services causes problems of network congestion, data loss and the like, and the traditional cloud computing cannot meet the requirements of terminals on high bandwidth, low time delay and real-time performance. In order to solve the deficiency of cloud computing, tasks which cannot be completed are migrated to adjacent idle servers to be calculated and are completed through cooperation of a plurality of edge servers, but the cost consumption is overlarge during server path searching, the cost consumed during server path searching can be reduced through acquisition of server seed nodes, acquisition of a server seed node set is carried out through K-shell decomposition, the whole cluster is decomposed into a plurality of sets according to the magnitude of the degree value of the nodes, the nodes with the same number as the preset number in the set corresponding to the maximum Ks value are selected to serve as the server seed nodes, and further searching of server paths is reduced, and tasks can be shared.
The problem of server path consumption is solved in the prior art, but the information propagation capability of potential nodes cannot be analyzed through static analysis of the information propagation capability of the nodes, and the problem that the selected server nodes are concentrated cannot be avoided, so that when the server seed nodes process tasks, the repeatability of the server nodes is high, and the efficiency is low.
In view of the above technical problems, a method for improving efficiency is sought, which is a problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a method, a device and a medium for acquiring server seed nodes in a cluster.
In order to solve the above technical problems, the present application provides a method for obtaining a server seed node in a cluster, including:
acquiring a seed node from a set corresponding to the current Ks value, and putting the seed node into the seed node set as the current seed node, wherein the current Ks value corresponding to the first seed node is the biggest Ks value;
the method comprises the steps of taking a current seed node as a starting point, obtaining the distance from other nodes to the current seed node, and updating a distance list to serve as a current distance list;
according to the current distance list, selecting a node farthest from the current seed node from a set corresponding to the next Ks value of the current Ks value to serve as the next current seed node, and putting the node into the current seed node set, wherein the next Ks value of the current Ks value serves as the next current Ks value;
judging whether the number of the nodes in the seed node set is equal to a preset number or not;
if yes, ending the acquisition of the seed node;
and if not, returning to the step of taking the current seed node as a starting point, acquiring the distance between the other nodes and the current seed node, and updating the distance list to serve as the current distance list.
Preferably, the obtaining a seed node from the set corresponding to the current Ks value includes:
constructing a complex network diagram, and decomposing according to the K-shell to obtain a plurality of sets;
and acquiring a node from the set corresponding to the maximum Ks value to serve as the current seed node.
Preferably, taking the current seed node as a starting point, obtaining the distances between the rest nodes and the current seed node includes:
and performing breadth-first traversal or depth-first traversal with the current seed node as a starting point, and determining the distance between the rest nodes and the current seed node.
Preferably, the decomposing according to the K-shell to obtain a plurality of sets includes:
according to the degree value of the node in the network, the network is decomposed into a plurality of sets, wherein one degree value corresponds to one set.
Preferably, after the end of the acquisition of the seed node, the method further includes:
and outputting the current seed node set.
Preferably, after the outputting the current seed node set, the method further comprises:
outputting the working state of each seed node.
Preferably, the preset number is 5.
In order to solve the above technical problem, the present application further provides a device for obtaining a server seed node in a cluster, including:
the first acquisition module is used for acquiring a seed node from a set corresponding to the current Ks value and putting the seed node into the seed node set as the current seed node, wherein the current Ks value is the biggest Ks value;
the second acquisition module is used for acquiring the distance from the other nodes to the current seed node by taking the current seed node as a starting point, and updating the distance list to serve as a current distance list;
the selecting module is used for selecting the node closest to the current seed node and the node which is the largest from the set corresponding to the next Ks value of the current Ks value according to the current distance list to be used as the next current seed node, and putting the node into the current seed node set, wherein the next Ks value of the current Ks value is used as the next current Ks value;
the judging module is used for judging whether the number of the nodes in the seed node set is equal to the preset number, if so, triggering the ending module, and if not, triggering the second acquisition module;
and the ending module is used for ending the acquisition of the seed node.
In order to solve the technical problem, the present application further provides a device for obtaining a server seed node in a cluster, including a memory, configured to store a computer program;
a processor for implementing the steps of the method of obtaining server seed nodes in a cluster as described above when executing said computer program.
To solve the above technical problem, the present application further provides a computer readable storage medium, where a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for obtaining a server seed node in a cluster as described above.
According to the method for acquiring the server seed nodes based on the clusters, one seed node is acquired from the set corresponding to the current Ks value, the seed node is put into the seed node set as the current seed node, the distance from other nodes to the current seed node is acquired by taking the current seed node as a starting point, the distance list is updated to serve as a current distance list, the node farthest from the current seed node is selected from the set corresponding to the next Ks value of the current Ks value according to the current distance list, the node is put into the current seed node set, finally whether the number of the nodes in the seed node set is equal to the preset number is judged, if yes, the acquisition of the seed nodes is ended, if no, the seed nodes are continuously acquired, and therefore the method not only improves the searching efficiency of the server path, but also ensures the capability analysis of the potential nodes, avoids the problem of node comparison concentration in the processing task, and avoids the problems of high node repeatability and low efficiency.
On the basis, the application also provides a device and a medium for acquiring the server seed node in the cluster, and the effects are the same.
Drawings
For a clearer description of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described, it being apparent that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for obtaining a server seed node in a cluster according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for obtaining a server seed node in another cluster according to an embodiment of the present disclosure;
fig. 3 is a block diagram of a device for obtaining a server seed node in a cluster according to an embodiment of the present application;
fig. 4 is a block diagram of an electronic device for obtaining a server seed node in a cluster according to another embodiment of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments herein without making any inventive effort are intended to fall within the scope of the present application.
The core of the application is to provide a method, a device and a computer readable storage medium for acquiring server seed nodes in a cluster.
In order to provide a better understanding of the present application, those skilled in the art will now make further details of the present application with reference to the drawings and detailed description.
Fig. 1 is a flowchart of a method for obtaining a server seed node in a cluster according to an embodiment of the present application, where, as shown in fig. 1, the method for obtaining a server seed node in a cluster includes the following steps:
s10: and obtaining a seed node from the set corresponding to the current Ks, and putting the seed node into the seed node set as the current seed node.
S11: and taking the current seed node as a starting point, and acquiring the distance from the rest nodes to the current seed node.
S12: and selecting a node farthest from the current seed node from a set corresponding to the next Ks value of the current Ks value according to the current distance list to serve as the next current seed node, and placing the node into the current seed node set.
S13: and judging whether the number of the nodes in the seed node set is equal to the preset number, if so, entering the step S14, and if not, returning to the step S11.
S14: and ending the acquisition of the seed node.
It can be appreciated that the rapid growth of streaming diversified network services and services causes problems of network congestion, data loss and the like, and the conventional cloud computing cannot meet the requirements of terminals on high bandwidth, low time delay and real-time performance. In order to solve the deficiency of cloud computing, tasks which cannot be completed are migrated to adjacent idle servers to be calculated and are completed through cooperation of a plurality of edge servers, but the cost consumption is overlarge during server path searching, the cost consumed during server path searching can be reduced through acquisition of server seed nodes, acquisition of a server seed node set is carried out through K-shell decomposition, the whole cluster is decomposed into a plurality of sets according to the magnitude of the degree value of the nodes, the nodes with the same number as the preset number in the set corresponding to the maximum Ks value are selected to serve as server seed nodes, further searching of server paths is reduced, and tasks can be shared. The problem of server path consumption is solved in the prior art, but the information propagation capability of potential nodes cannot be analyzed through static analysis of the information propagation capability of the nodes, and the problem that the selected server nodes are concentrated cannot be avoided, so that when the server seed nodes process tasks, the repeatability of the server nodes is high, and the efficiency is low. A method of obtaining server seed nodes in a cluster is therefore proposed.
In the step S10, a seed node is obtained from the set corresponding to the current Ks value, and is put into the seed node set as the current seed node, where a seed node corresponds to a server, and the current Ks value corresponding to the first seed node is the largest Ks value, where the Ks value is the number of cores of the node, the number of cores of a node is that the network is performing k-shell decomposition, ks is equal to 1 and is 1 core, that is, the degree value of the node is equal to 1, ks is equal to 2 and is 2 core, that is, the degree value of the node is equal to 2, and so on, until the degree values of the nodes all have corresponding cores, and if the largest degree value in the node is 10, the largest Ks value is 10. In this embodiment, which node in the set corresponding to the maximum Ks value is used as the node to be extracted is not limited.
In addition, for step S11, the distance from the remaining nodes to the current seed node is obtained, where the distance refers to the shortest distance between two nodes, and the distance list is updated according to the latest data after the distance from the remaining nodes to the current seed node is obtained, and an analysis is performed on the potential nodes, so that each node is obtained by analysis. In addition, for step S12, according to the current distance list, a node farthest from the current seed node is selected from a set corresponding to a next Ks value of the current Ks value to be used as the next current seed node, and the node is placed in the current seed node set, so that the Ks value is equal to the degree value of the node, that is, the next Ks value is less than the current Ks value by 1, and on the basis, the node farthest from the current node is selected from the next Ks value to ensure that the seed nodes cannot be repeated, so that the next Ks value of the current Ks value is taken as the next current Ks value from the distance list acquired at first.
In step S13, it is determined whether the number of nodes in the seed node set is equal to a preset number, which is not limited in the embodiment of the present application, and the preset number may be selected according to a specific implementation situation. If the number is equal, the acquisition of the seed node is ended, and if the number is not equal, the process returns to step S11. It is noted that after returning to step S11, the current seed node is taken as a starting point, and the current seed node is taken as a last acquired node, that is, a second seed node, specifically, a seed node is acquired in a set corresponding to ks=8, a farthest node is acquired in a set corresponding to ks=7 by taking the seed node as a starting point, and the node just acquired is taken as a starting point to acquire in a set corresponding to ks=6 until the preset number is reached. Seed nodes are obtained from the sets corresponding to different Ks values, so that the repeatability among the nodes is low.
According to the method for acquiring the server seed nodes in the cluster, one seed node is acquired from the set corresponding to the current Ks value, the seed node is put into the seed node set as the current seed node, the distance from the rest of the nodes to the current seed node is acquired by taking the current seed node as a starting point, the distance list is updated to serve as the current distance list, the node farthest from the current seed node is selected from the set corresponding to the next Ks value of the current Ks value according to the current distance list, the node is put into the current seed node set, finally whether the number of the nodes in the seed node set is equal to the preset number is judged, if yes, the acquisition of the seed nodes is ended, if no, the seed nodes are continuously acquired, and therefore the method not only improves the searching efficiency of the server path, but also ensures the analysis of the potential nodes, avoids the problem that the acquired nodes are concentrated, and avoids the problems of high node repeatability and low efficiency when processing tasks.
On the basis of the above embodiment, a description is made on how to obtain a seed node from a set corresponding to the current Ks value, which specifically includes the following steps:
and constructing a complex network diagram, decomposing according to the K-shell to obtain a plurality of sets, and acquiring a node from the set corresponding to the maximum Ks value to serve as a current seed node.
The specific steps of K-shell decomposition are as follows, in the first step, a node with a network degree value equal to 1 is placed in a set corresponding to ks=1, a node with a network degree value equal to 2 is placed in a set corresponding to ks=2, a node with a network degree value equal to 3 is placed in a set corresponding to ks=3, and so on, until each node in the network is allocated to a corresponding set, that is, one degree value corresponds to one set. On the basis, a node is obtained from the set corresponding to the maximum Ks value, the node is used as the current seed node, and the node in the set corresponding to the maximum Ks value is not limited, and can be selected according to specific implementation conditions.
According to the method, a complex network diagram is constructed, a plurality of sets are obtained through decomposition according to K-shell, one node is obtained in the set corresponding to the largest Ks value and serves as the current seed node, the seed node is easy to obtain, and the first seed node is obtained in a simple mode.
As a preferred embodiment, the distance from the current seed node to the remaining nodes is determined by breadth-first traversal or depth-first traversal using the current seed node as a starting point.
Wherein breadth-first traversal processes nodes by layer, those nodes closest to the seed node are accessed first, and those nodes furthest away are accessed last, much like the tree's layer sequence variables, the breadth-first search code uses a queue. Searching: one node is first selected as the starting node and is colored grey, the remaining nodes being white. The starting node is placed in a queue. Selecting a node from the head of the queue, finding all adjacent nodes, putting the found adjacent nodes into the tail of the queue, coating the accessed nodes with black, and coating the non-accessed nodes with white. If the color of the node is gray, it indicates that a queue has been found and placed, and if the color of the node is white, it indicates that the next node in the queue has not been found, and the same method is used to process the next node in the queue. The depth-first traversal is to access the seed nodes, and sequentially start from the adjacent nodes which are not accessed by the seed nodes, and the depth-first traversal is carried out on the graph; and (3) until nodes which are in path communication with the seed node in the graph are accessed, if the nodes in the graph are not accessed at the moment, starting from an unaccessed node, and performing depth-first traversal again until all the nodes in the graph are accessed. In this embodiment, the nodes in the set corresponding to the next Ks value of the current Ks value are preferentially accessed, so that breadth-first traversal is mainly used to obtain the distances from the other nodes to the seed node in this embodiment, but the method is not limited to breadth-first traversal and depth-first traversal, and the method for obtaining the distances can be selected according to a specific implementation manner.
The breadth-first traversal or the depth-first traversal provided by the embodiment takes the seed node as a starting point to acquire the distance from other nodes to the seed node, can more comprehensively comprise each node, can not miss, can analyze new nodes, and increases the accuracy of finding the seed node.
On the basis of the above embodiment, after the acquisition of the seed node is finished, the following steps are further included, and fig. 2 is a flowchart of another method for acquiring the server seed node in the cluster according to the embodiment of the present application, as shown in fig. 2, further includes, on the basis of S14:
s15: and outputting the current seed node set.
S16: and outputting the working states of the various sub-nodes.
After the seed node set is obtained, the seed node set is output, namely the defect of cloud computing is overcome, tasks which cannot be completed are migrated to adjacent idle servers for computing, the tasks are completed through cooperation of a plurality of edge servers, one seed node corresponds to one server, and the tasks are shared through cooperation of a plurality of seed nodes.
In addition, after the current seed node set is output, the working states of various seed nodes are also output, and whether the output seed nodes successfully enter the working states can be seen.
The embodiment outputs the current seed node set and the working states of various seed nodes, so that the degree of task completion of the current seed node can be seen, and the working state is 0 if the current seed node is not successfully output, thereby effectively improving the working efficiency.
As a preferred embodiment, the preset number of seed nodes is 5, but not limited to 5, and the preset number of seed nodes may be selected according to specific implementation cases.
In the above embodiments, the method for obtaining the server seed node in the cluster is described in detail, and the application further provides an embodiment corresponding to the device for obtaining the server seed node in the cluster. It should be noted that the present application describes an embodiment of the device portion from two angles, one based on the angle of the functional module and the other based on the angle of the hardware.
Fig. 3 is a block diagram of an apparatus for obtaining a server seed node in a cluster according to an embodiment of the present application, where, as shown in fig. 3, the apparatus for obtaining a server seed node in a cluster includes:
a first obtaining module 14, configured to obtain a seed node from a set corresponding to a current Ks value, and put the seed node as the current seed node into the seed node set, where the current Ks value is a largest Ks value;
the second obtaining module 15 is configured to obtain distances from the other nodes to the current seed node by using the current seed node as a starting point, and update the distance list to serve as a current distance list;
the selecting module 16 is configured to select, according to the current distance list, a node closest to and the largest to the current seed node from a set corresponding to a next Ks value of the current Ks value, as the next current seed node, and place the node into the current seed node set, where the next Ks value of the current Ks value is used as the next current Ks value;
the judging module 17 is configured to judge whether the number of nodes in the seed node set is equal to a preset number, if yes, trigger the ending module, and if no, trigger the second obtaining module;
an ending module 18, configured to end the obtaining of the seed node.
The device for acquiring the server seed node in the cluster provided by the embodiment comprises a first acquisition module, a second acquisition module, a selection module, a judgment module and an ending module, and is used for realizing the method for acquiring the server seed node in the cluster.
Fig. 4 is a block diagram of an electronic device for obtaining a server seed node in a cluster according to another embodiment of the present application, where, as shown in fig. 4, the electronic device for obtaining a server seed node in a cluster includes: a memory 20 for storing a computer program;
a processor 21 for implementing the steps of the method of obtaining server seed nodes in a cluster as mentioned in the above embodiments when executing a computer program.
The electronic device for obtaining the server seed node in the cluster provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like.
Processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 21 may also comprise a main processor, which is a processor for processing data in an awake state, also called CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing a computer program 201, where the computer program, when loaded and executed by the processor 21, is capable of implementing the relevant steps of the method for obtaining a server seed node in a cluster disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may further include an operating system 202, data 203, and the like, where the storage manner may be transient storage or permanent storage. The operating system 202 may include Windows, unix, linux, among others. The data 203 may include, but is not limited to, data of a method of acquiring a server seed node in a cluster, and the like.
In some embodiments, the electronic device for acquiring the server seed node in the cluster may further include a display screen 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the architecture shown in fig. 4 does not constitute a limitation on the electronics of the cluster that acquire the server seed node, and may include more or fewer components than illustrated.
The electronic device for acquiring the server seed node in the cluster provided by the embodiment comprises a memory and a processor, wherein the memory is used for storing a computer program, the processor is used for executing the computer program to realize the step of acquiring the server seed node in the cluster, one seed node is acquired from a set corresponding to the current Ks value and is taken as the current seed node to be put into the seed node set, the distance from the rest nodes to the current seed node is acquired by taking the current seed node as a starting point, a distance list is updated to be taken as a current distance list, the node farthest from the set corresponding to the next Ks value of the current Ks value is selected from the current distance list according to the current distance list, the node is put into the current seed node set, finally, whether the number of the nodes in the seed node set is equal to the preset number is judged, if yes, the acquisition of the seed nodes is ended, if no, the seed node is continuously acquired, the method not only improves the efficiency of searching the path of the server, but also ensures the analysis of the potential nodes, the problem of comparing the acquired nodes is solved, and the problem of low task concentration is avoided.
Finally, the present application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps as described in the method embodiments above.
It will be appreciated that the methods of the above embodiments, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored on a computer readable storage medium. With such understanding, the technical solution of the present application, or a part contributing to the prior art or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium, performing all or part of the steps of the method described in the various embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The computer readable storage medium provided in this embodiment stores a computer program, when the computer program is executed by a processor to perform the steps of a method for obtaining a server seed node in a cluster, one seed node is obtained from a set corresponding to a current Ks value, and is taken as a current seed node to be placed in the seed node set, and the distance between the rest nodes and the current seed node is obtained by taking the current seed node as a starting point, and a distance list is updated to be taken as the current distance list, according to the current distance list, a node farthest from the current seed node is selected from the set corresponding to the next Ks value of the current Ks value, and is placed in the current seed node set, finally, whether the number of nodes in the seed node set is equal to a preset number is judged, if yes, if no seed node is continuously obtained, the seed node is obtained from the set corresponding to each Ks value through the distance list, so that not only is the efficiency of server path searching is improved, but also the analysis of the potential nodes is ensured, the problem of node comparison in the obtained node set is avoided, and the problem of high efficiency of node comparison in processing task is avoided.
The method, the device and the medium for acquiring the server seed node in the cluster provided by the application are described in detail above. In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section. It should be noted that it would be obvious to those skilled in the art that various improvements and modifications can be made to the present application without departing from the principles of the present application, and such improvements and modifications fall within the scope of the claims of the present application.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method for obtaining a server seed node in a cluster, comprising:
acquiring a seed node from a set corresponding to a current Ks value, and putting the seed node into the seed node set as the current seed node, wherein the Ks value is the number of cores of the node, and the number of cores of one node is the number of cores corresponding to the node after the k-shell decomposition of the network; the current Ks value corresponding to the first seed node is the largest Ks value;
the method comprises the steps of taking a current seed node as a starting point, obtaining the distance from other nodes to the current seed node, and updating a distance list to serve as a current distance list;
according to the current distance list, selecting a node farthest from the current seed node from a set corresponding to the next Ks value of the current Ks value to serve as the next current seed node, and putting the node into the current seed node set, wherein the next Ks value of the current Ks value serves as the next current Ks value, and the next Ks value is 1 less than the current Ks value;
judging whether the number of the nodes in the seed node set is equal to a preset number or not;
if yes, ending the acquisition of the seed node;
and if not, returning to the step of taking the current seed node as a starting point, acquiring the distance between the other nodes and the current seed node, and updating the distance list to serve as the current distance list.
2. The method for obtaining a seed node of a server in a cluster according to claim 1, wherein obtaining a seed node from a set corresponding to a current Ks value includes:
constructing a complex network diagram, and decomposing according to the K-shell to obtain a plurality of sets;
and acquiring a node from the set corresponding to the maximum Ks value to serve as the current seed node.
3. The method for obtaining a server seed node in a cluster according to claim 2, wherein obtaining distances between the remaining nodes and the current seed node with the current seed node as a starting point comprises:
and performing breadth-first traversal or depth-first traversal with the current seed node as a starting point, and determining the distance between the rest nodes and the current seed node.
4. The method for obtaining server seed nodes in a cluster according to claim 2, wherein the obtaining a plurality of sets according to K-shell decomposition includes:
according to the degree value of the node in the network, the network is decomposed into a plurality of sets, wherein one degree value corresponds to one set.
5. The method for obtaining a server seed node in a cluster according to any of the claims 1 to 4, further comprising, after said ending the obtaining of the seed node:
and outputting the current seed node set.
6. The method of claim 5, further comprising, after said outputting the current set of seed nodes:
outputting the working state of each seed node.
7. The method for obtaining server seed nodes in a cluster according to claim 6, wherein the preset number is 5.
8. An apparatus for obtaining a server seed node in a cluster, comprising:
the first acquisition module is used for acquiring a seed node from a set corresponding to a current Ks value and putting the seed node into the seed node set as the current seed node, wherein the Ks value is the number of cores of the node, and the number of cores of one node is the number of cores corresponding to the node after the k-shell decomposition of the network; the current Ks value corresponding to the first seed node is the largest Ks value;
the second acquisition module is used for acquiring the distance from the other nodes to the current seed node by taking the current seed node as a starting point, and updating the distance list to serve as a current distance list;
the selecting module is used for selecting the node closest to the current seed node and the node which is the largest from the set corresponding to the next Ks value of the current Ks value according to the current distance list to be used as the next current seed node, and putting the node into the current seed node set, wherein the next Ks value of the current Ks value is used as the next current Ks value, and the next Ks value is 1 less than the current Ks value;
the judging module is used for judging whether the number of the nodes in the seed node set is equal to the preset number, if so, triggering the ending module, and if not, triggering the second acquisition module;
and the ending module is used for ending the acquisition of the seed node.
9. An electronic device for obtaining a server seed node in a cluster, comprising a memory for storing a computer program;
processor for implementing the steps of the method of obtaining server seed nodes in a cluster according to any of claims 1 to 7 when executing said computer program.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the method of obtaining server seed nodes in a cluster according to any of claims 1 to 7.
CN202111676468.9A 2021-12-31 2021-12-31 Method, device and medium for obtaining server seed nodes in cluster Active CN114466022B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111676468.9A CN114466022B (en) 2021-12-31 2021-12-31 Method, device and medium for obtaining server seed nodes in cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111676468.9A CN114466022B (en) 2021-12-31 2021-12-31 Method, device and medium for obtaining server seed nodes in cluster

Publications (2)

Publication Number Publication Date
CN114466022A CN114466022A (en) 2022-05-10
CN114466022B true CN114466022B (en) 2023-07-21

Family

ID=81406690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111676468.9A Active CN114466022B (en) 2021-12-31 2021-12-31 Method, device and medium for obtaining server seed nodes in cluster

Country Status (1)

Country Link
CN (1) CN114466022B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017148296A1 (en) * 2016-03-02 2017-09-08 阿里巴巴集团控股有限公司 Method of assigning application to assigned service cluster and device
CN107920072A (en) * 2017-11-14 2018-04-17 深圳市视维科技股份有限公司 A kind of multimedia sharing method and system based on data characteristics
CN108711111A (en) * 2018-05-16 2018-10-26 山东科技大学 A kind of social network influence power maximization approach decomposed based on K-shell
CN109471994A (en) * 2018-10-22 2019-03-15 西南石油大学 Network key nodal test method and system
CN110875938A (en) * 2018-08-31 2020-03-10 元一科技控股有限公司 Method and device for sending information in block chain
CN111800446A (en) * 2019-04-12 2020-10-20 北京沃东天骏信息技术有限公司 Scheduling processing method, device, equipment and storage medium
CN112015549A (en) * 2020-08-07 2020-12-01 苏州浪潮智能科技有限公司 Method and system for selectively preempting scheduling nodes based on server cluster
CN112231098A (en) * 2020-09-29 2021-01-15 北京三快在线科技有限公司 Task processing method, device, equipment and storage medium
WO2021212757A1 (en) * 2020-04-23 2021-10-28 平安科技(深圳)有限公司 Upgrade maintenance method and apparatus for cluster, and electronic device and storage medium
CN113723503A (en) * 2021-08-28 2021-11-30 重庆理工大学 Method for identifying influential propagators in complex network

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017148296A1 (en) * 2016-03-02 2017-09-08 阿里巴巴集团控股有限公司 Method of assigning application to assigned service cluster and device
CN107920072A (en) * 2017-11-14 2018-04-17 深圳市视维科技股份有限公司 A kind of multimedia sharing method and system based on data characteristics
CN108711111A (en) * 2018-05-16 2018-10-26 山东科技大学 A kind of social network influence power maximization approach decomposed based on K-shell
CN110875938A (en) * 2018-08-31 2020-03-10 元一科技控股有限公司 Method and device for sending information in block chain
CN109471994A (en) * 2018-10-22 2019-03-15 西南石油大学 Network key nodal test method and system
CN111800446A (en) * 2019-04-12 2020-10-20 北京沃东天骏信息技术有限公司 Scheduling processing method, device, equipment and storage medium
WO2021212757A1 (en) * 2020-04-23 2021-10-28 平安科技(深圳)有限公司 Upgrade maintenance method and apparatus for cluster, and electronic device and storage medium
CN112015549A (en) * 2020-08-07 2020-12-01 苏州浪潮智能科技有限公司 Method and system for selectively preempting scheduling nodes based on server cluster
CN112231098A (en) * 2020-09-29 2021-01-15 北京三快在线科技有限公司 Task processing method, device, equipment and storage medium
CN113723503A (en) * 2021-08-28 2021-11-30 重庆理工大学 Method for identifying influential propagators in complex network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈晶 ; 刘贤 ; .基于覆盖阈值的影响最大化算法的研究.高技术通讯.2019,全文. *

Also Published As

Publication number Publication date
CN114466022A (en) 2022-05-10

Similar Documents

Publication Publication Date Title
JP7043596B2 (en) Neural architecture search
CN111143039B (en) Scheduling method and device of virtual machine and computer storage medium
KR20180009352A (en) Method and apparatus for data processing for mobile games
CN104268229B (en) Resource obtaining method and device based on multi-process browser
CN112905326B (en) Task processing method and device
CN113010312B (en) Super-parameter tuning method, device and storage medium
CN110597965B (en) Emotion polarity analysis method and device for article, electronic equipment and storage medium
CN110728333A (en) Sunshine duration analysis method and device, electronic equipment and storage medium
CN114895773A (en) Energy consumption optimization method, system and device of heterogeneous multi-core processor and storage medium
CN114237869A (en) Ray double-layer scheduling method and device based on reinforcement learning and electronic equipment
CN114466022B (en) Method, device and medium for obtaining server seed nodes in cluster
CN111898766B (en) Ether house fuel limitation prediction method and device based on automatic machine learning
CN116151384B (en) Quantum circuit processing method and device and electronic equipment
CN115495248B (en) Memory allocation method and device of reasoning card, electronic equipment and storage medium
CN115629711A (en) Packet writing alignment method, system, device and medium
CN116069497A (en) Method, apparatus, device and storage medium for executing distributed task
CN109002498A (en) Interactive method, device, equipment and storage medium
CN115016735A (en) Control method, device and medium for distributed cache system
CN113377295A (en) Data storage and reading method, device and equipment for multi-producer single-consumer
CN112231481A (en) Website classification method and device, computer equipment and storage medium
CN114443767B (en) Method, device, equipment and medium for determining consistency level of distributed system
CN112070162A (en) Multi-class processing task training sample construction method, device and medium
CN114331379B (en) Method for outputting task to be handled, model training method and device
CN114596637B (en) Image sample data enhancement training method and device and electronic equipment
CN111538714B (en) Instruction execution method and device, 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
GR01 Patent grant