CN114640618A - Cluster routing scheduling method and device, electronic equipment and readable storage medium - Google Patents
Cluster routing scheduling method and device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN114640618A CN114640618A CN202210253786.2A CN202210253786A CN114640618A CN 114640618 A CN114640618 A CN 114640618A CN 202210253786 A CN202210253786 A CN 202210253786A CN 114640618 A CN114640618 A CN 114640618A
- Authority
- CN
- China
- Prior art keywords
- routing
- cluster
- node
- slave
- node set
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000004364 calculation method Methods 0.000 claims abstract description 42
- 230000003213 activating effect Effects 0.000 claims abstract description 16
- 238000012800 visualization Methods 0.000 claims abstract description 16
- 238000004891 communication Methods 0.000 claims description 31
- 238000012544 monitoring process Methods 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 11
- 238000006243 chemical reaction Methods 0.000 claims description 9
- 238000010276 construction Methods 0.000 claims description 3
- 238000005516 engineering process Methods 0.000 abstract description 12
- 238000013473 artificial intelligence Methods 0.000 abstract description 7
- 238000007726 management method Methods 0.000 description 21
- 230000006870 function Effects 0.000 description 18
- 241000282836 Camelus dromedarius Species 0.000 description 15
- 230000010354 integration Effects 0.000 description 8
- 230000004913 activation Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 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
- 230000003287 optical effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000004083 survival effect Effects 0.000 description 2
- 230000000007 visual 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
- 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
- 239000000178 monomer Substances 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
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 an artificial intelligence technology, and discloses a cluster routing scheduling method, which comprises the following steps: the method comprises the steps of constructing a distributed cluster comprising a main node set and a secondary node set, registering and activating the main node set and the secondary node set to obtain a standard distributed cluster, performing routing visualization arrangement by using the main node in the standard distributed cluster to obtain arrangement routing information, performing routing scheduling calculation on the secondary node in the standard distributed cluster, determining a target node from the secondary node set according to a calculation result, and performing routing scheduling on the arrangement routing information by using the target node. Furthermore, the invention also relates to a blockchain technology, and the routing information can be stored in the nodes of the blockchain. The invention also provides a cluster routing scheduling method and device, electronic equipment and a computer readable storage medium. The invention can solve the problem of low cluster routing scheduling efficiency.
Description
Technical Field
The present invention relates to the field of artificial intelligence technologies, and in particular, to a method and an apparatus for cluster routing scheduling, an electronic device, and a computer-readable storage medium.
Background
In recent years, with the digital promotion of governments and large-scale enterprises, more and more systems are provided, and the resource types and protocol types of each subsystem are different, such as FTP, JMS, TCP, HTTP, message queues or Web service interaction, and the like, so that the integration and interaction among the systems are also important. Apache camel is an open source framework based on EIP, a message transmission model defined by EIP among different application systems is realized, and camel and spring are integrated perfectly, so that camel becomes a preferred integration scheme of the current cluster system.
However, although the camel has a strong protocol conversion and routing function, there is no good integration scheme in the aspect of cluster routing scheduling at present, all routes run based on the monomer jvm, but in a large interaction scenario, the camel routes are hundreds of thousands, and the ordered scheduling efficiency of distributed integration and routing is low.
Disclosure of Invention
The invention provides a cluster routing scheduling method, a cluster routing scheduling device, electronic equipment and a readable storage medium, and mainly aims to solve the problem of low cluster routing scheduling efficiency.
In order to achieve the above object, a cluster routing scheduling method provided by the present invention includes:
constructing a distributed cluster comprising a master node set and a slave node set;
registering and activating the main node set and the slave node set to obtain a standard distributed cluster;
performing routing visualization arrangement by using the main nodes in the standard distributed cluster to obtain arrangement routing information;
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;
and carrying out routing scheduling on the routing information by using the target node.
Optionally, the constructing a distributed cluster including a master node and a slave node set includes:
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 original main nodes;
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 framework;
and summarizing the master node and the slave node set to obtain the distributed cluster.
Optionally, the generating a slave node set including a preset number of slave nodes based on a preset routing framework includes:
integrating a heartbeat module, a resource monitoring module and a route conversion module in the route frame to obtain an integrated component, and taking the integrated component as the slave node;
and summarizing the preset number of slave nodes to obtain the slave node set.
Optionally, the registering and activating the master node set and the slave node set to obtain a standard distributed cluster includes:
starting each slave node in the master node set 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 establishing the communication connection as the standard distributed cluster.
Optionally, after the master node and the slave node sets are registered and activated to obtain the standard distributed cluster, the method further includes:
utilizing a heartbeat module in the slave node set to send heartbeat information to the master node at fixed time;
and collecting the running environment information of the routing instance by using the resource monitoring module in the slave node set, and sending the running environment information to the master node.
Optionally, the performing routing visualization arrangement by using the master node in the standard distributed cluster to obtain arranged routing information includes:
acquiring a routing information set input by a user by using the main node;
and arranging the routing information set according to the input time of the routing information in the routing information set to obtain arranged routing information, and visually displaying the arranged routing information.
Optionally, 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 set by using heartbeat information collected by a master node in the standard distributed cluster;
calculating the average running environment information of the normal node set according to the running environment information sent by the nodes in the normal node set;
and selecting a slave node lower than the average operating 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 apparatus, including:
the standard distributed cluster construction module is used for constructing a distributed cluster comprising a main node set and a slave node set, and registering and activating the main node set and the slave node set to obtain a standard distributed cluster;
the routing arrangement module is used for carrying out routing visualization arrangement by utilizing the main nodes in the standard distributed cluster to obtain arrangement routing information;
the routing scheduling calculation module is used for performing routing scheduling calculation on the slave nodes in the standard distributed cluster and determining target nodes from the slave node set according to the calculation result;
and the cluster routing scheduling module is used for performing routing scheduling on the routing information by using the target node.
In order to solve the above problem, the present invention also provides an electronic device, 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 problem, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the cluster route scheduling method described above.
The invention constructs a distributed cluster comprising a main node and a slave node set, realizes a horizontal expansion function through the main node and the slave node, obtains a standard distributed cluster through registration and activation, performs routing management through the main node in the standard distributed cluster to obtain routing information, performs routing scheduling calculation on the slave node in the standard distributed cluster, determines a target node in the slave node set according to a calculation result, performs routing scheduling on the routing information by using the target node, and separates routing management from routing execution logic, thereby realizing high-efficiency distributed cluster routing scheduling. Therefore, the cluster routing scheduling method, the cluster routing scheduling device, the electronic equipment and the computer readable storage medium provided by the invention can solve the problem of low cluster routing scheduling efficiency.
Drawings
Fig. 1 is a schematic flowchart 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 apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device for implementing the cluster routing scheduling method according to an embodiment of the present invention.
The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides a cluster routing scheduling method. The executing body of the cluster routing scheduling method includes, but is not limited to, at least one of electronic devices that can be configured to execute the method provided by the embodiment of the present application, such as a server, a terminal, and the like. In other words, the cluster routing scheduling method may be performed by software or hardware installed in the terminal device or the server device, and the software may be a block chain platform. The server 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 basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Fig. 1 is a schematic flowchart of a cluster routing scheduling method according to an embodiment of the present invention. In this embodiment, the cluster routing scheduling method includes:
and S1, constructing a distributed cluster comprising the master node and the slave node set.
In the embodiment of the invention, the distributed cluster is a cluster of a master-slave distributed architecture mode and mainly comprises two types of nodes, namely a MasterNode (main node) and a WorkNode (slave node), wherein the MasterNode (main node) is a management node and is responsible for the functions of visual arrangement management, routing scheduling calculation, state management of the WorkNode (slave node), routing monitoring management and the like of cluster routing; the WorkNode (slave node) is a real working node and is responsible for reporting heartbeat information (whether survival exists) and resource information (running environment information such as a cup, a memory, a disk, a network and the like) to the MasterNode (master node), receiving a routing task scheduled by the MasterNode (master node), starting a route and managing the life cycle of the whole route.
In detail, the building of the distributed cluster including the master node and the slave node set includes:
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 original main nodes;
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 framework;
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 protocol between node communication can be simplified by adopting the RESET API. The target database may be a relational or non-relational database containing business data, for example, a relational database containing financial data. And the routing scheduling module is used for calculating the running resource information of each slave node and carrying out routing scheduling according to the calculation result.
In detail, the generating a slave node set including a preset number of slave nodes based on a preset routing framework includes:
integrating a heartbeat module, a resource monitoring module and a route conversion module in the route frame to obtain an integrated component, and taking the integrated component as the slave node;
and summarizing the preset number of slave nodes to obtain the slave node set.
In the embodiment of the invention, the routing framework can be an Apache camel framework, is an open source framework based on EIP, realizes message transmission models defined by EIP among different application systems, and obtains the slave nodes by integrating camel and spring.
In the embodiment of the invention, the slave nodes can be obtained through the integration of the camel and the spring, the strong protocol conversion and routing functions are carried out, and the distributed cluster is 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 S2, registering and activating the master node set and the slave node set to obtain the standard distributed cluster.
In the embodiment of the present invention, the registration activation refers to establishing a communication protocol connection between the master node and each slave node in the slave node set, and periodically reporting the heartbeat and the operating environment information of the current slave node through the communication protocol connection.
Specifically, the registering and activating the master node set and the slave node set to obtain a standard distributed cluster includes:
starting each slave node in the master node set 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 establishing the communication connection as the standard distributed cluster.
In an optional embodiment of the invention, a MasterNode node and a WorkNode node are started, each WorkNode node is taken as an example, a current example is registered to the MasterNode node based on a 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 the registering and activating are performed on the master node set and the slave node set to obtain the standard distributed cluster, the method further includes:
utilizing a heartbeat module in the slave node set to send heartbeat information to the master node at fixed time;
and collecting the running environment information of the routing instance by using the resource monitoring module in the slave node set, and sending the running 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 for sending a data packet (i.e. heartbeat information) to the master node to determine that the communication between the routing instance and the master node is not broken, and meanwhile, a resource monitoring module is used for collecting the running environment information (such as cup, memory, disk, network and the like) of the current instance.
And S3, performing routing visualization arrangement by using the main nodes in the standard distributed cluster to obtain arrangement routing information.
In the embodiment of the present invention, for example, during route distribution, a manager may perform route visualization arrangement management through a route arrangement page provided by a MasterNode, where the route information is only a descriptive concept, such as different structural information like xml, json, and the like.
In detail, the performing routing visualization arrangement by using the main nodes in the standard distributed cluster to obtain arrangement routing information includes:
acquiring a routing information set input by a user by using the main node;
and arranging the routing information set according to the input time of the routing information in the routing information set to obtain arranged routing information, and visually displaying the arranged routing information.
In an optional embodiment of the present invention, for the routing information input by the user, the routing information is arranged in sequence according to the input time, and the arranged routing information is visually displayed, so that the user can conveniently adjust or modify the routing information.
S4, 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 the calculation result.
In the embodiment of the present invention, the route 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 set by using heartbeat information collected by a master node in the standard distributed cluster;
calculating the average running environment information of the normal node set according to the running environment information sent by the nodes in the normal node set;
and selecting a slave node lower than the average operating environment information from the normal node set as the target node.
In an optional embodiment of the present invention, for example, the slave node that can normally send the heartbeat information is determined as a normal node, then the average CPU utilization rate of all the normal nodes is calculated, and then the slave node whose CPU utilization rate is lower than the average CPU utilization rate is selected from the normal node set as the target node.
And S5, performing routing scheduling on the routing information by using the target node.
In an optional embodiment of the present invention, the MasterNode selects a target node (WorkNode) executing the current routing information by calculating all information (such as memory, cpu, etc.) of the WorkNode runtime environment, and calls a related interface thereof, the target node receives the routing information released by the MasterNode, converts the descriptive concept logic of the routing into route required by camel context, and performs routing scheduling according to the route function. In the invention, because the target node is integrated based on the camel framework, route scheduling required by camelContext can be directly obtained through logic conversion, and the routing efficiency is improved.
The invention constructs a distributed cluster comprising a main node and a slave node set, realizes a horizontal expansion function through the main node and the slave node, obtains a standard distributed cluster through registration and activation, performs routing management through the main node in the standard distributed cluster to obtain routing information, performs routing scheduling calculation on the slave node in the standard distributed cluster, determines a target node in the slave node set according to a calculation result, performs routing scheduling on the routing information by using the target node, and separates routing management from routing execution logic, thereby realizing high-efficiency distributed cluster routing scheduling. Therefore, the cluster routing scheduling method provided by the invention can solve the problem of low cluster routing scheduling efficiency.
Fig. 2 is a functional block diagram of a cluster routing scheduling apparatus according to an embodiment of the present invention.
The cluster routing scheduling apparatus 100 according to the present invention may be installed in an electronic device. According to the realized functions, the cluster routing scheduling apparatus 100 may include a standard distributed cluster building module 101, a routing arrangement module 102, a routing scheduling calculation module 103, and a cluster routing scheduling module 104. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding 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 set and a slave node set, and register and activate the master node set 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 the main nodes in the standard distributed cluster to obtain arranged route information;
the routing scheduling calculation module 103 is configured to perform routing scheduling calculation on the slave nodes in the standard distributed cluster, and determine a target node from the slave node set according to a calculation result;
the cluster routing scheduling module 104 is configured to perform routing scheduling on the routing information by using the target node.
In detail, the specific implementation manner of each module of the cluster routing scheduling apparatus 100 is as follows:
step one, constructing a distributed cluster comprising a master node set and a slave node set.
In the embodiment of the invention, the distributed cluster is a cluster of a master-slave distributed architecture mode and mainly comprises two types of nodes, namely a MasterNode (main node) and a WorkNode (slave node), wherein the MasterNode (main node) is a management node and is responsible for the functions of visual arrangement management, routing scheduling calculation, state management of the WorkNode (slave node), routing monitoring management and the like of cluster routing; the WorkNode (slave node) is a real working node and is responsible for reporting heartbeat information (whether survival exists) and resource information (running environment information such as a cup, a memory, a disk, a network and the like) to the MasterNode (master node), receiving a routing task scheduled by the MasterNode (master node), starting a route and managing the life cycle of the whole route.
In detail, the building of the distributed cluster including the master node and the slave node set includes:
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 original main nodes;
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 framework;
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 protocol between node communication can be simplified by adopting the RESET API. The target database may be a relational or non-relational database containing business data, for example, a relational database containing financial data. And the routing scheduling module is used for calculating the running resource information of each slave node and carrying out routing scheduling according to the calculation result.
In detail, the generating a slave node set including a preset number of slave nodes based on a preset routing framework includes:
integrating a heartbeat module, a resource monitoring module and a route conversion module in the route frame to obtain an integrated component, and taking the integrated component as the slave node;
and summarizing the preset number of slave nodes to obtain the slave node set.
In the embodiment of the invention, the routing framework can be an Apache camel framework, is an open source framework based on EIP, realizes message transmission models defined by EIP among different application systems, and obtains the slave nodes by integrating camel and spring.
In the embodiment of the invention, the slave nodes can be obtained through the integration of the camel and the spring, the strong protocol conversion and routing functions are carried out, and the distributed cluster is 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 step two, registering and activating the master node set and the slave node set to obtain a standard distributed cluster.
In the embodiment of the present invention, the registration activation refers to establishing a communication protocol connection between the master node and each slave node in the slave node set, and periodically reporting the heartbeat and the operating environment information of the current slave node through the communication protocol connection.
Specifically, the registering and activating the master node set and the slave node set to obtain a standard distributed cluster includes:
starting each slave node in the master node set 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 establishing the communication connection as the standard distributed cluster.
In an optional embodiment of the invention, a MasterNode node and a WorkNode node are started, each WorkNode node is taken as an example, a current example is registered to the MasterNode node based on a 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 the registering and activating are performed on the master node set and the slave node set to obtain the standard distributed cluster, the method further includes:
utilizing a heartbeat module in the slave node set to send heartbeat information to the master node at fixed time;
and collecting the running environment information of the routing instance by using the resource monitoring module in the slave node set, and sending the running 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 for sending a data packet (i.e. heartbeat information) to the master node to determine that the communication between the routing instance and the master node is not broken, and meanwhile, a resource monitoring module is used for collecting the running environment information (such as cup, memory, disk, network and the like) of the current instance.
And thirdly, performing routing visualization arrangement by using the main nodes in the standard distributed cluster to obtain arrangement routing information.
In the embodiment of the present invention, for example, during route distribution, a manager may perform route visualization arrangement management through a route arrangement page provided by a MasterNode, where the route information is only a descriptive concept, such as different structural information like xml, json, and the like.
In detail, the performing routing visualization arrangement by using the main nodes in the standard distributed cluster to obtain arrangement routing information includes:
acquiring a routing information set input by a user by using the main node;
and arranging the routing information set according to the input time of the routing information in the routing information set to obtain arranged routing information, and visually displaying the arranged routing information.
In an optional embodiment of the present invention, for the routing information input by the user, the routing information is arranged in sequence according to the 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, 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.
In the embodiment of the present invention, the route 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 set by using heartbeat information collected by a master node in the standard distributed cluster;
calculating the average running environment information of the normal node set according to the running environment information sent by the nodes in the normal node set;
and selecting a slave node lower than the average operating environment information from the normal node set as the target node.
In an optional embodiment of the present invention, for example, the slave node that can normally send the heartbeat information is determined as a normal node, then the average CPU utilization rate of all the normal nodes is calculated, and then the slave node whose CPU utilization rate is lower than the average CPU utilization rate is selected from the normal node set as the target node.
And step five, carrying out routing scheduling on the routing information by using the target node.
In an optional embodiment of the present invention, the MasterNode selects a target node (WorkNode) executing the current routing information by calculating all information (such as memory, cpu, etc.) of the WorkNode runtime environment, and calls a related interface thereof, the target node receives the routing information released by the MasterNode, converts the descriptive concept logic of the routing into route required by camel context, and performs routing scheduling according to the route function. In the invention, because the target node is integrated based on the camel framework, route scheduling required by camelContext can be directly obtained through logic conversion, and the routing efficiency is improved.
The invention constructs a distributed cluster comprising a main node and a slave node set, realizes a horizontal expansion function through the main node and the slave node, obtains a standard distributed cluster through registration and activation, performs routing management through the main node in the standard distributed cluster to obtain routing information, performs routing scheduling calculation on the slave node in the standard distributed cluster, determines a target node in the slave node set according to a calculation result, performs routing scheduling on the routing information by using the target node, and separates routing management from routing execution logic, thereby realizing high-efficiency distributed cluster routing scheduling. Therefore, the cluster routing scheduling device provided by the invention can solve the problem of low cluster routing scheduling efficiency.
Fig. 3 is a schematic structural diagram of an electronic device for 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 operable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and 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 the electronic device and various types of data, such as codes of a cluster routing scheduler, etc., but also for temporarily storing data that has been output or is to be output.
The processor 10 may be formed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be formed of a plurality of integrated circuits packaged with the same function or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 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, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are 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), and optionally 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 device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
The bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 13 may be divided into an address bus, a data bus, a control bus, etc. The bus 13 is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 3 shows only an electronic device having components, and those skilled in the art will appreciate that the structure shown in fig. 3 does not constitute a limitation of the electronic device, and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions such as charge management, discharge management, and power consumption management are implemented through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally 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 (Display), an input unit (such as a Keyboard), and optionally 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 device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The cluster routing scheduler stored in the memory 11 of 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 set and a slave node set;
registering and activating the master node set and the slave node set to obtain a standard distributed cluster;
performing routing visualization arrangement by using the main nodes in the standard distributed cluster to obtain arrangement routing information;
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;
and carrying out routing scheduling on the routing information by utilizing the target node.
Specifically, the specific implementation method of the instruction by the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to the drawings, which is not described herein again.
Further, the electronic device integrated module/unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, 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, may implement:
constructing a distributed cluster comprising a master node set and a slave node set;
registering and activating the master node set and the slave node set to obtain a standard distributed cluster;
performing routing visualization arrangement by using the main nodes in the standard distributed cluster to obtain arrangement routing information;
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;
and carrying out routing scheduling on the routing information by using the target node.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
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 attributes 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 related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence infrastructure generally includes 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 the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims (10)
1. A cluster routing scheduling method, the method comprising:
constructing a distributed cluster comprising a main node set and a slave node set;
registering and activating the master node set and the slave node set to obtain a standard distributed cluster;
performing routing visualization arrangement by using the main nodes in the standard distributed cluster to obtain arrangement routing information;
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;
and carrying out routing scheduling on the routing information by using the target node.
2. The method for cluster routing scheduling of claim 1 wherein the constructing a distributed cluster comprising a set of master nodes and slave nodes comprises:
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 original main nodes;
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 framework;
and summarizing the master node and the slave node set to obtain the distributed cluster.
3. The method for cluster routing scheduling of claim 2 wherein said generating a set of slave nodes including a predetermined number of slave nodes based on a predetermined routing framework comprises:
integrating a heartbeat module, a resource monitoring module and a route conversion module in the route frame to obtain an integrated component, and taking the integrated component as the slave node;
and summarizing the preset number of slave nodes to obtain the slave node set.
4. The cluster routing scheduling method of claim 2, wherein the registering and activating the master node and the slave node sets to obtain a standard distributed cluster comprises:
starting each slave node in the master node set and the slave node set, and taking each slave node in the slave node set as a routing example;
and establishing communication connection between the main node and each routing instance by using the protocol interface, and taking the cluster after establishing the communication connection as the standard distributed cluster.
5. The cluster routing scheduling method of claim 4, wherein after registering and activating the master node and the slave node set to obtain a standard distributed cluster, the method further comprises:
utilizing a heartbeat module in the slave node set to send heartbeat information to the master node at fixed time;
and collecting the running environment information of the routing instance by using the resource monitoring module in the slave node set, and sending the running environment information to the master node.
6. The method according to claim 1, wherein the performing routing visualization layout by using the master node in the standard distributed cluster to obtain layout routing information comprises:
acquiring a routing information set input by a user by using the main node;
and arranging the routing information set according to the input time of the routing information in the routing information set to obtain arranged routing information, and visually displaying the arranged routing information.
7. The cluster routing scheduling method of claim 1, wherein the performing routing scheduling computation on the slave nodes in the standard distributed cluster, and determining a target node from the slave node set according to a computation result, comprises:
selecting a normal node set from the slave node set by using heartbeat information collected by a master node in the standard distributed cluster;
calculating the average running environment information of the normal node set according to the running environment information sent by the nodes in the normal node set;
and selecting a slave node lower than the average operating environment information from the normal node set as the target node.
8. An apparatus for cluster routing scheduling, the apparatus comprising:
the standard distributed cluster construction module is used for constructing a distributed cluster comprising a main node set and a slave node set, and registering and activating the main node set and the slave node set to obtain a standard distributed cluster;
the routing arrangement module is used for carrying out routing visualization arrangement by utilizing the main nodes in the standard distributed cluster to obtain arrangement routing information;
the routing scheduling calculation module is used for performing routing scheduling calculation on the slave nodes in the standard distributed cluster and determining target nodes from the slave node set according to the calculation result;
and the cluster routing scheduling module is used for performing routing scheduling on the arranged routing information by using the target node.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
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 route scheduling method of any one of claims 1 to 7.
10. A computer-readable storage medium, storing a computer program, wherein the computer program, when executed by a processor, implements the cluster route scheduling method according to any of claims 1 to 7.
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 true CN114640618A (en) | 2022-06-17 |
CN114640618B 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 (9)
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 |
US10430238B1 (en) * | 2019-05-30 | 2019-10-01 | Capital One Services, Llc | Programmatically applying labels to nodes in cluster orchestration platforms |
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 |
US20210132974A1 (en) * | 2019-11-01 | 2021-05-06 | 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 (9)
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 |
US10430238B1 (en) * | 2019-05-30 | 2019-10-01 | Capital One Services, Llc | Programmatically applying labels to nodes in cluster orchestration platforms |
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 |
US20210132974A1 (en) * | 2019-11-01 | 2021-05-06 | Dell Products L. P. | System for peering container clusters running on different container orchestration systems |
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 |
---|
张小林, 钟亦平: "基于集群***的资源管理***的性能分析与比较", 计算机应用研究, no. 09 * |
Also Published As
Publication number | Publication date |
---|---|
CN114640618B (en) | 2024-03-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112052370A (en) | Message generation method and device, electronic equipment and computer readable storage medium | |
CN112085217A (en) | Method, device, equipment and computer medium for deploying artificial intelligence service | |
CN111694844A (en) | Enterprise operation data analysis method and device based on configuration algorithm and electronic equipment | |
CN112256783A (en) | Data export method and device, electronic equipment and storage medium | |
CN113806434A (en) | Big data processing method, device, equipment and medium | |
CN113890712A (en) | Data transmission method and device, electronic equipment and readable storage medium | |
CN115129753A (en) | Data blood relationship analysis method and device, 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 | |
CN115373826B (en) | Task scheduling method and device based on cloud computing | |
CN113918305B (en) | Node scheduling method, node scheduling device, electronic equipment and readable storage medium | |
CN114817408B (en) | Scheduling resource identification method and device, electronic equipment and storage medium | |
CN115687384A (en) | UUID (user identifier) identification generation method, device, equipment and storage medium | |
CN115033605A (en) | Data query method and device, electronic equipment and storage medium | |
CN114640618B (en) | Cluster route scheduling method and device, electronic equipment and readable storage medium | |
CN113918296A (en) | Model training task scheduling execution method and device, electronic equipment and storage medium | |
CN114385453A (en) | Database cluster exception handling method, device, equipment and medium | |
CN114675976A (en) | GPU sharing method, device, equipment and medium based on kubernets | |
CN114820132A (en) | Order distribution method and device, electronic equipment and storage medium | |
CN114490137A (en) | Service data real-time statistical method and device, electronic equipment and readable storage medium | |
CN114185502A (en) | Log printing method, device, equipment and medium based on production line environment | |
CN112632042A (en) | Time data scheduling method and device, electronic equipment and readable storage medium | |
CN114598624A (en) | Cluster monitoring method and device, electronic equipment and readable storage medium | |
CN114723401A (en) | Project overall architecture method, device, equipment and storage medium | |
CN113360375A (en) | Transaction testing method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |