A data flow mode-aware streaming application node scheduling method and system

By adopting the flow application node scheduling method of data flow pattern perception in a distributed stream processing system, using LSTM neural network and deep reinforcement learning model, the problem of scheduling decision lag when data flow fluctuates is solved, and the stability and efficiency of system performance are achieved.

CN118590456BActive Publication Date: 2025-04-29CHINA UNIV OF GEOSCIENCES (BEIJING)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410632807.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2025-04-29
Estimated Expiration
2044-05-21

AI Technical Summary

Technical Problem

The existing distributed stream processing system cannot identify the data flow pattern characteristics when the data flow fluctuates, resulting in lag in scheduling decisions and large fluctuations in system performance.

Method used

The flow-based node scheduling method is used to collect topological indicator data through index monitoring nodes. The prediction node uses the LSTM neural network model to predict data. The adaptive scheduling node uses greedy algorithms and Markov iterative process to train a deep reinforcement learning model to generate a new scheduling solution.

Benefits of technology

Real-time perception and prediction of data flow mode is realized, which reduces the lag of scheduling decisions, and improves the long-term stability and efficient operation capabilities of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118590456B_ABST
    Figure CN118590456B_ABST
Patent Text Reader

Abstract

The present invention provides a data flow pattern-aware stream application node scheduling method, which relates to the technical field of distributed stream computing. The data flow pattern-aware stream application node scheduling method is implemented by an indicator monitoring node, a prediction node, an initial scheduling node, and an adaptive degree node; the indicator monitoring node collects the indicator data of the topology; the LSTM neural network model is trained according to the indicator data of the topology to obtain the total delay and operator load of the system topology; the data processing task is uploaded to the distributed stream computing system, and the heuristic packing algorithm is used to perform initial scheduling and determine the topological operator placement plan; the greedy algorithm and the Markov iterative process are used to train the deep reinforcement learning model to generate a new scheduling plan. The present invention is used to improve the throughput of the distributed stream computing system, reduce the delay, and improve the stability of the load.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed stream computing technology, and in particular to a data stream pattern-aware stream application node scheduling method and system. Background Art

[0002] In distributed stream processing systems, data flow fluctuations can cause existing operator allocation strategies to fail, leading to machine overload, system performance degradation, or resource waste, so appropriate reallocation strategies are needed. Existing online scheduling methods determine scheduling opportunities by detecting system performance and adjust operator allocation based on system status and load. However, the above schemes do not identify the potential pattern characteristics of data flows, cannot predict future data trends, and scheduling decisions rely on outdated information. Decisions made in response to data flow fluctuations are lagging, and system performance fluctuates greatly. Therefore, appropriate methods are needed to identify data flow patterns, predict system performance changes, and adjust operator allocation in a timely manner to maintain long-term system stability and efficient operation. Summary of the invention

[0003] In order to solve the technical problems that the existing technology does not recognize the underlying pattern characteristics of data flow, cannot predict the future data trend, the scheduling decision relies on outdated information, the decision made for data flow fluctuations is lagging, and the system performance fluctuates greatly, the embodiment of the present invention provides a data flow pattern-aware stream application node scheduling method and system. The technical solution is as follows:

[0004] On the one hand, a data flow mode-aware stream application node scheduling method is provided, the method is implemented by a data flow mode-aware stream application node scheduling device, and the method includes:

[0005] S1, the indicator monitoring node collects topology indicator data from the Nimbus component in the distributed stream computing system;

[0006] S2, the indicator monitoring node transmits the indicator data of the topology to the prediction node, and the prediction node trains the initial LSTM neural network model according to the indicator data of the topology to obtain a trained LSTM neural network model;

[0007] S3. When the distributed stream computing system receives a data processing task, the initial scheduling node performs initial scheduling on the data processing task through a heuristic packing algorithm to obtain a data flow rate and a topological operator placement plan;

[0008] S4, the initial scheduling node transmits the data flow rate and the topological operator placement plan to the prediction node, and the prediction node obtains the total delay and operator load of the topology of the distributed stream computing system through the trained LSTM neural network model;

[0009] S5, the prediction node transmits the total delay and operator load of the topology of the distributed stream computing system to the adaptive scheduling node, and the adaptive scheduling node trains the initial deep reinforcement learning model in the adaptive scheduling node by adopting a greedy algorithm and a Markov iteration process to obtain a trained deep reinforcement learning model;

[0010] S6. When the prediction node predicts that the indicator data of the topology of the distributed stream computing system decreases, the prediction node transmits the data flow rate and the topological operator placement plan to the adaptive scheduling node, and the adaptive scheduling node generates a new scheduling plan through the trained deep reinforcement learning model.

[0011] On the other hand, a data flow pattern-aware stream application node scheduling system is provided, the system is applied to a data flow pattern-aware stream application node scheduling method, the system comprising: an indicator monitoring node, a prediction node, an initial scheduling node, and an adaptive scheduling node;

[0012] The indicator monitoring node is used to collect topology indicator data from the Nimbus component in the distributed stream computing system;

[0013] The prediction node is used for the indicator monitoring node to transmit the indicator data of the topology to the prediction node, and the prediction node trains the initial LSTM neural network model according to the indicator data of the topology to obtain the trained LSTM neural network model; the initial scheduling node transmits the data flow rate and the topological operator placement plan to the prediction node, and the prediction node obtains the total delay and operator load of the topology of the distributed stream computing system through the trained LSTM neural network model;

[0014] The initial scheduling node is used for, when the distributed stream computing system receives a data processing task, performing initial scheduling on the data processing task through a heuristic packing algorithm to obtain a data flow rate and a topology operator placement scheme;

[0015] The adaptive scheduling node is used for the prediction node to transmit the total delay and operator load of the topology of the distributed stream computing system to the adaptive scheduling node, and the adaptive scheduling node trains the initial deep reinforcement learning model in the adaptive scheduling node by adopting a greedy algorithm and a Markov iteration process to obtain a trained deep reinforcement learning model; when the prediction node predicts that the indicator data of the topology of the distributed stream computing system decreases, the prediction node transmits the data flow rate and the topological operator placement plan to the adaptive scheduling node, and the adaptive scheduling node generates a new scheduling plan through the trained deep reinforcement learning model.

[0016] On the other hand, a data flow pattern-aware stream application node scheduling device is provided, and the data flow pattern-aware stream application node scheduling device includes: a processor; a memory, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by the processor, any one of the above-mentioned data flow pattern-aware stream application node scheduling methods is implemented.

[0017] On the other hand, a computer-readable storage medium is provided, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement any one of the above-mentioned data flow pattern-aware stream application node scheduling methods.

[0018] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0019] The embodiment of the present invention firstly uses an indicator monitoring node to collect topological indicator data from the Nimbus component in the distributed stream computing system; trains the initial LSTM neural network model in the prediction node according to the topological indicator data to obtain the trained LSTM neural network model; secondly, uploads the data processing task to the distributed stream computing system, performs initial scheduling on the uploaded data processing task through the heuristic packing algorithm of the initial scheduling node, and determines the topological operator placement plan; uses the trained LSTM neural network model to perform real-time prediction on the performance of the distributed stream computing system to obtain the total delay and operator load of the topology of the distributed stream computing system; according to the total delay and operator load of the topology of the distributed stream computing system, uses a greedy algorithm and a Markov iterative process to train the initial deep reinforcement learning model in the adaptive scheduling node to obtain the trained deep reinforcement learning model; finally, when it is predicted that the indicator data of the topology of the distributed stream computing system decreases, a new scheduling plan is generated according to the topological operator placement plan using the trained deep reinforcement learning model.

[0020] The embodiment of the present invention adopts an LSTM neural network model to fit the relationship between the indicator data of the data flow, the operator allocation state and the system topology through pre-training, and actually monitors the data flow through the trained LSTM neural network model to predict the change of system performance; adopts a heuristic packing algorithm as an initial scheduling method, and improves the packing algorithm in solving the shortcomings of heterogeneous cluster scheduling by adopting a multi-objective non-dominated sorting method; the embodiment of the present invention adopts a Markov process to solve the operator rescheduling problem in the stream processing system, uses the LSTM neural network model as the interactive environment of the intelligent body when the system is running, adopts a reinforcement learning algorithm with variable length actions to find the optimal operator allocation, and generates a new scheduling scheme online; the embodiment of the present invention can improve the throughput of the distributed stream computing system, reduce low latency and improve the stability of the load under different data stream environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 It is an overall architecture design diagram of a data flow pattern-aware stream application node scheduling method provided by an embodiment of the present invention.

[0023] Figure 2 It is a flow chart of a data flow mode-aware stream application node scheduling method provided by an embodiment of the present invention;

[0024] Figure 3 It is a structural schematic diagram of an LSTM neural network prediction model provided by an embodiment of the present invention;

[0025] Figure 4 It is a block diagram of a data flow mode-aware stream application node scheduling system provided by an embodiment of the present invention;

[0026] Figure 5 It is a structural diagram of a data flow pattern-aware stream application node scheduling device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0028] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.

[0029] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.

[0030] In the embodiments of the present invention, sometimes a subscript such as W1 may be written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are the same.

[0031] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0032] An embodiment of the present invention provides a data flow pattern-aware stream application node scheduling method, which can be implemented by a data flow pattern-aware stream application node scheduling device, and the data flow pattern-aware stream application node scheduling device can be a terminal or a server. Figure 1 It is an overall architecture design diagram of a data flow pattern-aware stream application node scheduling method provided by an embodiment of the present invention, wherein the overall design system structure includes: Supervisor component, Zookeeper component, Nimbus component, indicator monitor, prediction node, initial scheduler, database, self-adaptive scheduling node, master node and computing node of the distributed stream computing system; in a feasible implementation mode, the indicator monitor monitors the indicator data of the topology in the Nimbus component in real time and collects the indicator data of the topology; the indicator data of the topology is stored in the database, and the data in the database pre-trains the initial LSTM neural network model; when the system is running, the LSTM neural network model is used as the interactive environment of the intelligent body, and the reinforcement learning algorithm of variable-length actions is used to find the optimal operator allocation, and a new scheduling scheme is generated online.

[0033] like Figure 2 The flow chart of the data flow mode-aware stream application node scheduling method shown in the figure may include the following steps:

[0034] S1. The indicator monitoring node collects the indicator data of the topology from the Nimbus component in the distributed stream computing system.

[0035] Optionally, the indicator monitoring node is used to collect the indicator data of the topology by calling the REST API of the distributed stream computing system with a time window of 60 seconds.

[0036] In a feasible implementation manner, the indicator data of the topology includes: the data flow rate of the topology, the total delay of the topology, and the throughput of the topology.

[0037] In a feasible implementation, the indicator monitoring node monitors the rate at which spout consumes Kafka as the data flow rate entering the topology; the indicator monitoring node counts the processing delays of all bolts in the topology as the total delay of the topology, and records the number of acks of the bolts as the throughput of the topology; the indicator monitoring node stores the above information in the database at intervals of 60 seconds for use by the prediction node.

[0038] Among them, the indicator monitoring node can provide an HTTP interface for real-time acquisition of topology indicator data within a past time window.

[0039] S2. The indicator monitoring node transmits the indicator data of the topology to the prediction node. The prediction node trains the initial LSTM neural network model according to the indicator data of the topology to obtain a trained LSTM neural network model.

[0040] Optionally, an LSTM neural network model of S2 is used to fit the relationship between data flow, operator allocation, and distributed stream computing system performance;

[0041] Among them, the LSTM layer in the LSTM neural network model contains the parameter return_sequences; when the value of return_sequences is true, the LSTM layer returns an output sequence for each time step; wherein each input time step corresponds to an output; if the input data format is (samples, time_steps, features), the data format of the output of the LSTM layer is (samples, time_steps, units); wherein units represents the number of units of the LSTM layer.

[0042] Among them, when the value of return_sequences is false, the LSTM layer returns the output only at the last time step of the sequence, and the output data format is (samples, units).

[0043] In a feasible implementation, Figure 3FIG. 1 is a schematic diagram of the structure of an LSTM neural network prediction model provided by an embodiment of the present invention, wherein the LSTM neural network model includes: an input layer, an output layer and a hidden layer; wherein,

[0044] The input layer assigns states to the input data rate and each node in the topology;

[0045] In a feasible implementation, the data shape of the input layer is (TimeSteps, NumFeatures), the first four time periods are used to predict the index of the fifth time period; the parameter TimeSteps is set to 4; the input features are the one-dimensional expansion of the data flow rate and the operator placement scheme in the cluster in the topology, and the output is the feature vector at time t; the feature vector at time t can be calculated by the following formula (1):

[0046] X t =[f1 t , f2 t ]; (2)

[0047] Among them, X t represents the feature vector at time t; f1 t represents the placement scheme of the input data flow rate in the cluster at time t; f2 t Indicates the placement plan of the input topological operator in the cluster at time t.

[0048] In a feasible implementation, the input characteristic length can be calculated by the following (2):

[0049] NumFeature = m × n + 1; (2)

[0050] Among them, NumFeatures represents the feature length of the input; m represents the number of operators in the topology; and n represents the number of machines.

[0051] The output layer contains the delays and loads of multiple operators;

[0052] The output layer contains two neurons, and the output prediction results include: the average delay of operators in the system and the average load of operators in the system; the average delay of operators in the system and the average load of operators in the system can be expressed by the following formula (3):

[0053] Y t =[latency t , load t ];(3)

[0054] Among them, latency t Indicates the average delay of operators in the system at time t; load trepresents the load of operators in the system at time t; Y t represents the system performance at time t.

[0055] There are three hidden layers, including two layers of RNN nodes and one dense connection layer.

[0056] In a feasible implementation, the hidden layer includes 4 LSTM layers, the first LSTM layer includes 256 LSTM units; the second LSTM layer includes 5024 LSTM units; the third LSTM layer includes 512 LSTM units; and the fourth layer is a fully connected layer including 256 neurons.

[0057] Among them, by increasing the number of hidden layers and hidden layer nodes, the LSTM neural network model can learn high-level feature abstraction and improve the generalization ability of the model.

[0058] The loss function of the LSTM neural network model adopts the mean absolute error function, which is the sum of the absolute values ​​of the differences between the target value and the predicted value. The mean absolute error function only measures the average modulus of the predicted value error, regardless of the direction. The mean absolute error function is expressed by the following formula (4):

[0059]

[0060] Among them, y i represents the predicted value; represents the actual observed value; n represents the total number of data points;

[0061] Among them, the ADAM (Adaptive Moment Estimation) algorithm is used to optimize the LSTM neural network model.

[0062] In a feasible implementation, the indicator data collected by the indicator monitoring node is used to pre-train the initial LSTM neural network model. At different data flow rates, multiple operator allocation schemes are tested, with each allocation scheme collecting 1 hour of data as a training set in minutes, with a total of 8640 data.

[0063] In a feasible implementation, the following code represents the process of training the initial LSTM neural network model, wherein the input is the training set train_set, the time step n, the number of training times e, the number of batches B, and the learning rate α; and the output is the trained LSTM neural network model M.

[0064]

[0065] The prediction node uses the TensorFlow library to build an LSTM neural network, and the LSTM neural network is pre-trained through offline data collected by the indicator monitoring node. In a feasible implementation, the checkpoint of the LSTM neural network is saved on the disk, and when the distributed stream computing system is started, the latest checkpoint stored on the disk is loaded to complete the loading of the pre-trained network.

[0066] Optionally, a prediction node for predicting the total latency and operator load of the topology of the distributed stream computing system;

[0067] The prediction node includes a prediction interface and a training interface; among them,

[0068] Prediction interface, used to input the current data flow rate and topology operator placement plan, and obtain the total delay and operator load of the topology of the distributed stream computing system through prediction by the trained LSTM neural network model;

[0069] The training interface is used for online incremental training of the LSTM neural network model. By regularly calling the training interface, online real-time incremental updates of the model are completed.

[0070] S3. When the distributed stream computing system receives a data processing task, the initial scheduling node performs initial scheduling on the data processing task through a heuristic packing algorithm to obtain the data flow rate and topology operator placement plan.

[0071] In a feasible implementation, the following code represents the implementation process of the heuristic packing algorithm as the initial scheduling method, with the input being the computing cluster M and the applied operator cluster O; and the output being the initial operator placement plan S.

[0072]

[0073] Optionally, S3 uses a heuristic packing algorithm to initially schedule data processing tasks and obtain data flow rates and topology operator placement plans, including:

[0074] S31. Evaluate the resources of each node in the heterogeneous cluster; perform multi-objective fast non-dominated sorting based on the computing power, memory size, and network delay of each node; sort the nodes on the same Pareto frontier according to computing power, memory size, and network delay;

[0075] In a feasible implementation, resource evaluation is performed on each node in the heterogeneous cluster, including CPU computing power, memory size, and bandwidth.

[0076] S32, label the computing nodes in the cluster and assign the nodes to CPU type and memory type;

[0077] In a feasible implementation, when the ratio of the CPU computing power of a computing node to the total CPU computing power of the cluster is greater than the ratio of the memory of the node to the total memory of the cluster, the node is a CPU type, otherwise it is a memory type.

[0078] S33. Perform topological sorting on the topological operators according to the CPU type and the memory type, place the operator instances in the sorted order, and obtain the data flow rate and the topological operator placement plan.

[0079] In a feasible implementation, each time an operator in the sorted DAG is selected, the number of operators required is estimated based on historical data; if there is no historical data, one instance of each operator is initially set.

[0080] Among them, according to the type of operator, the operator instances are divided into CPU-sensitive, memory-sensitive, and communication-sensitive types; the operators are placed in the optimal sorting layer nodes. If the optimal sorting layer contains more than one node, it is necessary to select according to the type of operator.

[0081] In a feasible implementation manner, the selection basis includes:

[0082] (1) If the operator is CPU-sensitive, place the operator on a CPU-type node. If there is no CPU-type node in the optimal sorting layer, calculate the sum of the communications of all placed operator instances in all upper layers of the operator to each machine, and select the operator with the smallest communication.

[0083] (2) If the operator is memory-sensitive, place the operator on a memory-sensitive node. If there is no memory-sensitive node in this layer, calculate the sum of the communications from all placed operator instances in all upper layers of the operator to each machine, and select the one with the smallest communication.

[0084] (3) If the operator is communication-sensitive or no suitable placement node is obtained, the sum of the communications from all placed operator instances in all upper layers of the operator to each machine is calculated, and the operator with the minimum communication is selected.

[0085] In a feasible implementation, after an operator is placed on a node, the required resources are deducted from the corresponding node according to the delay of placing a maximum of 3 operators on a node, and the number of remaining slots and resources of the node are updated; all operator instances are placed repeatedly until the placement of operators in the entire DAG is completed.

[0086] In a feasible implementation, a heuristic packing algorithm selects the best node for operator instance placement each time by performing multi-objective non-dominated sorting of cluster nodes; when there is more than one optimal node, further judgment is made based on the operator's resource requirements and the resource classification of the computing nodes.

[0087] S4. The initial scheduling node transmits the data flow rate and topological operator placement plan to the prediction node. The prediction node obtains the total delay and operator load of the topology of the distributed stream computing system through the trained LSTM neural network model.

[0088] In a feasible implementation, the following code represents the process of using the trained LSTM neural network model for prediction, where the input is the trained LSTM neural network model M, the feature vectors [x t1 , x t2 , x t3 , x t4 ]; the output is the prediction result Y pred , contains the total latency and operator load of the topology.

[0089]

[0090] S5. The prediction node transmits the total delay and operator load of the topology of the distributed stream computing system to the adaptive scheduling node. The adaptive scheduling node trains the initial deep reinforcement learning model in the adaptive scheduling node by adopting a greedy algorithm and a Markov iterative process to obtain a trained deep reinforcement learning model.

[0091] Optionally, the adaptive scheduling node is used to provide an HTTP interface externally, input the current topology operator placement plan and data flow rate, and obtain an optimized topology operator placement plan.

[0092] In a feasible implementation, the adaptive scheduling node uses the PyTorch library to build a deep reinforcement learning model, and uses the topological indicator data collected by the indicator monitoring node for pre-training.

[0093] Among them, the distributed stream computing system provides an IScheduler interface to rewrite the schedule method and replace the default scheduler in the distributed stream computing system; the parameters received by the schedule method include: cluster cluster and topologies topologies; the cluster cluster parameter contains information related to the cluster status; the topologies topologies parameter is used to obtain the topology information in the cluster.

[0094] The scheduling process includes two stages: judgment and scheduling.

[0095] In a feasible implementation, the judgment stage includes: counting the average delay and load of the system in the past four cycles at the current time point from the database; if the delay at the current time point is higher than the average delay or the current system load deviation from the optimal load data is above 0.1, the scheduling stage is performed.

[0096] In a feasible implementation, the scheduling stage includes: the scheduling plan generation node obtains the placement plan of the topological operator, obtains the slot on the specified node through cluster.getAvailableSlots(supervisor), and places the specified operator on the slot of the specified node through the cluster.assign() method to complete the implementation of the plan.

[0097] Optionally, S5 uses a greedy algorithm to train the initial deep reinforcement learning model in the adaptability adjustment point to obtain a trained deep reinforcement learning model, including:

[0098] S51. Establish Markov, design state space, action space, reward function and intelligent agent;

[0099] The scheduling process is modeled as a Markov decision, which is used to determine the number and placement of operator instances to be scheduled, so that the adaptive scheduling node can provide a reasonable scheduling solution when the system needs scheduling.

[0100] The state space represents a set of possible states of the environment. The state space contains all possible states that the agent can observe. The agent can make decisions based on the observed states. The current state of the environment can be expressed by the following formula (5):

[0101] s=(X,u); (5)

[0102] Among them, s represents the current state of the environment; X represents the distribution of operator instances on the machine; and u represents the load of the operator.

[0103] In a feasible implementation, the distribution of operator instances on the machine is expanded in one dimension, which can be expressed by the following formula (6):

[0104] X=[[x 11 , x 12 , ..., x 1m ],[x 21 , x 22 , ..., x 2m ], ..., [x n1 , x n2 , ..., x nm ]; (6)

[0105] Among them, x ij Represents operator o i Place on machine M j n represents the total number of operators; m represents the total number of machines in the cluster.

[0106] In a feasible implementation, the load of the operator can be expressed by the following formula (7):

[0107]

[0108] in, Represents operator o i The load of n is the total number of operators.

[0109] The action space refers to the set of all actions that the agent can choose in a certain state; the action is the increase or decrease in the number of instances of operator i placed on machine j, and the action step indicates the number of increases or decreases; the size of the action step determines the speed of the agent's exploration. A short step slows down the agent's exploration speed, and a long step will cause the agent to miss the optimal solution of the scheduling scheme. The formula for calculating the action step can be expressed by formula (8):

[0110]

[0111] Where I represents the action step length; e represents the balance step length, and e is a decimal in [0, 1]; when the probability is 1-e, the step length is set to 1; when the probability is e, the step length is randomly selected from the number of remaining resources of the machine.

[0112] The action can be expressed by the following formula (9):

[0113] a= <x i,j ±l>;(9)

[0114] Among them, a represents an action.

[0115] The size of the action space can be expressed by the following formula (10):

[0116] |A|=2m×n;(10)

[0117] Among them, |A| represents the size of the action space.

[0118] The reward function is used to evaluate the badness of the behavior and determine the next action of the agent. The reward function includes delay reward and load reward.

[0119] In one feasible implementation, a hyperbolic tangent function is used to fit the required delayed reward. The hyperbolic tangent function can be expressed by the following formula (11):

[0120]

[0121] Among them, according to the hyperbolic tangent function, the delayed reward is obtained; the specific process of obtaining the delayed reward can be expressed by the following formula (12):

[0122]

[0123] Where Δdelay represents the delay change of the current time step compared to the previous time step; R delay Delayed reward.

[0124] In a feasible implementation, the load reward can be expressed by the following formula (13):

[0125] R load =-(load-δ) 2 +1;(13)

[0126] Among them, δ represents the expected runtime system load value; the value of δ determines the expectation of the system load. When the value of δ is 0.8, the system remains balanced; when the value of δ is 1.0, the system makes efficient use of the cluster machines and does not cause machine overload.

[0127] In a feasible implementation, the final reward function is obtained by a weighted method. The process of obtaining the reward function can be expressed by the following formula (14) and formula (15):

[0128] R=bR delay +cR load ; (14)

[0129]

[0130] Where R represents the final reward value; b represents the first weighting coefficient; c represents the second weighting coefficient; R delay represents delayed reward; R load represents load reward; delay represents system delay; load represents operator load.

[0131] Among them, the larger the first weighting coefficient is, the more the scheduling method based on reinforcement learning tends to be delay-sensitive; the larger the second weighting coefficient is, the more the scheduling method based on reinforcement learning tends to be load-sensitive.

[0132] S52. According to the state space, action space, reward function and intelligent agent, a method combining a greedy algorithm and a softmax function is used to select the optimal action; the initial deep reinforcement learning model is trained according to the optimal action to obtain a trained deep reinforcement learning model.

[0133] In a feasible implementation, the action selection methods of reinforcement learning include: exploration and utilization; exploring and trying new actions to obtain the expected rewards of the actions; and utilizing the actions with the greatest rewards based on the experience already obtained. Among them, exploration and utilization are contradictory to each other. The number of attempts is limited, and strengthening exploration will weaken utilization; on the contrary, strengthening utilization will weaken exploration.

[0134] In a feasible implementation, a method combining the ε-greedy algorithm and the softmax function is used as an exploration strategy.

[0135] Among them, the ε greedy algorithm is based on the probability trade-off algorithm for exploration and utilization. Among them, the parameter ε is a value between 0 and 1. The agent explores with the probability of the parameter ε, that is, randomly selects an action; and exploits with the probability of 1-ε, that is, selects the action with the highest estimated return at the moment. If the parameter ε is too high, the agent will over-explore and fail to fully utilize the known best strategy; if the parameter ε is too low, the agent will fall into the local optimal solution and will not have enough opportunities to explore the possible best strategy. Among them, setting a higher parameter ε value at the beginning of training to encourage exploration, and gradually reducing the parameter ε value as learning proceeds, can enable the agent to learn more knowledge.

[0136] Among them, the ε-greedy algorithm will only select the action with the largest reward when selecting actions based on experience, and only a few actions in the action space will be selected.

[0137] Among them, the softmax function is based on the average reward of the current known actions, and compromises between exploration and utilization; the softmax function converts a set of values ​​into a set of probabilities. The larger the value, the greater the corresponding probability. The softmax function can be expressed by the following formula (16).

[0138]

[0139] in, express.

[0140] In a feasible implementation, the randomly selected part of the strategy based on the ε-greedy algorithm is replaced by the softmax function for selection. The agent uses the Softmax function with a probability of ε and selects actions according to the probability distribution of the Q value; the action with the highest Q value is selected with a probability of 1-ε. The following formula (17) represents the process of updating the Q value:

[0141] Q′(s,a)←Q(s,a)+α[r+ymax a′ Q(s′,a′)-Q(s,a)]; (17)

[0142] Among them, Q represents the expected benefit that can be obtained by taking a certain action in a certain state; s represents the current state; s' represents the next state after taking action a; r represents the reward for action a.

[0143] In a feasible implementation, a method combining the ε-greedy algorithm and the Softmax function is used as an exploration strategy to improve the diversity of scheduling solutions.

[0144] In a feasible implementation, the following code represents the implementation process of the training algorithm of the deep reinforcement learning model, where the input is the state space S, the action space A, the learning rate ε, the number of training rounds E, the maximum number of steps M and the parameter δ; the output is the trained deep reinforcement learning model Q.

[0145]

[0146] In one feasible implementation, the training process of the deep reinforcement learning network includes:

[0147] (1) Input data into the initial deep reinforcement learning model;

[0148] (2) Randomly initialize all weights of the deep reinforcement learning network, and the value of the initialization parameter ε is 1.0;

[0149] (3) In each round of training, the state s is randomly initialized without violating the constraints;

[0150] (4) Perform t time steps; in each round, randomly select an action from the state space with a probability of parameter ε, and select the action with the largest Q value in the deep reinforcement learning network with a probability of 1-ε;

[0151] (5) Based on the action with the largest Q value, use the trained LSTM network model to obtain the return, reward r and new state s′;

[0152] (6) Store the experience tuple (s, a, r, s′) in the replay memory D, and randomly extract a small batch of experience tuples from the replay memory D; obtain the target value y based on the reward r, the discount factor γ, and the maximum expected reward of the next stage state;

[0153] (7) Update the difference between the Q value and the target value y through ADAM gradient descent;

[0154] (8) Update the state s, and after t time steps, update the parameter ε.

[0155] In a feasible implementation, the following code represents the algorithm implementation process of executing the selected action and obtaining the reward, where the value of e is 0.75, the input state s, action a, and the trained LSTM neural network model; output the state s′ and reward r of the next stage.

[0156]

[0157] In a feasible implementation, the maximum number of instances that can be placed on the current machine is calculated; when only one slot is available, an instance is placed on the machine; otherwise, an instance is added or reduced with a probability of 0.75, and the number of instances to be placed is randomly selected within the constraint range with a probability of 0.25. The selected number of instances is placed on the machine, and the delay and load of the next state are predicted by the trained LSTM neural network model. The reward r is obtained by using the predicted delay and load using a weighted method.

[0158] S6. When the prediction node predicts that the topology indicator data of the distributed stream computing system decreases, the prediction node transmits the data flow rate and the topology operator placement plan to the adaptive scheduling node. The adaptive scheduling node generates a new scheduling plan through the trained deep reinforcement learning model.

[0159] In a feasible implementation, the following code represents the implementation process of using a trained deep reinforcement learning model to generate a new scheduling plan, inputting the trained deep reinforcement learning model Q, the number of decision steps E, and the maximum number of steps M; and outputting the scheduling plan for the next state.

[0160]

[0161] In a feasible implementation, the current state, the trained deep reinforcement learning model, the number of decision steps, the maximum number of steps and the parameter ε are input; the scheduling plan for the following state is output; s is initialized using the current state; an action is randomly selected each time with a probability of ε / 2; an action is selected using the Softmax function with a probability of ε / 2; an action a with the maximum Q value in the current state is selected with a probability of 1-ε; action a is executed to obtain a new state s′; the new state s′ is assigned to the initial state s; the maximum number of steps is repeatedly executed to obtain a new scheduling plan.

[0162] In a feasible implementation, the following code represents the implementation process of the softmax function selection scheme:

[0163]

[0164] In one feasible implementation, the SoftMaxQ selection scheme takes as input the trained Q-value table, the action space A, the maximum execution deployment M, and the temperature coefficient τ. τ is the temperature parameter that adjusts the distribution of the softmax function. A high τ can make the distribution of actions more uniform and encourage the agent to explore; a low τ value leads to a more peaked distribution, focusing on the actions with the highest Q value, and can take advantage of existing experience. In order to have both exploration and utilization, the τ value is 0.5.

[0165] The embodiment of the present invention adopts an LSTM neural network model to fit the relationship between the indicator data of the data flow, the operator allocation state and the system topology through pre-training, and actually monitors the data flow and predicts the change of the system performance through the trained LSTM neural network model; adopts a heuristic packing algorithm as an initial scheduling method, and improves the packing algorithm in solving the shortcomings of heterogeneous cluster scheduling by adopting a multi-objective non-dominated sorting method; the embodiment of the present invention adopts a Markov process to solve the operator rescheduling problem in the stream processing system, uses the LSTM neural network model as the interactive environment of the intelligent body when the system is running, adopts a reinforcement learning algorithm with variable length actions to find the optimal operator allocation, and generates a new scheduling scheme online; the embodiment of the present invention can improve the throughput of the system, reduce the delay and improve the stability of the load under different data flow environments.

[0166] Figure 4 The block diagram of a data flow mode-aware stream application node scheduling system according to an exemplary embodiment is shown. The system is used for a data flow mode-aware stream application node scheduling method. Figure 4 The system includes an indicator monitoring node 310, a prediction node 320, an initial scheduling node 330 and an adaptive scheduling node 340. Among them:

[0167] The indicator monitoring node 310 is used to collect topology indicator data from the Nimbus component in the distributed stream computing system;

[0168] The prediction node 320 is used for the indicator monitoring node to transmit the indicator data of the topology to the prediction node, and the prediction node trains the initial LSTM neural network model according to the indicator data of the topology to obtain the trained LSTM neural network model; the initial scheduling node transmits the data flow rate and the topology operator placement plan to the prediction node, and the prediction node obtains the total delay and operator load of the topology of the distributed stream computing system through the trained LSTM neural network model;

[0169] The initial scheduling node 330 is used for, when the distributed stream computing system receives a data processing task, the initial scheduling node performs initial scheduling on the data processing task through a heuristic packing algorithm to obtain a data flow rate and a topology operator placement scheme;

[0170] The adaptive scheduling node 340 is used for the prediction node to transmit the total delay and operator load of the topology of the distributed stream computing system to the adaptive scheduling node. The adaptive scheduling node trains the initial deep reinforcement learning model in the adaptive scheduling node by adopting a greedy algorithm and a Markov iteration process to obtain a trained deep reinforcement learning model. When the prediction node predicts that the indicator data of the topology of the distributed stream computing system decreases, the prediction node transmits the data flow rate and the topological operator placement plan to the adaptive scheduling node. The adaptive scheduling node generates a new scheduling plan through the trained deep reinforcement learning model.

[0171] Optionally, the indicator monitoring node 310 is used to:

[0172] By calling the REST API of the distributed stream computing system, the indicator data of the topology is collected with a time window of 60 seconds.

[0173] Optionally, the prediction node 320 is used to:

[0174] Predict the total latency and operator load of a distributed stream computing system topology;

[0175] The prediction node includes a prediction interface and a training interface; wherein,

[0176] The prediction interface is used to input the current data flow rate and the topological operator placement plan, and perform prediction through the trained LSTM neural network model to obtain the total delay and operator load of the topology of the distributed stream computing system;

[0177] The training interface is used for online incremental training of the LSTM neural network model, and the online real-time incremental update of the model is completed by regularly calling the training interface.

[0178] Optionally, the adaptive scheduling node 340 is configured to:

[0179] Provide HTTP interface to the outside world, input the current topology operator placement plan and data flow rate, and obtain the optimized topology operator placement plan.

[0180] Optionally, the LSTM neural network model of S2 is used to:

[0181] Fitting the relationship between data flow, operator allocation, and the performance of distributed stream computing systems;

[0182] The LSTM neural network model includes: an input layer, an output layer and a hidden layer; wherein,

[0183] The input layer is for inputting data rate and allocation status of each node in the topology;

[0184] The output layer includes delays and loads of multiple operators;

[0185] The hidden layer has three layers, including two layers of RNN nodes and one dense connection layer.

[0186] Optionally, the initial scheduling node 330 is used to:

[0187] Perform resource evaluation on each node in the heterogeneous cluster; perform multi-objective fast non-dominated sorting based on the computing power, memory size, and network latency of each node; sort nodes on the same Pareto frontier according to computing power, memory size, and network latency;

[0188] Label the computing nodes in the cluster and assign them to CPU and memory types;

[0189] According to the CPU type and memory type, the topological operators are topologically sorted, and the operator instances are placed in the sorted order to obtain the data flow rate and the topological operator placement plan.

[0190] Optionally, the adaptive scheduling node 340 is configured to:

[0191] Establish Markov, design state space, action space, reward function and intelligent agent;

[0192] According to the state space, action space, reward function and intelligent agent, a method combining a greedy algorithm and a softmax function is used to select the optimal action; the initial deep reinforcement learning model is trained according to the optimal action to obtain a trained deep reinforcement learning model.

[0193] The embodiment of the present invention adopts an LSTM neural network model to fit the relationship between the indicator data of the data flow, the operator allocation state and the system topology through pre-training, and actually monitors the data flow through the trained LSTM neural network model to predict the change of system performance; adopts a heuristic packing algorithm as an initial scheduling method, and improves the packing algorithm in solving the shortcomings of heterogeneous cluster scheduling by adopting a multi-objective non-dominated sorting method; the embodiment of the present invention adopts a Markov process to solve the operator rescheduling problem in the stream processing system, uses the LSTM neural network model as the interactive environment of the intelligent body when the system is running, adopts a reinforcement learning algorithm with variable length actions to find the optimal operator allocation, and generates a new scheduling scheme online; the embodiment of the present invention can improve the throughput of the system, reduce the delay and improve the stability of the load under different data flow environments.

[0194] Figure 5 is a structural diagram of a data flow mode-aware stream application node scheduling device provided by an embodiment of the present invention, such as Figure 5As shown, the data flow mode-aware flow application node scheduling device may include the above Figure 4 The data flow pattern-aware stream application node scheduling system shown. Optionally, the data flow pattern-aware stream application node scheduling device 410 may include a first processor 2001 .

[0195] Optionally, the data flow pattern-aware stream application node scheduling device 410 may further include a memory 2002 and a transceiver 2003 .

[0196] The first processor 2001, the memory 2002 and the transceiver 2003 may be connected via a communication bus.

[0197] Combine the following Figure 5 The various components of the data flow mode-aware stream application node scheduling device 410 are specifically introduced:

[0198] The first processor 2001 is the control center of the data flow mode-aware stream application node scheduling device 410, which can be a processor or a general term for multiple processing elements. For example, the first processor 2001 is one or more central processing units (CPUs), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement an embodiment of the present invention, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (FPGAs).

[0199] Optionally, the first processor 2001 can perform various functions of the data flow pattern-aware stream application node scheduling device 410 by running or executing a software program stored in the memory 2002 and calling data stored in the memory 2002.

[0200] In a specific implementation, as an embodiment, the first processor 2001 may include one or more CPUs, such as Figure 5 CPU0 and CPU1 are shown in FIG.

[0201] In a specific implementation, as an embodiment, the data flow mode-aware stream application node scheduling device 410 may also include multiple processors, such as Figure 5The first processor 2001 and the second processor 2004 are shown in FIG. Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processor here can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0202] The memory 2002 is used to store the software program for executing the solution of the present invention, and is controlled to be executed by the first processor 2001. The specific implementation method can refer to the above method embodiment, which will not be repeated here.

[0203] Optionally, the memory 2002 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2002 may be integrated with the first processor 2001, or may exist independently, and may be accessed through the interface circuit ( Figure 5 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.

[0204] The transceiver 2003 is used to communicate with a network device or a terminal device.

[0205] Optionally, the transceiver 2003 may include a receiver and a transmitter ( Figure 5 The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.

[0206] Optionally, the transceiver 2003 may be integrated with the first processor 2001, or may exist independently, and may be configured to communicate with the first processor 2001 through the interface circuit ( Figure 5 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.

[0207] It should be noted that Figure 5 The structure of the data flow pattern-aware flow application node scheduling device 410 shown in the figure does not constitute a limitation on the router, and the actual knowledge structure recognition device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0208] In addition, the technical effects of the data flow pattern-aware stream application node scheduling device 410 can refer to the technical effects of the data flow pattern-aware stream application node scheduling method described in the above method embodiment, and will not be repeated here.

[0209] It should be understood that the first processor 2001 in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0210] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM).

[0211] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0212] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0213] In the present invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0214] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0215] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0216] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0217] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0218] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0219] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0220] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0221] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A data flow pattern-aware streaming application node scheduling method, characterized in that: The data flow pattern-aware stream application node scheduling method is implemented by an indicator monitoring node, a prediction node, an initial scheduling node, and an adaptive scheduling node in the structure of a distributed stream computing system; the method includes: S1, the indicator monitoring node collects topology indicator data from the Nimbus component in the distributed stream computing system; S2, the indicator monitoring node transmits the indicator data of the topology to the prediction node, and the prediction node trains the initial LSTM neural network model according to the indicator data of the topology to obtain a trained LSTM neural network model; The LSTM neural network model of S2 is used to fit the relationship between data flow, operator allocation and distributed stream computing system performance; The LSTM neural network model includes: an input layer, an output layer and a hidden layer; wherein, The input layer is for inputting data rate and allocation status of each node in the topology; The output layer includes delays and loads of multiple operators; The hidden layer has three layers, including two layers of RNN nodes and one dense connection layer; S3. When the distributed stream computing system receives a data processing task, the initial scheduling node performs initial scheduling on the data processing task through a heuristic packing algorithm to obtain a data flow rate and a topological operator placement plan; The S3 performs initial scheduling of data processing tasks through a heuristic packing algorithm to obtain a data flow rate and a topology operator placement scheme, including: S31. Evaluate the resources of each node in the heterogeneous cluster; perform multi-objective fast non-dominated sorting based on the computing power, memory size, and network delay of each node; sort the nodes on the same Pareto frontier according to computing power, memory size, and network delay; S32, label the computing nodes in the cluster and assign the nodes to CPU type and memory type; S33, topologically sorting the topological operators according to the CPU type and the memory type, placing the operator instances in the sorted order, and obtaining the data flow rate and the topological operator placement plan; S4, the initial scheduling node transmits the data flow rate and the topological operator placement plan to the prediction node, and the prediction node obtains the total delay and operator load of the topology of the distributed stream computing system through the trained LSTM neural network model; S5, the prediction node transmits the total delay and operator load of the topology of the distributed stream computing system to the adaptive scheduling node, and the adaptive scheduling node trains the initial deep reinforcement learning model in the adaptive scheduling node by adopting a greedy algorithm and a Markov iteration process to obtain a trained deep reinforcement learning model; The S5 adopts a greedy algorithm and a Markov iteration process to train the initial deep reinforcement learning model in the adaptive scheduling node to obtain a trained deep reinforcement learning model, including: S51. Establish Markov and design the state space, action space, reward function and intelligent agent according to the scheduling characteristics of stream computing; S52, according to the state space, action space, reward function and intelligent agent, a method combining a greedy algorithm and a softmax function is used to select the optimal action; according to the optimal action, the initial deep reinforcement learning model is trained to obtain a trained deep reinforcement learning model; S6. When the prediction node predicts that the indicator data of the topology of the distributed stream computing system decreases, the prediction node transmits the data flow rate and the topological operator placement plan to the adaptive scheduling node, and the adaptive scheduling node generates a new scheduling plan through the trained deep reinforcement learning model.

2. The data flow mode-aware stream application node scheduling method according to claim 1, characterized in that: The indicator monitoring node is used to collect topology indicator data by calling the REST API of the distributed stream computing system with a time window of 60 seconds.

3. The data flow mode-aware stream application node scheduling method according to claim 1, characterized in that: The prediction node is used to predict the total delay and operator load of the topology of the distributed stream computing system; The prediction node includes a prediction interface and a training interface; wherein, The prediction interface is used to input the current data flow rate and the topological operator placement plan, and perform prediction through the trained LSTM neural network model to obtain the total delay and operator load of the topology of the distributed stream computing system; The training interface is used for online incremental training of the LSTM neural network model, and the online real-time incremental update of the model is completed by regularly calling the training interface.

4. The data flow mode-aware stream application node scheduling method according to claim 1, characterized in that: The adaptive scheduling node is used to provide an HTTP interface externally, input the current topology operator placement plan and data flow rate, and obtain the optimized topology operator placement plan.

5. A data flow pattern-aware stream application node scheduling system, the data flow pattern-aware stream application node scheduling system is used to implement the data flow pattern-aware stream application node scheduling method according to any one of claims 1 to 4, characterized in that: The system includes: an indicator monitoring node, a prediction node, an initial scheduling node and an adaptive scheduling node; The indicator monitoring node is used to collect topology indicator data from the Nimbus component in the distributed stream computing system; The prediction node is used for the indicator monitoring node to transmit the indicator data of the topology to the prediction node, and the prediction node trains the initial LSTM neural network model according to the indicator data of the topology to obtain the trained LSTM neural network model; the initial scheduling node transmits the data flow rate and the topological operator placement plan to the prediction node, and the prediction node obtains the total delay and operator load of the topology of the distributed stream computing system through the trained LSTM neural network model; The initial scheduling node is used for, when the distributed stream computing system receives a data processing task, performing initial scheduling on the data processing task through a heuristic packing algorithm to obtain a data flow rate and a topology operator placement scheme; The adaptive scheduling node is used for the prediction node to transmit the total delay and operator load of the topology of the distributed stream computing system to the adaptive scheduling node, and the adaptive scheduling node trains the initial deep reinforcement learning model in the adaptive scheduling node by adopting a greedy algorithm and a Markov iteration process to obtain a trained deep reinforcement learning model; when the prediction node predicts that the indicator data of the topology of the distributed stream computing system decreases, the prediction node transmits the data flow rate and the topological operator placement plan to the adaptive scheduling node, and the adaptive scheduling node generates a new scheduling plan through the trained deep reinforcement learning model.

6. A data flow mode-aware stream application node scheduling device, characterized in that: The data flow mode-aware stream application node scheduling device includes: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • System fault-tolerant strategy method based on deep reinforcement learning

    CN114153640A

  • Flow rate and resource aware flow application scheduling method and system

    CN114780247A