Node scheduling method and device, computing system, computer equipment and medium

CN118945232APending Publication Date: 2024-11-12ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410991952.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In a distributed system, when the IP address of a node changes, the correspondence between the IP address and the tag needs to be updated, resulting in the node scheduling not supporting dynamic grouping, which affects flexibility and efficiency.

Method used

It provides a node scheduling method, which dynamically adjusts the tags in the node cluster by obtaining tag modification requests, allowing the scheduling nodes to respond to business requests based on the current tag information, supports online modification of tag rules, and improves the flexibility and efficiency of node scheduling.

Benefits of technology

It realizes the flexibility and efficiency of node scheduling, reduces the risks of service interruptions and resource waste, supports dynamic grouping according to changes in business needs, and improves the response speed and resource utilization of the computing system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945232A_ABST
    Figure CN118945232A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cloud computing, in particular to a node scheduling method and device, a computing system, computer equipment and a medium. The node scheduling method comprises the steps of obtaining a label modification request; modifying labels carried by nodes in the node cluster; in response to completion of label modification of the node cluster, enabling the node to register current label information; and allowing the scheduling node to respond to the service request matched with the current label information based on the current label information. By adopting the method, the label rule can be modified online, and the efficiency and the flexibility of node scheduling can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a node scheduling method, a node scheduling device, a computing system, a computer device, and a computer-readable storage medium. Background Art

[0002] In cluster applications such as distributed systems, the IP (Internet Protocol) addresses of nodes that implement each service request are usually specified, and labels are assigned to the nodes according to the service requests to achieve node grouping. This easily leads to the need to update the corresponding relationship between IP addresses and labels when the IP addresses of nodes change. Dynamic grouping based on changes in service requirements is not supported, which can easily affect the node scheduling process and even the flexibility of the computing system. Summary of the invention

[0003] Based on this, it is necessary to provide a node scheduling method, a node scheduling device, a computing system, a computer device and a computer-readable storage medium to address the above technical problems, which can support online modification of label rules and help improve the efficiency and flexibility of node scheduling.

[0004] On the one hand, a node scheduling method is provided, which includes: obtaining a label modification request; modifying the labels carried by nodes in a node cluster; in response to the completion of the label modification of the node cluster, allowing the nodes to register current label information; to allow the scheduling nodes to respond to business requests that match the current label information based on the current label information.

[0005] In one embodiment of the present application, modifying the labels carried by nodes in a node cluster includes: parsing the target label information of the label modification request; wherein the target label information includes the target label category and the target number of each type of target label; updating the current label rule based on the target label information; querying the nodes associated with the current label rule as associated nodes; and controlling the associated nodes to obtain labels respectively to comply with the current label rule.

[0006] In one embodiment of the present application, controlling associated nodes to obtain labels respectively includes: identifying current labels of associated nodes, and counting current label information; the current label information includes current label categories and the current quantity of each type of current labels; comparing target label information with current label information, and obtaining difference categories and difference quantities; wherein the difference category indicates a label category whose current quantity is higher than the target quantity; the difference quantity indicates the difference between the current quantity of the difference category and the target quantity; and at least scheduling associated nodes whose difference quantities carry the difference categories to re-acquire labels.

[0007] In one embodiment of the present application, the node scheduling method also includes: obtaining a label acquisition request from a node; searching whether there is a label to be assigned based on the current label rule; in response to the existence of a label to be assigned, assigning the node the label to be assigned as the current label of the node, and updating label usage information; wherein the label usage information includes information about labels carried by the node cluster, and / or the number of labels of each type that can be assigned; and instructing the node to register the current label information.

[0008] In one embodiment of the present application, after searching whether there is a label to be assigned based on the current label rule, the method further includes: in response to there being no label to be assigned, feeding back no-label information to the node; and placing the node receiving the no-label information in a no-label state.

[0009] In one embodiment of the present application, the node scheduling method also includes: obtaining a label carried by a node and releasing it as a release label; identifying the label category to which the release label belongs to update label usage information; and instructing the node that releases the label to clear its registered current label information.

[0010] In one embodiment of the present application, the scheduling node responds to the service request matching the current label information and further includes: obtaining the current service request; identifying the label information associated with the current service request; and in response to the current service request not being associated with label information, calling a node in an unlabeled state to respond to the current service request.

[0011] On the other hand, a node scheduling device is provided, which includes: a label manager and a label distributor; the label manager is used to obtain label modification requests; the label distributor is connected to the label manager and is used to respond to obtaining label modification requests; the labels carried by nodes in the node cluster are modified; in response to the completion of the label modification of the node cluster, the nodes are allowed to register the current label information; so as to allow the scheduling nodes to respond to business requests that match the current label information based on the current label information.

[0012] On the other hand, a computing system is provided, which includes: a node scheduling device, a node cluster and a service framework as in the above-mentioned embodiments; the node cluster is connected to the node scheduling device; the service framework is connected to the node cluster, and is used to receive current label information registered by nodes in the node cluster, and based on the current label information, the scheduling node responds to business requests that match the current label information.

[0013] On the other hand, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of the node scheduling method in any one of the above embodiments are implemented.

[0014] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the node scheduling method in any of the above embodiments are implemented.

[0015] The node scheduling method, node scheduling device, computing system, computer equipment and computer-readable storage medium identify nodes by means of labels, so that nodes can respond to service requests that match the labels they carry, and can improve the flexibility of node scheduling. At the same time, the labels carried by the nodes can be dynamically adjusted, and the node labels can be updated and notified by registering the current label information, and the node labels can be modified online, reducing the risk of service interruption and resource waste, so as to improve the efficiency of node scheduling. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a structural diagram of an embodiment of a computing system of the present application;

[0017] Figure 2 It is a structural diagram of an embodiment of a node scheduling device of the present application;

[0018] Figure 3 It is a schematic diagram of an application scenario of an embodiment of the computing system of the present application;

[0019] Figure 4 It is a flowchart of an embodiment of a node scheduling method of the present application;

[0020] Figure 5 This is a flowchart of an embodiment of label modification of the present application;

[0021] Figure 6 This is a flowchart of an embodiment of assigning node labels in the present application;

[0022] Figure 7 This is a flowchart of an embodiment of a node releasing a label of the present application;

[0023] Figure 8 It is a structural diagram of an embodiment of a computer device of the present application. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0025] In order to solve the technical problem of unreasonable node scheduling in related technologies, the present application provides a node scheduling method, a node scheduling device, a computing system, a computer device, and a computer-readable storage medium. The node scheduling method includes: obtaining a label modification request; modifying the labels carried by the nodes in the node cluster; in response to the completion of the label modification of the node cluster, allowing the node to register the current label information; to allow the scheduling node to respond to the service request matching the current label information based on the current label information. The specific architecture and working principle of the present application are described in detail below.

[0026] See also Figure 1 , Figure 1 It is a structural diagram of an embodiment of a computing system of the present application.

[0027] In one embodiment, the computing system may include a node cluster 10 , a service framework 20 , and a node scheduling device 30 .

[0028] As the name implies, the node cluster 10 can be composed of multiple nodes. A node is a terminal of a network branch or a common point of interconnection of two or more branches in a network. A node can exist in the form of a software program or in the form of hardware, which is not limited here. In this embodiment, a node is a computing terminal with a certain computing capability that can respond to service requests.

[0029] The node cluster 10 may be connected to the node scheduling device 30 so that the node scheduling device 30 can schedule the nodes constituting the node cluster 10. In this embodiment, the functions of the node scheduling device 30 include but are not limited to managing node labels. The specific structure and working principle of the node scheduling device 30 will be described in detail later, so they will not be repeated here.

[0030] The service framework 20 may be connected to the node cluster 10. The service framework 20 may receive current label information registered by nodes in the node cluster 10. As such, the service framework 20 may schedule nodes to respond to service requests matching the current label information based on the current label information.

[0031] For example, the service framework 20 may be Dubbo, which is an open source, high-performance service framework 20 that enables applications to implement service output and input functions through high-performance RPC (an abstraction of a remote procedure call that supports load balancing, disaster recovery, and clustering functions). In an alternative embodiment, the service framework 20 may also be IceRPC, Finagle, etc., which are not limited here. Among them, IceRPC represents an RPC framework based on QUIC (Quick UDP Internet Connections), UDP represents the User Datagram Protocol; Finagle represents a fault-tolerant, protocol-independent RPC framework developed based on Netty (an open source framework).

[0032] The following is an example of the specific structure of the node scheduling device of the present application. Figure 2 , Figure 2 It is a structural diagram of an embodiment of a node scheduling device of the present application.

[0033] In one embodiment, the node scheduling device includes a label manager and a label distributor.

[0034] The label manager 31 is used to obtain a label modification request.

[0035] The label distributor 32 is connected to the label manager 31. The label distributor 32 is used to modify the labels carried by the nodes in the node cluster in response to the label modification request; in response to the label modification completion of the node cluster, the node is required to register the current label information; so as to allow the node to respond to the service request matching the current label information based on the current label information.

[0036] Optionally, the label manager 31 and the label distributor 32 may be integrated into one, or the label manager 31 may be an independent module relative to the label distributor 32, which is not limited here.

[0037] For the specific definition of the node scheduling device, please refer to the definition of the node scheduling method in the following text, which will not be repeated here. Each module in the above-mentioned node scheduling device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0038] The following is an example of the working principle of the computing system of this application, combined with a specific application scenario. Figure 3 , Figure 3 It is a schematic diagram of an application scenario of an embodiment of the computing system of the present application.

[0039] In one embodiment, the administrator can send a configuration tag rule to the tag manager. The administrator refers to a user with authority to request configuration tags and / or update tags; or, in a multi-level user architecture, a user with a relatively high level; or, the administrator can be a module in the node scheduling device that can generate a tag modification request based on cluster resource usage, which is not limited here.

[0040] The tag manager can identify the configuration tag rules sent by the administrator and configure the corresponding tags in the tag distributor. Figure 3 As shown in the example, the number of tags A configured by the administrator is 1, the number of tags B is 2, and the number of tags C is 3.

[0041] The nodes in the node cluster can request the label distributor to obtain labels respectively. In response to receiving the label acquisition request from the node, the label distributor can assign the node label based on the remaining labels, and can feedback the no-label information to the node when there is no label to be assigned. The node that receives the no-label information is regarded as a node in the no-label state.

[0042] by Figure 3 For example, the node cluster in the example includes 9 nodes, and the node cluster includes 1 node carrying label A, 2 nodes carrying label B, 5 nodes carrying label C, and 1 node in the unlabeled state.

[0043] After being assigned a label, each node can register its current label information with the service framework. If the current label information has been registered with the service framework before, the service framework can use the current label information sent to overwrite the previous current label information, or assign an invalid label to the previous current label information, etc., without limitation here. The service framework can perform service routing based on the current label information of the node.

[0044] For example, Figure 3 The service A shown in the example indicates that the node carrying label A can be used to respond to the service. Similarly, service B indicates that the node carrying label B can be used to respond to the service. Service C indicates that the node carrying label C can be used to respond to the service. Figure 3 The example of business D is also shown. There is no node with label D in the node cluster, so the node in the unlabeled state can be called to respond to business D.

[0045] The following is a detailed description of the working principle of the node scheduling device of this application. Figure 4 , Figure 4 It is a flowchart of an embodiment of the node scheduling method of the present application.

[0046] S101: Obtain a label modification request.

[0047] In this embodiment, the label modification request indicates a request to modify the label of a node in the node cluster. Optionally, the label modification request may request to modify the entire label rule; or, may request to modify the label of some nodes, which is not limited here.

[0048] To obtain the label modification request, you can monitor whether there is a matching label modification request in the broadcast; or, you can receive the label modification request sent by a single channel, which is not limited here.

[0049] S102: Modify labels carried by nodes in the node cluster.

[0050] In this embodiment, in response to obtaining a label modification request, the labels carried by the nodes in the node cluster can be modified. Optionally, when the label modification request is a request to modify the labels of some nodes, the labels of the corresponding nodes can be modified; when the label modification request is to modify the overall current label rule, the labels of each node in the node cluster can be reset so that each node re-acquires the label, or some nodes can be controlled to re-acquire the label, which is not limited here. In this way, the automation of node label modification can be achieved, and the labels carried by the nodes do not need to be associated with the IP addresses of the nodes, etc., so as to improve the flexibility of label configuration.

[0051] S103: In response to the completion of label modification of the node cluster, the node is instructed to register the current label information, so as to allow the node to be scheduled to respond to a service request matching the current label information based on the current label information.

[0052] In this embodiment, the current label information indicates the information currently carried by the node.

[0053] In response to completing the label modification of nodes in the node cluster based on the label modification request, at least the node with the updated label is required to re-register the current label information. After completing the registration of the current label information, it can be considered that the label carried by the node is effective, so it can be allowed to schedule the node to respond to the service request matching the current label information based on the current label information of the node.

[0054] As described above, the node can register the current label information with the service framework, and the service framework schedules the node to respond to the service request; or, the node scheduling device can have a corresponding module to schedule the node to respond to the service request, which is not limited here.

[0055] It can be seen that in this embodiment, the node labels and service requests can be decoupled from the node IP addresses, etc., and there is no need to specify the nodes that can execute each service request. Each node can be identified by a label, so that the service request matching the label can be responded to according to the label carried by the node, thereby improving the flexibility of node scheduling. At the same time, the label carried by the node can be dynamically adjusted, and the node label update and notification can be completed by registering the current label information. In this way, the node label modification can be completed online without restarting the node cluster or even the computing system, reducing the risk of service interruption and resource waste, and improving the efficiency of node scheduling.

[0056] Further, as described above in the working principle of the computing system, when the scheduling node responds to a service request matching the current tag information, the current service request is obtained and the tag information associated with the current service request can be identified.

[0057] In response to the current service request having associated label information, a node carrying the corresponding label may be called to respond to the current service request. In response to the current service request not being associated with label information, a node in an unlabeled state may be called to respond to the current service request.

[0058] As such, in this embodiment, the labels of services and nodes can be flexibly managed. According to the computing volume and request frequency of the services, node groups that respond to some services can be set up, and nodes without labels can be used to respond to some services, so as to simplify the label planning and allocation process. For some services with relatively small computing volume or low request frequency, there is no need to plan corresponding labels and nodes carrying corresponding labels, which reduces the long-term idle state or low load state of nodes, and is also conducive to improving the flexibility and utilization of node clusters.

[0059] In layman's terms, some nodes can be considered as private nodes corresponding to corresponding businesses, and some nodes are public nodes for other businesses.

[0060] See also Figure 5 , Figure 5 It is a flowchart of an embodiment of label modification of the present application.

[0061] S201: The administrator sends a label modification request.

[0062] In this embodiment, as described above, the administrator represents the user who can send the label modification request, and does not strictly limit the identity of the person who sends the label modification request.

[0063] The administrator can send a tag modification request to modify the overall current tag rules. For example, the tag category and the number of each tag category can be modified, which is not limited here.

[0064] S202: The tag manager obtains a tag modification request.

[0065] In this embodiment, the label manager obtains a label modification request, which can be considered to be a need to modify the labels carried by the nodes in the node cluster. Therefore, the label manager can parse the target label information of the label modification request to adjust the node label based on the target label information to achieve automatic response to the label modification request.

[0066] The target label information may include the target label category and the target number of each target label. The target label category indicates the label category of the nodes in the node cluster after the current label modification; as the name implies, the target number of each target label indicates the number of each label after the current label modification, which can also be considered as the number of nodes carrying each label.

[0067] For example, the target tag category may be a tag category currently available, and the target quantity of the tag category may be the same as or different from the current quantity; the target tag category may also be a tag category not currently available, which is not limited here.

[0068] S203: The tag manager updates the current tag rule based on the target tag information.

[0069] In this embodiment, the label manager can update the current label rule based on the target label information, such as resetting the current label category and the current number of each type of label, updating to the target label category and the target number, etc., so that the label carried by the node can be modified based on the current label rule. Among them, the current label rule represents the information based on which the node label is currently assigned, which can include the current label category and the number of each type of label.

[0070] S204: The label manager notifies the label distributor.

[0071] In this embodiment, in response to the current label rule being updated, the label manager may notify the label distributor, so that the label distributor schedules each node to update the label based on the updated current label rule.

[0072] In an alternative embodiment, the label distributor may sense the current label rule, and in response to sensing that the current label rule is updated, execute step S205, which is not limited here.

[0073] S205: The label distributor searches for a node associated with the current label rule as an associated node.

[0074] In this embodiment, the label distributor may query the nodes associated with the current label rule, and use the nodes associated with the current label rule as associated nodes.

[0075] Optionally, all nodes in the node cluster may match the current label rule, and all nodes may be used as associated nodes. Alternatively, nodes in the node cluster may be filtered based on the current label rule to obtain associated nodes. For example, nodes may be filtered based on node performance, node computing resources, etc.

[0076] S206: The label distributor notifies the node to re-acquire the label.

[0077] In this embodiment, at least some of the associated nodes can be controlled to obtain labels respectively, and the label distribution after obtaining the labels is made to conform to the current label rules. In other words, all associated nodes in the node cluster can be controlled to re-acquire labels; or, based on the difference between the current label information and the target label information, some of the associated nodes can be controlled to re-acquire labels.

[0078] For example, the current label of the associated node can be identified and the current label information can be counted. The current label information includes the current label category and the current number of each type of current label.

[0079] Compare the target label information with the current label information to obtain the difference category and the difference quantity. The difference category indicates the label category whose current quantity is higher than the target quantity. The difference quantity indicates the difference between the current quantity and the target quantity of the difference category. At least the associated nodes with the difference category carrying the difference quantity are scheduled to re-acquire the label.

[0080] Generally speaking, there are three possible situations for the target number and current number of the same label category, namely, the target number is higher than the current number, the target number is equal to the current number, and the target number is lower than the current number. When the target number is higher than the current number, it means that the number of nodes carrying this type of label after the label modification is reduced, and the nodes carrying this type of label need to be adjusted; the target number is equal to the current number, which means that the number of nodes carrying this type of label remains unchanged after the label modification; the target number is lower than the current number, which means that the number of nodes carrying this type of label needs to be increased. Therefore, in this embodiment, nodes carrying difference labels can be managed preferentially, and they can be controlled to re-acquire labels to reduce the number of nodes that need to be modified. When the scheduling of the associated nodes carrying the difference category with the expected difference number is completed, if there is still an insufficient number of nodes of some target label categories, the nodes in the unlabeled state can be controlled to obtain labels to improve the efficiency of node scheduling.

[0081] Furthermore, the scale of the node cluster and / or target label information can also be identified, and adaptively selected to control all associated nodes to reacquire labels or to control part of the associated nodes to reacquire labels. In other words, when the scale of the node cluster is relatively small, it is possible to screen the associated nodes that need to reacquire labels without occupying computing resources, thereby reducing the risk of using additional computing resources; when the scale of the node cluster is relatively large, the associated nodes that need to reacquire labels can be screened to help reduce the amount of computing in the process of reallocating labels. In this way, it is beneficial to further improve the flexibility of the node scheduling of this embodiment, and also to enrich the application scenarios adapted to the node scheduling of this embodiment.

[0082] S207: The node sends a label acquisition request to the label distributor.

[0083] In this embodiment, taking one of the nodes that receives the re-acquired label as an example, the node sends a label acquisition request to the label distributor in response to obtaining the information of the re-acquired label, so that the label distributor can assign the node label based on the pending allocation of the target label category.

[0084] Optionally, in this embodiment, the node can interact with other modules in the form of a node instance. In object-oriented programming, a "class" can be called an "instance" after instantiation.

[0085] That is to say, in this embodiment, each node can compete for the label in a stateless manner. Stateless means that the competition for the label does not need to rely on the node status information such as IP address, so as to simplify the operation and maintenance of the computing system and improve the elasticity and scalability of the computing system.

[0086] S208: The label distributor updates label usage information and assigns a node label.

[0087] In this embodiment, the label usage information may include information about labels carried by the node cluster, and / or the number of labels that can be allocated. That is, the label usage information may include information about labels carried by the node cluster, such as label distribution, etc.; or, the label usage information may include the number of labels that can be allocated, that is, the number of labels that can be allocated to nodes; or, the label usage information may include information about labels carried by the node cluster and the number of labels that can be allocated.

[0088] In response to obtaining a label acquisition request from a node, the label distributor can first update the allocable quantity and then assign the node a corresponding label. In response to the label being assigned to the node, the label information carried by the node cluster can be updated. In this way, this embodiment can help reduce the risk of over-allocating labels, and also help improve the authenticity of the label information carried by the node cluster, further improving the reliability of node scheduling.

[0089] For example, the label distributor has three types of labels to be allocated, namely, label A, label B, and label C. In response to obtaining a label acquisition request from a node, the number of label A that can be allocated can be identified. If label A can still be allocated, label A is assigned to the node. Otherwise, the number of label B that can be allocated is identified. This is not repeated here. Furthermore, each type of target label category can have a priority, and a high-priority label can be assigned to the node first to ensure that services associated with high priorities can be reliably responded to.

[0090] In an alternative embodiment, the execution order of updating the allocatable quantity, assigning corresponding labels to the nodes, and updating the information of the labels carried by the node cluster may be different, which will not be described in detail here.

[0091] S209: The node registers current label information with the service framework.

[0092] In this embodiment, in response to obtaining a new label, the node may register the current label information to update the recorded label information, which can improve the reliability of the current label information and further improve the reliability of routing services based on the current label information.

[0093] That is to say, in this embodiment, a label distributor is designed, which can be responsible for managing and distributing labels in a cluster environment. The current label rules can be configured through the label distributor, for example, the number of nodes corresponding to each label can be defined. In this way, service providers and consumers can be flexibly divided and classified according to business needs, which is conducive to improving the refinement of service management and resource allocation. In addition, in this embodiment, it is possible to support real-time modification of label rules and to notify nodes within the node cluster in real time to re-group dynamically. This is conducive to flexibly adjusting the system configuration according to real-time business needs and resource changes, without restarting or reconfiguring the node cluster or even the computing system, thereby improving the flexibility and response speed of node scheduling and computing systems.

[0094] See also Figure 6 , Figure 6 It is a flowchart of an embodiment of assigning node labels in the present application.

[0095] S301: A node sends a label acquisition request to a label distributor.

[0096] In this embodiment, in response to initial startup, reloading, etc., the node may request the label distributor to obtain a label, that is, send a label obtaining request to the label distributor, so that the label distributor obtains the label obtaining request of the node and allocates a label to it.

[0097] S302: The label distributor searches whether there is a label to be allocated based on the current label rule.

[0098] In this embodiment, if there is a label to be assigned based on the current label rule search, the label distributor executes step S303; if there is no label to be assigned based on the current label rule search, the label distributor executes step S305.

[0099] S303: The label distributor updates the label usage information.

[0100] In this embodiment, in response to the existence of a label to be assigned, it can be considered that a label can still be assigned to the node, but the current label rule is not met yet, so the label usage information can be updated. As described in the above embodiment, the label usage information can include information about labels carried by the node cluster, and / or the number of labels that can be assigned.

[0101] The allocatable number of the label assigned to the target node may be updated, for example, the allocatable number may be reduced by one.

[0102] S304: The label distributor assigns the node a label to be assigned as the current label of the node.

[0103] In this embodiment, in response to the existence of a label to be assigned, one of the labels to be assigned to the node is assigned as the current label of the node. In this embodiment, taking the label usage information including the information of the labels carried by the node cluster and the number of labels that can be assigned as an example, in response to the existence of a label to be assigned, the label to be assigned to the node is assigned as the current label of the node, and the number of labels that can be assigned can be updated.

[0104] S305: The label distributor feeds back no-label information to the node.

[0105] In this embodiment, in response to the fact that there is no label to be assigned, that is, there is no label to be assigned, it can be considered that the labels under the current label rule have been assigned to the nodes in the node cluster, and there is no idle label, and no label information can be fed back to the node. Optionally, the node receiving the no-label information can be placed in a no-label state so that it can respond to a service request without associated label information or without matching label information as described above.

[0106] S306: The label distributor updates the label usage information.

[0107] In this embodiment, the label distributor may update the information of the label carried by the node cluster to improve the reliability of the label usage information.

[0108] S307: The node registers current label information with the service framework.

[0109] In this embodiment, in response to obtaining the label, the node may register the current label information with the service framework to allow the service framework to route the service request based on the current label information.

[0110] In layman's terms, in the node cluster of this embodiment, each node can obtain a label during the startup phase, and this label is allocated from the available label pool minus one. Each node can register its current label information with the Dubbo registration center. In this way, the nodes in the node cluster can be dynamically grouped based on their current label information. This grouping method is flexible and can be adjusted according to real-time business needs and resource changes.

[0111] See also Figure 7 , Figure 7 It is a flowchart of an embodiment of a node releasing a label of the present application.

[0112] S401: The node releases the label it carries.

[0113] In this embodiment, the node can release the label it carries in response to the node instance exit, node exit or node shutdown, etc., to reduce the risk of failure of routing service requests and further improve the reliability of node scheduling. The node can release the label it carries as a release label.

[0114] S402: The label distributor obtains a release label.

[0115] In this embodiment, the label distributor may obtain the release label so as to reassign the release label to other nodes, etc., which is not limited here.

[0116] S403: The label distributor updates label usage information.

[0117] In this embodiment, the label distributor may identify the label category to which the released label belongs to update the label usage information. As described above, the label usage information may include information about labels carried by the node cluster and / or the allocable number of each type of labels.

[0118] In this embodiment, the allocatable quantities of the corresponding label categories may be updated respectively, for example, by adding one to the allocatable quantities; and the information of the labels carried by the node cluster may be updated, so as to improve the reliability of the label usage information.

[0119] S404: The node requests the service framework to clear its currently registered label information.

[0120] In this embodiment, after releasing the label it carries, the node can request the service framework to clear its registered current label information, that is, the node that releases the label clears its registered current label information. In this way, when the service framework obtains a service request associated with the released label, it can route the service request to other nodes carrying the same type of label as the released label for response, thereby improving the reliability of node scheduling and the reliability of the computing system.

[0121] That is to say, when a node exits a node cluster or computing system, the labels it occupies can be released, so that the number of available labels in the label pool increases, which is conducive to ensuring the dynamic and scalability of the computing system. In this way, the efficiency of resource utilization can be improved, and the node cluster can adaptively respond to business fluctuations and resource changes, thereby improving the overall stability and operation efficiency of the system.

[0122] In summary, this application can allocate different business logics or business scenarios to different service instances through label distribution strategies to achieve business isolation, which is conducive to improving the independence and security between different businesses. It is also possible to optimize the use of resources in the cluster by dynamically adjusting the allocation of labels. For example, this application can dynamically adjust the allocation of labels based on factors such as the load and performance of the service instance to ensure that resources are reasonably allocated and efficiently utilized. In other words, this application has the advantages of being able to dynamically adjust node grouping, enhance business isolation, improve resource utilization efficiency, have configurability and ease of use, good compatibility and scalability, etc.

[0123] In detail, compared with traditional static node management, the present application can support real-time, online modification of label rules and can notify cluster nodes to re-group dynamically according to changes in actual business needs and dynamic adjustment of resources, so as to improve the flexibility of node scheduling and computing systems, and can improve the response efficiency of business changes and resource adjustments. The present application can isolate different businesses or services through the allocation and management of labels, which is conducive to ensuring the independence and security of each business or service, and reducing the risk of mutual influence between different businesses. The present application can also monitor the operating status of the cluster and the actual use of resources in real time, such as being able to adjust the allocation rules of labels according to actual conditions, realize dynamic allocation and optimal utilization of resources, effectively reduce the risk of resource waste and overuse, and help improve the performance and stability of node scheduling and computing systems. Further, the present application can also provide a visual configuration interface to facilitate adjustment and management of label rules, which is conducive to realizing that the configuration and management of computing systems become simple and intuitive, and is conducive to reducing operational burdens and costs. At the same time, the present application can also be applied to common cluster operating environments, such as elastic computing services (ECS) and cloud containers. By integrating with service frameworks such as the Dubbo Registry, it can adapt to the existing distributed system architecture and also has good scalability to meet the growing cluster size and business needs.

[0124] It should be understood that although Figures 4 to 7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figures 4 to 7 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0125] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps of the node scheduling method described above are implemented, which will not be described in detail here.

[0126] See also Figure 8 , Figure 8 It is a structural diagram of an embodiment of a computer device of the present application.

[0127] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8As shown in the example.

[0128] The computer device includes a processor, a memory and a network interface connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a node scheduling method is implemented.

[0129] Those skilled in the art will understand that Figure 8 The structure shown as an example is only a block diagram of a partial structure related to the present application scheme, and does not constitute a limitation on the computer device to which the present application scheme is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0130] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0131] S101: Obtain a label modification request.

[0132] S102: Modify labels carried by nodes in the node cluster.

[0133] S103: In response to the completion of label modification of the node cluster, the node is instructed to register the current label information, so as to allow the node to be scheduled to respond to a service request matching the current label information based on the current label information.

[0134] In one embodiment, when modifying the labels carried by nodes in a node cluster, the processor also implements the following steps when executing a computer program: parsing the target label information of the label modification request; wherein the target label information includes the target label category and the target number of each type of target label; updating the current label rule based on the target label information; querying the nodes associated with the current label rule as associated nodes; and controlling the associated nodes to obtain labels respectively to comply with the current label rule.

[0135] In one embodiment, when controlling associated nodes to obtain labels respectively, the processor also implements the following steps when executing the computer program: identifying the current labels of the associated nodes and counting the current label information; the current label information includes the current label category and the current number of each type of current label; comparing the target label information with the current label information, obtaining the difference category and the difference number; wherein the difference category indicates the label category whose current number is higher than the target number; the difference number indicates the difference between the current number of the difference category and the target number; at least scheduling the associated nodes whose difference numbers carry the difference category to re-acquire the labels.

[0136] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining a label acquisition request from a node; searching whether there is a label to be assigned based on the current label rule; in response to the existence of a label to be assigned, assigning the node the label to be assigned as the current label of the node, and updating label usage information; wherein the label usage information includes information about labels carried by the node cluster, and / or the number of labels of each type that can be assigned; and instructing the node to register the current label information.

[0137] In one embodiment, after searching whether there is a label to be assigned based on the current label rule, the processor further implements the following steps when executing the computer program: in response to there being no label to be assigned, feeding back no-label information to the node; and placing the node receiving the no-label information in a no-label state.

[0138] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the label carried by the node released as a released label; identifying the label category to which the released label belongs to update the label usage information; and instructing the node that releases the label to clear its registered current label information.

[0139] In one embodiment, when the scheduling node responds to a service request that matches the current label information, the processor also implements the following steps when executing the computer program: obtaining the current service request; identifying the label information associated with the current service request; and in response to the current service request not being associated with label information, calling a node in an unlabeled state to respond to the current service request.

[0140] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0141] S101: Obtain a label modification request.

[0142] S102: Modify labels carried by nodes in the node cluster.

[0143] S103: In response to the completion of label modification of the node cluster, the node is instructed to register the current label information, so as to allow the node to be scheduled to respond to a service request matching the current label information based on the current label information.

[0144] In one embodiment, when the labels carried by nodes in a node cluster are modified, the computer program also implements the following steps when executed by the processor: parsing the target label information of the label modification request; wherein the target label information includes the target label category and the target number of each type of target label; updating the current label rule based on the target label information; querying the nodes associated with the current label rule as associated nodes; and controlling the associated nodes to obtain labels respectively to comply with the current label rule.

[0145] In one embodiment, when controlling associated nodes to obtain labels respectively, the computer program also implements the following steps when executed by the processor: identifying the current labels of the associated nodes and counting the current label information; the current label information includes the current label category and the current number of each type of current label; comparing the target label information with the current label information, obtaining the difference category and the difference number; wherein the difference category indicates the label category whose current number is higher than the target number; the difference number indicates the difference between the current number of the difference category and the target number; at least scheduling the associated nodes with the difference category carrying the difference number to re-acquire the label.

[0146] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a label acquisition request from a node; searching whether there is a label to be assigned based on the current label rule; in response to the existence of a label to be assigned, assigning the node the label to be assigned as the current label of the node, and updating label usage information; wherein the label usage information includes information about labels carried by the node cluster, and / or the number of labels of each type that can be assigned; and instructing the node to register the current label information.

[0147] In one embodiment, after searching whether there is a label to be assigned based on the current label rule, the computer program further implements the following steps when executed by the processor: in response to there being no label to be assigned, feeding back no-label information to the node; and placing the node receiving the no-label information in a no-label state.

[0148] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the label carried by the node released as a released label; identifying the label category to which the released label belongs to update the label usage information; and instructing the node that releases the label to clear its registered current label information.

[0149] In one embodiment, when the scheduling node responds to a service request that matches the current label information, the computer program also implements the following steps when executed by the processor: obtaining the current service request; identifying the label information associated with the current service request; and in response to the current service request not being associated with label information, calling a node in an unlabeled state to respond to the current service request.

[0150] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0151] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0152] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.

Claims

1. A node scheduling method, characterized in that: The node scheduling method comprises: Get label modification request; Modify the labels carried by nodes in the node cluster; In response to completion of label modification of the node cluster, the node is instructed to register current label information, so as to allow scheduling the node to respond to a service request matching the current label information based on the current label information.

2. The node scheduling method according to claim 1, characterized in that: The modification of the labels carried by the nodes in the node cluster includes: Parsing the target tag information of the tag modification request; wherein the target tag information includes the target tag category and the target quantity of each type of target tag; Update the current label rule based on the target label information; Querying a node associated with the current label rule as an associated node; The associated nodes are controlled to obtain labels respectively to comply with the current label rule.

3. The node scheduling method according to claim 2, characterized in that: The controlling the associated nodes to respectively obtain labels comprises: Identify the current label of the associated node and count the current label information; the current label information includes the current label category and the current number of each category of current labels; Compare the target label information with the current label information to obtain a difference category and a difference quantity; wherein the difference category indicates a label category whose current quantity is higher than the target quantity; and the difference quantity indicates a difference between the current quantity of the difference category and the target quantity; At least the associated nodes with the difference quantity and the difference category are scheduled to reacquire labels.

4. The node scheduling method according to claim 1, characterized in that: The node scheduling method further includes: Obtain a label acquisition request of the node; Find out whether there is a label to be assigned based on the current label rule; In response to the existence of the label to be assigned, assigning the label to be assigned to the node as the current label of the node, and updating label usage information; wherein the label usage information includes information of labels carried by the node cluster, and / or the number of labels that can be assigned of each type; Instruct the node to register current label information.

5. The node scheduling method according to claim 4, characterized in that: After searching whether there is a label to be assigned based on the current label rule, the method further includes: In response to the fact that there is no label to be allocated, feeding back label-free information to the node; The node receiving the no-label information is placed in a no-label state.

6. The node scheduling method according to claim 1, characterized in that: The node scheduling method further includes: Obtaining a label carried by the node for releasing the label as a release label; Identify the tag category to which the released tag belongs, so as to update the tag usage information; The node that releases the label is instructed to clear the current label information that has been registered.

7. The node scheduling method according to claim 1, characterized in that: The scheduling the node to respond to the service request matching the current label information further includes: Get the current business request; Identifying tag information associated with the current service request; In response to the current service request not being associated with the label information, calling the node in the unlabeled state to respond to the current service request.

8. A node scheduling device, characterized in that: The node scheduling device comprises: Tag manager, used to obtain tag modification requests; A label distributor is connected to the label manager and is used to respond to a label modification request; modify the labels carried by nodes in the node cluster; in response to the completion of the label modification of the node cluster, enable the node to register the current label information; to allow the node to be scheduled to respond to a business request that matches the current label information based on the current label information.

9. A computing system, characterized in that: The computing system comprises: The node scheduling device as claimed in claim 8; A node cluster connected to the node scheduling device; The service framework is connected to the node cluster and is used to receive current label information registered by nodes in the node cluster, and based on the current label information, schedule the nodes to respond to service requests matching the current label information.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the node scheduling method according to any one of claims 1 to 7 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the node scheduling method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Node classification method and device, related equipment and computer program product

    CN119697020A