Node scheduling method, device, electronic device and storage medium
By determining the fault domain matrix and node scheduling strategy in the Redis cluster, node switching is achieved, and the problem of high availability of fault domains in the Redis cluster is solved, business continuity is improved, and data migration affects continuity is avoided.
Patent Information
- Application Number
- CN202210668481.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-14
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-06-14
AI Technical Summary
The prior art is difficult to achieve high availability of fault domains in Redis clusters without affecting business continuity, and data migration is usually required to affect the continuity of data processing.
By determining the fault domain matrix and node scheduling strategy in the target cluster, a node switching scheme is formulated to enable nodes in the cluster to switch between fault domains, thereby meeting the high availability conditions of the fault domain.
Without migrating the cluster, quickly realize high availability of fault domains, reduce the impact on data processing, and improve business continuity.
Smart Images

Figure CN115098303B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a node scheduling method, device, electronic device and storage medium. Background Art
[0002] The high availability scheduling of fault domain based on Redis (Remote Dictionary Server) cluster generally focuses on how to distribute nodes when clusters are created to meet the high availability of fault domains. For an existing Redis cluster, if it does not meet the high availability of fault domains, the method often adopted is to migrate its data to other Redis clusters that meet the high availability of fault domains. This has a great impact on the continuity of data processing. Therefore, how to switch nodes in an existing Redis cluster while ensuring the continuity of cluster business has become one of the hot issues in the current research on the high availability of fault domains of clusters. Summary of the invention
[0003] The present disclosure provides a node scheduling method, device, electronic device and storage medium, which can perform node switching on a cluster while ensuring cluster service continuity.
[0004] In a first aspect, the present disclosure provides a node scheduling method, the method comprising:
[0005] Determine the fault domain matrix of the target cluster based on the distribution information of each node in the target cluster in the fault domain; wherein the fault domain matrix includes the corresponding relationship between each node and the fault domain;
[0006] Determine a node switching solution for the target cluster based on the fault domain matrix and the node scheduling strategy;
[0007] The nodes in the target cluster are switched according to the node switching scheme, so that the switched target cluster meets the fault domain high availability condition.
[0008] In a second aspect, the present disclosure provides a node scheduling device, including:
[0009] A processing unit, configured to determine a fault domain matrix of the target cluster based on distribution information of each node in the target cluster in the fault domain; wherein the fault domain matrix includes a correspondence between each node and the fault domain;
[0010] The processing unit is further used to determine a node switching scheme of the target cluster based on the fault domain matrix and the node scheduling strategy;
[0011] The scheduling unit is used to switch the nodes in the target cluster according to the node switching scheme, so that the target cluster after switching meets the fault domain high availability condition.
[0012] In a third aspect, the present disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, and one or more of the computer programs are executed by the at least one processor so that the at least one processor can execute the above-mentioned node scheduling method.
[0013] In a fourth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned node scheduling method when executed by a processor / processing core.
[0014] The node scheduling method provided by the present disclosure determines the fault domain matrix of the target cluster based on the distribution information of each node in the target cluster in the fault domain, determines the node switching scheme of the target cluster based on the fault domain matrix and the node scheduling strategy, can convert the fault domain problem into a matrix problem suitable for computer processing, speed up the speed of determining the node switching scheme, and improve the efficiency of processing the fault domain problem. Then, the nodes in the target cluster are switched according to the node switching scheme, so that the switched cluster meets the fault domain high availability condition, can achieve the fault domain high availability of the target cluster without too much change, has little impact on the continuity of data processing of the cluster, and can effectively improve the continuity of cluster-based services.
[0015] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings, in which:
[0017] Figure 1 A flowchart of a node scheduling method provided by an embodiment of the present disclosure;
[0018] Figure 2 A schematic diagram of determining a fault domain matrix of a target cluster based on distribution information of each node in the target cluster in the fault domain provided by an embodiment of the present disclosure;
[0019] Figure 3A flowchart of a method for determining a node switching solution of a target cluster based on a fault domain matrix and a node scheduling strategy provided by an embodiment of the present disclosure;
[0020] Figure 4 A schematic diagram of switching nodes in a target cluster according to a node switching scheme provided in an embodiment of the present disclosure;
[0021] Figure 5 A flowchart of a node scheduling method based on a target cluster provided in an embodiment of the present disclosure;
[0022] Figure 6 A flowchart of a node scheduling method based on a target cluster provided in an embodiment of the present disclosure;
[0023] Figure 7 A schematic diagram of the structure of a node scheduling device based on a target cluster provided in an embodiment of the present disclosure;
[0024] Figure 8 A block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0026] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.
[0027] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0028] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "including" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.
[0029] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.
[0030] The disclosed embodiment provides a node scheduling method for performing node scheduling on a target cluster, wherein the target cluster refers to a Redis cluster that currently needs to perform node scheduling, and the method is applicable to a Redis cluster environment. Redis refers to a key-value storage system. It supports relatively many types of data structures (value types) for storage, including strings, lists, sets, ordered sets (sorted sets or zsets), and hash types. These data types support rich operations such as push / pop, add / remove, intersection, union, and difference, and these operations are atomic.
[0031] Redis cluster is a facility that can share data between multiple Redis nodes. Redis cluster provides a certain degree of availability through partitioning. Even if some nodes in the cluster fail or cannot communicate, the cluster can continue to process command requests.
[0032] Redis cluster uses data sharding instead of consistent hashing to achieve: a Redis cluster contains 16384 hash slots, each key in the database belongs to one of these 16384 hash slots, and the cluster uses the formula CRC16(key)%16384 to calculate which slot the key belongs to. Among them, CRC16 is the most commonly used error checking code in the field of data communication, and its characteristic is that the length of the information field and the check field can be selected arbitrarily.
[0033] Each node in a Redis cluster is responsible for processing a portion of hash slots. Generally speaking, the nodes in a Redis cluster are divided into multiple master nodes and at least one slave node corresponding to each master node. Among them, the master node is used to process command requests (for example, processing hash slots), while the slave node is used to replicate the corresponding master node, and when the corresponding master node goes offline, it replaces the offline master node to continue processing command requests. For example, a cluster has 3 master nodes (node A, node B and node C), 3 slave nodes, node D, node E and node F. Among them, node A is responsible for processing hash slots 0 to 5460, and its slave node is D; node B is responsible for processing hash slots 5461 to 10922, and its slave node is E; node C is responsible for processing hash slots 10923 to 16383, and its slave node is F.
[0034] For any Redis cluster, if the master and slave nodes holding the slots fail at the same time (for example, the master node A and its corresponding slave node D in the above cluster), the entire cluster will be unavailable. Therefore, the master nodes under the cluster can be distributed in different fault domains, and the master node and at least one of its corresponding slave nodes can be distributed in different fault domains to achieve high availability of fault domains.
[0035] Among them, fault domain and high availability are closely related concepts. A fault domain is a group of hardware components that share a single point of failure. To achieve a certain level of fault tolerance (i.e. high availability), multiple fault domains of the corresponding level are required. For a Redis cluster, it is necessary that the master nodes are not distributed in the same fault domain, and the master node and at least one slave node corresponding to itself are not distributed in the same fault domain, that is, at least the same number of fault domains as the number of master nodes in the cluster are required.
[0036] High availability scheduling based on fault domains of Redis clusters generally focuses on how to distribute nodes when creating a cluster to meet fault domain high availability, but does not involve how to detect whether an existing Redis cluster meets fault domain high availability. In addition, when some Redis clusters do not meet fault domain high availability, they often use the method of migrating their data to other Redis clusters that meet fault domain high availability, which has a great impact on the continuity of data processing.
[0037] The node scheduling method provided in this embodiment can quickly determine the node switching plan for the existing Redis cluster, so that the Redis cluster can meet the high availability of the fault domain without migrating the Redis cluster. The execution subject of the method can be an electronic device such as a terminal device or a server. Among them, the terminal device can include any device such as a mobile phone, a laptop computer, an intelligent voice interaction device, a vehicle terminal, etc., and the server can be an independent physical server, a server cluster, or a cloud server capable of cloud computing.
[0038] Figure 1 A flowchart of a node scheduling method provided by an embodiment of the present disclosure. Figure 1 As shown, the method includes steps S11 to S13.
[0039] Step S11: Determine the fault domain matrix of the target cluster based on the distribution information of each node in the target cluster in the fault domain.
[0040] The target cluster refers to the Redis cluster that currently needs to perform node scheduling. Each node in the target cluster refers to a node that is configured with the ability to process command requests (for example, processing hash slots), including multiple master nodes and at least one slave node (slave) corresponding to each master node. The master node is used to process command requests (for example, processing hash slots), and the slave node is used to copy the corresponding master node, and when the corresponding master node goes offline, it replaces the offline master node to continue processing command requests. Each node in the target cluster is distributed in multiple fault domains, and the distribution information includes the distribution of each node in the multiple fault domains, such as master node 1 is distributed in fault domain 1, and the slave nodes of master node 1 are distributed in fault domain 2 and fault domain 3, or master node 2 is distributed in fault domain 2, and master node 3 and the slave nodes corresponding to master node 3 are all distributed in fault domain 3. The fault domain matrix can reflect the corresponding relationship between each node and the fault domain.
[0041] In one embodiment, in the above-mentioned fault domain matrix determined based on the distribution information of each node in the target cluster in the fault domain, the fault domain matrix includes at least one matrix row, and each matrix row corresponds to a master node and a slave node corresponding to the master node. The elements with preset positions in any matrix row of the fault domain matrix include a node identifier of a master node and a corresponding fault domain identifier, and each other element of the matrix row except the elements with preset positions includes a node identifier of a slave node corresponding to the master node and a fault domain identifier corresponding to the slave node.
[0042] The preset bit is any bit in a predetermined matrix row, for example, the preset bit can be any bit in the first, second, or third bit in the matrix row. Since each matrix row corresponds to only one master node, and the master node may correspond to multiple slave nodes, in order to facilitate data processing, it is preferred to configure the preset bit as the first bit in the matrix row, that is, to place the node identifier of the master node in the first bit in the matrix row, and to place the node identifier of the slave node corresponding to the master node in other bits except the first bit. For example, see Figure 2 , which is a schematic diagram of determining a fault domain matrix of a target cluster based on distribution information of each node in the target cluster in the fault domain, provided by an embodiment of the present disclosure.
[0043] like Figure 2As shown, the target cluster 21 includes multiple nodes, including: master node A, slave node A1 corresponding to master node A; master node B, slave node B1 corresponding to master node B; master node C, slave node C1 corresponding to master node C. The multiple nodes are distributed in three fault domains, and the fault domain identifiers of the three fault domains are 0, 1, and 2 respectively. The distribution information of each node in the target cluster in the fault domain is: master node A and master node B are distributed in fault domain 0, master node C and slave node A1 are distributed in fault domain 1, and slave node B1 and slave node C1 are distributed in fault domain 2.
[0044] like Figure 2 As shown, in this embodiment, the preset bit is the first bit of the matrix row. The fault domain matrix 22 determined based on the distribution information includes the corresponding relationship between the node and the fault domain. In the fault domain matrix 22, the first bit of the first matrix row is 0 (A) and the second bit is 1 (A1), wherein 0 (A) is used to identify the master node A in fault domain 0, and 1 (A1) is used to identify the slave node A1 corresponding to the master node A in fault domain 1; the first bit of the second matrix row is 0 (B) and the second bit is 2 (B1), wherein 0 (B) is used to identify the master node B in fault domain 0, and 2 (B1) is used to identify the slave node B1 corresponding to the master node B in fault domain 2; the first bit of the third matrix row is 1 (C) and the second bit is 2 (C1), wherein 1 (C) is used for the master node C in fault domain 1, and 2 (C1) is used to identify the slave node C1 corresponding to the master node C in fault domain 2.
[0045] In the disclosed embodiment, the fault domain matrix of the target cluster is determined based on the distribution information of each node in the target cluster in the fault domain, which can convert the fault domain problem into a matrix problem suitable for computer processing, speed up the determination of the node switching plan, and improve the efficiency of processing the fault domain problem.
[0046] Step S12: Determine a node switching solution for the target cluster based on the fault domain matrix and the node scheduling strategy.
[0047] The node scheduling strategy is a criterion for determining the node switching scheme through the fault domain matrix. The node scheduling strategy is used to stipulate that multiple master nodes are not in the same fault domain, and any master node and at least one slave node corresponding to the any master node are not in the same fault domain. The node switching scheme is a scheme that indicates how to switch the nodes in the target cluster so that the target cluster meets the fault domain high availability condition.
[0048] Based on the above definition of the node scheduling strategy, the node switching plan determined based on the fault domain matrix and the node scheduling strategy can ensure that after the nodes in the target cluster are switched according to the node switching plan, the target cluster meets the high availability of the fault domain. In this way, the accuracy and continuity of business execution in the target cluster can be guaranteed.
[0049] Step S13: Switch the nodes in the target cluster according to the node switching plan, so that the scheduled target cluster meets the fault domain high availability condition.
[0050] The fault domain high availability condition means that multiple master nodes are not distributed in the same fault domain, and the master node and at least one slave node corresponding to the master node are not distributed in the same fault domain.
[0051] In this embodiment, there is no need to migrate the target cluster. Only the nodes in the target cluster need to be switched to make the scheduled cluster meet the fault domain high availability condition. That is, this embodiment can achieve fault domain high availability of the target cluster with little impact on the data processing continuity of the target cluster.
[0052] The disclosed embodiment provides a node scheduling method. First, a fault domain matrix of a target cluster is determined based on the distribution information of each node in the target cluster in the fault domain. Then, a node switching scheme of the target cluster is determined based on the fault domain matrix and the node scheduling strategy. The fault domain problem can be converted into a matrix problem suitable for computer processing, thereby accelerating the speed of determining the node switching scheme and improving the efficiency of processing the fault domain problem. Finally, the nodes in the target cluster are switched according to the node switching scheme, so that the scheduled cluster meets the high availability condition of the fault domain, and the high availability of the fault domain of the target cluster can be achieved with little impact on the continuity of data processing of the target cluster, thereby effectively improving the continuity of the business based on the target cluster.
[0053] Figure 3 A flowchart of a method for determining a node switching solution of a target cluster based on a fault domain matrix and a node scheduling strategy provided by an embodiment of the present disclosure. In one embodiment, Figure 3 The method comprises: step S31 to step S34.
[0054] Step S31: Obtain at least one initial path corresponding to the fault domain matrix.
[0055] The initial path includes one element of each matrix row in the fault domain matrix. As an optional implementation, obtaining at least one initial path corresponding to the fault domain matrix may include: sequentially combining each element in the first matrix row with an element in other matrix rows until there is no uncombined element in each other matrix row; and taking each combination obtained in the above traversal process as an initial path. For example, Figure 2Take the fault domain matrix in as an example. The first element in the first matrix row is 0(A). 0(A) is combined with 0(B) in the second matrix row and 1(C) in the third matrix row. Then 0(A)-0(B)-1(C) is an initial path. Since there are elements in the second and third matrix rows that are not combined with 0(A), these elements are combined with 0(A). According to the above process, based on Figure 2 At least one initial path that can be determined in the fault domain matrix is as follows:
[0056] 0(A)-0(B)-1(C);
[0057] 0(A)-0(B)-2(C1);
[0058] 0(A)-2(B1)-1(C);
[0059] 0(A)-2(B1)-2(C1);
[0060] 1(A1)-0(B)-1(C);
[0061] 1(A1)-0(B)-2(C1);
[0062] 1(A1)-2(B1)-1(C);
[0063] 1(A1)-2(B1)-2(C1).
[0064] Step S32: Determine at least one candidate path from at least one initial path, wherein the fault domain identifier included in each element in each candidate path is different.
[0065] Each initial path in at least one initial path is traversed, and an initial path in at least one initial path that meets a condition is determined as a candidate path, where the condition is met when each element included in the initial path has a different fault domain identifier. Figure 2 Taking the initial path determined by the fault domain matrix shown in as an example, the candidate paths determined in this step are: 0(A)-2(B1)-1(C) and 1(A1)-0(B)-2(C1).
[0066] In some embodiments, in order to improve the processing rate, it is not necessary to determine the candidate path from the initial path after the fault domain matrix determines the initial path, but the candidate path is determined directly based on the fault domain matrix. That is, recursively from the first bit of the first matrix row of the fault domain matrix downward, after selecting the element corresponding to one step in the path, the fault domain identifier included in the element corresponding to the next step is different from the fault domain identifiers corresponding to all previous steps, until all candidate paths are selected. For example, when the element of the first step of the selected path is 0 (A), the element containing the fault domain identifier of 0 is not selected in the subsequent steps, that is, 2 (B1) is selected in the second step, and 1 (C) is selected in the third step.
[0067] In some embodiments, when a path including different fault domain identifiers for each bit element cannot be selected from the initial path, it indicates that the target cluster does not have a suitable node for switching. Therefore, in this case, the scheduling process for the target cluster can be terminated.
[0068] Step S33: taking the candidate path having the largest number of elements with preset positions among at least one candidate path as the target path.
[0069] by Figure 2 Taking the fault domain matrix shown in as an example, the preset bit of the fault domain matrix is the first bit, and the candidate path with the largest number of elements containing the preset bits of the matrix rows in the candidate path is: 0(A)-2(B1)-1(C). Therefore, the candidate path 0(A)-2(B1)-1(C) is determined as the target path.
[0070] It should be noted that since the high availability condition of the fault domain requires that the master nodes are not distributed on the same fault domain, and the elements with preset positions in the fault domain matrix determined in the previous step correspond to the master nodes, in this step, the candidate path with the largest number of elements with preset positions of matrix rows in the candidate path is used as the target path. The purpose is to clarify the existing master nodes in each fault domain, so that in the subsequent step of determining at least one node to be scheduled through the target path, the scheduling of these master nodes can be minimized, thereby reducing the impact on the target cluster.
[0071] Step S34: determine the node to be scheduled based on the target path and the node scheduling strategy, and generate a node switching plan according to the node to be scheduled.
[0072] The node to be scheduled refers to a node that is determined to be scheduled. The node switching scheme includes switching of the node to be scheduled.
[0073] The node scheduling strategy is used to ensure that multiple master nodes are not in the same fault domain, and any master node and at least one slave node corresponding to the any master node are not in the same fault domain. Therefore, in this embodiment, at least one node to be scheduled is determined according to the target path and the node scheduling strategy, and a node switching plan is generated according to at least one node to be scheduled, so that the node switching plan is an effective plan that can enable the scheduled target cluster to meet the high availability conditions of the fault domain.
[0074] by Figure 2 As an example, the target path 0(A)-2(B1)-1(C) determined by the fault domain matrix shown in FIG. 1 indicates that a master node A already exists in fault domain 0, a master node C already exists in fault domain 1, but there is no master node in fault domain 2. Therefore, the slave node B1 in fault domain 2 is determined as the node to be scheduled. The node switching solution generated based on the node B1 to be scheduled includes switching the node B1 to be scheduled.
[0075] In one embodiment, the node switching scheme includes switching of the node to be scheduled. Then the switching of the nodes in the target cluster according to the node switching scheme (step S13) includes: switching the node to be scheduled with the master node corresponding to the node to be scheduled.
[0076] In some embodiments, the node switching scheme may exist in the form of a matrix, for example, the node identifiers of the node to be scheduled and the master node corresponding to the node to be scheduled in the fault domain matrix of the aforementioned part are interchanged. The node switching scheme may also exist in other forms, such as text information, code information, etc.
[0077] Figure 4 A schematic diagram of switching nodes in a target cluster according to a node switching scheme provided in an embodiment of the present disclosure. Figure 4 As shown, the node switching scheme 41 exists in the form of a matrix. Based on the node switching scheme 41, the node to be scheduled and the master node corresponding to the node to be scheduled are switched. In the target cluster 42 after scheduling, multiple master nodes (A, B, C) are not in the same fault domain, and any master node and at least one slave node corresponding to the master node (A and A1, B and B1, C and C1) are not in the same fault domain. Therefore, the target cluster 42 after scheduling meets the high availability condition of the fault domain.
[0078] Figure 5 A flowchart of a node scheduling method based on a target cluster provided by an embodiment of the present disclosure. In one embodiment, before determining the fault domain matrix of the target cluster based on the distribution information of each node in the target cluster in the fault domain (the above step S11), as Figure 5 As shown, the method includes step S10a.
[0079] Step S10a: determining whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster.
[0080] The attribute parameters of the target cluster are parameters used to describe the configuration of the target cluster, for example, the attribute parameters include one or more of the number of fault domains, the number of master nodes, the number of slave nodes corresponding to the master nodes, and the distribution information of each node in the fault domain. The scheduling condition refers to the basic conditions that the target cluster needs to meet to achieve high availability of the fault domain through node switching.
[0081] In some embodiments, the attribute parameters of the target cluster include the number of fault domains and the number of master nodes. The determining whether the target cluster meets the scheduling conditions based on the attribute parameters of the target cluster includes: if the number of fault domains is greater than or equal to the number of master nodes, determining that the target cluster meets the scheduling conditions; if the number of fault domains is less than the number of master nodes, determining that the target cluster does not meet the scheduling conditions.
[0082] It should be noted that when the number of fault domains is less than the number of master nodes, no matter how the nodes of the target cluster are switched, all master nodes cannot be in different fault domains, that is, the scheduled target cluster cannot meet the high availability of fault domains. Therefore, in this embodiment, the scheduling conditions are set by the number of fault domains and the number of master nodes, so that the target cluster of this type can be screened out, and the target cluster that meets the scheduling conditions can be processed, thereby avoiding resource waste and improving processing efficiency.
[0083] In some embodiments, the attribute parameters of the target cluster also include distribution information of each node in the target cluster in the fault domain. The determination of whether the target cluster meets the scheduling conditions based on the attribute parameters of the target cluster includes: for any master node, if the master node and at least one corresponding slave node are in different fault domains, determining that the target cluster meets the scheduling conditions; if there is a master node and all its corresponding slave nodes in the same fault domain, determining that the target cluster does not meet the scheduling conditions.
[0084] It should be noted that if a master node in the target cluster and all its corresponding slave nodes are located in the same fault domain, no matter how the nodes of the target cluster are switched, the master node and at least one corresponding slave node cannot be in different fault domains, that is, the scheduled target cluster cannot meet the high availability of the fault domain. Therefore, in this embodiment, the scheduling conditions are set by the distribution information of each node in the target cluster in the fault domain, so that the target cluster of this type can be screened out, and the target cluster that meets the scheduling conditions can be processed, thereby avoiding resource waste and improving processing efficiency.
[0085] In one implementation, when the target cluster does not meet the scheduling condition, the scheduling process for the target cluster is terminated.
[0086] like Figure 5 As shown, the above-mentioned determination of the fault domain matrix of the target cluster based on the distribution information of each node in the target cluster in the fault domain (the above-mentioned step S11) includes: step S11a.
[0087] Step S11a: when the target cluster meets the scheduling conditions, determine the fault domain matrix of the target cluster based on the distribution information of each node in the target cluster in the fault domain.
[0088] The process of determining the fault domain matrix of the target cluster based on the distribution information of each node in the target cluster in the fault domain is described in the above embodiment and will not be described again here.
[0089] In this implementation, by setting the scheduling conditions, the target clusters that do not meet the scheduling conditions can be screened out, and the target clusters that meet the scheduling conditions are processed, which can effectively avoid resource waste and improve processing efficiency.
[0090] Figure 6 A flowchart of a node scheduling method based on a target cluster provided in an embodiment of the present disclosure.
[0091] In one embodiment, before determining whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster (step S10a), the method further includes: step S00.
[0092] Step S00: Determine whether the target cluster meets the fault domain high availability condition.
[0093] The fault domain high availability condition means that multiple master nodes in the target cluster are not in the same fault domain, and any master node and at least one slave node corresponding to the master node are not in the same fault domain.
[0094] In one implementation, determining whether the target cluster meets the fault domain high availability condition includes the following case 1 and case 2.
[0095] Case 1: Based on the distribution information of each node in the target cluster in the fault domain, it is determined that any master node in the target cluster and at least one other master node are distributed in the same fault domain, or, when any master node and all corresponding slave nodes are distributed in the same fault domain, it is determined that the target cluster does not meet the fault domain high availability condition.
[0096] In this embodiment, if Figure 6 As shown, the above-mentioned determining whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster (step S10a) includes: step S10b.
[0097] Step S10b: When the target cluster does not meet the fault domain high availability condition, determine whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster.
[0098] The detailed process of determining whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster can be found in the description of the aforementioned embodiment, which will not be repeated here.
[0099] Case 2: Based on the node distribution information of the target cluster, it is determined that each master node in the target cluster is distributed in a different fault domain from other master nodes, and any master node and at least one corresponding slave node are distributed in a different fault domain, and it is determined that the target cluster meets the fault domain high availability condition.
[0100] In this implementation, when the target cluster meets the high availability condition of the fault domain, it is determined that the target cluster does not need to be scheduled, and the scheduling process for the target cluster is terminated.
[0101] It should be noted that since the present disclosure is aimed at a target cluster that does not meet the fault domain high availability conditions, determining whether the target cluster meets the fault domain high availability conditions in this embodiment can screen out the target cluster that meets the fault domain high availability conditions, and process the target cluster that does not meet the fault domain high availability conditions, which can avoid resource waste and improve processing efficiency.
[0102] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.
[0103] In addition, the embodiments of the present disclosure also provide a node scheduling device, an electronic device, and a computer-readable storage medium based on a target cluster, which can be used to implement any node scheduling method based on a target cluster provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method part and will not be repeated here.
[0104] Figure 7 The schematic diagram of the structure of a node scheduling device based on a target cluster provided by an embodiment of the present disclosure is shown in FIG. Figure 7 As shown, the node scheduling device includes: a processing unit 71 and a scheduling unit 72.
[0105] The processing unit 71 is used to determine the fault domain matrix of the target cluster based on the distribution information of each node in the target cluster in the fault domain; wherein the fault domain matrix includes the corresponding relationship between each node and the fault domain.
[0106] The processing unit 71 is further configured to determine a node switching solution of the target cluster based on the fault domain matrix and the node scheduling strategy.
[0107] The scheduling unit 72 is used to switch the nodes in the target cluster according to the node switching scheme, so that the target cluster after switching meets the fault domain high availability condition.
[0108] In one embodiment, each node includes multiple master nodes and at least one slave node corresponding to each master node; the node scheduling strategy is used to stipulate that the multiple master nodes are not in the same fault domain, and any master node and at least one slave node corresponding to the any master node are not in the same fault domain.
[0109] In one embodiment, the fault domain matrix includes at least one matrix row, each matrix row corresponds to a master node and at least one slave node corresponding thereto; the elements with preset positions in any matrix row of the fault domain matrix include a node identifier of any master node and a corresponding fault domain identifier, and each other element of any matrix row except the elements with preset positions includes a node identifier of a slave node corresponding to the any master node and a corresponding fault domain identifier.
[0110] In one embodiment, when determining the node switching solution of the target cluster based on the fault domain matrix and the node scheduling strategy, the processing unit 71 performs the following steps:
[0111] Obtain at least one initial path corresponding to the fault domain matrix, where the initial path includes one element of each matrix row in the fault domain matrix;
[0112] Determine at least one candidate path from at least one initial path, wherein the fault domain identifiers included in each element of each candidate path are different;
[0113] Among at least one candidate path, the candidate path that contains the largest number of elements at the preset positions is used as the target path;
[0114] The nodes to be scheduled are determined based on the target path and the node scheduling strategy, and a node switching plan is generated according to the nodes to be scheduled.
[0115] In one embodiment, the node switching scheme includes switching of the node to be scheduled; when the scheduling unit 72 switches the nodes in the target cluster according to the node switching scheme, it performs the following steps: switching the node to be scheduled with the master node corresponding to the node to be scheduled.
[0116] In one embodiment, the processing unit 71 is further configured to determine whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster;
[0117] When the target cluster meets the scheduling conditions, the fault domain matrix of the target cluster is determined based on the distribution information of each node in the target cluster in the fault domain.
[0118] In one embodiment, the attribute parameters include the number of fault domains and the number of master nodes. When determining whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster, the processing unit 71 performs the following steps: when the number of fault domains is greater than or equal to the number of master nodes, determining that the target cluster meets the scheduling condition.
[0119] In one embodiment, the processing unit 71 is further used to determine whether the target cluster meets the fault domain high availability condition; when the processing unit 71 determines whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster, the processing unit 71 performs the following steps:
[0120] In the case that the target cluster does not meet the fault domain high availability condition, it is determined whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster.
[0121] In one embodiment, when determining whether the target cluster meets the fault domain high availability condition, the processing unit 71 performs the following steps:
[0122] If, based on the distribution information of each node in the target cluster in the fault domain, it is determined that any master node in the target cluster and at least one other master node are distributed in the same fault domain, or any master node and a slave node corresponding to the any master node are distributed in the same fault domain, it is determined that the target cluster does not meet the fault domain high availability condition;
[0123] If, based on the distribution information of each node in the target cluster in the fault domain, it is determined that any master node in the target cluster is not in the same fault domain as at least one other master node, and that any master node and the slave node corresponding to the any master node are distributed in different fault domains, then it is determined that the target cluster meets the fault domain high availability condition.
[0124] The disclosed embodiment provides a node scheduling device based on a target cluster, wherein a processing unit 71 is used to determine a fault domain matrix of a target cluster based on distribution information of each node in the target cluster in a fault domain, and to determine a node switching scheme of the target cluster based on the fault domain matrix and a node scheduling strategy. The device can convert a fault domain problem into a matrix problem suitable for computer processing, thereby accelerating the speed of determining a node switching scheme and improving the efficiency of processing fault domain problems. The scheduling unit 72 is used to switch nodes in the target cluster according to the node switching scheme, so that the scheduled cluster meets the high availability condition of the fault domain, and can achieve high availability of the fault domain of the target cluster with little impact on the continuity of data processing of the target cluster, thereby effectively improving the continuity of services based on the target cluster.
[0125] Figure 8 A block diagram of an electronic device provided by an embodiment of the present disclosure. Figure 8 , an embodiment of the present disclosure provides an electronic device, the electronic device comprising: at least one processor 801; at least one memory 802, and one or more I / O interfaces 803, connected between the processor 801 and the memory 802; wherein the memory 802 stores one or more computer programs executable by the at least one processor 801, and the one or more computer programs are executed by the at least one processor 801:
[0126] Based on the distribution information of each node in the target cluster in the fault domain, the fault domain matrix of the target cluster is determined; wherein the fault domain matrix includes the corresponding relationship between each node and the fault domain; based on the fault domain matrix and the node scheduling strategy, the node switching plan of the target cluster is determined; according to the node switching plan, the nodes in the target cluster are switched so that the switched target cluster meets the high availability condition of the fault domain.
[0127] In some embodiments, each node includes a master node and at least one slave node corresponding to the master node; the node scheduling strategy is used to ensure that multiple master nodes are not in the same fault domain, and any master node and at least one slave node corresponding to the master node are not in the same fault domain.
[0128] In some embodiments, the fault domain matrix includes at least one matrix row, each matrix row corresponds to a master node and at least one slave node corresponding thereto; the elements with preset positions in any matrix row of the fault domain matrix include a node identifier of any master node and a corresponding fault domain identifier, and each other element of any matrix row except the elements with preset positions includes a node identifier of a slave node corresponding to the any master node and a corresponding fault domain identifier.
[0129] In some embodiments, when the processor 801 determines the node switching plan of the target cluster based on the fault domain matrix and the node scheduling strategy, it performs the following steps: obtaining at least one initial path corresponding to the fault domain matrix; the initial path includes one element of each matrix row in the fault domain matrix; determining a candidate path from at least one initial path, and the fault domain identifiers included in each element in the candidate path are all different; taking the candidate path with the largest number of elements containing preset positions of the matrix row in the candidate path as the target path; determining at least one node to be scheduled based on the target path and the node scheduling strategy, and generating a node scheduling plan based on the at least one node to be scheduled.
[0130] In some embodiments, the node switching scheme includes switching of at least one node to be scheduled. When the processor 801 switches the nodes in the target cluster according to the node switching scheme, it performs the following steps: switching the node to be scheduled and the master node corresponding to the node to be scheduled.
[0131] In some embodiments, before determining the fault domain matrix of the target cluster based on the distribution information of each node in the target cluster in the fault domain, the processor 801 is further configured to determine whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster.
[0132] When determining the fault domain matrix of the target cluster based on the distribution information of each node in the target cluster in the fault domain, the processor 801 performs the following steps: when the target cluster meets the scheduling conditions, determining the fault domain matrix of the target cluster based on the distribution information of each node in the target cluster in the fault domain.
[0133] In some embodiments, the attribute parameters include the number of fault domains and the number of master nodes. When the processor 801 determines whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster, it performs the following steps: if the number of fault domains is greater than or equal to the number of master nodes, it is determined that the target cluster meets the scheduling condition.
[0134] In some embodiments, before determining whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster, the processor 801 is further configured to determine whether the target cluster meets the fault domain high availability condition.
[0135] When determining whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster, the processor 801 performs the following steps: if the target cluster does not meet the fault domain high availability condition, determining whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster.
[0136] In some embodiments, when determining whether the target cluster meets the fault domain high availability condition, the processor 801 performs the following steps: if it is determined based on the distribution information of each node in the target cluster in the fault domain that any one master node in the target cluster is distributed in the same fault domain as at least one other master node, or, if any one master node and all corresponding slave nodes are distributed in the same fault domain, it is determined that the target cluster does not meet the fault domain high availability condition; if it is determined based on the distribution information of each node in the target cluster in the fault domain that any one master node in the target cluster is not in the same fault domain as at least one other master node, and any one master node and the slave node corresponding to the any one master node are distributed in different fault domains, it is determined that the target cluster meets the fault domain high availability condition.
[0137] In the disclosed embodiment, a fault domain matrix of a target cluster is determined based on the distribution information of each node in the target cluster in the fault domain, and a node switching plan of the target cluster is determined based on the fault domain matrix and the node scheduling strategy. This can convert the fault domain problem into a matrix problem suitable for computer processing, thereby accelerating the speed of determining the node switching plan and improving the efficiency of processing the fault domain problem. Then, the nodes in the target cluster are switched according to the node switching plan so that the switched cluster meets the high availability condition of the fault domain, and can achieve high availability of the fault domain of the target cluster without causing too much change in the target cluster, with little impact on the continuity of data processing in the cluster, thereby effectively improving the continuity of cluster-based services.
[0138] The present disclosure also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program implements the above-mentioned node scheduling method when executed by a processor / processing core. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.
[0139] The embodiment of the present disclosure also provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned node scheduling method.
[0140] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).
[0141] As is known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is known to those of ordinary skill in the art that communication media typically contain computer-readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.
[0142] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0143] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0144] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.
[0145] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0146] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0147] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0148] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0149] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. A node scheduling method, characterized in that: include: Based on the distribution information of each node in the target cluster in the fault domain, determine the fault domain matrix of the target cluster; wherein each node includes multiple master nodes and at least one slave node corresponding to each master node, the fault domain matrix includes the corresponding relationship between each node and the fault domain, and the fault domain matrix includes at least one matrix row, each matrix row corresponds to a master node and at least one slave node corresponding to it; for each matrix row, the elements of the matrix row with preset positions include a node identifier of a master node and a corresponding fault domain identifier, and the elements of the non-preset positions include a node identifier of a slave node corresponding to the master node and a corresponding fault domain identifier; Determine a node switching scheme of the target cluster based on the fault domain matrix and a node scheduling strategy, wherein the node scheduling strategy is used to stipulate that multiple master nodes are not in the same fault domain, and any master node and at least one slave node corresponding to it are not in the same fault domain; The nodes in the target cluster are switched according to the node switching scheme, so that the switched target cluster meets the fault domain high availability condition.
2. The node scheduling method according to claim 1, characterized in that: The determining of the node switching scheme of the target cluster based on the fault domain matrix and the node scheduling strategy includes: Obtain at least one initial path corresponding to the fault domain matrix; the initial path includes one element of each matrix row in the fault domain matrix; Determine at least one candidate path from the at least one initial path, wherein the fault domain identifiers included in each element in each candidate path are different; Taking the candidate path with the largest number of elements containing preset positions among the at least one candidate path as the target path; The node to be scheduled is determined based on the target path and the node scheduling strategy, and the node switching plan is generated according to the node to be scheduled.
3. The node scheduling method according to claim 2, characterized in that: The node switching scheme includes switching of the node to be scheduled; The switching of the nodes in the target cluster according to the node switching scheme includes: The node to be scheduled is switched with a master node corresponding to the node to be scheduled.
4. The node scheduling method according to claim 1, characterized in that: Before determining the fault domain matrix of the target cluster based on the distribution information of each node in the target cluster in the fault domain, the method further includes: Determining whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster; The determining of the fault domain matrix of the target cluster based on the distribution information of each node in the target cluster in the fault domain includes: When the target cluster meets the scheduling conditions, a fault domain matrix of the target cluster is determined based on distribution information of each node in the target cluster in the fault domain.
5. The node scheduling method according to claim 4, characterized in that: The attribute parameters include the number of fault domains and the number of master nodes; The determining whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster includes: When the number of fault domains is greater than or equal to the number of master nodes, it is determined that the target cluster meets the scheduling condition.
6. The node scheduling method according to claim 4, characterized in that: Before determining whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster, the method further includes: Determine whether the target cluster meets the fault domain high availability condition; The determining whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster includes: In the case that the target cluster does not meet the fault domain high availability condition, it is determined whether the target cluster meets the scheduling condition based on the attribute parameters of the target cluster.
7. The node scheduling method according to claim 6, characterized in that: The determining whether the target cluster meets the fault domain high availability condition includes: If, based on the distribution information of each node in the target cluster in the fault domain, it is determined that any master node in the target cluster and at least one other master node are distributed in the same fault domain, or any master node and a slave node corresponding to the any master node are distributed in the same fault domain, it is determined that the target cluster does not meet the fault domain high availability condition; If, based on the distribution information of each node in the target cluster in the fault domain, it is determined that any master node in the target cluster is not in the same fault domain as at least one other master node, and that any master node and the slave node corresponding to the any master node are distributed in different fault domains, then it is determined that the target cluster meets the fault domain high availability condition.
8. A node scheduling device, characterized in that: include: A processing unit, configured to determine a fault domain matrix of a target cluster based on distribution information of each node in the target cluster in a fault domain; wherein each node includes a plurality of master nodes and at least one slave node corresponding to each master node, the fault domain matrix includes a correspondence between each node and a fault domain, and the fault domain matrix includes at least one matrix row, each matrix row corresponds to a master node and at least one slave node corresponding thereto; for each matrix row, elements of the matrix row with preset positions include a node identifier of a master node and a corresponding fault domain identifier, and elements of non-preset positions include a node identifier of a slave node corresponding to the master node and a corresponding fault domain identifier; The processing unit is further used to determine a node switching scheme of the target cluster based on the fault domain matrix and a node scheduling strategy, wherein the node scheduling strategy is used to stipulate that multiple master nodes are not in the same fault domain, and any master node and at least one slave node corresponding to it are not in the same fault domain; The scheduling unit is used to switch the nodes in the target cluster according to the node switching scheme, so that the target cluster after switching meets the fault domain high availability condition.
9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, and the one or more computer programs are executed by the at least one processor to enable the at least one processor to perform the node scheduling method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the node scheduling method according to any one of claims 1 to 7.
