CN114640618B - Cluster route scheduling method and device, electronic equipment and readable storage medium - Google Patents
Cluster route scheduling method and device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN114640618B CN114640618B CN202210253786.2A CN202210253786A CN114640618B CN 114640618 B CN114640618 B CN 114640618B CN 202210253786 A CN202210253786 A CN 202210253786A CN 114640618 B CN114640618 B CN 114640618B
- Authority
- CN
- China
- Prior art keywords
- node
- cluster
- slave
- route
- routing
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 238000004364 calculation method Methods 0.000 claims abstract description 40
- 230000003213 activating effect Effects 0.000 claims abstract description 15
- 238000012800 visualization Methods 0.000 claims abstract description 14
- 238000004891 communication Methods 0.000 claims description 35
- 238000012544 monitoring process Methods 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 10
- 238000006243 chemical reaction Methods 0.000 claims description 9
- 230000004913 activation Effects 0.000 claims description 8
- 238000010276 construction Methods 0.000 claims description 6
- 238000005516 engineering process Methods 0.000 abstract description 13
- 238000013473 artificial intelligence Methods 0.000 abstract description 8
- 238000007726 management method Methods 0.000 description 23
- 230000006870 function Effects 0.000 description 17
- 230000010354 integration Effects 0.000 description 9
- 238000012545 processing Methods 0.000 description 6
- 230000000007 visual effect Effects 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 239000004973 liquid crystal related substance Substances 0.000 description 4
- 241000282836 Camelus dromedarius Species 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000004083 survival effect Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention relates to artificial intelligence technology, and discloses a cluster routing scheduling method, which comprises the following steps: constructing a distributed cluster comprising a master node and a slave node set, registering and activating the master node and the slave node set to obtain a standard distributed cluster, performing route visualization arrangement by using the master node in the standard distributed cluster to obtain arrangement route information, performing route scheduling calculation on the slave node in the standard distributed cluster, determining a target node from the slave node set according to a calculation result, and performing route scheduling on the arrangement route information by using the target node. In addition, the present invention relates to blockchain technology, and the arrangement route information can be stored in nodes of the blockchain. The invention also provides a cluster routing scheduling method device, electronic equipment and a computer readable storage medium. The invention can solve the problem of lower dispatching efficiency of the cluster route.
Description
Technical Field
The present invention relates to the field of artificial intelligence technologies, and in particular, to a cluster routing scheduling method, a cluster routing scheduling device, an electronic device, and a computer readable storage medium.
Background
With the digital advancement of government and large enterprises in recent years, the system is more and more, and the resource types and protocol types of the subsystems are different from each other, such as FTP, JMS, TCP, HTTP, message queues or Web service interaction, etc., so that the integration and interaction between the systems are also important. Apache camera is an open source framework based on EIP, and achieves a message transmission model between different application systems defined by EIP, and the integration of camera and spring is perfect, so that camera becomes the preferred scheme for the integration of the current cluster system.
However, although the camel has strong protocol conversion and routing functions, at present, there is no good integration scheme in the aspect of cluster routing scheduling, all routes are operated based on a single body jvm, but in a large-scale interaction scene, the routes of the camel are hundreds or thousands, and the distributed integration and the ordered scheduling of the routes are low in efficiency.
Disclosure of Invention
The invention provides a cluster route scheduling method, a cluster route scheduling device, electronic equipment and a readable storage medium, and mainly aims to solve the problem of low cluster route scheduling efficiency.
In order to achieve the above object, the present invention provides a method for scheduling a cluster route, including:
constructing a distributed cluster comprising a master node and a slave node set;
registering and activating the master node and the slave node set to obtain a standard distributed cluster;
performing route visualization arrangement by using the main nodes in the standard distributed cluster to obtain arrangement route information;
performing route scheduling calculation on the slave nodes in the standard distributed cluster, and determining a target node from the slave node set according to a calculation result;
and carrying out route scheduling on the arranging route information by utilizing the target node.
Optionally, the constructing a distributed cluster including a master node and a slave node set includes:
the method comprises the steps of performing communication connection by using a preset protocol interface and a target database, and taking the protocol interface and the target database which are subjected to communication connection as an original main node;
adding a routing scheduling module in the original main node to obtain the main node;
generating a slave node set comprising a preset number of slave nodes based on a preset routing frame;
and summarizing the master node and the slave node set to obtain the distributed cluster.
Optionally, the generating, based on the preset routing framework, a slave node set including a preset number of slave nodes includes:
integrating a heartbeat module, a resource monitoring module and a route conversion module in the route framework to obtain an integrated component, and taking the integrated component as the slave node;
summarizing preset numbers of the slave nodes to obtain the slave node set.
Optionally, the registering and activating the master node and the slave node set to obtain a standard distributed cluster includes:
starting each slave node in the master node and the slave node set, and taking each slave node in the slave node set as a routing instance;
and establishing communication connection between the main node and each routing instance by using the protocol interface, and taking the cluster after communication connection establishment as the standard distributed cluster.
Optionally, after the registering and activating the master node and the slave node set to obtain the standard distributed cluster, the method further includes:
sending heartbeat information to the main node at regular time by utilizing a heartbeat module in the slave node set;
and collecting the operation environment information of the routing instance by using the resource monitoring module in the slave node set, and transmitting the operation environment information to the master node.
Optionally, the route visualization arrangement is performed by using the master node in the standard distributed cluster to obtain arrangement route information, including:
acquiring a routing information set input by a user by using the main node;
and arranging the route information set according to the input time of the route information in the route information set to obtain the arranging route information, and visually displaying the arranging route information.
Optionally, the performing routing scheduling calculation on the slave nodes in the standard distributed cluster, and determining the target node from the slave node set according to the calculation result, includes:
selecting a normal node set from the slave node sets by using heartbeat information collected by the master nodes in the standard distributed cluster;
calculating average operation environment information of the normal node set according to operation environment information sent by nodes in the normal node set;
and selecting a slave node lower than the average running environment information from the normal node set as the target node.
In order to solve the above problem, the present invention further provides a cluster routing scheduling device, where the device includes:
the standard distributed cluster construction module is used for constructing a distributed cluster comprising a master node and a slave node set, and registering and activating the master node and the slave node set to obtain a standard distributed cluster;
the route arrangement module is used for carrying out route visualization arrangement by utilizing the main nodes in the standard distributed cluster to obtain arrangement route information;
the routing scheduling calculation module is used for carrying out routing scheduling calculation on the slave nodes in the standard distributed cluster and determining a target node from the slave node set according to a calculation result;
and the cluster route scheduling module is used for carrying out route scheduling on the arranging route information by utilizing the target node.
In order to solve the above-mentioned problems, the present invention also provides an electronic apparatus including:
a memory storing at least one computer program; and
And the processor executes the computer program stored in the memory to realize the cluster routing scheduling method.
In order to solve the above-mentioned problems, the present invention also provides a computer readable storage medium having stored therein at least one computer program that is executed by a processor in an electronic device to implement the above-mentioned cluster routing scheduling method.
The invention realizes the horizontal expansion function through the master node and the slave node by constructing the distributed cluster comprising the master node and the slave node set, obtains the standard distributed cluster through registration activation, obtains the arrangement route information through the route management of the master node in the standard distributed cluster, carries out route scheduling calculation on the slave node in the standard distributed cluster, determines the target node in the slave node set according to the calculation result, carries out route scheduling on the arrangement route information by utilizing the target node, logically separates the route management and the route execution, and realizes the high-efficiency distributed cluster route scheduling. Therefore, the cluster route scheduling method, the device, the electronic equipment and the computer readable storage medium can solve the problem of low cluster route scheduling efficiency.
Drawings
Fig. 1 is a flow chart of a cluster routing scheduling method according to an embodiment of the present invention;
fig. 2 is a functional block diagram of a cluster routing scheduling device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device implementing the cluster routing scheduling method according to an embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The embodiment of the application provides a cluster route scheduling method. The execution body of the cluster routing scheduling method includes, but is not limited to, at least one of a server, a terminal, and the like, which can be configured to execute the method provided by the embodiment of the application. In other words, the cluster routing scheduling method may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The service end includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (ContentDelivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Referring to fig. 1, a flow chart of a cluster routing scheduling method according to an embodiment of the present invention is shown. In this embodiment, the cluster routing scheduling method includes:
s1, constructing a distributed cluster comprising a master node and a slave node set.
In the embodiment of the invention, the distributed cluster is a master-slave distributed architecture mode cluster and mainly comprises two types of nodes, namely a master node and a WorkNode, wherein the master node is a management node and is responsible for the functions of visual arrangement management, route scheduling calculation, state management of the WorkNode, route monitoring management and the like of cluster routes; the WorkNode (slave node) is a real working node and is responsible for reporting heartbeat information (whether survival exists or not) and resource information (cup, memory, disk, network and other runtime environment information) to the master node, receiving routing tasks scheduled by the master node, starting a route and responsible for life cycle management of the whole route.
In detail, the building of the distributed cluster including the master node and the slave node set includes:
the method comprises the steps of performing communication connection by using a preset protocol interface and a target database, and taking the protocol interface and the target database which are subjected to communication connection as an original main node;
adding a routing scheduling module in the original main node to obtain the main node;
generating a slave node set comprising a preset number of slave nodes based on a preset routing frame;
and summarizing the master node and the slave node set to obtain the distributed cluster.
In the embodiment of the invention, the preset protocol interface can be a RESET API interface, and the adoption of the RESET API can simplify the protocol between node communication. The target database may be a relational or non-relational database containing business data, for example, a relational database containing financial data. The routing scheduling module is used for calculating the operation resource information of each slave node and carrying out routing scheduling according to the calculation result.
In detail, the generating the slave node set including the preset number of slave nodes based on the preset routing frame includes:
integrating a heartbeat module, a resource monitoring module and a route conversion module in the route framework to obtain an integrated component, and taking the integrated component as the slave node;
summarizing preset numbers of the slave nodes to obtain the slave node set.
In the embodiment of the invention, the routing framework can be an Apache camera framework, is an open source framework based on EIP, realizes a message transmission model between different application systems defined by EIP, and obtains a slave node by integrating camera and spring.
In the embodiment of the invention, the slave nodes can be obtained through the integration of the camera and the spring, the powerful protocol conversion and routing functions are carried out, and meanwhile, the distributed clusters are obtained through the integration of the master node and the slave node set, so that the ordered scheduling and monitoring of the distributed routing are facilitated.
S2, registering and activating the master node and the slave node set to obtain a standard distributed cluster.
In the embodiment of the invention, the registration activation refers to establishing a communication protocol connection between a master node and each slave node in a slave node set, and periodically reporting the operation environment information of the heartbeat and the current slave node through the communication protocol connection.
Specifically, the registering and activating the master node and the slave node set to obtain a standard distributed cluster includes:
starting each slave node in the master node and the slave node set, and taking each slave node in the slave node set as a routing instance;
and establishing communication connection between the main node and each routing instance by using the protocol interface, and taking the cluster after communication connection establishment as the standard distributed cluster.
In an alternative embodiment of the present invention, the MasterNode node and the WorkNode node are started first, each WorkNode is taken as an example, the current example is registered to the MasterNode based on the RESET API interface, and the heartbeat and the running environment information of the current example are reported periodically.
In another optional embodiment of the present invention, after performing registration activation on the master node and the slave node set to obtain a standard distributed cluster, the method further includes:
sending heartbeat information to the main node at regular time by utilizing a heartbeat module in the slave node set;
and collecting the operation environment information of the routing instance by using the resource monitoring module in the slave node set, and transmitting the operation environment information to the master node.
In the embodiment of the invention, for each routing instance (i.e. slave node), a heartbeat module is used to send a data packet (i.e. heartbeat information) to the master node to determine that communication between the two is not broken, and meanwhile, a resource monitoring module is used to collect running environment information (cup, memory, disk, network, etc.) of the current instance.
And S3, performing route visualization arrangement by using the main nodes in the standard distributed cluster to obtain arrangement route information.
In the embodiment of the invention, for example, when route distribution is performed, a manager can perform route visual arrangement management through a route arrangement page provided by a MasterNode, and the route information at the moment is only one descriptive concept, such as xml, json and other different structural information.
In detail, the route visualization arrangement is performed by using the master node in the standard distributed cluster to obtain arrangement route information, which includes:
acquiring a routing information set input by a user by using the main node;
and arranging the route information set according to the input time of the route information in the route information set to obtain the arranging route information, and visually displaying the arranging route information.
In an optional embodiment of the present invention, routing information input by a user is arranged in sequence according to input time, and the arranged routing information is visually displayed, so that the user can conveniently adjust or modify the routing information.
And S4, carrying out route scheduling calculation on the slave nodes in the standard distributed cluster, and determining a target node from the slave node set according to a calculation result.
In the embodiment of the present invention, the routing scheduling calculation refers to calculating the resource operation condition of each slave node in the slave node set, and selecting the slave node with the lowest resource operation as the target node.
Specifically, the performing routing scheduling calculation on the slave nodes in the standard distributed cluster, and determining a target node from the slave node set according to a calculation result includes:
selecting a normal node set from the slave node sets by using heartbeat information collected by the master nodes in the standard distributed cluster;
calculating average operation environment information of the normal node set according to operation environment information sent by nodes in the normal node set;
and selecting a slave node lower than the average running environment information from the normal node set as the target node.
In an alternative embodiment of the present invention, for example, a slave node capable of sending heartbeat information normally is first determined as a normal node, then the average CPU utilization of all the normal nodes is calculated, and then a slave node whose CPU utilization is lower than the average CPU utilization is selected from the normal node set as a target node.
S5, carrying out route scheduling on the arranging route information by utilizing the target node.
In an alternative embodiment of the present invention, the MasterNode selects the destination node (WorkNode) for executing the current arrangement route information by calculating all environment information (such as memory, cpu, etc.) during the operation of the WorkNode, and invokes its related interface, the destination node receives the arrangement route information issued by the MasterNode, converts the descriptive concept logic of the route into route needed by the camelContext, and performs route scheduling according to the route function. In the invention, the destination node is integrated based on the camera framework, so that route scheduling required by the camera context can be obtained directly through logic conversion, and the routing efficiency is improved.
The invention realizes the horizontal expansion function through the master node and the slave node by constructing the distributed cluster comprising the master node and the slave node set, obtains the standard distributed cluster through registration activation, obtains the arrangement route information through the route management of the master node in the standard distributed cluster, carries out route scheduling calculation on the slave node in the standard distributed cluster, determines the target node in the slave node set according to the calculation result, carries out route scheduling on the arrangement route information by utilizing the target node, logically separates the route management and the route execution, and realizes the high-efficiency distributed cluster route scheduling. Therefore, the cluster route scheduling method provided by the invention can solve the problem of lower cluster route scheduling efficiency.
Fig. 2 is a functional block diagram of a cluster routing scheduling device according to an embodiment of the present invention.
The cluster routing scheduling apparatus 100 of the present invention may be installed in an electronic device. Depending on the implemented functionality, the cluster routing device 100 may include a standard distributed cluster construction module 101, a routing orchestration module 102, a routing computation module 103, and a cluster routing module 104. The module of the invention, which may also be referred to as a unit, refers to a series of computer program segments, which are stored in the memory of the electronic device, capable of being executed by the processor of the electronic device and of performing a fixed function.
In the present embodiment, the functions concerning the respective modules/units are as follows:
the standard distributed cluster construction module 101 is configured to construct a distributed cluster including a master node and a slave node set, and register and activate the master node and the slave node set to obtain a standard distributed cluster;
the route arranging module 102 is configured to perform route visualization arrangement by using a master node in the standard distributed cluster to obtain arrangement route information;
the routing computation module 103 is configured to perform routing computation on the slave nodes in the standard distributed cluster, and determine a target node from the slave node set according to a computation result;
the cluster routing scheduling module 104 is configured to perform routing scheduling on the orchestration routing information by using the target node.
In detail, the specific implementation manner of each module of the cluster routing scheduling device 100 is as follows:
step one, constructing a distributed cluster comprising a master node and a slave node set.
In the embodiment of the invention, the distributed cluster is a master-slave distributed architecture mode cluster and mainly comprises two types of nodes, namely a master node and a WorkNode, wherein the master node is a management node and is responsible for the functions of visual arrangement management, route scheduling calculation, state management of the WorkNode, route monitoring management and the like of cluster routes; the WorkNode (slave node) is a real working node and is responsible for reporting heartbeat information (whether survival exists or not) and resource information (cup, memory, disk, network and other runtime environment information) to the master node, receiving routing tasks scheduled by the master node, starting a route and responsible for life cycle management of the whole route.
In detail, the building of the distributed cluster including the master node and the slave node set includes:
the method comprises the steps of performing communication connection by using a preset protocol interface and a target database, and taking the protocol interface and the target database which are subjected to communication connection as an original main node;
adding a routing scheduling module in the original main node to obtain the main node;
generating a slave node set comprising a preset number of slave nodes based on a preset routing frame;
and summarizing the master node and the slave node set to obtain the distributed cluster.
In the embodiment of the invention, the preset protocol interface can be a RESET API interface, and the adoption of the RESET API can simplify the protocol between node communication. The target database may be a relational or non-relational database containing business data, for example, a relational database containing financial data. The routing scheduling module is used for calculating the operation resource information of each slave node and carrying out routing scheduling according to the calculation result.
In detail, the generating the slave node set including the preset number of slave nodes based on the preset routing frame includes:
integrating a heartbeat module, a resource monitoring module and a route conversion module in the route framework to obtain an integrated component, and taking the integrated component as the slave node;
summarizing preset numbers of the slave nodes to obtain the slave node set.
In the embodiment of the invention, the routing framework can be an Apache camera framework, is an open source framework based on EIP, realizes a message transmission model between different application systems defined by EIP, and obtains a slave node by integrating camera and spring.
In the embodiment of the invention, the slave nodes can be obtained through the integration of the camera and the spring, the powerful protocol conversion and routing functions are carried out, and meanwhile, the distributed clusters are obtained through the integration of the master node and the slave node set, so that the ordered scheduling and monitoring of the distributed routing are facilitated.
And secondly, registering and activating the master node and the slave node set to obtain a standard distributed cluster.
In the embodiment of the invention, the registration activation refers to establishing a communication protocol connection between a master node and each slave node in a slave node set, and periodically reporting the operation environment information of the heartbeat and the current slave node through the communication protocol connection.
Specifically, the registering and activating the master node and the slave node set to obtain a standard distributed cluster includes:
starting each slave node in the master node and the slave node set, and taking each slave node in the slave node set as a routing instance;
and establishing communication connection between the main node and each routing instance by using the protocol interface, and taking the cluster after communication connection establishment as the standard distributed cluster.
In an alternative embodiment of the present invention, the MasterNode node and the WorkNode node are started first, each WorkNode is taken as an example, the current example is registered to the MasterNode based on the RESET API interface, and the heartbeat and the running environment information of the current example are reported periodically.
In another optional embodiment of the present invention, after performing registration activation on the master node and the slave node set to obtain a standard distributed cluster, the method further includes:
sending heartbeat information to the main node at regular time by utilizing a heartbeat module in the slave node set;
and collecting the operation environment information of the routing instance by using the resource monitoring module in the slave node set, and transmitting the operation environment information to the master node.
In the embodiment of the invention, for each routing instance (i.e. slave node), a heartbeat module is used to send a data packet (i.e. heartbeat information) to the master node to determine that communication between the two is not broken, and meanwhile, a resource monitoring module is used to collect running environment information (cup, memory, disk, network, etc.) of the current instance.
And thirdly, performing route visualization arrangement by using the main nodes in the standard distributed cluster to obtain arrangement route information.
In the embodiment of the invention, for example, when route distribution is performed, a manager can perform route visual arrangement management through a route arrangement page provided by a MasterNode, and the route information at the moment is only one descriptive concept, such as xml, json and other different structural information.
In detail, the route visualization arrangement is performed by using the master node in the standard distributed cluster to obtain arrangement route information, which includes:
acquiring a routing information set input by a user by using the main node;
and arranging the route information set according to the input time of the route information in the route information set to obtain the arranging route information, and visually displaying the arranging route information.
In an optional embodiment of the present invention, routing information input by a user is arranged in sequence according to input time, and the arranged routing information is visually displayed, so that the user can conveniently adjust or modify the routing information.
And step four, carrying out route scheduling calculation on the slave nodes in the standard distributed cluster, and determining a target node from the slave node set according to a calculation result.
In the embodiment of the present invention, the routing scheduling calculation refers to calculating the resource operation condition of each slave node in the slave node set, and selecting the slave node with the lowest resource operation as the target node.
Specifically, the performing routing scheduling calculation on the slave nodes in the standard distributed cluster, and determining a target node from the slave node set according to a calculation result includes:
selecting a normal node set from the slave node sets by using heartbeat information collected by the master nodes in the standard distributed cluster;
calculating average operation environment information of the normal node set according to operation environment information sent by nodes in the normal node set;
and selecting a slave node lower than the average running environment information from the normal node set as the target node.
In an alternative embodiment of the present invention, for example, a slave node capable of sending heartbeat information normally is first determined as a normal node, then the average CPU utilization of all the normal nodes is calculated, and then a slave node whose CPU utilization is lower than the average CPU utilization is selected from the normal node set as a target node.
And fifthly, carrying out route scheduling on the arranging route information by utilizing the target node.
In an alternative embodiment of the present invention, the MasterNode selects the destination node (WorkNode) for executing the current arrangement route information by calculating all environment information (such as memory, cpu, etc.) during the operation of the WorkNode, and invokes its related interface, the destination node receives the arrangement route information issued by the MasterNode, converts the descriptive concept logic of the route into route needed by the camelContext, and performs route scheduling according to the route function. In the invention, the destination node is integrated based on the camera framework, so that route scheduling required by the camera context can be obtained directly through logic conversion, and the routing efficiency is improved.
The invention realizes the horizontal expansion function through the master node and the slave node by constructing the distributed cluster comprising the master node and the slave node set, obtains the standard distributed cluster through registration activation, obtains the arrangement route information through the route management of the master node in the standard distributed cluster, carries out route scheduling calculation on the slave node in the standard distributed cluster, determines the target node in the slave node set according to the calculation result, carries out route scheduling on the arrangement route information by utilizing the target node, logically separates the route management and the route execution, and realizes the high-efficiency distributed cluster route scheduling. Therefore, the cluster route scheduling device provided by the invention can solve the problem of lower cluster route scheduling efficiency.
Fig. 3 is a schematic structural diagram of an electronic device implementing a cluster routing scheduling method according to an embodiment of the present invention.
The electronic device may comprise a processor 10, a memory 11, a communication interface 12 and a bus 13, and may further comprise a computer program, such as a cluster routing scheduler, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, including flash memory, a mobile hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. The memory 11 may in other embodiments also be an external storage device of the electronic device, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only for storing application software installed in an electronic device and various types of data, such as code of a cluster routing scheduler, but also for temporarily storing data that has been output or is to be output.
The processor 10 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, combinations of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the entire electronic device using various interfaces and lines, and executes various functions of the electronic device and processes data by running or executing programs or modules (e.g., a cluster routing scheduler, etc.) stored in the memory 11, and calling data stored in the memory 11.
The communication interface 12 is used for communication between the electronic device and other devices, including network interfaces and user interfaces. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), or alternatively a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual user interface.
The bus 13 may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus 13 may be classified into an address bus, a data bus, a control bus, and the like. The bus 13 is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
Fig. 3 shows only an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 3 is not limiting of the electronic device and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to the respective components, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device may further include various sensors, bluetooth modules, wi-Fi modules, etc., which are not described herein.
Further, the electronic device may also include a network interface, optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the electronic device and other electronic devices.
Optionally, the electronic device may further comprise a user interface, which may be a Display, an input unit, such as a Keyboard (Keyboard), or a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The cluster routing scheduler stored in the memory 11 in the electronic device is a combination of instructions that, when executed in the processor 10, may implement:
constructing a distributed cluster comprising a master node and a slave node set;
registering and activating the master node and the slave node set to obtain a standard distributed cluster;
performing route visualization arrangement by using the main nodes in the standard distributed cluster to obtain arrangement route information;
performing route scheduling calculation on the slave nodes in the standard distributed cluster, and determining a target node from the slave node set according to a calculation result;
and carrying out route scheduling on the arranging route information by utilizing the target node.
In particular, the specific implementation method of the above instructions by the processor 10 may refer to the description of the relevant steps in the corresponding embodiment of the drawings, which is not repeated herein.
Further, the electronic device integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. The computer readable storage medium may be volatile or nonvolatile. For example, the computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
The present invention also provides a computer readable storage medium storing a computer program which, when executed by a processor of an electronic device, can implement:
constructing a distributed cluster comprising a master node and a slave node set;
registering and activating the master node and the slave node set to obtain a standard distributed cluster;
performing route visualization arrangement by using the main nodes in the standard distributed cluster to obtain arrangement route information;
performing route scheduling calculation on the slave nodes in the standard distributed cluster, and determining a target node from the slave node set according to a calculation result;
and carrying out route scheduling on the arranging route information by utilizing the target node.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.
Claims (8)
1. A method for cluster routing scheduling, the method comprising:
constructing a distributed cluster comprising a master node and a slave node set;
registering and activating the master node and the slave node set to obtain a standard distributed cluster;
performing route visualization arrangement by using the main nodes in the standard distributed cluster to obtain arrangement route information;
performing route scheduling calculation on the slave nodes in the standard distributed cluster, and determining a target node from the slave node set according to a calculation result;
carrying out route scheduling on the arranging route information by utilizing the target node;
the construction of the distributed cluster comprising a master node and a slave node set comprises the following steps: the method comprises the steps of performing communication connection by using a preset protocol interface and a target database, and taking the protocol interface and the target database which are subjected to communication connection as an original main node; adding a routing scheduling module in the original main node to obtain the main node; generating a slave node set comprising a preset number of slave nodes based on a preset routing frame; summarizing the master node and the slave node set to obtain the distributed cluster;
the registering and activating the master node and the slave node set to obtain a standard distributed cluster comprises the following steps: starting each slave node in the master node and the slave node set, and taking each slave node in the slave node set as a routing instance; and establishing communication connection between the main node and each routing instance by using the protocol interface, and taking the cluster after communication connection establishment as the standard distributed cluster.
2. The cluster routing scheduling method of claim 1, wherein the generating a set of slave nodes including a preset number of slave nodes based on the preset routing frame comprises:
integrating a heartbeat module, a resource monitoring module and a route conversion module in the route framework to obtain an integrated component, and taking the integrated component as the slave node;
summarizing preset numbers of the slave nodes to obtain the slave node set.
3. The method of cluster routing scheduling according to claim 1, wherein after performing registration activation on the master node and the slave node set to obtain a standard distributed cluster, the method further comprises:
sending heartbeat information to the main node at regular time by utilizing a heartbeat module in the slave node set;
and collecting the operation environment information of the routing instance by using the resource monitoring module in the slave node set, and transmitting the operation environment information to the master node.
4. The method for scheduling cluster routes according to claim 1, wherein the performing route visualization arrangement by using the master node in the standard distributed cluster to obtain arrangement route information includes:
acquiring a routing information set input by a user by using the main node;
and arranging the route information set according to the input time of the route information in the route information set to obtain the arranging route information, and visually displaying the arranging route information.
5. The method for routing and scheduling the cluster according to claim 1, wherein performing routing and scheduling calculation on the slave nodes in the standard distributed cluster, and determining the target node from the slave node set according to the calculation result, includes:
selecting a normal node set from the slave node sets by using heartbeat information collected by the master nodes in the standard distributed cluster;
calculating average operation environment information of the normal node set according to operation environment information sent by nodes in the normal node set;
and selecting a slave node lower than the average running environment information from the normal node set as the target node.
6. A cluster routing scheduling apparatus, the apparatus comprising:
the standard distributed cluster construction module is used for constructing a distributed cluster comprising a master node and a slave node set, and registering and activating the master node and the slave node set to obtain a standard distributed cluster;
the route arrangement module is used for carrying out route visualization arrangement by utilizing the main nodes in the standard distributed cluster to obtain arrangement route information;
the routing scheduling calculation module is used for carrying out routing scheduling calculation on the slave nodes in the standard distributed cluster and determining a target node from the slave node set according to a calculation result;
the cluster route scheduling module is used for carrying out route scheduling on the arranging route information by utilizing the target node;
the construction of the distributed cluster comprising a master node and a slave node set comprises the following steps: the method comprises the steps of performing communication connection by using a preset protocol interface and a target database, and taking the protocol interface and the target database which are subjected to communication connection as an original main node; adding a routing scheduling module in the original main node to obtain the main node; generating a slave node set comprising a preset number of slave nodes based on a preset routing frame; summarizing the master node and the slave node set to obtain the distributed cluster;
the registering and activating the master node and the slave node set to obtain a standard distributed cluster comprises the following steps: starting each slave node in the master node and the slave node set, and taking each slave node in the slave node set as a routing instance; and establishing communication connection between the main node and each routing instance by using the protocol interface, and taking the cluster after communication connection establishment as the standard distributed cluster.
7. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the cluster routing scheduling method of any one of claims 1 to 5.
8. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the cluster routing scheduling method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210253786.2A CN114640618B (en) | 2022-03-15 | 2022-03-15 | Cluster route scheduling method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210253786.2A CN114640618B (en) | 2022-03-15 | 2022-03-15 | Cluster route scheduling method and device, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114640618A CN114640618A (en) | 2022-06-17 |
CN114640618B true CN114640618B (en) | 2024-03-12 |
Family
ID=81948412
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210253786.2A Active CN114640618B (en) | 2022-03-15 | 2022-03-15 | Cluster route scheduling method and device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114640618B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101212385A (en) * | 2006-12-27 | 2008-07-02 | 大唐移动通信设备有限公司 | Trunked network interconnecting method and system |
CN101309201A (en) * | 2007-05-14 | 2008-11-19 | 华为技术有限公司 | Route processing method, routing processor and router |
CN110750343A (en) * | 2019-09-20 | 2020-02-04 | 深圳市递四方信息科技有限公司 | Cluster system timing task scheduling control method and cluster system |
CN110912780A (en) * | 2019-12-13 | 2020-03-24 | 无锡华云数据技术服务有限公司 | High-availability cluster detection method, system and controlled terminal |
CN110955506A (en) * | 2019-11-26 | 2020-04-03 | 浙江电子口岸有限公司 | Distributed job scheduling processing method |
CN111930372A (en) * | 2020-08-06 | 2020-11-13 | 科大国创云网科技有限公司 | Service arrangement solution method and system realized through draggable flow chart |
EP3767894A1 (en) * | 2019-07-19 | 2021-01-20 | Siemens Aktiengesellschaft | Method for data communication, worker node, cluster, industrial network, computer program and computer readable medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10430238B1 (en) * | 2019-05-30 | 2019-10-01 | Capital One Services, Llc | Programmatically applying labels to nodes in cluster orchestration platforms |
US11157304B2 (en) * | 2019-11-01 | 2021-10-26 | Dell Products L.P. | System for peering container clusters running on different container orchestration systems |
-
2022
- 2022-03-15 CN CN202210253786.2A patent/CN114640618B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101212385A (en) * | 2006-12-27 | 2008-07-02 | 大唐移动通信设备有限公司 | Trunked network interconnecting method and system |
CN101309201A (en) * | 2007-05-14 | 2008-11-19 | 华为技术有限公司 | Route processing method, routing processor and router |
EP3767894A1 (en) * | 2019-07-19 | 2021-01-20 | Siemens Aktiengesellschaft | Method for data communication, worker node, cluster, industrial network, computer program and computer readable medium |
CN110750343A (en) * | 2019-09-20 | 2020-02-04 | 深圳市递四方信息科技有限公司 | Cluster system timing task scheduling control method and cluster system |
CN110955506A (en) * | 2019-11-26 | 2020-04-03 | 浙江电子口岸有限公司 | Distributed job scheduling processing method |
CN110912780A (en) * | 2019-12-13 | 2020-03-24 | 无锡华云数据技术服务有限公司 | High-availability cluster detection method, system and controlled terminal |
CN111930372A (en) * | 2020-08-06 | 2020-11-13 | 科大国创云网科技有限公司 | Service arrangement solution method and system realized through draggable flow chart |
Non-Patent Citations (1)
Title |
---|
基于集群***的资源管理***的性能分析与比较;张小林, 钟亦平;计算机应用研究(第09期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN114640618A (en) | 2022-06-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111694844A (en) | Enterprise operation data analysis method and device based on configuration algorithm and electronic equipment | |
CN116434934A (en) | Message queue-based patient waiting method and device, electronic equipment and medium | |
CN113890712A (en) | Data transmission method and device, electronic equipment and readable storage medium | |
CN112256783A (en) | Data export method and device, electronic equipment and storage medium | |
CN114020845A (en) | Block chain network management method, system, electronic equipment and storage medium | |
CN114913371A (en) | Multitask learning model training method and device, electronic equipment and storage medium | |
CN114844844A (en) | Delay message processing method, device, equipment and storage medium | |
CN114640618B (en) | Cluster route scheduling method and device, electronic equipment and readable storage medium | |
CN113918305B (en) | Node scheduling method, node scheduling device, electronic equipment and readable storage medium | |
CN115373826B (en) | Task scheduling method and device based on cloud computing | |
CN114817408B (en) | Scheduling resource identification method and device, electronic equipment and storage medium | |
CN115033605A (en) | Data query method and device, electronic equipment and storage medium | |
CN114385453A (en) | Database cluster exception handling method, device, equipment and medium | |
CN114490137A (en) | Service data real-time statistical method and device, electronic equipment and readable storage medium | |
CN113918296A (en) | Model training task scheduling execution method and device, electronic equipment and storage medium | |
CN114598624B (en) | Cluster monitoring method and device, electronic equipment and readable storage medium | |
CN118037453B (en) | Order processing method, device, equipment and medium of transaction system | |
CN117349030B (en) | Medical digital system, method and equipment based on cloud computing cluster | |
CN116414366B (en) | Middleware interface generation method, device, equipment and medium | |
CN115242662B (en) | Data resource allocation method and device based on cloud computing | |
CN113704616B (en) | Information pushing method and device, electronic equipment and readable storage medium | |
CN113032168B (en) | Data transmission rate dynamic adjustment method and device, electronic equipment and storage medium | |
CN115509740A (en) | Intelligent resource scheduling method, device, equipment and storage medium based on block chain | |
CN117195880A (en) | Intention recognition method, device, electronic equipment and storage medium | |
CN114253525A (en) | Lightweight component bus implementation method and device, electronic equipment and 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 |