A strongly adaptive distributed data distribution method supporting dynamic expansion
By optimizing task scheduling through deep reinforcement learning and lock-free queues, the shortcomings of traditional distributed data distribution strategies in complex and dynamic environments are addressed, achieving efficient and stable task allocation and resource utilization, and supporting flexible expansion and exit of nodes.
Patent Information
- Application Number
- CN202510048436.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-01-13
AI Technical Summary
Traditional distributed data distribution strategies are difficult to dynamically adjust in the face of complex and dynamic environments, resulting in uneven task distribution, node overload and resource waste. Furthermore, existing deep reinforcement learning-based methods are not adaptable to dynamic node changes and complex task scenarios.
By employing deep reinforcement learning techniques, a deep Q-network model is initialized, node status is dynamically monitored, a reward mechanism is designed for task allocation, and lock-free queue technology is used to optimize task scheduling, supporting flexible expansion and exit of nodes and dynamic adjustment of resource configuration.
It improves the efficiency and accuracy of data distribution, enhances the system's adaptability to complex and dynamic environments, and ensures that the system maintains high efficiency and stable operation when it is expanded.
Smart Images

Figure CN119960991B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distributed computing and data processing technology, and in particular to a strongly adaptive distributed data distribution strategy that supports dynamic expansion. It aims to optimize data transmission efficiency and node resource utilization in distributed systems through intelligent task allocation and resource scheduling mechanisms, and is suitable for the efficient processing of complex tasks in large-scale distributed network environments. Background Technology
[0002] With the rapid development of information technology, distributed systems have gradually become the core infrastructure for handling large-scale data tasks, and have been widely used in fields such as cloud computing, edge computing, and the Internet of Things. These systems complete tasks through the collaboration of multiple nodes, effectively improving computing power and data processing efficiency. However, as the scale and complexity of data continue to grow, the challenges faced by distributed systems are becoming increasingly severe. Especially in environments with massive data transmission volumes and dynamically changing node states, how to achieve efficient data distribution and task allocation has become a key research focus and challenge.
[0003] Traditional distributed data distribution strategies typically rely on static rules or simple scheduling algorithms, such as load-balanced round-robin or random allocation. While these methods can achieve basic functionality under conditions of fixed nodes and stable task requirements, they exhibit significant limitations in complex environments. When node load or network conditions change, static allocation strategies often struggle to adjust the allocation scheme in a timely manner, easily leading to uneven task distribution, overload of some nodes, or wasted resources. Furthermore, these methods lack flexibility when dealing with diverse task types (such as real-time streaming data and batch data tasks), and struggle to dynamically optimize allocation strategies based on task characteristics and priorities.
[0004] As distributed systems scale up, the dynamic addition and removal of nodes become significant factors affecting system stability. In traditional distributed systems, adding new nodes typically requires manual registration and configuration, which prolongs the time it takes for the system to adapt to changes. Node removal can lead to task interruptions and even affect the normal operation of the entire system. Existing methods lack the ability to quickly adapt to dynamic changes in nodes, especially in scenarios with large workloads and high real-time requirements; this deficiency significantly reduces system efficiency and stability.
[0005] In recent years, with the rise of artificial intelligence technology, especially the widespread application of deep learning and reinforcement learning, more and more research has begun to explore intelligent distributed task allocation methods. Allocation models based on deep reinforcement learning can dynamically perceive task characteristics and node states, and adjust allocation decisions according to the real-time environment. These methods self-optimize by continuously accumulating system operation data, theoretically significantly improving the adaptability and efficiency of distributed systems. However, existing deep reinforcement learning-based task allocation schemes still have certain limitations, such as insufficient real-time performance, poor model adaptability, and limited support for complex task scenarios. Furthermore, these methods have not yet formed a unified and effective solution for the dynamic expansion of nodes and optimized resource utilization.
[0006] In conclusion, in order to address the shortcomings of traditional distributed data distribution strategies and fully leverage the advantages of artificial intelligence technology in task allocation, it is urgent to propose a new data distribution strategy. Summary of the Invention
[0007] The purpose of this invention is to overcome the shortcomings of the prior art and provide a strongly adaptive distributed data distribution method that optimizes distributed task allocation through deep reinforcement learning technology, improves the efficiency and accuracy of data distribution, enhances the system's adaptability to complex dynamic environments, and supports dynamic expansion.
[0008] The objective of this invention is achieved through the following technical solution: a strongly adaptive distributed data distribution method that supports dynamic expansion, comprising the following steps:
[0009] S1. Initialize all nodes of the distributed system, configure the basic architecture of the deep reinforcement learning model, and establish communication protocols between nodes; configure hardware and network parameters for all distributed nodes to ensure interconnection between nodes; construct the deep reinforcement learning model and define the input state, output action, and reward mechanism.
[0010] S2. Receive task requests from the distributed system, parse the task type, assign a priority to each task, and convert the task features into the input format of the deep reinforcement learning model; classify tasks according to task type and priority; and convert task features into a data format that the deep reinforcement learning model can process.
[0011] S3. Periodically detect the running status of all nodes, record the real-time load information of the nodes, and remove nodes with abnormal status or overload; dynamically monitor the CPU utilization, memory usage, and network bandwidth information of the nodes, and block nodes with abnormal operation or exceeding the load threshold.
[0012] S4. Input the task features and node states into the deep reinforcement learning model, design a reward mechanism, and enable the model to output the allocation strategy based on historical experience and current state. Train the model for reinforcement learning based on state-action-reward data.
[0013] S5. Based on the allocation decision output by the trained model, the task is transmitted to the target node, and the task scheduling is optimized using lock-free queue technology.
[0014] S6. Collect task execution results, update the experience pool of the deep reinforcement learning model accordingly, record the action-state-reward data of task allocation, and retrain the model periodically.
[0015] S7. Dynamically handle the addition or removal of nodes and dynamically adjust the resource configuration of nodes according to the system task load; register and synchronize the status of newly added nodes in real time; reallocate tasks that are not completed due to node removal and dynamically optimize resource allocation;
[0016] S8. Regularly evaluate the performance of the distributed system and adjust the parameters of the deep reinforcement learning model based on the evaluation results to form best practices for dynamic task allocation.
[0017] The beneficial effects of this invention are as follows: The distribution strategy of this invention can dynamically perceive changes in the state of nodes and tasks, optimize distributed task allocation through deep reinforcement learning technology, improve the efficiency and accuracy of data distribution, and enhance the system's adaptability to complex dynamic environments. This invention also supports the flexible expansion and exit of nodes, ensuring that the system maintains high efficiency and stable operation even during expansion. This invention can provide strong technical support for large-scale distributed systems, promoting their further application and development in fields such as cloud computing, the Internet of Things, and edge computing. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a dynamically scalable, strongly adaptive distributed data distribution strategy according to the present invention.
[0019] Figure 2 This is a schematic diagram of the distributed system architecture in step S1 of this embodiment of the invention;
[0020] Figure 3 This is a structural diagram of the deep reinforcement learning task allocation model used in step S4 of this embodiment of the invention. Detailed Implementation
[0021] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0022] like Figure 1 As shown, a strongly adaptive distributed data distribution method supporting dynamic expansion according to the present invention includes the following steps:
[0023] S1. Initialize all nodes in the distributed system, configure the basic architecture of the Deep Reinforcement Learning (DQN) model, and establish inter-node communication protocols. The distributed system includes a central controller and multiple distributed nodes. The central controller is a high-performance resource management computer equipped with a multi-core CPU, large-capacity memory, high-performance storage devices, and runs task decomposition and resource management programs. Distributed nodes are multiple sub-computers, each equipped with a multi-core CPU, GPU accelerator, 32GB or more of memory, and a high-speed network interface. The central controller can communicate with all distributed nodes via TCP / IP protocol, allocate tasks to each node, and each node collects its running status information via its internal CPU and uploads it to the central controller for processing by the central controller's multi-core CPU. Its network structure is as follows: Figure 2 As shown. Configure hardware and network parameters for all distributed nodes to ensure interoperability; construct a deep reinforcement learning model, defining input states, output actions, and reward mechanisms to optimize task allocation strategies; specifically as follows:
[0024] S11. Initialize the system nodes, configuring hardware parameters for all nodes in the distributed system, including but not limited to CPU performance C. i Memory capacity (M) i and network bandwidth B i Where i represents the i-th node; configure the communication protocol between nodes to ensure low latency and high reliability of data transmission, and use Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) to implement communication between nodes to ensure system stability;
[0025] S12. Define the input state vector S of the Deep Q-Network (DQN), including task feature information (such as task size T). size Task priority T priority ) and node status information (such as node load ratio L) i Remaining bandwidth ratio B i / B max Remaining computing power ratio C i / C max Define an action set A = {a1, a2, ..., a...} N}, a i Let represent the action of assigning a task to the i-th node, where N is the total number of nodes; the reward function R(s,a) is designed as follows:
[0026] R(s,a)=α·E-β·L-γ·D
[0027] Where E represents the task completion rate, L represents the node load balancing index, D represents the communication latency of task allocation, and α, β, and γ are weighting coefficients used to balance the importance of different objectives.
[0028] S13. Determine the unique identifier (ID) of the distributed nodes, establish a routing table between nodes to describe the logical topology between nodes; configure an efficient data transmission interface, define the data packet format, including task identifier, target node ID, task type and data content, to ensure the accuracy and integrity of distributed task allocation.
[0029] S14. Based on the CPU performance and network bandwidth of the nodes, define an initial load threshold L for each node. th,i :
[0030] L th,i =δ c ·C i +δ b B i
[0031] Where, δ c and δ b Weighting coefficients for node CPU performance and network bandwidth to ensure reasonable load distribution;
[0032] S15. Configure a distributed monitoring module in the system to periodically collect node operating status information and upload it to the central controller through a unified data acquisition interface. Determine the status collection frequency and node status update cycle to balance monitoring overhead and system real-time performance.
[0033] S2. Receive task requests from the distributed system, parse the task type, assign a priority to each task, and convert the task features into the input format of the deep reinforcement learning model; classify tasks according to task type (real-time data stream, batch tasks, etc.) and priority; convert task features (such as task size, completion deadline) into a data format that the deep reinforcement learning model can process. Specifically:
[0034] S21. After receiving a task request, the system parses the basic attributes of the task, including task type, task size, and computational requirements. Task types are categorized into real-time streaming tasks, batch tasks, and latency-tolerant tasks, marked as high, medium, and low priorities, respectively. Real-time streaming tasks are marked with a priority of 1, batch tasks with a priority of 2, and latency-tolerant tasks with a priority of 3. The task size T... size Calculate the requirement T in bytes. compute Quantized in units of floating-point operands (FLOPs), it is used to describe the computational intensity required to execute a task.
[0035] S22. Based on the parsed task attributes, construct the task feature vector T = [T size ,T compute ,T priority ], where T size T represents the size of the task's data. compute To calculate the demand, T priority The task priority is defined by the task feature vector, which represents the key features of the task to support subsequent allocation decisions.
[0036] S23. Standardize the task feature vectors to ensure that the numerical range of all features is consistent; the standardization formula is as follows:
[0037]
[0038] Among them, T min and T max These represent the minimum and maximum values of the feature in the historical task data, respectively; the standardized task feature vector T′ is mapped to the interval [0,1], which facilitates processing and optimization calculation by the deep learning model.
[0039] S24. The standardized task feature vector T′ is used to determine the current node state N of the system. state Combined, they form a complete input state vector S = [T′, N] state ]; where the node status information includes the node load ratio L i Remaining bandwidth ratio B i / B max And the remaining computing power ratio C i / C msx This is to reflect the current resource usage of each node in the system.
[0040] S25. By integrating task features and node states, the input state vector S for the deep reinforcement learning model is finally generated. The input state vector not only contains a description of the task's characteristics but also incorporates the resource state of the current node, providing the model with a comprehensive information foundation and supporting efficient task allocation decisions.
[0041] S3. Periodically check the running status of all nodes, record the real-time load information of the nodes, and remove nodes with abnormal status or overload; dynamically monitor the CPU utilization, memory usage, network bandwidth and other status information of the nodes, and block nodes with abnormal operation or exceeding the load threshold to ensure the reliability of task allocation. Specifically as follows:
[0042] S31. Periodically collect the operating status information of all nodes through the distributed monitoring module. The monitoring content includes the CPU utilization U of the i-th node. CPU,i Memory usage U MEM,iNetwork bandwidth utilization rate U BW,i and the task queue length Q i By using a predefined sampling period Δt, it is ensured that the status information can be updated in a timely manner and reflect the real-time operation of the system.
[0043] S32. Based on the collected status information, calculate the node's comprehensive load index L′. i :
[0044] L′ i =δ·U CPU,i +ε·U MEM,i +∈U BW,i
[0045] Where δ, ε, and ∈ are load weighting parameters used to adjust the contribution ratio of different resource types to the overall load. Overall load L′ i The higher the value, the more severe the current resource consumption of the node.
[0046] S33. Calculate the comprehensive load index L′ i With the system's set load threshold L th Comparison: If L′ i >L th If the node is overloaded, it is marked as an abnormal state; otherwise, the node is marked as normal. Nodes in normal state will continue to be included in the candidate range for task allocation.
[0047] S34. For abnormal nodes, remove them from the candidate list for task allocation and record the abnormal status information E. i This allows for subsequent system alarms or troubleshooting. Simultaneously, by reallocating unfinished tasks to other normal nodes, task processing interruptions due to abnormal nodes can be avoided.
[0048] S35. Upload the updated node running status information to the central controller for unified storage and synchronization, ensuring that all modules in the distributed system can share the latest node status in real time. Through the synchronization mechanism, other modules can make dynamic adjustments based on the latest status information, providing support for subsequent task allocation.
[0049] S4. Input task features and node states into the deep reinforcement learning model, design a reward mechanism, and enable the model to allocate strategies based on historical experience and current state output for training the DQN model. The reward mechanism includes positive rewards such as high task completion efficiency, load balancing, and high system resource utilization. The model is trained using reinforcement learning based on state-action-reward data. Details are as follows:
[0050] S41. The characteristic vector T′ of the collection task = [T size ,T compute,T priority and the state vector N of the node state =[L i C i / C max B i / B max ], which are combined into the input state vector S of the deep reinforcement learning model.
[0051] [T′,N state ]; among which, T size For the amount of task data, T compute T represents the amount of computational resources required for the task. priority For task priority, L i C i / C max B i / B max These represent the node's load ratio, remaining computing power ratio, and remaining bandwidth ratio, respectively.
[0052] S42. Construct a reinforcement learning model based on Deep Reinforcement Learning (DQN), where the state vector S serves as the model input, and the action set A = {a1, a2, ..., a...} N The output represents the decision made to assign a task to a specific node; for example... Figure 3 As shown, the DQN network includes three hidden layers. The first hidden layer is a fully connected layer with 128 nodes and a ReLU layer. The second hidden layer is a fully connected layer with 64 nodes and a ReLU layer. The third hidden layer is a fully connected layer with N nodes. Each action a in the action set... i This corresponds to assigning the task to the i-th node.
[0053] S43. The reward function R(s,a) is designed to balance task completion efficiency, load balancing, and latency minimization. The specific formula is as follows:
[0054]
[0055] Among them, T complete L represents the task completion time. i The target node's load ratio; D is the communication delay for task transmission; α,
[0056] β and γ are weighting parameters, representing the degree of concern for efficiency, load balancing, and latency, respectively.
[0057] S44. Input the input state vector S into the deep Q-network model, and obtain each action a through the model's forward computation. iThe Q-value is used to select the action with the largest Q-value as the current task allocation decision; the model's experience pool is updated using the task execution results and reward function, and the state-action-reward data (S,a,R) is recorded; based on the experience pool data, the model parameters are optimized through backpropagation to ensure that the model gradually learns the optimal task allocation strategy.
[0058] S45. During training, the model's input and experience pool are updated in real time based on new tasks and node states to ensure the timeliness and adaptability of the strategy; after the model completes training, the optimal action assignment a is selected for the current task. i * The task is assigned to the corresponding target node.
[0059] S5. Based on the allocation decision output by the trained model, the task is transmitted to the target node, and the task scheduling is optimized using lock-free queue technology to avoid thread conflicts and improve execution efficiency. The model decision is used to select the optimal target node; based on lock-free queue technology, efficient transmission and concurrent processing of tasks are guaranteed.
[0060] S5 is detailed below:
[0061] S51. Assign action a based on the output of the deep reinforcement learning model. i * Assign the task to the target node N i ; where target node N i The system calculates the highest allocation decision score (Q-value) based on the model. It prioritizes nodes with sufficient resources and low latency based on task priority and node status information, ensuring efficient task execution.
[0062] S52. After assigning tasks, the system transmits the task data to the target node N via the network communication module. i During transmission, the optimal routing algorithm is used to select the transmission path to minimize network latency. trans And packet loss rate. Simultaneously, the transmission status is monitored in real time through a traffic monitoring module to ensure the integrity and accuracy of task data.
[0063] S53. Within the target node, a lock-free queue is used for task scheduling and management. The lock-free queue design uses atomic operations to ensure concurrency safety in a multi-threaded environment, effectively avoiding conflicts and delays caused by thread contention. Specifically, tasks are scheduled according to priority T. priority The tasks are sorted, and high-priority tasks are given priority to be processed at the head of the queue.
[0064] S54. After receiving the task data, the target node, based on the task characteristics (such as computational requirement T),compute ) and its own resource situation (such as remaining computing power C) i Allocate appropriate computing and storage resources; select the appropriate execution mode based on the task type: use fast response mode for real-time tasks and batch processing mode for batch tasks; monitor resource usage in real time during task execution to avoid resource overload.
[0065] S55. During task execution, the target node periodically generates task progress feedback information, including the current amount of data processed and the estimated completion time T. remain The system monitors resource usage status (such as CPU utilization and memory utilization), and the feedback information is uploaded to the central controller via the communication module for subsequent task monitoring and scheduling optimization.
[0066] S56. After the task is completed, the target node uploads the final execution result to the central controller and records the completion time T. complete and resource usage R used If an error occurs during task execution, the node will generate an error log and notify the central controller, triggering a reallocation mechanism to reassign the unfinished task to other candidate nodes.
[0067] S6. Collect task execution results and update the experience pool of the deep reinforcement learning model accordingly. Record the action-state-reward data for task allocation and retrain the model periodically. Collect data such as task completion time and node status feedback. Regularly retrain the DQN model to continuously optimize the task allocation strategy. Details are as follows:
[0068] S61. After the task is completed, the target node will send the task execution result and completion time T. complete Resource usage R used The system also uploads operational status information (such as CPU utilization and memory usage) to the central controller; it also records whether the task was successfully completed or whether there were any abnormal situations (such as timeouts or interruptions), providing basic data for subsequent model adjustments and optimizations.
[0069] S62. Match the task execution result with the corresponding input state vector S = [T′, N]. state Assigning action a i The reward value R(s,a) is stored in the experience pool of the deep reinforcement learning model to form state-action-reward data (S,a,R);
[0070] S63. The system manages the data in the experience pool. When the storage capacity of the experience pool reaches its limit, a priority eviction strategy is adopted to remove older or low-value data entries to ensure that new data can be updated to the experience pool in a timely manner. Priority is given to retaining samples that are valuable to model learning, such as data records of high-complexity tasks or anomalous tasks, to enhance the model's adaptability.
[0071] S64. Periodically extract batches of samples ((S,a,R) from the experience pool to retrain the deep reinforcement learning model; optimize the model parameters through the backpropagation algorithm and update the model's state-action mapping strategy.
[0072] S65. After retraining, the new model strategy is deployed to the system, and the effect of the strategy is verified by real-time monitoring, including the efficiency of task allocation, the utilization rate of system resources, and the load balancing of nodes. If the new strategy causes a performance degradation, the system will roll back to the previous version of the strategy to ensure the stability and efficiency of the distributed system.
[0073] S66. Regularly evaluate the performance of deep reinforcement learning models, using metrics such as task completion rate and average completion time T. avg Node load balancing coefficient B balance Quantify the model's performance; if the evaluation results show that the model has not met the expected performance standards, adjust the weight parameters α, β, γ or other hyperparameters of the reward function to further optimize the model training.
[0074] S7. Dynamically handle the addition or removal of nodes and dynamically adjust node resource configurations based on system task load; register and synchronize the status of newly added nodes in real time; reallocate tasks not completed due to node removal and dynamically optimize resource allocation; details are as follows:
[0075] S71, When the new node T avg When a device joins a distributed system, the system assigns it a unique identifier (ID) through a registration mechanism and records its hardware parameters (such as computing power C). new Memory capacity (M) new Network bandwidth B new ) and initial state (such as load ratio) Subsequently, the system synchronizes the routing information of the new node with other nodes and updates the global node topology to ensure that the new node can participate in task allocation in a timely manner.
[0076] S72, For the added node N newThe system periodically collects status information, including CPU utilization, memory usage, and network bandwidth utilization, through a monitoring module. This collected information is uploaded to the central controller via a communication module, serving as the basis for subsequent allocation decisions and load balancing. Simultaneously, the addition of a new node triggers an update to the global node status table, ensuring that all nodes share the latest status information.
[0077] S73. To adapt to the addition of new nodes, the system recalculates the task allocation strategy and includes the new nodes in the task candidate allocation range. Through the real-time decision-making of the deep reinforcement learning model, the new nodes are given priority in being allocated tasks that are suitable for their resource characteristics. For example, tasks with low computing requirements are allocated to new nodes with fewer resources, thereby avoiding resource waste.
[0078] S74, When node N exit When a node needs to exit due to a fault or planned maintenance, the system detects its abnormal state (such as communication interruption or resource unavailability) through an anomaly detection mechanism and marks it as "exiting". Subsequently, the system stops assigning new tasks to the exiting node and transfers its unfinished tasks to other normal nodes N. alt The transfer should prioritize nodes with low load and sufficient resources to minimize task execution interruption time.
[0079] S75. For exit nodes, the system records their exit time T. exit The system log records the amount of data from completed tasks and the cause of failures (such as hardware failures or network interruptions) for subsequent system maintenance and fault analysis.
[0080] S76. After a node joins or leaves, the system reassesses the overall load L of each node. i Update the global load balancing strategy; adjust the load threshold L. th,i Dynamically optimize task allocation to ensure efficient resource utilization and balanced task distribution even when the number of nodes changes.
[0081] S77. After a node's state changes, the system evaluates the scaling performance during an observation period. Evaluation metrics include task completion rate, node resource utilization, average task latency, and load balancing coefficient. If the performance is found to be below expectations, the system will adjust the task allocation strategy or optimize model parameters to further improve the adaptability of dynamic scaling.
[0082] S8. Regularly evaluate the performance of the distributed system and adjust the parameters of the deep reinforcement learning model based on the evaluation results to form best practices for dynamic task allocation and further improve system efficiency; optimize model parameters based on system operation data (throughput, latency, task success rate, etc.); improve the global performance of task allocation and ensure that the system adapts to dynamically changing needs.
[0083] S8 is detailed below:
[0084] S81. During operation, the system continuously collects key performance indicator data, including task completion rate R. complete Average completion time T avg Node resource utilization rate U i and load balancing coefficient B balance Among them, the task completion rate is defined as the ratio of the number of tasks actually completed to the total number of tasks; the average completion time represents the average time taken from receiving a task to its completion; the node resource utilization rate is the average proportion of computing power, memory, and bandwidth occupied by each node; and the load balancing coefficient reflects the uniformity of load among the nodes in the system.
[0085] S82. Based on the collected performance data, calculate the system's comprehensive performance index P. sys The specific formula is as follows:
[0086] P sys =α·R complete -β·T avg -γ·(1-B balance )
[0087] Wherein, α, β, and γ are weighting coefficients, representing the importance of task completion rate, task latency, and load balancing, respectively; by evaluating comprehensive performance indicators, it is determined whether the current operating status of the system meets the expected goals;
[0088] S83. If the evaluation results show that the system performance is lower than the target value, the parameters of the deep reinforcement learning model are adjusted according to the actual operation. For example, by optimizing the weight parameters α, β, and γ in the reward function, the model's focus on specific performance objectives (such as latency or load balancing) can be enhanced. At the same time, the weights of input features can be adjusted or the model architecture can be redefined according to the latest task distribution and node status to improve the model's prediction accuracy and allocation efficiency.
[0089] S84. Apply the optimized strategy to the test task set to verify its effect on improving system performance; record the performance data differences before and after optimization, including task latency, resource utilization, and task completion rate; if the test results show a significant performance improvement, deploy the new strategy to the actual environment; otherwise, continue to adjust the model or strategy parameters until the expected goal is met.
[0090] S85. Based on the optimized model and strategy, the system makes global adjustments to the current task allocation scheme and resource allocation mechanism to ensure the stability of system performance in a dynamically changing environment. Simultaneously, parameter adjustments involved in the evaluation and optimization process are recorded in the system log, providing a basis for subsequent improvements and maintenance.
[0091] S86. By combining historical performance data, analyze the long-term operating trend of the system to identify potential performance bottlenecks or areas for improvement. For example, by analyzing the task distribution characteristics and node resource changes over different time periods, predict potential future load peaks or resource shortages, and take proactive measures, such as adding nodes or optimizing communication protocols.
[0092] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.
Claims
1. A strongly adaptive distributed data distribution method supporting dynamic expansion, characterized in that, Includes the following steps: S1. Initialize all nodes of the distributed system, configure the basic architecture of the deep reinforcement learning model, and establish communication protocols between nodes; configure hardware and network parameters for all distributed nodes to ensure interconnection between nodes; construct the deep reinforcement learning model and define the input state, output action, and reward mechanism. S2. Receive task requests from the distributed system, parse the task type, assign a priority to each task, and convert the task features into the input format of the deep reinforcement learning model; classify tasks according to task type and priority; and convert task features into a data format that the deep reinforcement learning model can process. S3. Periodically check the running status of all nodes, record the real-time load information of the nodes, and remove nodes with abnormal status or overload. S4. Input the task features and node states into the deep reinforcement learning model, design a reward mechanism, and enable the model to output the allocation strategy based on historical experience and current state. Train the model for reinforcement learning based on state-action-reward data. S5. Based on the allocation decision output by the trained model, the task is transmitted to the target node, and the task scheduling is optimized using lock-free queue technology. S6. Collect task execution results, update the experience pool of the deep reinforcement learning model accordingly, record the action-state-reward data of task allocation, and retrain the model periodically. S7. Dynamically handle the addition or removal of nodes and dynamically adjust the resource configuration of nodes according to the system task load; register and synchronize the status of newly added nodes in real time; reallocate tasks that are not completed due to node removal and dynamically optimize resource allocation; S8. Regularly evaluate the performance of the distributed system and adjust the parameters of the deep reinforcement learning model based on the evaluation results to form best practices for dynamic task allocation.
2. The strongly adaptive distributed data distribution method supporting dynamic expansion according to claim 1, characterized in that, The specific steps of S1 are as follows: S11. Initialize the system nodes, configuring hardware parameters for all nodes in the distributed system, including CPU performance. Memory capacity and network bandwidth ;in, Indicates the first Each node; communication between nodes is achieved using Transmission Control Protocol or User Datagram Protocol. S12. Define the input state vector of the deep Q-network. This includes task characteristic information and node status information; defining action sets. , This indicates that the task will be assigned to the first... Actions of each node; design the reward function. as follows: ; in, Indicates the task completion rate. This represents a metric for node load balancing. This indicates the communication latency for task allocation. , , These are weighting coefficients used to balance the importance of different objectives; S13. Determine the unique identifier of the distributed nodes and establish a routing table between nodes; configure an efficient data transmission interface and define the data packet format, including task identifier, target node ID, task type and data content; S14. Based on the node's CPU performance and network bandwidth, define an initial load threshold for each node. : ; in, and These are the weighting coefficients for the node's CPU performance and network bandwidth; S15. Configure a distributed monitoring module to periodically collect node operating status information and upload it to the central controller through a unified data collection interface.
3. The strongly adaptive distributed data distribution method supporting dynamic expansion according to claim 1, characterized in that, Step S2 is as follows: S21. After receiving a task request, the system parses the basic attributes of the task, including task type, task size, and computational requirements. Task types are categorized into real-time streaming tasks, batch tasks, and latency-tolerant tasks, marked with high, medium, and low priorities, respectively. Real-time streaming tasks are marked with a priority of 1, batch tasks with a priority of 2, and latency-tolerant tasks with a priority of 3. Task size... Calculation requirements in bytes Quantization is performed in units of floating-point operands; S22. Construct task feature vectors based on parsed task attributes. ,in, The size of the data for the task. To calculate the demand, Prioritize tasks; S23. Standardize the task feature vectors to ensure that the numerical range of all features is consistent; the standardization formula is as follows: ; in, and These represent the minimum and maximum values of this feature in historical task data, respectively. S24. The standardized task feature vector Current node status of the system Combined, they form a complete input state vector. Among them, the node status information includes the node load ratio. Remaining bandwidth ratio and remaining computing power ratio ; S25. By integrating task features and node states, the final input state vector for the deep reinforcement learning model is generated. .
4. The strongly adaptive distributed data distribution method supporting dynamic expansion according to claim 1, wherein step S3 is specifically as follows: S31. Periodically collect the operating status information of all nodes through the distributed monitoring module. The monitoring content includes the CPU utilization of the i-th node. Memory usage Network bandwidth utilization and task queue length ; S32. Calculate the comprehensive load index of the node based on the collected status information. : ; in, , and For load weight parameters; S33, Calculate the comprehensive load index With the system's set load threshold Comparison: If If the node is overloaded, it is marked as an abnormal state; otherwise, the node is marked as a normal state. S34. For abnormal nodes, remove them from the candidate list for task allocation and record the abnormal status information. ; S35. Upload the updated node running status information to the central controller for unified storage and synchronization, ensuring that all modules in the distributed system can share the latest node status in real time.
5. The strongly adaptive distributed data distribution method supporting dynamic expansion according to claim 3, characterized in that, Step S4 is as follows: S41, Feature vector of the collection task and the state vector of the node This is combined into the input state vector of the deep reinforcement learning model. ; S42. Construct a model based on deep reinforcement learning, where the state vector... The action set serves as the input to the model. The output represents the decision made to assign a task to a specific node, and each action in the action set represents that action. Corresponding to assigning the task to the first One node; S43, Reward Function The design goal is to balance task completion efficiency, load balancing, and latency minimization, as shown in the following formula: ; in, The time required to complete the task. The load ratio of the target node; This indicates the communication latency for task allocation. , , These are the weighting coefficients; S44. Input state vector Input a deep Q-network model, and obtain each action through the model's forward computation. The Q-value is used to select the action with the largest Q-value as the assignment decision for the current task; the experience pool of the model is updated using the task execution results and reward function, and state-action-reward data is recorded. Based on experience pool data, the model parameters are optimized through backpropagation to ensure that the model learns the optimal task allocation strategy step by step. S45. During training, the model's input and experience pool are updated in real time based on new tasks and node states; after the model completes training, the optimal action assignment is selected for the current task. The task is assigned to the corresponding target node.
6. The strongly adaptive distributed data distribution method supporting dynamic expansion according to claim 5, characterized in that, Step S5 is as follows: S51. Assign actions based on the output of the deep reinforcement learning model. Assign tasks to target nodes ; S52. After assigning tasks, the system transmits the task data to the target node via the network communication module. The optimal routing algorithm is used to select the transmission path during transmission. S53. Within the target node, a lock-free queue is used to schedule and manage tasks, with tasks ordered according to priority. The tasks are sorted, with high-priority tasks being processed at the head of the queue first. S54. After receiving the task data, the target node allocates corresponding computing and storage resources based on the task characteristics and its own resource situation; selects an appropriate execution method according to the task type: for real-time tasks, a fast response mode is adopted; for batch tasks, a batch processing mode is adopted; and resource usage is monitored in real time during task execution. S55. During task execution, the target node periodically generates task progress feedback information, including the current amount of data processed and the estimated completion time. The system monitors resource usage status and uploads feedback information to the central controller via the communication module. S56. After the task is completed, the target node uploads the final execution result to the central controller and records the completion time. and resource usage ; If an error occurs during task execution, the node will generate an error log and notify the central controller, triggering a reallocation mechanism to reassign the unfinished task to other candidate nodes.
7. The strongly adaptive distributed data distribution method supporting dynamic expansion according to claim 1, characterized in that, Step S6 is as follows: S61. After the task is completed, the target node will send the task execution result and completion time. Resource usage The system also uploads operational status information to the central controller and records whether the task was successfully completed or if any abnormalities occurred. S62. Compare the task execution result with the corresponding input state vector. Assigning actions Reward Value The data is stored in the experience pool of the deep reinforcement learning model to form state-action-reward data. ; S63. The system manages the data in the experience pool. When the storage capacity of the experience pool reaches the upper limit, a priority elimination strategy is adopted to remove older or low-value data entries. S64. Periodically draw batches of samples from the experience pool. The deep reinforcement learning model is retrained; the model parameters are optimized using the backpropagation algorithm, and the model's state-action mapping strategy is updated. S65. After retraining, the new model strategy is deployed to the system, and the effect of the strategy is verified by real-time monitoring. If the new strategy causes a performance drop, the system will roll back to the previous version of the strategy. S66. Regularly evaluate the performance of the deep reinforcement learning model. If the evaluation results show that the model does not meet the expected performance standards, adjust the parameters to further optimize the model training.
8. The strongly adaptive distributed data distribution method supporting dynamic expansion according to claim 1, characterized in that, Step S7 is as follows: S71, When a new node When a device joins a distributed system, the system assigns it a unique identifier through a registration mechanism and records its hardware parameters and initial state. Subsequently, the system synchronizes the routing information of the new node with other nodes and updates the global node topology; S72, For the added node The system periodically collects status information, including CPU utilization, memory usage, and network bandwidth usage, through the monitoring module. The collected status information is uploaded to the central controller through the communication module. At the same time, the addition of a new node will trigger an update of the global node status table. S73. Recalculate the task allocation strategy and include the new node in the task candidate allocation range; S74, When node When a node needs to exit due to a fault or planned maintenance, the system detects the abnormal status through an anomaly detection mechanism and marks it as "exiting". Subsequently, the system stops assigning new tasks to the exiting node and transfers its unfinished tasks to other normal nodes. Nodes with low load and sufficient resources should be prioritized for migration. S75. For exit nodes, the system records their exit time. The amount of data completed and the cause of the failure; S76. After a node joins or leaves, the system reassesses the load ratio of each node. Update the global load balancing strategy; adjust the load threshold. Dynamically optimize task allocation to ensure efficient resource utilization and balanced task distribution even when the number of nodes changes. S77. After a node's state changes, the system evaluates the extended performance through an observation period. Evaluation metrics include task completion rate, node resource utilization, average task latency, and load balancing coefficient. If the performance is found to be below expectations, the task allocation strategy is adjusted or the model parameters are optimized.
9. A strongly adaptive distributed data distribution method supporting dynamic expansion according to claim 1, characterized in that, Step S8 is as follows: S81. The system continuously collects key performance indicator data during operation, including task completion rate. Average completion time Node resource utilization rate and load balancing coefficient ; S82. Based on the collected performance data, calculate the overall performance index of the system. The specific formula is as follows: ; in, , , These are weighting coefficients, representing the importance of task completion rate, task latency, and load balancing, respectively; by evaluating comprehensive performance indicators, it is determined whether the current operating status of the system meets the expected goals; S83. If the evaluation results show that the system performance is lower than the target value, the parameters of the deep reinforcement learning model shall be adjusted according to the actual operation. S84. Apply the optimized strategy to the test task set to verify its effect on improving system performance; record the performance data differences before and after optimization, including task latency, resource utilization, and task completion rate; if the test results show a significant performance improvement, deploy the new strategy to the actual environment; otherwise, continue to adjust the model or strategy parameters until the expected goal is met. S85. Based on the optimized model and strategy, make global adjustments to the current task allocation scheme and resource allocation mechanism; S86. Analyze the long-term operating trend of the system by combining historical performance data.
Citation Information
Patent Citations
Calculation power distribution network online scheduling method based on dual deep reinforcement learning
CN117834624A
Industrial network optimization system based on edge computing
CN118474100A