A scheduling method, apparatus, device, and storage medium

By determining the target parameter value and selecting consistent scheduling objects during the master node election process, the problem of poor scheduling performance in the existing scheduled task scheduling framework is solved, unified data processing of target tasks is achieved, version compatibility issues are avoided, and scheduling performance is improved.

CN114691338BActive Publication Date: 2025-11-07BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210361543.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-07
Publication Date
2025-11-07
Estimated Expiration
2042-04-07

AI Technical Summary

Technical Problem

Existing scheduled task frameworks suffer from poor scheduling performance.

Method used

During the master node election process, the target parameter value is determined from the candidate parameter values ​​based on the parameter value weight representation data under the scheduling reference parameters of the target task. The target scheduling object is then selected from the candidate scheduling objects to ensure that its parameter value is consistent under the scheduling reference parameters, and then sharding is performed to execute the target task.

Benefits of technology

This effectively avoids version compatibility issues caused by different data processing methods used in different shards, and improves scheduling performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114691338B_ABST
    Figure CN114691338B_ABST
Patent Text Reader

Abstract

The present disclosure discloses a scheduling method, device, equipment and storage medium, the scheduling method comprises: after triggering the scheduling request for the target task, first electing the master node for the target task; then the master node determines the target parameter value from at least one candidate parameter value of the scheduling reference parameter according to the parameter value weight representation data of the target task under the scheduling reference parameter; then, the master node screens at least one to-be-used scheduling object from at least one candidate scheduling object according to the target parameter value, so that the parameter value of each to-be-used scheduling object under the scheduling reference parameter is the target parameter value; finally, the master node performs fragmentation processing on the to-be-used scheduling object to obtain a fragmentation result, so that the to-be-used scheduling object executes the target task according to the fragmentation result, so that all fragments of the target task are processed according to the same data processing mode, which is beneficial to improve the scheduling effect of the target task.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer, and particularly relates to a scheduling method and device, equipment and storage medium. BACKGROUND

[0002] Timing task scheduling refers to automatically executing a task based on a given time point, a given time interval or a given execution number.

[0003] At present, there are many kinds of timing task scheduling frameworks, each having advantages and disadvantages, and the implementation ideas are also different. However, due to the defects of the existing timing task scheduling framework, the scheduling effect is poor. SUMMARY

[0004] In order to solve the above technical problems, the present disclosure provides a scheduling method, device, equipment and storage medium, which can improve the scheduling effect.

[0005] In order to achieve the above purpose, the technical scheme provided by the embodiments of the present disclosure is as follows:

[0006] The present disclosure provides a scheduling method applied to a master node elected in response to a scheduling request of a target task, and the method comprises:

[0007] According to parameter value weight representation data of the target task under a scheduling reference parameter, a target parameter value is determined from at least one candidate parameter value of the scheduling reference parameter; wherein the parameter value weight representation data is used to represent the use probability of the at least one candidate parameter value;

[0008] According to the target parameter value, at least one to-be-used scheduling object is screened from at least one candidate scheduling object; wherein the parameter value of each to-be-used scheduling object under the scheduling reference parameter is the target parameter value;

[0009] According to the at least one to-be-used scheduling object, the target task is processed by fragmentation to obtain a fragmentation result, so that the at least one to-be-used scheduling object executes the target task according to the fragmentation result.

[0010] In a possible implementation, the at least one to-be-used scheduling object is screened from the at least one candidate scheduling object according to the target parameter value, comprising:

[0011] According to the target parameter value and the registration information of the at least one candidate scheduling object, the at least one to-be-used scheduling object is screened from the at least one candidate scheduling object; wherein the registration information of each candidate scheduling object carries the parameter value of each candidate scheduling object under the scheduling reference parameter.

[0012] In a possible implementation, the determining process of the at least one to-be-used scheduling object comprises:

[0013] extracting, from the registration information of each of the candidate scheduling objects, a parameter value of each of the candidate scheduling objects under the scheduling reference parameter;

[0014] comparing the parameter value of each of the candidate scheduling objects under the scheduling reference parameter with the target parameter value to obtain a comparison result of each of the candidate scheduling objects;

[0015] determining the at least one to-be-used scheduling object according to the comparison result of the at least one candidate scheduling object.

[0016] In a possible implementation, the number of the candidate scheduling objects is N;

[0017] the registration information of the nth candidate scheduling object is determined according to an Internet Protocol (IP) address of the nth candidate scheduling object, a thread number of the nth candidate scheduling object, and a parameter value of the nth candidate scheduling object under the scheduling reference parameter; wherein n is a positive integer, n≤N, and N is a positive integer.

[0018] In a possible implementation, the parameter value of the nth candidate scheduling object under the scheduling reference parameter is obtained from a preset configuration file of the nth candidate scheduling object; wherein the preset configuration file records the parameter value of the nth candidate scheduling object under the scheduling reference parameter.

[0019] In a possible implementation, the preset configuration file is obtained by configuring a preset variable in the preset configuration file by using the parameter value of the nth candidate scheduling object under the scheduling reference parameter after the nth candidate scheduling object is started; wherein the preset variable is used to represent the scheduling reference parameter.

[0020] In a possible implementation, the parameter value weight representation data comprises a use weight of each of the candidate parameter values; wherein the use weight of each of the candidate parameter values is used to represent a use probability of each of the candidate parameter values.

[0021] The determining of the target parameter value from the at least one candidate parameter value of the scheduling reference parameter according to the parameter value weight representation data of the target task under the scheduling reference parameter comprises:

[0022] determining, according to the use weight of each of the candidate parameter values, a data representation range of each of the candidate parameter values from a preset data range;

[0023] According to the preset data range, a random number generation process is performed to obtain a to-be-used random number;

[0024] According to the to-be-used random number and a data representation range of the at least one candidate parameter value, a target parameter value is determined, so that a data representation range of the target parameter value includes the to-be-used random number.

[0025] In a possible implementation, the method further includes:

[0026] An execution result of the at least one to-be-used scheduling object on the target task is obtained.

[0027] When it is determined that the target parameter value matches scheduling requirement description information of the target task, and it is determined that the execution result meets a preset rollback condition, adjusted parameter value weight representation data is obtained by adjusting the parameter value weight representation data, and rollback is performed based on the adjusted parameter value weight representation data. The scheduling requirement description information is used to describe a requirement of the target task under the scheduling reference parameter.

[0028] In a possible implementation, the scheduling reference parameter is determined according to scheduling requirement description information of the target task. The scheduling requirement description information is used to describe a requirement of the target task under the scheduling reference parameter.

[0029] The embodiments of the present disclosure further provide a master node, including:

[0030] A determination unit is configured to determine a target parameter value from at least one candidate parameter value of a scheduling reference parameter according to parameter value weight representation data of the target task under the scheduling reference parameter. The parameter value weight representation data is used to represent a use probability of the at least one candidate parameter value.

[0031] A screening unit is configured to screen at least one to-be-used scheduling object from at least one candidate scheduling object according to the target parameter value. Each to-be-used scheduling object has the target parameter value as a parameter value under the scheduling reference parameter.

[0032] A fragmentation unit is configured to perform fragmentation processing on the target task according to the at least one to-be-used scheduling object, to obtain a fragmentation result, so that the at least one to-be-used scheduling object executes the target task according to the fragmentation result.

[0033] The embodiments of the present disclosure further provide a device including a processor and a memory. The memory is configured to store a computer program. The processor is configured to execute any implementation of the scheduling method provided by the embodiments of the present disclosure according to the computer program.

[0034] The embodiment of the present disclosure further provides a computer readable storage medium for storing a computer program, wherein the computer program is used for executing any implementation manner of the scheduling method provided by the embodiment of the present disclosure.

[0035] The embodiment of the present disclosure further provides a computer program product, which, when running on a terminal device, causes the terminal device to execute any implementation manner of the scheduling method provided by the embodiment of the present disclosure.

[0036] Compared with the prior art, the embodiment of the present disclosure has at least the following advantages:

[0037] In the timing task scheduling framework provided by the embodiment of the present disclosure, after triggering a scheduling request for a target task, a master node is first elected for the target task; then the master node determines a target parameter value (for example, code version 2) from at least one candidate parameter value (for example, code version 1 and code version 2) of a scheduling reference parameter according to parameter value weight representation data (for example, the use weight of code version 1 is 10%, and the use weight of code version 2 is 90%) of the target task under the scheduling reference parameter; then the master node screens at least one to-be-used scheduling object from at least one candidate scheduling object (for example, server 1, server 2, and so on) according to the target parameter value, so that the parameter value of each to-be-used scheduling object under the scheduling reference parameter is the target parameter value; finally, the master node performs sharding processing on the to-be-used scheduling objects to obtain a sharding result, so that the to-be-used scheduling objects execute the target task according to the sharding result.

[0038] It can be seen that, because the parameter value of each to-be-used scheduling object under the scheduling reference parameter is the target parameter value, the parameter values of the to-be-used scheduling objects under the scheduling reference parameter are consistent (for example, the to-be-used scheduling objects have the same code version for the target task), so that the data processing functions of the to-be-used scheduling objects under the scheduling reference parameter for the target task remain consistent, which can effectively ensure that all shards of the target task are processed according to the same data processing mode, thereby effectively avoiding adverse effects (for example, version compatibility problems) caused by different shards of the target task being processed according to different data processing modes, and further effectively improving the scheduling effect for the target task. BRIEF DESCRIPTION OF DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present disclosure, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0040] Figure 1 A working principle schematic diagram of a timing task scheduling framework provided by the embodiments of the present disclosure;

[0041] Figure 2 A registration process schematic diagram of a timing task scheduling framework provided by the embodiments of the present disclosure;

[0042] Figure 3 A scheduling process schematic diagram of a timing task scheduling framework provided by the embodiments of the present disclosure;

[0043] Figure 4 A sharding strategy schematic diagram of a timing task scheduling framework provided by the embodiments of the present disclosure;

[0044] Figure 5 A flowchart of a scheduling method provided by the embodiments of the present disclosure;

[0045] Figure 6 An improved registration process schematic diagram provided by the embodiments of the present disclosure;

[0046] Figure 7 An improved scheduling process schematic diagram provided by the embodiments of the present disclosure;

[0047] Figure 8 An improved sharding strategy schematic diagram provided by the embodiments of the present disclosure;

[0048] Figure 9 A structure schematic diagram of a master node provided by the embodiments of the present disclosure. DETAILED DESCRIPTION

[0049] For the timing task scheduling framework as shown in Figures 1-4 , the timing task scheduling framework has relatively complete functions, and therefore in order to better overcome the technical problems shown in the background art part, the embodiments of the present disclosure improve the timing task scheduling framework as shown in Figures 1-4 , so that the improved scheduling framework (such as the scheduling framework as shown in Figures 5-8 ) adds the gray release capability of unified scheduling according to the scheduling requirements (for example, code version requirements, or server configuration parameter requirements, etc.) of a certain timing task. In order to facilitate understanding of the gray release capability, the following takes the code version as an example for description.

[0050] As an example, in one embodiment of the present disclosure, the gray-scale capability refers to the same timing task, N different versions of code can be gradually switched from the old code to the new code according to the preset proportion, so that the old code can be quickly switched back after encountering problems, and all shards of the timing task are uniformly scheduled new code (or old code) during a scheduling process of the timing task. This can ensure that all shards use the same version of code for processing, thereby effectively avoiding adverse effects (such as version compatibility problems, etc.) caused by different shards of the same timing task using different versions of code for processing, thereby effectively improving the scheduling effect for the timing task.

[0051] In addition, by comparing the scheduling framework shown in Figure 2 , Figure 3 , and Figure 4 with the scheduling framework shown in Figure 6 , Figure 7 , and Figure 8 , it is found that for the improved scheduling framework provided by the embodiment of the present disclosure, the server scheduling process performed by the master node is improved to enable the master node to uniformly schedule the corresponding server (for example, all servers deployed with new code) according to the scheduling requirements (for example, code version requirements, etc.) of a certain timing task.

[0052] In order for those skilled in the art to better understand the present disclosure, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, not all embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present disclosure.

[0053] In order to facilitate the understanding of the scheduling framework provided by the embodiments of the present disclosure, the related content of the scheduling method will be explained in detail below. Referring to Figure 5 , this figure is a flowchart of a scheduling method provided by an embodiment of the present disclosure.

[0054] The scheduling method provided by the embodiments of the present disclosure is applied to the master node elected in response to the scheduling request of the target task, and the scheduling method comprises S1-S3:

[0055] S1: The master node determines a target parameter value from at least one candidate parameter value of a scheduling reference parameter according to parameter value weight representation data of the target task under the scheduling reference parameter.

[0056] In one embodiment of the present disclosure, the target task refers to a timing task that triggers a scheduling request.

[0057] In an embodiment of the present disclosure, the scheduling request is used to request scheduling at least one data processing unit (e.g., a server, a container, or a cluster, etc.) to participate in the execution process of the target task; and the present embodiment of the present disclosure does not limit the receiver of the scheduling request, for example, it can be implemented by using the receiver of the scheduling request involved in any one of the existing or future implemented timing task scheduling frameworks.

[0058] In an embodiment of the present disclosure, the master node refers to the data processing unit for the sharding processing of the target task elected by a plurality of data processing units (e.g., “at least one candidate scheduling object” shown below) after triggering the scheduling request for the target task; and the master node can not only filter the data processing units participating in the execution of the target task (as shown in S2 below), but also complete the sharding processing of the target task (as shown in S3 below).

[0059] In addition, the present embodiment of the present disclosure does not limit the election process of the master node, for example, in an embodiment of the present disclosure, the election process of the master node can be specifically as follows: after receiving the scheduling request for the target task, any one of the existing or future appearing master node election methods used by ElasticJob (e.g., the master node election method shown in Figure 3 and Figure 7 , etc.) is used to implement the master node election process for the target task.

[0060] In an embodiment of the present disclosure, the above-mentioned “scheduling reference parameter” is used to represent the parameter required for reference when scheduling the target task; and the present embodiment of the present disclosure does not limit the “scheduling reference parameter”, in order to facilitate understanding, the following three examples are described.

[0061] For example, in some application scenarios, the above-mentioned “scheduling reference parameter” can be a code version. Wherein, the code version refers to the code version deployed in a data processing unit for the target task, so that the “code version” can represent the data processing function of the data processing unit.

[0062] For another example, in some other application scenarios, the above-mentioned “scheduling reference parameter” can be a device configuration parameter. Wherein, the device configuration parameter refers to the configuration parameter of a data processing unit, so that the “device configuration parameter” can represent the data processing performance of the data processing unit.

[0063] For still another example, in some other application scenarios, the above-mentioned “scheduling reference parameter” can include a code version and a device configuration parameter.

[0064] In addition, the embodiment of the present disclosure does not limit the obtaining manner of the above-mentioned "scheduling reference parameter", for example, the "scheduling reference parameter" can be determined according to the scheduling demand description information of the target task.

[0065] In an embodiment of the present disclosure, the "scheduling demand description information of the target task" is used to describe the scheduling demand of the target task, in particular, the demand of the target task under the scheduling reference parameter; and the embodiment of the present disclosure does not limit the "scheduling demand description information of the target task", for example, the "scheduling demand description information of the target task" can be that a server with a code version 2 is used to participate in the execution process of the target task, so that the "scheduling demand description information of the target task" can represent the demand of the target task on the code version. For another example, the "scheduling demand description information of the target task" can be that a server with a first configuration parameter is used to participate in the execution process of the target task, so that the "scheduling demand description information of the target task" can represent the demand of the target task on the device configuration parameter.

[0066] It can be seen that after obtaining the scheduling demand description information of the target task, the parameter (for example, the code version or the device configuration parameter) referred to in the scheduling process of the target task can be extracted from the scheduling demand description information as the scheduling reference parameter, so that the scheduling reference parameter can represent the parameter required to be referred to when scheduling the target task.

[0067] In an embodiment of the present disclosure, the "at least one candidate parameter value" is used to represent different values of the scheduling reference parameter. For example, when the "scheduling reference parameter" is the code version (version), the "at least one candidate parameter value" can include code version 1 (version 1), code version 2 (version 2), code version 3 (version 3), and so on.

[0068] In addition, the embodiment of the present disclosure does not limit the obtaining process of the above-mentioned "at least one candidate parameter value", for example, in an embodiment of the present disclosure, when the master node elected for the target task can call N candidate scheduling objects, and the "scheduling reference parameter" is the code version, the obtaining process of the "at least one candidate parameter value" can include: performing statistical analysis on the code versions deployed in the N candidate scheduling objects to obtain at least one candidate parameter value of the scheduling reference parameter, so that the "at least one candidate parameter value" can cover the code versions deployed in the N candidate scheduling objects. It should be noted that the related content of the "candidate scheduling object" can be referred to the related content in S2 below.

[0069] In one embodiment of this disclosure, the above-mentioned "parameter value weight characterization data" is used to represent the probability of use of each candidate parameter value of the scheduling reference parameter under the target task, so that the "parameter value weight characterization data" can represent the candidate parameter values ​​that are emphasized when scheduling for the target task.

[0070] Furthermore, this disclosure does not limit the aforementioned "parameter value weight representation data." For example, in one embodiment of this disclosure, when the aforementioned "at least one candidate parameter value" includes M candidate parameter values, the "parameter value weight representation data" may include the usage weights of the M candidate parameter values, so that the usage weight of the m-th candidate parameter value can represent the usage probability of the m-th candidate parameter value under the target task. Here, m is a positive integer, m≤M, and M is a positive integer.

[0071] It should be noted that in some application scenarios, if the "scheduling requirement description information of the target task" indicates that the target task has a requirement of the t-th candidate parameter value under the scheduling reference parameters (e.g., version2), then the usage weight of the t-th candidate parameter value can be directly set to 1, and the usage weights of other candidate parameter values ​​can be set to 0. In other application scenarios, if the "scheduling requirement description information of the target task" indicates that the target task has a requirement of the t-th candidate parameter value under the scheduling reference parameters (e.g., version2), then in order to mitigate losses more promptly, the usage weight of the t-th candidate parameter value can be directly set to a large value (e.g., 90%), and the usage weights of all other candidate parameter values ​​can be set to small values. This allows for timely detection of problems when comparing the execution results corresponding to different candidate parameter values, thus enabling timely loss mitigation and improving loss mitigation efficiency.

[0072] Furthermore, the embodiments of this disclosure do not limit the method of obtaining the above-mentioned "parameter value weight representation data". For example, in one embodiment of this disclosure, the "parameter value weight representation data" can be obtained through a manually set method. As another example, in another embodiment of this disclosure, such as... Figure 7 As shown, the aforementioned "parameter value weight representation data" can be read from the preset storage space of the dynamic configuration center. The dynamic configuration center is used to pre-store information required for the scheduled task scheduling process (e.g., the weights of each candidate parameter value for the scheduling reference parameters).

[0073] In an embodiment of the present disclosure, the above-mentioned "target parameter value" refers to a candidate parameter value selected for a target task under a scheduling reference parameter, so that the "target parameter value" can represent a parameter value required for reference when scheduling the target task. For example, when the above-mentioned "scheduling reference parameter" is a code version, the target parameter value can be code version 2, so that the master node can call all data processing units deployed with code version 2 to execute the target task.

[0074] In an embodiment of the present disclosure, the selection process of the above-mentioned "target parameter value" is generally implemented according to all usage weights recorded in the above-mentioned "parameter value weight representation data", so that the probability of being selected for the "target parameter value" conforms to the usage probability represented by the usage weight of the "target parameter value".

[0075] In addition, the embodiments of the present disclosure do not limit the determination process of the above-mentioned "target parameter value". For example, in an embodiment of the present disclosure, the determination process of the "target parameter value" can be implemented by using any one of the possible implementation manners of selecting a target parameter value shown below.

[0076] Based on the related content of S1, for the target task, after triggering the mobilization request for the target task, the master node for the target task can be first elected from a large number of data processing units (for example, "at least one candidate scheduling object" shown in S2 below); then after the master node obtains the parameter value weight representation data of the target task under the scheduling reference parameter, the master node determines the target parameter value from at least one candidate parameter value of the scheduling reference parameter according to the parameter value weight representation data, so that the subsequent scheduling process for the target task can be implemented by the master node based on the target parameter value.

[0077] S2: The master node selects at least one to-be-used scheduling object from at least one candidate scheduling object according to the target parameter value. Each to-be-used scheduling object has a parameter value under the scheduling reference parameter, and the parameter value is the target parameter value.

[0078] In an embodiment of the present disclosure, the candidate scheduling object is used to represent a data processing unit capable of participating in the scheduling process of the target task (that is, a data processing unit that can be scheduled by the master node for the target task); and the embodiments of the present disclosure do not limit the candidate scheduling object, which can be a server, a container, or a cluster, etc. It can be seen that the candidate scheduling object is deployed with an execution code for implementing the target task.

[0079] In addition, the embodiments of the present disclosure do not limit the association relationship between the above-mentioned "at least one candidate scheduling object", for example, in an embodiment of the present disclosure, the "at least one candidate scheduling object" belongs to the same cluster. For another example, in some application scenarios, the above-mentioned "at least one candidate scheduling object" can also belong to different clusters.

[0080] In an embodiment of the present disclosure, the above-mentioned "to-be-used scheduling object" is used to represent a data processing unit selected by the master node to participate in the execution process of the target task; and the parameter value of the "to-be-used scheduling object" under the scheduling reference parameter is the target parameter value.

[0081] In addition, the embodiments of the present disclosure do not limit the screening process of the above-mentioned "to-be-used scheduling object", for example, in an embodiment of the present disclosure, the screening process of the "to-be-used scheduling object" can be specifically: judging whether the parameter value of the nth candidate scheduling object under the scheduling reference parameter is the target parameter value, if yes, the nth candidate scheduling object is determined as the to-be-used scheduling object; if not, the nth candidate scheduling object is discarded. Wherein, n is a positive integer, n≤N, N represents the number of candidate scheduling objects.

[0082] In addition, the embodiments of the present disclosure do not limit the implementation of S2, for example, in an embodiment of the present disclosure, S2 can be implemented by using any of the implementation of S2 shown below.

[0083] Based on the above-mentioned related content of S2, for the master node elected for the target task, after the master node obtains the target parameter value, the master node can refer to the target parameter value to screen at least one to-be-used scheduling object from a large number of candidate scheduling objects, so that the parameter values of these to-be-used scheduling objects under the scheduling reference parameter are all target parameter values, thereby making these to-be-used scheduling objects consistent in the data processing manner for the target task.

[0084] S3: The master node performs sharding processing on the target task according to the at least one to-be-used scheduling object, to obtain a sharding result, so that the at least one to-be-used scheduling object executes the target task according to the sharding result.

[0085] In an embodiment of the present disclosure, the "sharding result" is used to represent which task shard of the target task is executed by which to-be-used scheduling object. In order to facilitate understanding, the following is described in conjunction with an example.

[0086] As an example, when the master node divides the target task into G task shards, and the number of to-be-used scheduling objects is D, the above-mentioned "sharding result" can be specifically: dividing g1 task shards of the target task to the first to-be-used scheduling object, so that the first to-be-used scheduling object can subsequently execute the g1 task shards; dividing g2 task shards of the target task to the second to-be-used scheduling object, so that the second to-be-used scheduling object can subsequently execute the g2 task shards; and so on; dividing gD task shards of the target task to the Dth to-be-used scheduling object, so that the Dth to-be-used scheduling object can subsequently execute the gD task shards. Wherein, g1 is a positive integer; g2 is a positive integer; …; gD is a positive integer; and g1+g2+…+gD=G, G is a positive integer, and D is a positive integer. D D D D

[0087] Based on the above-mentioned related content of S1 to S3, it can be seen that for the scheduling method applied to the master node elected for the target task provided by the embodiments of the present disclosure, first, the master node determines the target parameter value (for example, code version 2) from at least one candidate parameter value (for example, code version 1 and code version 2) of the scheduling reference parameter according to the parameter value weight representation data (for example, the use weight of code version 1 is 10%, the use weight of code version 2 is 90%, etc.) of the target task under the scheduling reference parameter; then, the master node screens at least one to-be-used scheduling object from at least one candidate scheduling object (for example, server 1, server 2, …, etc.) according to the target parameter value, so that the parameter value of each to-be-used scheduling object under the scheduling reference parameter is the target parameter value; finally, the master node performs sharding processing on the to-be-used scheduling objects to obtain a sharding result, so that the to-be-used scheduling objects execute the target task according to the sharding result.

[0088] It can be seen that because the parameter value of each to-be-used scheduling object under the scheduling reference parameter is the target parameter value, the parameter value of the to-be-used scheduling object under the scheduling reference parameter is consistent (for example, the to-be-used scheduling object has the same code version for the target task), so that the data processing function of the to-be-used scheduling object under the scheduling reference parameter for the target task remains consistent, which can effectively ensure that all shards of the target task are processed according to the same data processing mode, thereby effectively avoiding the adverse effects (for example, version compatibility problems) caused by different shards of the target task being processed according to different data processing modes, and further effectively improving the scheduling effect for the target task.

[0089] ​​​​In addition, in order to better ensure that the selected probability of the target parameter value is more consistent with the use probability represented by the use weight of the target parameter value, the embodiment of the present disclosure further provides a possible implementation of S1 (i.e., screening the target parameter value) above, in which when the "parameter value weight representation data of the target task under the scheduling reference parameter" includes the use weight of at least one candidate parameter value, S1 can specifically include S11-S13:

[0090] S11: determining the data representation range of each candidate parameter value from the preset data range according to the use weight of each candidate parameter value.

[0091] In an embodiment of the present disclosure, the use weight of the mth candidate parameter value is used to represent the use probability of the mth candidate parameter value under the target task. m is a positive integer, m≤M, M is a positive integer, and M represents the number of candidate parameter values.

[0092] In an embodiment of the present disclosure, the preset data range is used to represent a data mapping range; and the present embodiment does not limit the preset data range, for example, it can be the range of [0, 1].

[0093] In an embodiment of the present disclosure, the data representation range of the mth candidate parameter value is used to represent the mapping area occupied by the mth candidate parameter value in the preset data range; and the mapping area is proportional to the use weight of the mth candidate parameter value. Wherein, m is a positive integer, m≤M, M is a positive integer, and M represents the number of candidate parameter values.

[0094] It can be seen that for the mth candidate parameter value of the scheduling reference parameter, if the use weight of the mth candidate parameter value recorded in the "parameter value weight representation data of the target task under the scheduling reference parameter" is larger, the mapping area occupied by the mth candidate parameter value in the preset data range is also larger, so that the data representation range of the mth candidate parameter value is wider; but if the use weight of the mth candidate parameter value recorded in the "parameter value weight representation data of the target task under the scheduling reference parameter" is smaller, the mapping area occupied by the mth candidate parameter value in the preset data range is also smaller, so that the data representation range of the mth candidate parameter value is narrower.

[0095] It should be noted that in an embodiment of the present disclosure, there is no intersection between the data representation ranges of different candidate parameter values. That is, the intersection between the data representation range of the mth candidate parameter value and the data representation range of the jth candidate parameter value is an empty set. Wherein, m≠j, j∈{1, 2, 3, …, M}.

[0096] In addition, the embodiment of the present disclosure does not limit the implementation of S11, and the following is described in combination with examples for ease of understanding.

[0097] As an example, when the above-mentioned "scheduling reference parameter" is a code version, the above-mentioned "at least one candidate parameter value" includes a code version 1 (version 1) and a code version 2 (version 2), the above-mentioned "parameter value weight representation data of the target task under the scheduling reference parameter" includes (usage weight of version 1, 10%) and (usage weight of version 2, 90%), and the preset data range is [0, 1], S11 can be specifically: determining [0, 0.1] as the data representation range of version 1, and determining (0.1, 1] as the data representation range of version 2.

[0098] Based on the related content of the above-mentioned S11, after obtaining the parameter value weight representation data of the target task under the scheduling reference parameter, the preset data range can be mapped and divided according to the usage weight of each candidate parameter value recorded in the parameter value weight representation data, to obtain the data representation range of each candidate parameter value, so that the data representation range of each candidate parameter value can represent the mapping area occupied by each candidate parameter value in the preset data range, so that the data representation range of each candidate parameter value can represent the usage probability of each candidate parameter value under the target task.

[0099] S12: Perform random number generation processing according to the preset data range to obtain a to-be-used random number.

[0100] In an embodiment of the present disclosure, the to-be-used random number refers to a value randomly selected in the preset data range for the target task; and the to-be-used random number belongs to the preset data range.

[0101] In addition, the embodiment of the present disclosure does not limit the determination process of the above-mentioned "to-be-used random number", for example, in an embodiment of the present disclosure, the determination process of the "to-be-used random number" can be implemented by using any existing or future random number generation method.

[0102] It should be noted that the embodiment of the present disclosure does not limit the execution order between S11 and S12, for example, S11 and S12 can be executed in sequence, S12 and S11 can be executed in sequence, or S11 and S12 can be executed simultaneously.

[0103] S13: Determine the target parameter value according to the to-be-used random number and the data representation range of the at least one candidate parameter value, so that the data representation range of the target parameter value includes the to-be-used random number.

[0104] In one embodiment of the present disclosure, for the random number to be used, it can be judged whether the random number to be used is located within the data representation range of the mth candidate parameter value, if yes, the mth candidate parameter value is determined as the target parameter value; if no, the mth candidate parameter value is discarded. Wherein, m is a positive integer, m≤M, M is a positive integer, and M represents the number of candidate parameter values.

[0105] Based on the above related content of S11 to S13, after obtaining the parameter value weight representation data of the target task under the scheduling reference parameter, each candidate parameter value can be mapped to a preset data range according to the use weight of each candidate parameter value recorded in the parameter value weight representation data, so as to obtain the data representation range of each candidate parameter value, so that after obtaining the random number to be used, the random number to be used is compared with the data representation range of each candidate parameter value, and the target parameter value is obtained, so that the data representation range of the target parameter value includes the random number to be used. In this way, the purpose of screening the target parameter value according to the use weight of the candidate parameter value can be achieved, thereby facilitating the realization of gradually switching the gray scale scheduling ability from one candidate parameter value to another candidate parameter value according to the proportion.

[0106] In fact, in some cases, the parameter value of the candidate scheduling object under the scheduling reference parameter is usually difficult to obtain.

[0107] In order to overcome the above difficulties, another possible implementation of S2 is also provided in the embodiments of the present disclosure. In this implementation, when the registration information of each candidate scheduling object carries the parameter value of each candidate scheduling object under the scheduling reference parameter, S2 can specifically include: the master node screens at least one to-be-used scheduling object from at least one candidate scheduling object according to the target parameter value and the registration information of the at least one candidate scheduling object.

[0108] In one embodiment of the present disclosure, the registration information of the nth candidate scheduling object is used to uniquely identify the nth candidate scheduling object; and the registration information of the nth candidate scheduling object carries the parameter value of the nth candidate scheduling object under the scheduling reference parameter.

[0109] In addition, the embodiments of the present disclosure do not limit the above-mentioned registration information of the nth candidate scheduling object. For example, in one embodiment of the present disclosure, the registration information of the nth candidate scheduling object can include the Internet Protocol Address (IP address) of the nth candidate scheduling object, the thread number of the nth candidate scheduling object, and the parameter value of the nth candidate scheduling object under the scheduling reference parameter.

[0110] Furthermore, the embodiments of this disclosure do not limit the representation of the above-mentioned "registration information of the nth candidate scheduling object". For example, in one embodiment of this disclosure, when the IP address of the nth candidate scheduling object is 10.10.10.01, the thread number of the nth candidate scheduling object is 123, the scheduling reference parameter is a version number, and the parameter value of the nth candidate scheduling object under the scheduling reference parameter is version1, the "registration information of the nth candidate scheduling object" can be represented as 10.10.10.01_123_version1 (e.g., Figure 6 (The "Registration Server A Information" shown).

[0111] In one embodiment of this disclosure, the aforementioned "registration information of the nth candidate scheduling object" is usually generated after the nth candidate scheduling object is started, and the "registration information of the nth candidate scheduling object" can be determined based on the IP address of the nth candidate scheduling object, the thread number of the nth candidate scheduling object, and the parameter value of the nth candidate scheduling object under the scheduling reference parameters.

[0112] It should be noted that the embodiments of this disclosure do not limit the generation process of the "registration information of the nth candidate scheduling object". For example, in one embodiment of this disclosure, the generation process of the "registration information of the nth candidate scheduling object" can be similar to... Figure 6 The process of generating the "Registration Server A Information" shown will not be described in detail here for the sake of brevity.

[0113] In one embodiment of this disclosure, before the master node executes the above-mentioned process of generating the "registration information of the nth candidate scheduling object", the master node needs to obtain three pieces of information: the IP address of the nth candidate scheduling object, the thread number of the nth candidate scheduling object, and the parameter value of the nth candidate scheduling object under the scheduling reference parameters.

[0114] In this embodiment, the process of obtaining the "IP address of the nth candidate scheduling object" is not limited. For example, in one embodiment of this disclosure, the process of obtaining the "IP address of the nth candidate scheduling object" can adopt any existing or future IP address acquisition method (e.g., Figure 2 or Figure 6 The method for obtaining the IP address "10.10.10.01" shown is implemented.

[0115] Furthermore, the embodiments of this disclosure are not limited to the process of obtaining the "thread number of the nth candidate scheduling object". For example, in one embodiment of this disclosure, the process of obtaining the "thread number of the nth candidate scheduling object" can adopt any existing or future thread number acquisition method (e.g.,Figure 2 Or Figure 6 The thread number "123" is obtained as shown in the figure) is implemented.

[0116] In addition, the embodiment of the present disclosure further provides a possible implementation manner of obtaining the parameter value of the nth candidate scheduling object under the scheduling reference parameter (as shown in the figure, the version number "version1" is obtained), which can specifically include steps 11-12: Figure 6

[0117] Step 11: After the nth candidate scheduling object is started, the preset variable in the preset configuration file of the nth candidate scheduling object is configured by using the parameter value of the nth candidate scheduling object under the scheduling reference parameter, to obtain the preset configuration file of the nth candidate scheduling object.

[0118] In an embodiment of the present disclosure, the preset variable can be preset, for example, when the "scheduling reference parameter" is the code version, the preset variable can be the "version" variable.

[0119] It can be seen that if the "scheduling reference parameter" is the code version, after the nth candidate scheduling object is started, the "version" variable in the preset configuration file of the nth candidate scheduling object is configured by using the code version number possessed by the nth candidate scheduling object, to obtain the preset configuration file of the nth candidate scheduling object, so that the preset configuration file records the information of version = xxx. Wherein, "XXX" is used to represent the code version number possessed by the nth candidate scheduling object.

[0120] In an embodiment of the present disclosure, the "preset configuration file of the nth candidate scheduling object" is used to record some configuration information (for example, configuration information for environment variables, configuration information for preset variables, etc.) possessed by the nth candidate scheduling object; and the embodiment of the present disclosure does not limit the "preset configuration file of the nth candidate scheduling object", for example, in an embodiment of the present disclosure, the "preset configuration file of the nth candidate scheduling object" can be a *. bash file.

[0121] In addition, the embodiment of the present disclosure does not limit the information recorded in the "preset configuration file of the nth candidate scheduling object", for example, in an embodiment of the present disclosure, the "preset configuration file of the nth candidate scheduling object" can include not only the configuration information of the preset variable, but also the configuration information of some other variables (for example, environment variables).

[0122] ​Based on the above step 11, after the nth candidate scheduling object is started, the parameter value of the nth candidate scheduling object under the scheduling reference parameter can be used to configure the preset variable in the preset configuration file of the nth candidate scheduling object, so as to obtain the preset configuration file of the nth candidate scheduling object, so that the preset configuration file records the parameter value of the nth candidate scheduling object under the scheduling reference parameter, so that the nth candidate scheduling object can read the parameter value of the nth candidate scheduling object under the scheduling reference parameter from the preset configuration file.

[0123] Step 12: Obtain the parameter value of the nth candidate scheduling object under the scheduling reference parameter from the preset configuration file of the nth candidate scheduling object.

[0124] In an embodiment of the present disclosure, if the nth candidate scheduling object wants to generate the registration information of the nth candidate scheduling object, the nth candidate scheduling object can first read the parameter value of the nth candidate scheduling object under the scheduling reference parameter from the preset configuration file of the nth candidate scheduling object (such as the reading process of the version number “version1” shown in the figure), so that the registration information of the nth candidate scheduling object can be generated by using the parameter value of the nth candidate scheduling object under the scheduling reference parameter. Figure 6

[0125] Based on the above step 11 to step 12, after the nth candidate scheduling object is started, the parameter value of the nth candidate scheduling object under the scheduling reference parameter can be added to the preset configuration file of the nth candidate scheduling object as the configuration information of the preset variable; then the parameter value of the nth candidate scheduling object under the scheduling reference parameter recorded in the preset configuration file is used to participate in the generation process of the registration information of the nth candidate scheduling object, so as to obtain the registration information of the nth candidate scheduling object, so that the registration information of the nth candidate scheduling object can carry the parameter value of the nth candidate scheduling object under the scheduling reference parameter.

[0126] ​Based on the above-mentioned related content of the registration information of the nth candidate scheduling object, it can be seen that the registration information of the nth candidate scheduling object carries the parameter value of the nth candidate scheduling object under the scheduling reference parameter, so that the master node can quickly know the parameter value of the nth candidate scheduling object under the scheduling reference parameter from the registration information of the nth candidate scheduling object. It can be seen that because the master node can easily obtain the above-mentioned registration information of the nth candidate scheduling object, the master node can also easily obtain the parameter value of the nth candidate scheduling object under the scheduling reference parameter carried by the registration information of the nth candidate scheduling object. In this way, the above-mentioned defect of difficulty in obtaining the parameter value of the nth candidate scheduling object under the scheduling reference parameter can be overcome, thereby facilitating to improve the scheduling efficiency for the target task.

[0127] In order to better understand another possible implementation of S2, the following is described in conjunction with an example.

[0128] As an example, S2 can specifically include S21-S23:

[0129] S21: Extracting the parameter value of each candidate scheduling object under the scheduling reference parameter from the registration information of each candidate scheduling object.

[0130] In an embodiment of the present disclosure, after obtaining the registration information of the nth candidate scheduling object, the parameter value of the nth candidate scheduling object under the scheduling reference parameter can be extracted from the registration information of the nth candidate scheduling object. Wherein, n is a positive integer, n≤N, N is a positive integer, and N represents the number of candidate scheduling objects.

[0131] S22: Comparing the parameter value of each candidate scheduling object under the scheduling reference parameter with the target parameter value to obtain the comparison result of each candidate scheduling object.

[0132] In an embodiment of the present disclosure, the comparison result of the nth candidate scheduling object is used to represent whether the parameter value of the nth candidate scheduling object under the scheduling reference parameter is equal to the target parameter value. Wherein, n is a positive integer, n≤N, N is a positive integer, and N represents the number of candidate scheduling objects.

[0133] It can be seen that after obtaining the parameter value of the nth candidate scheduling object under the scheduling reference parameter, the parameter value of the nth candidate scheduling object under the scheduling reference parameter can be compared with the target parameter value to obtain the comparison result of the nth candidate scheduling object, so that the comparison result can represent whether the parameter value of the nth candidate scheduling object under the scheduling reference parameter is equal to the target parameter value.

[0134] S23: determining at least one to-be-used scheduling object according to the comparison result of the at least one candidate scheduling object.

[0135] In an embodiment of the present disclosure, after obtaining the comparison result of the nth candidate scheduling object, if the comparison result indicates that the parameter value of the nth candidate scheduling object under the scheduling reference parameter is equal to the target parameter value, the nth candidate scheduling object can be directly determined as the to-be-used scheduling object; however, if the comparison result indicates that the parameter value of the nth candidate scheduling object under the scheduling reference parameter is not equal to the target parameter value, the nth candidate scheduling object can be directly discarded.

[0136] Based on the related content of another possible implementation manner of S2, for the master node elected for the target task, after obtaining the target parameter value, the master node can filter at least one to-be-used scheduling object by comparing the registration information of each candidate scheduling object with the target parameter value, so that the parameter value of each to-be-used scheduling object under the scheduling reference parameter is the target parameter value, thereby achieving the purpose of filtering the to-be-used scheduling object with the target parameter value from a large number of candidate scheduling objects.

[0137] It can be seen that, because the master node can easily obtain the registration information of each candidate scheduling object, the master node can also easily obtain the parameter value of each candidate scheduling object under the scheduling reference parameter carried by the registration information of each candidate scheduling object, thereby overcoming the defect of difficulty in obtaining the parameter value of the candidate scheduling object under the scheduling reference parameter, and thus facilitating improvement of the scheduling efficiency for the target task.

[0138] In fact, in order to improve the rollback efficiency, the present disclosure also provides another possible implementation manner of the scheduling method, in which the scheduling method not only includes S1-S3, but also includes S4-S6.

[0139] S4: The master node obtains the execution result of at least one to-be-used scheduling object on the target task.

[0140] In an embodiment of the present disclosure, the execution result is used to record the completion of the at least one to-be-used scheduling object on the target task (for example, whether the target task is correctly completed), so that the execution result can indicate whether the execution ability of the at least one to-be-used scheduling object on the target task reaches the expected target.

[0141] S5: When it is determined that the target parameter value matches the scheduling requirement description information of the target task, and it is determined that the execution result satisfies the preset rollback condition, the master node adjusts the parameter value weight representation data of the target task under the scheduling reference parameter to obtain adjusted parameter value weight representation data.

[0142] In an embodiment of the present disclosure, the "target parameter value matches the scheduling requirement description information of the target task" means that the target parameter value meets the requirement of the target task on the code version. For example, when the "scheduling requirement description information of the target task" is to participate in the execution process of the target task by using a server with code version 2 (version 2), the "target parameter value" is version 2, and the "scheduling reference parameter" is the code version, it can be determined that the target parameter value (that is, version 2) matches the scheduling requirement description information of the target task.

[0143] In an embodiment of the present disclosure, the preset rollback condition can be preset, for example, the "execution result" means that at least one to-be-used scheduling object cannot correctly complete the target task (that is, the execution capability of the "at least one to-be-used scheduling object" for the target task does not meet the expected target).

[0144] In an embodiment of the present disclosure, the "adjusted parameter value weight representation data" refers to the result obtained by adjusting the "parameter value weight representation data of the target task under the scheduling reference parameter", so that the "adjusted parameter value weight representation data" can represent the candidate parameter value focused on when the rollback processing is performed.

[0145] In addition, the embodiment of the present disclosure does not limit the "adjusted parameter value weight representation data", for example, when the "parameter value weight representation data of the target task under the scheduling reference parameter" includes (the use weight of version 1, 10%), and (the use weight of version 2, 90%), the "adjusted parameter value weight representation data" can include (the use weight of version 1, 100%), and (the use weight of version 2, 0), so that the "adjusted parameter value weight representation data" focuses more on version 1, so that the "adjusted parameter value weight representation data" can be used to realize the purpose of rolling back to code version 1.

[0146] In addition, the embodiment of the present disclosure does not limit the process of obtaining the "adjusted parameter value weight representation data", in order to facilitate understanding, the following will be described in combination with two cases.

[0147] Case 1: In some application scenarios, the "parameter value weight representation data of the target task under the scheduling reference parameter" can be manually adjusted.

[0148] Based on this, the embodiment of the present disclosure provides a possible implementation of S5, which can specifically include steps 21-22:

[0149] Step 21: When it is determined that the target parameter value matches the scheduling requirement description information of the target task, and it is determined that the execution result satisfies the preset rollback condition, the master node generates and sends a rollback prompt information, so that the user can receive the rollback prompt information.

[0150] In an embodiment of the present disclosure, the rollback prompt information is used to prompt the user that the rollback can be realized by manually adjusting the parameter value weight representation data, so that the user can know from the rollback prompt information that the target task realized based on the target parameter value cannot achieve the expected target, and know that the rollback can be realized by manually adjusting the parameter value weight representation data.

[0151] In addition, the embodiment of the present disclosure does not limit the above-mentioned receiving manner of the user to the rollback prompt information. For example, in an embodiment of the present disclosure, the above-mentioned receiving manner of the user to the rollback prompt information can be specifically that the master node directly sends the rollback prompt information to the user according to a preset communication manner (for example, short message, email, etc.). For another example, it can also be that the master node sends the rollback prompt information to a display device, so that the user can receive (for example, see and / or hear) the rollback prompt information from the display device.

[0152] In addition, the embodiment of the present disclosure does not limit the above-mentioned “user”, for example, in an embodiment of the present disclosure, the “user” can be personnel (for example, programming personnel, testing personnel, etc.) related to the timing task scheduling processing.

[0153] Step 22: After the master node obtains the weight update description information provided by the user, the master node adjusts the parameter value weight representation data of the target task under the scheduling reference parameter according to the weight update description information, to obtain adjusted parameter value weight representation data.

[0154] In an embodiment of the present disclosure, the weight update description information is used to describe the manual adjustment result of the user to the adjusted parameter value weight representation data.

[0155] In addition, the embodiment of the present disclosure does not limit the above-mentioned “weight update description information”, for example, in an embodiment of the present disclosure, the “weight update description information” can include (the use weight of version 1, 100%), and (the use weight of version 2, 0). For another example, the weight update description information can also include: increase the use weight of version 1 by 90%, and decrease the use weight of version 2 by 90%.

[0156] In addition, the embodiments of the present disclosure do not limit the providing manner of the user for the above-mentioned "weight update description information", for example, in an embodiment of the present disclosure, the providing manner of the "weight update description information" can be implemented by means of any input device capable of data communication with the master node (for example, a keyboard, a mouse, a scanning device, an image acquisition device, etc.).

[0157] Based on the above-mentioned related content of steps 21 to 22, when the master node determines that the target parameter value matches the scheduling requirement description information of the target task and determines that the execution result satisfies the preset rollback condition, the master node can determine that the target task implemented based on the target parameter value cannot achieve the expected target, so it can be determined that rollback processing needs to be performed, and therefore the master node can first send a rollback prompt information to the user, so that after the user provides the weight update description information to the master node in response to the rollback prompt information, the master node adjusts the "parameter value weight representation data of the target task under the scheduling reference parameter" based on the weight update description information to obtain adjusted parameter value weight representation data, so that the "adjusted parameter value weight representation data" conforms to the weight update description information, which is beneficial to improve the control accuracy of the user for the scheduling of the timing task.

[0158] Case 2, in some application scenarios, the master node can automatically adjust the "parameter value weight representation data of the target task under the scheduling reference parameter".

[0159] Based on this, the embodiments of the present disclosure provide another possible implementation manner of S5, which can specifically include steps 31-32:

[0160] Step 31: When it is determined that the target parameter value matches the scheduling requirement description information of the target task and it is determined that the execution result satisfies the preset rollback condition, the master node acquires the weight adjustment rule corresponding to the preset rollback condition.

[0161] In an embodiment of the present disclosure, the "weight adjustment rule corresponding to the preset rollback condition" is used to adjust at least one usage weight recorded in the above-mentioned "parameter value weight representation data of the target task under the scheduling reference parameter", and the "weight adjustment rule corresponding to the preset rollback condition" can be preset.

[0162] In addition, the embodiments of the present disclosure do not limit the above-mentioned "weight adjustment rule corresponding to the preset rollback condition", for example, when the "scheduling reference parameter" is a code version, the "weight adjustment rule corresponding to the preset rollback condition" can be: increasing the usage weight of the low code version (for example, version 1) by a first proportion and reducing the usage weight of the high code version (for example, version 2) by a second proportion.

[0163] Further, the embodiment of the present disclosure does not limit the obtaining manner of the preset rollback condition corresponding weight adjustment rule by the master node, for example, in an embodiment of the present disclosure, the obtaining manner of the preset rollback condition corresponding weight adjustment rule can be specifically: the master node can read the preset rollback condition corresponding weight adjustment rule from the preset storage space of the master node according to a preset storage location. For another example, the master node can request the preset rollback condition corresponding weight adjustment rule from other devices (for example, a server, a storage device, or a terminal device, etc.).

[0164] Step 32: The master node adjusts the parameter value weight representation data of the target task under the scheduling reference parameter according to the preset rollback condition corresponding weight adjustment rule, to obtain adjusted parameter value weight representation data.

[0165] Based on the related content of steps 31 to 32, when the master node determines that the target parameter value matches the scheduling demand description information of the target task, and determines that the execution result satisfies the preset rollback condition, the master node can determine that the target task implemented based on the target parameter value cannot achieve the expected target, and thus can determine that rollback processing is needed, so the master node can first obtain the weight adjustment rule corresponding to the preset rollback condition; and then adjusts the parameter value weight representation data of the target task under the scheduling reference parameter according to the weight adjustment rule, to obtain adjusted parameter value weight representation data, so that the adjusted parameter value weight representation data meets the weight adjustment rule, which can realize the purpose of automatically adjusting the parameter value weight representation data by the master node, thereby facilitating to improve the rollback efficiency.

[0166] Based on the related content of the above S5, when the master node determines that the target parameter value matches the scheduling demand description information of the target task, and determines that the execution result satisfies the preset rollback condition, the master node can determine that rollback processing is needed, so the master node can adjust the parameter value weight representation data of the target task under the scheduling reference parameter to obtain adjusted parameter value weight representation data, so that the adjusted parameter value weight representation data can represent the candidate parameter value focused on when the rollback processing is performed.

[0167] S6: Rolling back based on the adjusted parameter value weight representation data.

[0168] In an embodiment of the present disclosure, after obtaining the adjusted parameter value weight representation data, the scheduling process for the target task can be re-executed (for example, the scheduling process for the target task is re-executed according to the adjusted parameter value weight representation data, or the scheduling process for the target task is re-executed according to the adjusted parameter value weight representation data, etc.) according to the adjusted parameter value weight representation data, to realize the rollback. Figure 7

[0169] ​Based on the related content of S4 to S6, it can be known that after at least one to-be-used scheduling object completes the execution of the target task, the master node can first acquire the execution result of the target task by the to-be-used scheduling object; and when it is determined that the target parameter value matches the scheduling requirement description information of the target task, and the execution result meets the preset rollback condition, the master node adjusts the parameter value weight representation data of the target task under the scheduling reference parameter to obtain adjusted parameter value weight representation data, so that the adjusted parameter value weight representation data can represent the candidate parameter value focused on during the rollback processing, so that the master node can implement rollback based on the adjusted parameter value weight representation data, so that fast rollback can be implemented, thereby facilitating to improve the rollback efficiency.

[0170] In order to better understand the scheduling method provided by the embodiments of the present disclosure, the implementation of the scheduling framework of the present disclosure is specifically introduced as follows.

[0171] In an embodiment of the present disclosure, the following improvements are made to the original registration process shown in Figure 2 and the improved registration process shown in Figure 6 It can be known from the comparison of the original registration process shown in

[0172] For any server, after the server is started, the version = xxx can be set in the record file of the environment variable. That is, a string version = 1 / 2 / 3 is written into a configuration file (for example, a *.bash file) of the server.

[0173] For any server, when generating the registration information of the server, not only the IP address and thread number of the server are used, but also the code version number obtained from the record file of the environment variable is used, so that the registration information of the server can carry the code version number of the server, so that the master node can determine whether to call the server to participate in the execution process of the target task based on the registration information of the server.

[0174] In another embodiment of the present disclosure, the following improvements are made to the original scheduling process shown in Figure 3 and the improved scheduling process shown in Figure 7 It can be known from the comparison of the original scheduling process shown in

[0175] After triggering the timing task scheduling request each time, instead of inquiring whether re-sharding is needed, the sharding process can be directly entered. That is, sharding is needed each time the scheduling is performed.

[0176] After the master node is elected for a task (e.g., the above "target task"), the master node can first obtain the version weight of the task (e.g., (version1, 10%), and (version2, 90%) and the like) from the dynamic configuration center, then perform random number determination processing according to the version weight to obtain the code version (e.g., version2) required for the current execution, then filter out all servers of the "code version required for the current execution" (e.g., 10.12.221.15_123_version2, 10.12.221.18_123_version2 and the like ending with_version2), and finally perform random sharding on the filtered servers to make the filtered servers execute the task according to the sharding result (e.g., after dividing the task into three shards, two shards are executed on 10.12.221.15_123_version2, and one shard is executed on 10.12.221.18_123_version2), so that only the servers of the "code version required for the current execution" are used in the current scheduling process of the task. That is, only the servers ending with_version2 are used in the current scheduling process of the task, and the servers ending with_version1 are not used, so that all shards of the task are processed using the same version of code.

[0177] In another embodiment of the present disclosure, by comparing the sharding strategy shown in Figure 4 with the improved sharding strategy shown in Figure 8 It can be seen that the present disclosure improves the sharding strategy as follows:

[0178] When sharding a task, the master node randomly allocates all shards to multiple servers with the current selected code version (e.g., version2), so that these servers with the current selected code version (e.g., version2) can complete the task, thereby effectively avoiding different shards of the task using different versions of code for processing, and further avoiding the adverse effects caused by mixing new and old versions of code, so as to improve the effect of the timing task call.

[0179] Based on the above three embodiments, it can be seen that the improved scheduling framework provided by the present disclosure (i.e., the improved scheduling framework shown in Figures 6-8In terms of the scheduling framework shown, the dynamic configuration center is combined with the timing task framework to implement a configured proportional scheduling, so that the timing task scheduling process under the scheduling framework has the ability to schedule according to the code version gray scale, thereby enabling the scheduling framework to support better gray scale verification and rapid rollback, which is conducive to improving the stability online and timely stop loss in case of problems. In addition, the improved scheduling framework changes the source code of the timing task framework and the main flow sharding strategy to ensure that different shards are scheduled to the same code in a scheduling process for a task, which can avoid compatibility problems caused by different shards being scheduled to different codes in a scheduling process for a task, thereby effectively avoiding online accidents.

[0180] Based on the scheduling method provided in the above method embodiment, the disclosure embodiment further provides a scheduling device, which is explained and described below in conjunction with the drawings. It should be noted that the technical details of the scheduling device provided by the disclosure are referred to the related content of the above scheduling method.

[0181] Referring to Figure 9 The figure is a structural schematic diagram of a scheduling device provided by an embodiment of the disclosure.

[0182] The scheduling device 900 provided by the embodiment of the disclosure comprises:

[0183] A determination unit 901 is configured to determine a target parameter value from at least one candidate parameter value of a scheduling reference parameter according to parameter value weight representation data of the target task under the scheduling reference parameter, wherein the parameter value weight representation data is used to represent the use probability of the at least one candidate parameter value.

[0184] A screening unit 902 is configured to screen at least one to-be-used scheduling object from at least one candidate scheduling object according to the target parameter value, wherein the parameter value of each to-be-used scheduling object under the scheduling reference parameter is the target parameter value.

[0185] A sharding unit 903 is configured to perform sharding processing on the target task according to the at least one to-be-used scheduling object, to obtain a sharding result, so that the at least one to-be-used scheduling object executes the target task according to the sharding result.

[0186] In a possible implementation, the screening unit 902 is specifically configured to screen the at least one to-be-used scheduling object from the at least one candidate scheduling object according to the target parameter value and registration information of the at least one candidate scheduling object, wherein the registration information of each candidate scheduling object carries the parameter value of each candidate scheduling object under the scheduling reference parameter.

[0187] In a possible implementation, the screening unit 902 is specifically configured to: extract a parameter value of each candidate scheduling object under the scheduling reference parameter from registration information of each candidate scheduling object; compare the parameter value of each candidate scheduling object under the scheduling reference parameter with the target parameter value to obtain a comparison result of each candidate scheduling object; and determine the at least one to-be-used scheduling object according to the comparison result of the at least one candidate scheduling object.

[0188] In a possible implementation, the number of the candidate scheduling objects is N; the registration information of the nth candidate scheduling object is determined according to an Internet Protocol (IP) address of the nth candidate scheduling object, a thread number of the nth candidate scheduling object, and a parameter value of the nth candidate scheduling object under the scheduling reference parameter; where n is a positive integer, n≤N, and N is a positive integer.

[0189] In a possible implementation, the parameter value of the nth candidate scheduling object under the scheduling reference parameter is obtained from a preset configuration file of the nth candidate scheduling object; where the preset configuration file records the parameter value of the nth candidate scheduling object under the scheduling reference parameter.

[0190] In a possible implementation, the preset configuration file is obtained by configuring a preset variable in the preset configuration file using the parameter value of the nth candidate scheduling object under the scheduling reference parameter after the nth candidate scheduling object is started; where the preset variable is used to represent the scheduling reference parameter.

[0191] In a possible implementation, the parameter value weight characteristic data includes a use weight of the at least one candidate parameter value; where the use weight of each candidate parameter value is used to represent a use probability of each candidate parameter value.

[0192] The determination unit 901 is specifically configured to: determine a data representation range of each candidate parameter value from a preset data range according to the use weight of each candidate parameter value; perform random number generation processing according to the preset data range to obtain a to-be-used random number; and determine a target parameter value according to the to-be-used random number and the data representation range of the at least one candidate parameter value, so that the data representation range of the target parameter value includes the to-be-used random number.

[0193] In a possible implementation, the scheduling apparatus 900 further includes:

[0194] The obtaining unit is configured to obtain an execution result of the target task by the at least one to-be-used scheduling object.

[0195] a rollback unit, configured to, when it is determined that the target parameter value matches the scheduling requirement description information of the target task and it is determined that the execution result satisfies a preset rollback condition, adjust the parameter value weight representation data to obtain adjusted parameter value weight representation data, and perform rollback based on the adjusted parameter value weight representation data; wherein the scheduling requirement description information is used to describe a requirement that the target task has under the scheduling reference parameter.

[0196] In a possible implementation, the scheduling reference parameter is determined according to scheduling requirement description information of the target task; wherein the scheduling requirement description information is used to describe a requirement that the target task has under the scheduling reference parameter.

[0197] Based on the above-mentioned related content of the scheduling apparatus 900, it can be seen that for the scheduling apparatus 900 provided by the embodiments of the present disclosure, the scheduling apparatus 900 determines a target parameter value (for example, version 2) from at least one candidate parameter value (for example, version 1 and version 2) of the scheduling reference parameter (for example, code version) according to parameter value weight representation data of the target task under the scheduling reference parameter; then, the scheduling apparatus 900 screens at least one to-be-used scheduling object from at least one candidate scheduling object (for example, server 1, server 2, …, etc.) according to the target parameter value, so that the parameter value of each to-be-used scheduling object under the scheduling reference parameter is the target parameter value; finally, the scheduling apparatus 900 performs sharding processing on the to-be-used scheduling objects to obtain a sharding result, so that the to-be-used scheduling objects execute the target task according to the sharding result.

[0198] It can be seen that because the parameter value of each to-be-used scheduling object under the scheduling reference parameter is the target parameter value, the parameter values of the to-be-used scheduling objects under the scheduling reference parameter are consistent (for example, code version), so that the data processing functions of the to-be-used scheduling objects under the scheduling reference parameter can remain consistent, which can effectively ensure that all shards of the target task can be processed according to the same data processing mode, thereby effectively avoiding adverse effects caused by different shards of the target task being processed according to different data processing modes, and further effectively improving the scheduling effect for the target task.

[0199] It should be noted that the disclosure does not limit the deployment position of the above-mentioned scheduling device 900. For example, in an embodiment of the disclosure, the above-mentioned scheduling device 900 can be a master node elected in response to a scheduling request of a target task, so that the master node can execute any embodiment of the scheduling method provided by the disclosure. For another example, in an embodiment of the disclosure, the above-mentioned scheduling device 900 can also be integrated as a functional module in a master node elected in response to a scheduling request of a target task, so that the master node can execute any embodiment of the scheduling method provided by the disclosure.

[0200] Further, the embodiment of the disclosure also provides a device, the device comprising a processor and a memory:

[0201] The memory is used to store a computer program.

[0202] The processor is used to execute any embodiment of the scheduling method provided by the embodiment of the disclosure according to the computer program.

[0203] Further, the embodiment of the disclosure also provides a computer readable storage medium, the computer readable storage medium is used to store a computer program, the computer program is used to execute any embodiment of the scheduling method provided by the embodiment of the disclosure.

[0204] Further, the embodiment of the disclosure also provides a computer program product, when the computer program product runs on a terminal device, the terminal device executes any embodiment of the scheduling method provided by the embodiment of the disclosure.

[0205] It should be understood that in the disclosure, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, "A and / or B" can represent: only A, only B and A and B exist at the same time, and A and B can be singular or plural. The character " / " generally represents that the associated objects before and after are in an "or" relationship. "At least one of the following" or the like means any combination of these items, including single or multiple combinations of any combination. For example, at least one of a, b or c, can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0206] The above merely describes preferred embodiments of the present disclosure, and is not intended to limit the present disclosure in any form. Although the present disclosure has been disclosed as above with preferred embodiments, it is not intended to limit the present disclosure. Any person skilled in the art, without departing from the technical solution of the present disclosure, can utilize the disclosed methods and technical contents to make many possible changes and modifications to the technical solution of the present disclosure, or modify equivalent embodiments. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present disclosure, without departing from the technical solution of the present disclosure, are still within the protection scope of the present disclosure.

Claims

1. A scheduling method, characterized by, The method comprises: determining a target parameter value from at least one candidate parameter value of a scheduling reference parameter according to parameter value weight representation data of the target task under the scheduling reference parameter, wherein the parameter value weight representation data is used to represent a use probability of the at least one candidate parameter value; screening at least one to-be-used scheduling object from at least one candidate scheduling object according to the target parameter value, wherein a parameter value of each to-be-used scheduling object under the scheduling reference parameter is the target parameter value; performing a fragmentation process on the target task according to the at least one to-be-used scheduling object to obtain a fragmentation result, so that the at least one to-be-used scheduling object executes the target task according to the fragmentation result; the determination process of the at least one to-be-used scheduling object comprises: extracting a parameter value of each candidate scheduling object under the scheduling reference parameter from registration information of each candidate scheduling object; for any candidate scheduling object, the registration information of the candidate scheduling object is determined according to an Internet Protocol (IP) address of the candidate scheduling object, a thread number of the candidate scheduling object, and a parameter value of the candidate scheduling object under the scheduling reference parameter; comparing the parameter value of each candidate scheduling object under the scheduling reference parameter with the target parameter value to obtain a comparison result of each candidate scheduling object; and determining the at least one to-be-used scheduling object according to the comparison result of the at least one candidate scheduling object.

2. The method of claim 1, wherein, The number of the candidate scheduling objects is N; a parameter value of an nth candidate scheduling object under the scheduling reference parameter is obtained from a preset configuration file of the nth candidate scheduling object, wherein the preset configuration file records the parameter value of the nth candidate scheduling object under the scheduling reference parameter; wherein n is a positive integer, n≤N, and N is a positive integer.

3. The method of claim 2, wherein, The preset configuration file is obtained by configuring a preset variable in the preset configuration file by using the parameter value of the nth candidate scheduling object under the scheduling reference parameter, wherein the preset variable is used to represent the scheduling reference parameter.

4. The method of claim 1, wherein, The parameter value weight representation data comprises use weights of the at least one candidate parameter value, wherein each use weight of each candidate parameter value is used to represent a use probability of each candidate parameter value. The determination of the target parameter value from the at least one candidate parameter value of the scheduling reference parameter according to the parameter value weight representation data of the target task under the scheduling reference parameter comprises: determining data representation ranges of each candidate parameter value from a preset data range according to the use weights of each candidate parameter value; performing random number generation processing according to the preset data range to obtain a to-be-used random number; determining a target parameter value according to the to-be-used random number and the data representation ranges of the at least one candidate parameter value, so that a data representation range of the target parameter value comprises the to-be-used random number.

5. The method according to any one of claims 1 to 4, characterized in that, The method further comprises: obtaining an execution result of the target task by the at least one to-be-used scheduling object. When it is determined that the target parameter value matches the scheduling requirement description information of the target task, and it is determined that the execution result satisfies a preset rollback condition, the parameter value weight representation data is adjusted to obtain adjusted parameter value weight representation data, and rollback is performed based on the adjusted parameter value weight representation data.

6. The method according to any one of claims 1 to 4, characterized in that, The scheduling reference parameter is determined according to the scheduling requirement description information of the target task; and the scheduling requirement description information is used to describe the requirement of the target task under the scheduling reference parameter.

7. A scheduling apparatus characterized by comprising: Comprise: A determination unit is configured to determine a target parameter value from at least one candidate parameter value of a scheduling reference parameter according to parameter value weight representation data of a target task under the scheduling reference parameter; wherein the parameter value weight representation data is used to represent the use probability of the at least one candidate parameter value. A screening unit is configured to screen at least one to-be-used scheduling object from at least one candidate scheduling object according to the target parameter value; wherein the parameter value of each to-be-used scheduling object under the scheduling reference parameter is the target parameter value. A fragmentation unit is configured to perform fragmentation processing on the target task according to the at least one to-be-used scheduling object to obtain a fragmentation result, so that the at least one to-be-used scheduling object executes the target task according to the fragmentation result. The screening unit is specifically configured to: extract the parameter value of each candidate scheduling object under the scheduling reference parameter from the registration information of each candidate scheduling object; for any candidate scheduling object, the registration information of the candidate scheduling object is determined according to the Internet Protocol (IP) address of the candidate scheduling object, the thread number of the candidate scheduling object, and the parameter value of the candidate scheduling object under the scheduling reference parameter; compare the parameter value of each candidate scheduling object under the scheduling reference parameter with the target parameter value to obtain a comparison result of each candidate scheduling object; and determine the at least one to-be-used scheduling object according to the comparison result of the at least one candidate scheduling object.

8. A dispatching device characterized by comprising: The device comprises a processor and a memory: The memory is configured to store a computer program; The processor is configured to execute the method according to any one of claims 1-6 according to the computer program.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium is configured to store a computer program, and the computer program is configured to execute the method according to any one of claims 1-6.

10. A computer program product, characterised in that, The computer program product, when running on a terminal device, causes the terminal device to execute the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Timing task scheduling method, device and system

    CN112181627A

  • Message pushing method and device, computer equipment and storage medium

    CN114154044A