Nothing Special   »   [go: up one dir, main page]

CN114466022A - Method, device and medium for acquiring server seed nodes in cluster - Google Patents

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

Info

Publication number
CN114466022A
CN114466022A CN202111676468.9A CN202111676468A CN114466022A CN 114466022 A CN114466022 A CN 114466022A CN 202111676468 A CN202111676468 A CN 202111676468A CN 114466022 A CN114466022 A CN 114466022A
Authority
CN
China
Prior art keywords
current
seed node
node
value
nodes
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
CN202111676468.9A
Other languages
Chinese (zh)
Other versions
CN114466022B (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

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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a method, a device and a medium for obtaining a server seed node based on a cluster, wherein a seed node is obtained from a set corresponding to a current Ks value and is put into a seed node set as the current seed node, the distances from other nodes to the current seed node are obtained, a distance list is updated to be used 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, and finally whether the number of the nodes in the seed node set is equal to a preset number or not is judged, and whether continuous obtaining or ending is selected according to the result. Therefore, the method obtains the seed nodes from the sets corresponding to the Ks values through the distance list, the efficiency of server path searching is improved, analysis of potential nodes is guaranteed, the problem of centralized obtained nodes is avoided, and the problems of high node repeatability and low efficiency during task processing are avoided.

Description

Method, device and medium for acquiring server seed nodes in cluster
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method, an apparatus, and a medium for acquiring a server seed node in a cluster.
Background
The rapid growth of streaming diversified network services and services causes network congestion, data loss and other problems, and the traditional cloud computing cannot meet the requirements of a terminal on high bandwidth, low time delay and real-time performance. In order to solve the defects of cloud computing, tasks which cannot be completed are migrated to adjacent idle servers for computing, and the tasks are completed through cooperation of a plurality of edge servers, however, in the method, cost consumption is overlarge during server path searching, cost consumed during server path searching can be reduced through acquisition of server seed nodes, acquisition of a server seed node set is performed through K-shell decomposition, the whole cluster is decomposed into a plurality of sets according to the size of the value of the node, the nodes with the number which is the same as the preset number in the set corresponding to the maximum Ks value are selected as the server seed nodes, searching of a server path is further reduced, and sharing processing can be performed on the tasks.
Although the problem of server path consumption is solved by the current technology, the information transmission capability of potential nodes cannot be analyzed by statically analyzing the information transmission capability of the nodes, and the problem that selected server nodes are concentrated cannot be avoided, so that the server nodes have high repeatability and low efficiency when processing tasks of server seed nodes.
In view of the above technical problems, a method for improving efficiency is sought, and 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 a server seed node in a cluster.
In order to solve the above technical problem, the present application provides a method for obtaining a server seed node in a cluster, including:
acquiring a seed node from the 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 maximum Ks value;
taking the current seed node as a starting point, obtaining the distances from the other nodes to the current seed node, and updating the distance list to be used as a current distance list;
according to the current distance list, selecting a node which is farthest away from the current seed node from a set corresponding to a next Ks value of the current Ks value to serve as a 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 nodes in the seed node set is equal to a preset number or not;
if so, ending the acquisition of the seed node;
if not, returning to the step of taking the current seed node as a starting point, obtaining the distances between the other nodes and the current seed node, and updating the distance list to be used 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 in 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 distances between the remaining nodes and the current seed node includes:
and performing breadth-first traversal or depth-first traversal by taking the current seed node as a starting point, and determining the distances from the other nodes to the current seed node.
Preferably, the obtaining a plurality of sets according to K-shell decomposition includes:
decomposing the network into a plurality of sets according to the sizes of the values of the nodes in the network, wherein one of the values corresponds to one set.
Preferably, after the ending of the acquiring 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 includes:
and 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 obtaining module is used for obtaining 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 maximum Ks value;
the second acquisition module is used for acquiring the distances 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 be used as the current distance list;
a selecting module, configured to select, according to the current distance list, a node closest to and largest in distance from the current seed node from a set corresponding to a next Ks value of the current Ks value, as a next current seed node, and place the node in 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 is used for judging whether the number of the nodes in the seed node set is equal to a preset number or not, if so, the ending module is triggered, and if not, the second obtaining module is triggered;
and the ending module is used for ending the acquisition of the seed node.
In order to solve the above technical problem, the present application further provides a device for acquiring a server seed node in a cluster, including a memory for storing a computer program;
a processor configured to implement the steps of the method for obtaining a server seed node in a cluster as described above when executing the computer program.
To solve the above technical problem, the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of the method for obtaining a server seed node in a cluster as described above.
The method for obtaining the server seed node based on the cluster, provided by the application, comprises the steps of obtaining a seed node from a set corresponding to a current Ks value, putting the seed node into a seed node set as the current seed node, obtaining the distances from other nodes to the current seed node by taking the current seed node as a starting point, updating a distance list to be used as a current distance list, selecting a node farthest away from the current seed node from a set corresponding to a next Ks value of the current Ks value according to the current distance list, putting the node into the current seed node set, finally judging whether the number of nodes in the seed node set is equal to a preset number, if so, finishing obtaining the seed node, if not, continuously obtaining the seed node, and thus, the method obtains the seed node from the set corresponding to each Ks value through the distance list, not only improves the efficiency of server path search, the analysis of potential nodes is also ensured, the problem that the acquired nodes are concentrated is also avoided, and the problems of high node repeatability and low efficiency in task processing are avoided.
On the basis, the application also provides a device and a medium for acquiring the server seed node in the cluster, and the effect is the same as the above.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a method for acquiring a server seed node in a cluster according to an embodiment of the present disclosure;
fig. 2 is a flowchart of another method for acquiring a server seed node in a cluster according to an embodiment of the present disclosure;
fig. 3 is a structural diagram of a device for acquiring a server seed node in a cluster according to an embodiment of the present disclosure;
fig. 4 is a structural diagram of an apparatus for acquiring a server seed node in a cluster according to another embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
The core of the application is to provide a method and a device for acquiring a server seed node in a cluster and a computer readable storage medium.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings.
Fig. 1 is a flowchart of a method for acquiring a server seed node in a cluster according to an embodiment of the present application, where as shown in fig. 1, the method for acquiring a server seed node in a cluster includes the following steps:
s10: and acquiring 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 distances from the other nodes to the current seed node.
S12: and according to the current distance list, selecting a node which is farthest away from the current seed node from a set corresponding to a next Ks value of the current Ks value 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, otherwise, returning to the step S11.
S14: and finishing the acquisition of the seed node.
It can be understood that the rapid growth of streaming diversified network services and services leads to network congestion, data loss and other problems, and the traditional cloud computing cannot meet the requirements of the terminal on high bandwidth, low time delay and real-time performance. In order to solve the defects of cloud computing, tasks which cannot be completed are migrated to adjacent idle servers for computing, and the tasks are completed through cooperation of a plurality of edge servers, however, in the method, cost consumption is overlarge during server path searching, cost consumed during server path searching can be reduced through acquisition of server seed nodes, acquisition of a server seed node set is performed through K-shell decomposition, the whole cluster is decomposed into a plurality of sets according to the size of the value of the node, the nodes with the number being the same as the preset number in the set corresponding to the maximum Ks value are selected as the server seed nodes, searching of the server path is further reduced, and the tasks can be shared. Although the problem of server path consumption is solved by the current technology, the information transmission capability of potential nodes cannot be analyzed by statically analyzing the information transmission capability of the nodes, and the problem that selected server nodes are concentrated cannot be avoided, so that the server nodes have high repeatability and low efficiency when processing tasks of server seed nodes. Therefore, a method for acquiring a server seed node in a cluster is provided.
As shown in step S10, a seed node is obtained from the set corresponding to the current Ks value, and is placed in the seed node set as the current seed node, where one seed node corresponds to one server, and the current Ks value corresponding to the first seed node is the maximum Ks value, where the Ks value is the number of cores of the node, the number of cores of one node is that the network is performing k-shell decomposition, and Ks is equal to 1 or 1 core, that is, the value of the node is equal to 1, and Ks is equal to 2 or 2 cores, that is, the value of the node is equal to 2, and so on until all the values of the nodes have corresponding cores, and if the maximum value of the nodes is 10, the maximum Ks value is 10. In this embodiment, it is not limited which node in the set corresponding to the maximum Ks value is used as the fetched node.
In addition, for the step S11, the distances from the remaining nodes to the current seed node are 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 distances from the remaining nodes to the current seed node are obtained, and an analysis is performed on the potential nodes, so that each node is obtained through analysis. In addition, for the step S12, according to 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 to be used as the next current seed node, and this node is placed into the current seed node set, as described above, the Ks value is equal to the value of the node, that is, the next Ks value is less than 1 than the current Ks value, on this basis, the node farthest from the current node is selected from the next Ks value, which is used as the next current Ks value, and it is ensured that there is no duplication between the seed nodes, so the distance list obtained from the beginning is obtained.
In the 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 embodiments of the present application and may be selected according to specific implementation conditions. If the number of the seed nodes is equal, the acquisition of the seed nodes is ended, and if the number is not equal, the process returns to step S11. It should be noted that after returning to step S11, taking the current seed node as the starting point, the current seed node is the last acquired node, that is, the second seed node, specifically, one seed node is acquired in the set corresponding to Ks ═ 8, the farthest node is acquired in the set corresponding to Ks ═ 7 as the starting point by using this seed node as the starting point, and the node that is just acquired is acquired in the set corresponding to Ks ═ 6 as the starting point again until the preset number is reached. Seed nodes are obtained from the sets corresponding to different Ks values, so that low repeatability among the nodes is ensured.
The method for obtaining seed nodes of a server in a cluster according to this embodiment obtains a seed node from a set corresponding to a current Ks value, places the seed node into a seed node set as the current seed node, obtains distances from other nodes to the current seed node with the current seed node as a starting point, updates a distance list as a current distance list, selects a node farthest from the current seed node from a set corresponding to a next Ks value of the current Ks value according to the current distance list, places the node into the current seed node set, and finally determines whether the number of nodes in the seed node set is equal to a preset number, if so, ends the obtaining of the seed node, and if not, continues to obtain the seed node, thus not only improving the efficiency of server path search, the analysis of potential nodes is also ensured, the problem that the acquired nodes are concentrated is also avoided, and the problems of high node repeatability and low efficiency in task processing are avoided.
On the basis of the above embodiment, how to obtain a seed node from the set corresponding to the current Ks value is described, which includes the following specific steps:
and constructing a complex network graph, decomposing according to the K-shell to obtain a plurality of sets, and acquiring a node in the set corresponding to the maximum Ks value to be used as a current seed node.
The first step is to put the nodes with the network median value equal to 1 into the set corresponding to Ks ═ 1, put the nodes with the network median value equal to 2 into the set corresponding to Ks ═ 2, put the nodes with the network median value equal to 3 into the set corresponding to Ks ═ 3, and so on until each node in the network is assigned to the corresponding set, that is, one median value corresponds to one set. On this basis, a node is obtained from the set corresponding to the maximum Ks value, and the node is used as the current seed node, and which node in the set corresponding to the maximum Ks value is selected is not limited, and can be selected according to the specific implementation situation.
How to obtain a seed node from the set corresponding to the current Ks value provided by this embodiment obtains a plurality of sets by constructing a complex network diagram and decomposing according to K-shell, and obtains a node from the set corresponding to the largest Ks value to serve as the current seed node.
As a preferred embodiment, the distances between the remaining nodes and the current seed node are obtained by performing breadth-first traversal or depth-first traversal using the current seed node as a starting point to determine the distances between the remaining nodes and the current seed node.
Where breadth-first traversal processes nodes by level, those nodes closest to the seed node are visited first and those nodes farthest are visited last, this sum tree's hierarchical variables are much like breadth-first search code uses a queue. A searching step: one node is first selected as the starting node and is colored gray, with the remaining nodes being white. The start node is placed in a queue. And selecting a node from the head of the queue, finding all nodes adjacent to the node, placing the found adjacent nodes at the tail of the queue, and painting the accessed nodes into black, wherein the nodes which are not accessed are white. If the color of the node is gray, indicating that it has been found and placed in the queue, and if the color of the node is white, indicating that it has not been found, the next node in the queue is processed in the same way. The depth-first traversal is to access the seed nodes, and sequentially start from the non-accessed adjacent nodes of the seed nodes to perform depth-first traversal on the graph; and if the nodes in the graph which are communicated with the paths of the seed nodes are not accessed, starting from one node which is not accessed, 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 the range-first traversal is mainly used in this embodiment to obtain the distances from the other nodes to the seed node, but not limited to the range-first traversal and the depth-first traversal, and the distance obtaining manner may be selected according to a specific implementation manner.
The breadth-first traversal or the depth-first traversal provided by the embodiment uses the seed node as a starting point to obtain the distances from other nodes to the seed node, can more comprehensively comprise each node, cannot generate omission, can analyze a new node, and simultaneously increases the accuracy of finding the seed node.
On the basis of the foregoing embodiment, after the obtaining of the seed node is finished, the following steps are further included, and fig. 2 is a flowchart of another method for obtaining a server seed node in a cluster provided in the embodiment of the present application, and as shown in fig. 2, the method further includes, on the basis of S14:
s15: and outputting the current seed node set.
S16: and outputting the working states of various child nodes.
After the seed node set is obtained, the seed node set is output, namely the defects of cloud computing are solved, 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 plurality of seed nodes share the tasks in a cooperation mode.
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 current seed node set is output, the working states of various child nodes are output, the degree of the task completion of the current seed node can be seen, and if the output is not successful, the working state is 0, so that the working efficiency is effectively improved.
As a preferred embodiment, the preset number of the seed nodes is 5, but is not limited to 5, and the preset number of the seed nodes may be selected according to a specific implementation situation.
In the foregoing embodiment, a method for obtaining a server seed node in a cluster is described in detail, and the present application also provides an embodiment corresponding to an apparatus for obtaining a server seed node in a cluster. It should be noted that the present application describes the embodiments of the apparatus portion from two perspectives, one from the perspective of the function module and the other from the perspective of the hardware.
Fig. 3 is a structural diagram of an apparatus for acquiring a server seed node in a cluster according to an embodiment of the present application, where as shown in fig. 3, the apparatus for acquiring 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 place the seed node as the current seed node into the seed node set, where the current Ks value is a maximum Ks value;
a second obtaining module 15, configured to obtain distances from the remaining nodes to the current seed node using the current seed node as a starting point, and update the distance list to serve as a current distance list;
a selecting module 16, configured to select, according to the current distance list, a node closest to and largest in distance from the current seed node from a set corresponding to a next Ks value of the current Ks value, as a next current seed node, and place the node in 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 so, trigger the ending module, and if not, trigger the second obtaining module;
and an ending module 18, configured to end the acquisition of the seed node.
The device for obtaining a seed node of a server in a cluster according to this embodiment includes a first obtaining module, a second obtaining module, a selecting module, a determining module, and an ending module, and is configured to implement a method for obtaining a seed node of a server in a cluster, where the method includes obtaining a seed node from a set corresponding to a current Ks value, placing the seed node in a seed node set as the current seed node, obtaining distances from other nodes to the current seed node using the current seed node as a starting point, updating a distance list as a current distance list, selecting a node farthest from a set corresponding to a next Ks value of the current Ks value according to the current distance list, placing the node in the current seed node set, and finally determining whether the number of nodes in the seed node set is equal to a preset number, if so, ending the obtaining of the seed node, if not, the seed nodes are continuously obtained, and therefore, the method obtains the seed nodes from the sets corresponding to the Ks values through the distance lists, the efficiency of server path searching is improved, analysis of potential nodes is guaranteed, the problem that the obtained nodes are concentrated is solved, and the problems of high node repeatability and low efficiency in task processing are solved.
Fig. 4 is a structural diagram of an apparatus for acquiring a server seed node in a cluster according to another embodiment of the present application, where as shown in fig. 4, the apparatus for acquiring a server seed node in a cluster includes: a memory 20 for storing a computer program;
the processor 21, configured to execute the computer program, is configured to implement the steps of the method for obtaining a server seed node in a cluster as mentioned in the above embodiments.
The device for acquiring the server seed node in the cluster provided by this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, or a desktop computer.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor for processing a calculation operation related to machine learning.
The 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 the following computer program 201, wherein after being loaded and executed by the processor 21, the computer program can implement the relevant steps of the method for acquiring a server seed node in a cluster disclosed in any one of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among others, Windows, Unix, Linux, and the like. Data 203 may include, but is not limited to, data of a method of obtaining a server seed node in a cluster, and the like.
In some embodiments, the 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 means for obtaining a server seed node in a cluster and may include more or fewer components than those shown.
The apparatus for obtaining a server seed node in a cluster provided in this embodiment includes a memory and a processor, where the memory is used to store a computer program, and the processor is used to execute the computer program to implement a method for obtaining a server seed node in a cluster, where a seed node is obtained from a set corresponding to a current Ks value and is placed in a seed node set as the current seed node, distances from other nodes to the current seed node are obtained using the current seed node as a starting point, a distance list is updated as 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 according to the current distance list, the node is placed in the current seed node set, and finally, whether the number of nodes in the seed node set is equal to a preset number is determined, if yes, the obtaining of the seed node is ended, if not, the seed nodes are continuously obtained, and therefore, the method obtains the seed nodes from the sets corresponding to the Ks values through the distance list, the efficiency of server path searching is improved, analysis of potential nodes is guaranteed, the problem that the obtained nodes are concentrated is avoided, and the problems that the nodes are high in repeatability and low in efficiency when tasks are processed are avoided.
Finally, the 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 being executed by a processor, carries out the steps as set forth in the above-mentioned method embodiments.
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods described in the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The computer-readable storage medium provided in this embodiment stores a computer program, and when the computer program is executed by a processor to perform the steps of the method for acquiring a server seed node in a cluster, the computer program acquires a seed node from a set corresponding to a current Ks value, puts the seed node into a seed node set as the current seed node, acquires distances from other nodes to the current seed node using the current seed node as a starting point, updates a distance list as a current distance list, selects a node farthest from the current seed node from a set corresponding to a next Ks value of the current Ks value according to the current distance list, puts the node into the current seed node set, and finally determines whether the number of nodes in the seed node set is equal to a preset number, if so, ends the acquisition of the seed node, and if not, continues to acquire the seed node, thus determining, according to the method, the seed nodes are obtained from the sets corresponding to the Ks values through the distance list, so that the efficiency of server path search is improved, the analysis of potential nodes is guaranteed, the problem that the obtained nodes are concentrated is avoided, and the problems of high node repeatability and low efficiency in task processing are avoided.
The method, the apparatus, and the medium for acquiring the server seed node in the cluster provided by the present application are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present 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. Also, 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 an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method for acquiring a server seed node in a cluster is characterized by comprising the following steps:
acquiring a seed node from the 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 maximum Ks value;
taking the current seed node as a starting point, obtaining the distances from the other nodes to the current seed node, and updating the distance list to be used as a current distance list;
according to the current distance list, selecting a node which is farthest away from the current seed node from a set corresponding to a next Ks value of the current Ks value to serve as a 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 nodes in the seed node set is equal to a preset number or not;
if so, ending the acquisition of the seed node;
if not, returning to the step of taking the current seed node as a starting point, obtaining the distances between the other nodes and the current seed node, and updating the distance list to be used as the current distance list.
2. The method of claim 1, wherein obtaining a seed node from the set corresponding to the current Ks value comprises:
constructing a complex network diagram, and decomposing according to the K-shell to obtain a plurality of sets;
and acquiring a node in the set corresponding to the maximum Ks value to serve as the current seed node.
3. The method of claim 2, wherein taking the current seed node as a starting point, and obtaining distances between the remaining nodes and the current seed node comprises:
and performing breadth-first traversal or depth-first traversal by taking the current seed node as a starting point, and determining the distances from the other nodes to the current seed node.
4. The method of claim 2, wherein obtaining a plurality of sets according to K-shell decomposition comprises:
decomposing the network into a plurality of sets according to the sizes of the values of the nodes in the network, wherein one of the values corresponds to one set.
5. The method for acquiring the server seed node in the cluster according to any one of claims 1 to 4, further comprising, after the ending of the acquisition of the seed node:
and outputting the current seed node set.
6. The method for obtaining the server seed node in the cluster according to claim 5, further comprising, after the outputting the current seed node set:
and outputting the working state of each seed node.
7. The method of claim 6, wherein the predetermined number is 5.
8. An apparatus for obtaining a seed node of a server in a cluster, comprising:
the first obtaining module is used for obtaining 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 maximum Ks value;
the second acquisition module is used for acquiring the distances 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 be used as the current distance list;
a selecting module, configured to select, according to the current distance list, a node closest to and largest in distance from the current seed node from a set corresponding to a next Ks value of the current Ks value, as a next current seed node, and place the node in 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 is used for judging whether the number of the nodes in the seed node set is equal to a preset number or not, if so, the ending module is triggered, and if not, the second obtaining module is triggered;
and the ending module is used for ending the acquisition of the seed node.
9. An apparatus for obtaining a server seed node in a cluster, comprising a memory for storing a computer program;
a processor for implementing the steps of the method for obtaining a server seed node in a cluster according to any one of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method for obtaining a server seed node in a cluster according to any one 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 true CN114466022A (en) 2022-05-10
CN114466022B 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
陈晶;刘贤;: "基于覆盖阈值的影响最大化算法的研究", 高技术通讯 *

Also Published As

Publication number Publication date
CN114466022B (en) 2023-07-21

Similar Documents

Publication Publication Date Title
JP7043596B2 (en) Neural architecture search
CN111143039B (en) Scheduling method and device of virtual machine and computer storage medium
KR102094066B1 (en) Method and device for processing data for mobile games
CN110309269B (en) Response processing method and system, computer system and computer readable medium
CN111949832A (en) Method and device for analyzing dependency relationship of batch operation
CN113010312B (en) Super-parameter tuning method, device and storage medium
CN116151384A (en) Quantum circuit processing method and device and electronic equipment
CN112685409B (en) PAAS application service topology generation method and device and readable storage medium
CN115798654A (en) Model material processing method, device, equipment and medium
CN111612155A (en) Distributed machine learning system and communication scheduling method suitable for same
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
CN113849758A (en) Webpage index generation method and device, electronic equipment and storage medium
US20240176657A1 (en) Task processing method and apparatus, electronic device, storage medium and program product
CN115495248B (en) Memory allocation method and device of reasoning card, electronic equipment and storage medium
CN109213922B (en) Method and device for sequencing search results
CN111737347B (en) Method and device for sequentially segmenting data on Spark platform
CN115629711A (en) Packet writing alignment method, system, device and medium
CN116360712A (en) Platform framework extension method, device and storage medium
CN109299337B (en) Graph searching method based on iteration
CN110232393B (en) Data processing method and device, storage medium and electronic device
CN111538714B (en) Instruction execution method and device, electronic equipment and storage medium
CN116167447B (en) Quantum circuit processing method and device and electronic equipment
CN114615144B (en) Network optimization method and system
CN112100446A (en) Search method, readable storage medium and electronic device

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