Bandwidth allocation method and device, storage medium and electronic equipment

By dynamically calculating task priorities and secondary bandwidth allocation, combined with large language model prediction, the problem of low bandwidth utilization in existing technologies is solved, achieving efficient bandwidth resource management and accurate prediction of task completion time.

CN121309508APending Publication Date: 2026-01-09AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511734280.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-24
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

Existing network bandwidth allocation strategies lack flexibility and cannot be dynamically adjusted according to task attributes and real-time status, resulting in low bandwidth utilization, uneven resource allocation, and low transmission efficiency.

Method used

By responding to task status change events, obtaining task information, calculating task priorities, and allocating bandwidth, and combining large language models to predict task completion time, dynamic bandwidth allocation and secondary allocation are achieved to optimize bandwidth utilization.

Benefits of technology

This improved bandwidth utilization, ensured dynamic allocation of tasks according to priority and resource requirements, and enhanced transmission efficiency and the accuracy of task completion time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121309508A_ABST
    Figure CN121309508A_ABST
Patent Text Reader

Abstract

The invention provides a bandwidth allocation method and device, a storage medium and electronic equipment, and relates to the technical field of computers, and the method comprises the steps: responding to a task state change event in a task system, and obtaining the importance degree, urgency degree, data volume and maximum expected sending bandwidth of all uncompleted tasks; and calculating the priority of each task. And allocating the total available bandwidth of the system as the pre-allocated bandwidth of each task according to the priority proportion, and completing primary allocation by taking a smaller value with the maximum expected bandwidth of each task, thereby ensuring that no task is excessively occupied. Then, the remaining bandwidth of the system is calculated. And if the remaining bandwidth exists and the tasks do not reach the upper limit of the bandwidth, identifying the tasks as second tasks, and performing secondary allocation: allocating the remaining bandwidth according to the priority proportion, thereby realizing efficient and reasonable utilization of the bandwidth.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a bandwidth allocation method and device, storage medium and electronic equipment. BACKGROUND

[0002] With the development of informationization in the financial industry, various types of regulatory data reporting systems need to transmit a large amount of business data in real time. The existing network bandwidth is mostly allocated statically or by using a simple priority strategy, which is difficult to adapt to dynamic business needs and changes in network environment, often leading to uneven resource allocation and low transmission efficiency.

[0003] In the prior art, the bandwidth allocation strategy lacks flexibility and cannot be dynamically adjusted according to task attributes and real-time state, resulting in low bandwidth utilization. SUMMARY

[0004] The technical problem to be solved by the present application is to provide a bandwidth allocation method, device, storage medium and electronic equipment, which can improve the bandwidth utilization. The specific scheme is as follows:

[0005] A bandwidth allocation method comprises:

[0006] In response to a task state change event occurring in a task system, obtaining task information and maximum expected sending bandwidth of each first task in the task system in a to-be-executed or incomplete state, the task information including importance, urgency and data volume;

[0007] Determining a task priority of each first task according to the task information of each first task;

[0008] Based on the task priority and the current available total bandwidth of the task system, calculating a pre-allocation bandwidth of each first task;

[0009] For each first task, taking the smaller value between the pre-allocation bandwidth of the first task and the maximum expected sending bandwidth of the first task as the initial allocation bandwidth of the first task;

[0010] Based on the initial allocation bandwidth of each first task, calculating the remaining bandwidth of the task system;

[0011] In the case that the remaining bandwidth in the task system is not zero and there is at least one first task whose initial allocation bandwidth is less than its maximum expected sending bandwidth, taking the first task that does not reach the maximum expected bandwidth as a second task;

[0012] Based on the task priority and the maximum expected sending bandwidth of each second task, allocating the remaining bandwidth to each second task.

[0013] The method, optionally, the task priority of each first task is determined according to the task information of each first task, comprising:

[0014] The data amount score of each first task is calculated based on the data amount of each first task;

[0015] For each first task, the data amount score, importance and urgency of the first task are weighted and summed to obtain the initial priority score of the first task;

[0016] The initial priority scores of all first tasks are summed to obtain the initial priority score sum;

[0017] The initial priority score of each first task is divided by the initial priority score sum to obtain the task priority of each first task.

[0018] The method, optionally, the residual bandwidth is allocated to each second task based on the task priority of each second task and the maximum expected sending bandwidth, comprising:

[0019] The residual bandwidth is allocated to each second task in a weighted proportion based on the task priority of each second task to obtain the secondary pre-allocation bandwidth of each second task;

[0020] For each second task, the difference between the maximum expected sending bandwidth and the current actual allocation bandwidth of the second task is calculated as the current available bandwidth margin of the second task;

[0021] The minimum value between the secondary pre-allocation bandwidth of each second task and the current available bandwidth margin of the second task is taken as the actual new bandwidth of the second task, and the residual bandwidth of the task system is updated.

[0022] The method, optionally, after the residual bandwidth is allocated to each second task based on the task priority of each second task and the maximum expected sending bandwidth, further comprising:

[0023] The actual allocation bandwidth and the residual data amount of each first task are obtained;

[0024] The baseline completion time of each first task is calculated based on the residual data amount and the actual allocation bandwidth;

[0025] A large language model is called, a parameter containing task context information is input, and a correction coefficient of the first task completion time output by the large language model is obtained;

[0026] For each of the first tasks, the correction factor of the first task is multiplied by the baseline completion time to obtain the predicted completion time of each of the first tasks.

[0027] Optionally, in the above method, multiplying the correction coefficient of the first task by the baseline completion time to obtain the predicted completion time of each of the first tasks includes:

[0028] Receive the confidence level returned by the large language model corresponding to the correction coefficient;

[0029] Determine whether the confidence level is lower than a preset confidence threshold;

[0030] If the confidence level is greater than the confidence level threshold, the correction coefficient of the first task is multiplied by the baseline completion time to obtain the predicted completion time of each first task.

[0031] A bandwidth allocation device, comprising:

[0032] The acquisition unit is used to acquire the task information and maximum expected transmission bandwidth of each first task in the task system that is in a pending or incomplete state in response to a task status change event in the task system. The task information includes importance, urgency and data volume.

[0033] A determining unit is configured to determine the task priority of each first task based on the task information of each first task.

[0034] A calculation unit is used to calculate the pre-allocated bandwidth for each first task based on the task priority and the current available total bandwidth of the task system;

[0035] The sending unit is configured to, for each of the first tasks, use the smaller of the pre-allocated bandwidth of the first task and the maximum expected sending bandwidth of the first task as the initial allocated bandwidth of the first task.

[0036] The second computing unit is used to calculate the remaining bandwidth of the task system based on the initial allocated bandwidth of each of the first tasks.

[0037] An execution unit is configured to, when the remaining bandwidth in the task system is not zero and at least one of the first tasks has an initial allocated bandwidth less than its maximum expected transmission bandwidth, designate the first task that has not reached the maximum expected bandwidth as the second task.

[0038] The allocation unit is used to allocate the remaining bandwidth to each of the second tasks based on the task priority and the maximum expected transmission bandwidth of each second task.

[0039] Optionally, the determining unit in the aforementioned apparatus includes:

[0040] The first calculation subunit is used to calculate the data volume score for each first task based on the data volume of each first task;

[0041] The second calculation subunit is used to perform a weighted summation of the data volume score, importance, and urgency of each first task to obtain the initial priority score of the first task.

[0042] The third calculation subunit is used to sum the initial priority scores of all first tasks to obtain the total initial priority scores;

[0043] The fourth calculation subunit is used to divide the initial priority score of each first task by the sum of the initial priority scores to obtain the task priority of each first task.

[0044] Optionally, the distribution unit in the aforementioned apparatus includes:

[0045] The allocation subunit is used to allocate the remaining bandwidth to each of the second tasks according to the task priority of each second task and in a weighted proportion, so as to obtain the secondary pre-allocated bandwidth of each second task.

[0046] The calculation subunit is used to calculate, for each of the second tasks, the difference between the maximum expected transmission bandwidth of the second task and the currently actually allocated bandwidth, as the current available bandwidth margin of the second task.

[0047] The execution subunit is used to take the minimum value between the secondary pre-allocated bandwidth of each second task and the current available bandwidth margin of the second task as the actual newly added bandwidth of the second task, and update the remaining bandwidth of the task system.

[0048] A storage medium comprising stored instructions, wherein, when the instructions are executed, the device in which the storage medium resides executes the bandwidth allocation method described above.

[0049] An electronic device includes a memory and one or more instructions, wherein one or more instructions are stored in the memory and configured to be executed by one or more processors as described above in the bandwidth allocation method.

[0050] This application provides a bandwidth allocation method, apparatus, storage medium, and electronic device. The method includes: responding to a task state change event in a task system, acquiring task information and maximum expected transmission bandwidth of each first task in the task system that is in a pending or incomplete state, the task information including importance, urgency, and data volume; determining the task priority of each first task based on the task information of each first task; calculating a pre-allocated bandwidth for each first task based on the task priority and the current available total bandwidth of the task system; for each first task, using the smaller value between the pre-allocated bandwidth and the maximum expected transmission bandwidth of the first task as the initial allocated bandwidth of the first task; calculating the remaining bandwidth of the task system based on the initial allocated bandwidth of each first task; if the remaining bandwidth of the task system is not zero, and at least one first task has an initial allocated bandwidth less than its maximum expected transmission bandwidth, designating the first task that has not reached its maximum expected bandwidth as a second task; and allocating the remaining bandwidth to each second task based on the task priority and maximum expected transmission bandwidth of each second task. Applying the method provided in this application can accurately allocate bandwidth to each task, thereby improving bandwidth utilization. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0052] Figure 1 A flowchart of a bandwidth allocation method provided in this application;

[0053] Figure 2 A flowchart of a bandwidth allocation process provided in this application;

[0054] Figure 3 A flowchart of a task completion time prediction process provided in this application;

[0055] Figure 4 A schematic diagram of a bandwidth allocation device provided in this application;

[0056] Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation

[0057] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0058] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0059] This application provides a bandwidth allocation method that can be applied to electronic devices, such as personal computers, servers, smartphones, tablets, smart wearable devices, etc. The method flowchart is shown below. Figure 1 As shown, it specifically includes:

[0060] S101: In response to a task status change event in the task system, obtain the task information and maximum expected transmission bandwidth of each first task in the task system that is in a pending or incomplete state. The task information includes importance, urgency and data volume.

[0061] In this embodiment, task status change events may include, but are not limited to, situations such as a new task being added to the system, an existing task completing its transfer, or the task attributes being modified by the administrator.

[0062] Among them, the importance in the task information represents the priority weight of the transmission task at the business level, which is usually specified by the task initiator when creating the task; urgency reflects the task's requirement for transmission timeliness; and data volume is measured in megabytes to measure the size of the file to be transmitted.

[0063] In addition, the maximum expected transmission bandwidth, as a configurable parameter for each task, is used to limit the maximum bandwidth resources that the task can occupy, preventing a single task from excessively consuming network resources.

[0064] S102: Determine the task priority of each first task based on the task information of each first task.

[0065] In this embodiment, the data volume can be inversely normalized. That is, the largest file size in the system is used as a benchmark, and a data volume score is obtained by calculating the relative proportion and taking the logarithm. This effectively avoids the excessive influence of extremely large files on priority calculation. The initial priority score is obtained by multiplying the data volume score, importance, and urgency by their respective weighting coefficients and then summing the results. Finally, the initial scores of all tasks are normalized to ensure that the sum of the priorities of all tasks is 1. This yields the task priorities that can be used for bandwidth allocation.

[0066] S103: Calculate the pre-allocated bandwidth for each first task based on task priority and the current total available bandwidth of the task system.

[0067] In this embodiment, the pre-allocated bandwidth is calculated using a priority-based allocation principle. Specifically, the system's current total available bandwidth is allocated according to the priority of each task.

[0068] For example, if the total system bandwidth is 100Mbps and a task has a priority of 0.2, then the pre-allocated bandwidth for that task is 20Mbps. This allocation method ensures that high-priority tasks receive more bandwidth resources, aligning with the urgency of business needs.

[0069] S104: For each first task, the smaller of the pre-allocated bandwidth of the first task and the maximum expected transmission bandwidth of the first task is used as the initial allocated bandwidth of the first task.

[0070] In this embodiment, considering that some tasks may not be able to fully utilize the priority-allocated bandwidth due to their hardware limitations or business characteristics, it is necessary to compare the pre-allocated bandwidth with the task's own capacity limit. By taking the smaller value, it is ensured that the task does not exceed its processing capacity, and bandwidth resources are not wasted.

[0071] S105: Calculate the remaining bandwidth of the task system based on the initial allocated bandwidth of each first task.

[0072] In this embodiment, the remaining bandwidth is calculated using simple arithmetic. The remaining bandwidth is obtained by subtracting the sum of the initial bandwidth allocated to all tasks from the total system bandwidth. This remaining bandwidth may come from two sources: first, the remaining bandwidth due to some tasks having their pre-allocated bandwidth exceeding their maximum expected transmission bandwidth and being truncated; second, the bandwidth reserved by the system to maintain network stability. Accurately calculating the remaining bandwidth is the basis for subsequent secondary allocation.

[0073] S106: If the remaining bandwidth in the task system is not zero, and there is at least one first task whose initial allocated bandwidth is less than its maximum expected transmission bandwidth, the first task that has not reached the maximum expected bandwidth shall be designated as the second task.

[0074] In this embodiment, the selection process for the second task is essentially the construction of a candidate set for bandwidth reallocation. Two conditions must be met simultaneously: first, the system must indeed have available remaining bandwidth; second, there must be tasks with room for bandwidth improvement. This dual-condition judgment ensures the necessity and effectiveness of the secondary allocation. All tasks meeting the conditions are marked as second tasks, providing clear operational targets for subsequent iterative allocation.

[0075] S107: Based on the task priority and maximum expected transmission bandwidth of each second task, allocate the remaining bandwidth to each second task.

[0076] In this embodiment, the remaining bandwidth can first be allocated according to the priority ratio of the second tasks, and then it can be checked whether the bandwidth allocated to each task exceeds its remaining available bandwidth capacity. Any excess bandwidth is truncated, and the system's remaining bandwidth is updated. This process is repeated until the remaining bandwidth is zero or all second tasks have reached their bandwidth limits. Additionally, to ensure system stability, a maximum number of iterations can be set to prevent infinite loops due to special circumstances.

[0077] In one alternative embodiment, to prevent the iteration process from proceeding indefinitely, an upper limit on the number of iterations can be set. Specifically, a counter is incremented at the beginning of each iteration, and the iteration process is terminated immediately when a preset threshold is reached. This protection mechanism ensures that the system maintains stable operation under all circumstances.

[0078] Furthermore, in practice, the weighting coefficients for task priorities can be dynamically adjusted based on actual business needs. For example, during peak business periods, the weight of importance can be appropriately increased to ensure that critical business operations are prioritized; when the system load is light, the weight of data volume can be appropriately increased to facilitate the rapid transmission of large files. This flexible weighting configuration mechanism allows the bandwidth allocation strategy to adapt to different business scenario requirements.

[0079] It is easy to understand that the embodiments of this application, through the organic combination of initial allocation and secondary allocation, take into account both task priority and fully utilize the remaining bandwidth resources of the system, thereby maximizing bandwidth utilization efficiency.

[0080] In one embodiment provided in this application, based on the above-described scheme, optionally, the task priority of each first task is determined according to the task information of each first task, including:

[0081] Based on the amount of data for each first task, a data volume score is calculated for each first task.

[0082] For each first task, the data volume score, importance, and urgency of the first task are weighted and summed to obtain the initial priority score of the first task;

[0083] Sum the initial priority scores of all first tasks to obtain the total initial priority scores;

[0084] Divide the initial priority score of each first task by the sum of the initial priority scores to obtain the task priority of each first task.

[0085] Optionally, when calculating the score based on the actual amount of data, an inverse normalization approach can be adopted. That is, tasks with smaller file sizes should be given relatively higher scores, which can ensure that small files can get priority transmission opportunities.

[0086] For example, the final data volume score can be obtained by calculating the ratio of the task's data volume to the maximum task's data volume in the system, then performing a base-10 logarithmic operation on that ratio, and finally subtracting the logarithmic value from 1. This calculation method can effectively avoid the excessive influence of a few extremely large files on the scoring system, while also preventing the problem of overly concentrated scoring results caused by a large number of small files.

[0087] In one optional embodiment, the values ​​of the importance and urgency parameters are typically set between 0 and 1, and are specified by the task creator according to business needs. The weighting coefficients used in the weighted summation process need to meet a normalization condition, meaning the sum of the three weighting coefficients should equal 1. Furthermore, these weighting coefficients should allow system administrators to dynamically adjust them based on changes in actual business scenarios. For example, the importance weighting coefficient can be appropriately increased during peak business periods, while the urgency weighting coefficient can be appropriately increased during regular operating periods. This design makes the priority calculation strategy highly adaptable to business needs.

[0088] As is easily understood, normalization ensures that the sum of the priorities of all tasks equals 1, thus laying the mathematical foundation for the subsequent proportional allocation of bandwidth resources. This normalization process also effectively avoids excessive fluctuations in priority distribution caused by changes in the number of tasks.

[0089] It should be noted that in actual system implementation, a special case may occur where the sum of the initial priority scores is zero. The system should have a corresponding exception handling mechanism to handle such boundary cases. For example, when an initial priority score sum of zero is detected, all first tasks can be assigned equal task priorities, or a round-robin approach can be used. This design ensures that the system remains stable even under abnormal conditions.

[0090] In one optional embodiment, the specific setting of the weighting coefficients needs to take into account the characteristics of different business scenarios. For example, for video conferencing systems with high real-time requirements, a relatively high urgency weight can be set, such as setting the urgency weight to 0.5, the importance weight to 0.3, and the data volume score weight to 0.2. For file backup systems, a relatively high data volume weight can be set to promote the rapid transfer of large files.

[0091] In one embodiment provided in this application, based on the above-described scheme, optionally, the remaining bandwidth is allocated to each second task based on the task priority and maximum expected transmission bandwidth of each second task, including:

[0092] Based on the task priority of each second task, the remaining bandwidth is allocated to each second task according to the weight ratio, resulting in the secondary pre-allocated bandwidth for each second task.

[0093] For each second task, calculate the difference between the maximum expected transmission bandwidth of the second task and the currently actually allocated bandwidth, and use it as the current available bandwidth margin for the second task.

[0094] The minimum value between the pre-allocated bandwidth of each second task and the current available bandwidth margin of the second task is taken as the actual additional bandwidth of the second task, and the remaining bandwidth of the task system is updated.

[0095] In this embodiment, the second task refers to the pending task that has not yet reached its maximum expected transmission bandwidth after the initial bandwidth allocation. In the actual allocation process, it is necessary to first calculate the proportion of the task priority of each second task in the total priority of all second tasks, and then allocate the remaining bandwidth of the system according to this proportion.

[0096] For example, assuming the system has 50Mbps of remaining bandwidth, and a second task has a priority of 30% of the total priority, then that task will receive 15Mbps of pre-allocated bandwidth. This weighted allocation method ensures that higher-priority tasks receive more remaining bandwidth resources.

[0097] As is easily understood, in actual system implementations, the above allocation process typically needs to be repeated iteratively. After each iteration, the system's remaining bandwidth needs to be recalculated, and it needs to be checked whether there is any available bandwidth for a second task. If the conditions for continuing allocation are met, the next iteration process is initiated. This iterative allocation mechanism ensures that the system's remaining bandwidth is utilized to the maximum extent.

[0098] It should be noted that some special situations may arise in actual operation. For example, when the available bandwidth margin for a second task is very small, the allocation process may converge slowly. To address this, a minimum allocation threshold can be set. When the available bandwidth margin for a task falls below this threshold, it will no longer participate in the subsequent allocation process. This optimization measure can improve allocation efficiency and avoid wasting system resources on minor bandwidth adjustments.

[0099] In an alternative embodiment, a maximum limit can be set for the number of iterations. For example, the system can be set to perform a maximum of 10 iterations, forcibly ending the allocation process even if there is still remaining bandwidth and tasks that have not reached the limit. This protection mechanism can prevent the system from falling into an infinite loop under special circumstances, ensuring system stability and responsiveness.

[0100] Finally, it's important to note that atomic operations are necessary to ensure data consistency when updating the system's remaining bandwidth. Especially in high-concurrency scenarios where multiple tasks update the remaining bandwidth value simultaneously, appropriate locking mechanisms or transaction processing must be employed to prevent calculation errors caused by data race conditions. This design ensures the accuracy and reliability of the bandwidth allocation process.

[0101] In one embodiment provided in this application, based on the above-described scheme, optionally, after allocating the remaining bandwidth to each second task based on the task priority and maximum expected transmission bandwidth of each second task, the method further includes:

[0102] Obtain the actual allocated bandwidth and remaining data volume for each first task;

[0103] Based on the remaining data volume and the actual allocated bandwidth, calculate the baseline completion time for each first task;

[0104] Call the large language model, input parameters containing task context information, and obtain the correction coefficient for the first task completion time output by the large language model;

[0105] For each first task, the correction factor of the first task is multiplied by the baseline completion time to obtain the predicted completion time of each first task.

[0106] In this embodiment, the actual allocated bandwidth is the actual transmission rate available to the task at the current moment; the remaining data amount refers to the total amount of data that the task has not yet completed transmitting.

[0107] In an optional embodiment, the specific calculation method for the step "calculating the baseline completion time of each first task based on the remaining data volume and the actual allocated bandwidth" can be described as follows. The baseline completion time can be calculated using a simple division operation, that is, dividing the remaining data volume by the actual allocated bandwidth. However, considering the protocol overhead and transmission efficiency issues that may exist in the actual transmission process, a transmission efficiency coefficient is usually introduced for correction.

[0108] For example, the calculation formula can be expressed as: Baseline completion time = (Remaining data volume × 8) / (Actual allocated bandwidth × Transmission efficiency coefficient). The multiplication by 8 is to convert the data volume unit from bytes to bits, and the transmission efficiency coefficient usually ranges from 0.8 to 0.95, and the specific value can be determined based on historical transmission statistics.

[0109] Optionally, task context information is a relatively broad concept, and may include, but is not limited to, the following: task attribute information (such as importance, urgency, etc.), system network status information (such as historical bandwidth fluctuations, current network load, etc.), and historical completion status of similar tasks. This context information, after appropriate formatting, is input into the large language model as prompt words.

[0110] It's easy to understand that after receiving this contextual information, the large language model will output a correction coefficient for the baseline completion time. This correction coefficient is usually a floating-point number, and its value can be set between 0.5 and 1.5. A value less than 1 indicates that the model believes the baseline completion time is too high and needs to be reduced, while a value greater than 1 indicates that it needs to be increased. In practical applications, to ensure the reliability of the system, it is also necessary to obtain the confidence index of the model output. When the confidence level is lower than a preset threshold, the historical average correction coefficient or the baseline completion time can be used directly.

[0111] In one optional embodiment, the invocation process of the large language model also needs to consider the balance between system performance and response time. Since the inference of the large language model may take a considerable amount of time, an asynchronous invocation approach can be adopted in practice. That is, the baseline completion time is returned first as an initial estimate, and the predicted value is updated only after the large language model returns the corrected result. This design ensures both system response speed and improved prediction accuracy.

[0112] Finally, it's important to note that the entire prediction process should form a closed-loop optimization system. Specifically, the actual error of each prediction can be fed back to the large language model, allowing the model to continuously learn and improve. For example, the mean absolute error between the predicted completion time and the actual completion time can be calculated periodically, and this error information can be used as one of the input parameters for subsequent model calls, thereby achieving continuous calibration and optimization of the correction coefficients.

[0113] In one embodiment provided in this application, based on the above-described scheme, optionally, the correction coefficient of the first task is multiplied by the baseline completion time to obtain the predicted completion time of each first task, including:

[0114] Receive the confidence scores returned by the large language model corresponding to the correction coefficients;

[0115] Determine whether the confidence level is lower than the preset confidence threshold;

[0116] If the confidence level is greater than the confidence level threshold, the correction coefficient of the first task is multiplied by the baseline completion time to obtain the predicted completion time of each first task.

[0117] In one alternative embodiment, the confidence level refers to the reliability of the large language model's output correction coefficients, typically represented by a value between 0 and 1. The closer the value is to 1, the more confident the model is in its output correction coefficients; conversely, the closer the value is to 0, the higher the uncertainty of the model's output. In practical system implementations, this confidence level value is usually related to the probability distribution characteristics calculated internally by the large language model.

[0118] In one optional embodiment, the confidence threshold is a configurable system parameter, typically set between 0.6 and 0.8. The specific setting of this threshold needs to consider both the system's requirements for prediction accuracy and its dependence on the reliability of the large language model. For example, in a demanding production environment, the confidence threshold can be set to 0.75; the correction coefficients output will only be adopted when the model's confidence level reaches or exceeds this value.

[0119] Optionally, if the confidence level is less than a confidence threshold, the average of correction coefficients for similar tasks is calculated from a historical correction coefficient database, and this historical average is used to predict the completion time of the current task. Alternatively, in an optional embodiment, a processing strategy that directly uses the baseline completion time can be adopted. Specifically, when the confidence level is detected to be below the threshold and historical data is insufficient, the baseline completion time is directly used as the final predicted completion time output.

[0120] This invention addresses the network bandwidth management needs in financial industry data reporting and control scenarios by proposing an intelligent network bandwidth allocation and prediction method. This method effectively solves the problems of low resource utilization and large prediction errors inherent in traditional technologies by organically combining dynamic priority calculation, a secondary bandwidth allocation algorithm, and a hybrid prediction model.

[0121] like Figure 2 As shown, when a new task is added to the task system, the task priority calculation module will be triggered. This module calculates the normalized weight of each incomplete task based on the importance (I), urgency (U), and data volume (S) that the user has marked for the file transfer task. The task priority calculation formula is as follows:

[0122] (1)

[0123] (2)

[0124] (3)

[0125] Where Size represents the amount of data. Indicates importance weight, Indicates urgency weight, This indicates the weight of the data volume.

[0126] Specifically, formula (1) calculates the data volume score Snorm through inverse normalization and logarithmic processing to ensure that small files receive higher priority and avoid individual files receiving excessively high scores; formula (2) performs a weighted summation of the data volume score, importance, and urgency to obtain the initial priority score. Formula (3) normalizes the score by constraining the sum of weighted coefficients, where the weighted coefficients can be dynamically adjusted by the system administrator according to business needs.

[0127] After obtaining the normalized priority, the bandwidth allocation module multiplies it by the total available bandwidth of the system to obtain the pre-allocated bandwidth for each task. By matching the pre-allocated bandwidth with the task's maximum expected transmission bandwidth. Take the smaller value to complete the initial allocation and excess cutoff, as shown in formula (4):

[0128] (4)

[0129] in, This indicates the initial bandwidth allocation.

[0130] To further improve bandwidth utilization efficiency, the system selects tasks that have not reached the bandwidth limit as secondary tasks and allocates them again based on the remaining network bandwidth. As shown in formulas (5) and (6),

[0131] (5)

[0132] (6)

[0133] in, Indicates the remaining available bandwidth of the current transmission network. This indicates secondary bandwidth allocation.

[0134] The remaining bandwidth is allocated in a secondary distribution based on task priority, and truncation protection is performed again. This process is repeated iteratively until bandwidth is exhausted or all tasks reach their limits, thereby achieving efficient utilization of network resources.

[0135] After bandwidth allocation is completed, such as Figure 3 As shown, the task completion time is predicted. This application introduces an LLM model to correct the baseline value, as shown in formula (7):

[0136] (7)

[0137] By inputting task context parameters, the LLM outputs a correction coefficient α, which is multiplied by the baseline completion time to obtain the prediction result. The system also receives the confidence level returned by the model; if it is lower than a set threshold, the historical average correction coefficient or the baseline estimate is used directly.

[0138] To further improve prediction accuracy, this invention introduces a feedback optimization mechanism, as shown in formula (8):

[0139] (8)

[0140] in, Indicates the historical prediction time. Indicates the actual completion time. This represents the mean absolute error. The mean absolute error between historical predictions and actual completion times can be fed back into the LLM model to achieve dynamic calibration of the correction coefficients, forming a closed-loop optimization. In summary, this invention significantly improves bandwidth resource utilization efficiency and the accuracy of task completion time prediction through priority calculation, dynamic bandwidth allocation, and LLM-assisted prediction.

[0141] and Figure 1 Corresponding to the method described herein, embodiments of this application also provide a bandwidth allocation device, applied to data processing nodes in a blockchain, specifically for allocating bandwidth to... Figure 1 The specific implementation of the method is shown in the following structural diagram. Figure 4 As shown, it includes:

[0142] The acquisition unit 401 is used to respond to a task status change event in the task system and acquire the task information and maximum expected transmission bandwidth of each first task in the task system that is in a pending or incomplete state. The task information includes importance, urgency and data volume.

[0143] The determining unit 402 is used to determine the task priority of each first task based on the task information of each first task.

[0144] The calculation unit 403 is used to calculate the pre-allocated bandwidth for each first task based on the task priority and the current available total bandwidth of the task system.

[0145] The sending unit 404 is used to, for each first task, take the smaller value between the pre-allocated bandwidth of the first task and the maximum expected sending bandwidth of the first task as the initial allocated bandwidth of the first task.

[0146] The second computing unit 405 is used to calculate the remaining bandwidth of the task system based on the initial allocated bandwidth of each first task.

[0147] The execution unit 406 is used to treat the first task that has not reached the maximum expected bandwidth as the second task when the remaining bandwidth in the task system is not zero and there is at least one first task whose initial allocated bandwidth is less than its maximum expected transmission bandwidth.

[0148] Allocation unit 407 is used to allocate the remaining bandwidth to each second task based on the task priority and the maximum expected transmission bandwidth of each second task.

[0149] In one embodiment provided in this application, based on the above-described solution, optionally, the determining unit 402 includes:

[0150] The first calculation subunit is used to calculate the data volume score for each first task based on the data volume of each first task;

[0151] The second calculation subunit is used to perform a weighted summation of the data volume score, importance, and urgency of each first task to obtain the initial priority score of the first task.

[0152] The third calculation subunit is used to sum the initial priority scores of all first tasks to obtain the total initial priority scores;

[0153] The fourth calculation subunit is used to divide the initial priority score of each first task by the sum of the initial priority scores to obtain the task priority of each first task.

[0154] In one embodiment provided in this application, based on the above-described solution, optionally, the allocation unit 407 includes:

[0155] The allocation subunit is used to allocate the remaining bandwidth to each second task according to the task priority of each second task and the weight ratio, so as to obtain the secondary pre-allocated bandwidth of each second task.

[0156] The calculation subunit is used to calculate the difference between the maximum expected transmission bandwidth of the second task and the currently actually allocated bandwidth for each second task, as the current available bandwidth margin of the second task.

[0157] The execution subunit is used to take the minimum value between the pre-allocated bandwidth of each second task and the current available bandwidth margin of the second task as the actual additional bandwidth of the second task, and update the remaining bandwidth of the task system.

[0158] The specific principles and execution processes of each unit and module in the bandwidth allocation device disclosed in the above embodiments of this application are the same as those of the bandwidth allocation method disclosed in the above embodiments of this application. Please refer to the corresponding parts of the bandwidth allocation method provided in the above embodiments of this application, and they will not be repeated here.

[0159] This application also provides a storage medium, which includes stored instructions, wherein the instructions, when executed, control the device where the storage medium is located to perform the above-described bandwidth allocation method.

[0160] This application also provides an electronic device, the structural schematic diagram of which is shown below. Figure 5 As shown, it specifically includes a memory 501 and one or more instructions 502, wherein one or more instructions 502 are stored in the memory 501 and are configured to be executed by one or more processors 503 to perform the bandwidth allocation method described above.

[0161] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0162] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application program, server, or storage medium executing the operation of this invention, based on the prompt message.

[0163] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0164] It is understood that the above notification and user authorization process is merely illustrative and does not constitute a limitation on the implementation of the present invention. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present invention.

[0165] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0166] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0167] Finally, it should be noted that in this paper, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0168] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.

[0169] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0170] The bandwidth allocation method provided in this application has been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A bandwidth allocation method, characterized in that, include: In response to a task status change event in the task system, the task information and maximum expected transmission bandwidth of each first task in the task system that is in a pending or incomplete state are obtained. The task information includes importance, urgency and data volume. Determine the task priority of each first task based on the task information of each first task; Based on the task priority and the current total available bandwidth of the task system, calculate the pre-allocated bandwidth for each first task; For each of the first tasks, the smaller of the pre-allocated bandwidth of the first task and the maximum expected transmission bandwidth of the first task is used as the initial allocated bandwidth of the first task. Based on the initial allocated bandwidth of each of the first tasks, calculate the remaining bandwidth of the task system; If the remaining bandwidth in the task system is not zero, and at least one of the first tasks has an initial allocated bandwidth less than its maximum expected transmission bandwidth, the first task that has not reached the maximum expected bandwidth will be designated as the second task. The remaining bandwidth is allocated to each of the second tasks based on the task priority and the maximum expected transmission bandwidth of each second task.

2. The method according to claim 1, characterized in that, The step of determining the task priority of each first task based on the task information of each first task includes: Based on the amount of data for each first task, a data volume score for each first task is calculated. For each of the first tasks, the data volume score, importance, and urgency of the first task are weighted and summed to obtain the initial priority score of the first task. Sum the initial priority scores of all first tasks to obtain the total initial priority scores; The task priority of each first task is obtained by dividing the initial priority score of each first task by the sum of the initial priority scores.

3. The method according to claim 1, characterized in that, The step of allocating the remaining bandwidth to each of the second tasks based on the task priority and maximum expected transmission bandwidth of each second task includes: Based on the task priority of each second task, the remaining bandwidth is allocated to each second task according to the weight ratio to obtain the secondary pre-allocated bandwidth for each second task; For each of the second tasks, the difference between the maximum expected transmission bandwidth of the second task and the currently actually allocated bandwidth is calculated as the current available bandwidth margin of the second task. The minimum value between the pre-allocated bandwidth of each second task and the current available bandwidth margin of the second task is taken as the actual newly added bandwidth of the second task, and the remaining bandwidth of the task system is updated.

4. The method according to claim 1, characterized in that, After allocating the remaining bandwidth to each of the second tasks based on the task priority and maximum expected transmission bandwidth of each second task, the method further includes: Obtain the actual allocated bandwidth and remaining data volume for each of the first tasks; Based on the remaining data volume and the actual allocated bandwidth, calculate the baseline completion time for each of the first tasks; Call the large language model, input parameters containing task context information, and obtain the correction coefficient of the first task completion time output by the large language model; For each of the first tasks, the correction factor of the first task is multiplied by the baseline completion time to obtain the predicted completion time of each of the first tasks.

5. The method according to claim 4, characterized in that, The step of multiplying the correction coefficient of the first task by the baseline completion time to obtain the predicted completion time of each of the first tasks includes: Receive the confidence level returned by the large language model corresponding to the correction coefficient; Determine whether the confidence level is lower than a preset confidence threshold; If the confidence level is greater than the confidence level threshold, the correction coefficient of the first task is multiplied by the baseline completion time to obtain the predicted completion time of each first task.

6. A bandwidth allocation device, characterized in that, include: The acquisition unit is used to acquire the task information and maximum expected transmission bandwidth of each first task in the task system that is in a pending or incomplete state in response to a task status change event in the task system. The task information includes importance, urgency and data volume. A determining unit is configured to determine the task priority of each first task based on the task information of each first task. A calculation unit is used to calculate the pre-allocated bandwidth for each first task based on the task priority and the current available total bandwidth of the task system; The sending unit is configured to, for each of the first tasks, use the smaller of the pre-allocated bandwidth of the first task and the maximum expected sending bandwidth of the first task as the initial allocated bandwidth of the first task. The second computing unit is used to calculate the remaining bandwidth of the task system based on the initial allocated bandwidth of each of the first tasks. An execution unit is configured to, when the remaining bandwidth in the task system is not zero and at least one of the first tasks has an initial allocated bandwidth less than its maximum expected transmission bandwidth, designate the first task that has not reached the maximum expected bandwidth as the second task. The allocation unit is used to allocate the remaining bandwidth to each of the second tasks based on the task priority and the maximum expected transmission bandwidth of each second task.

7. The apparatus according to claim 6, characterized in that, The determining unit includes: The first calculation subunit is used to calculate the data volume score for each first task based on the data volume of each first task; The second calculation subunit is used to perform a weighted summation of the data volume score, importance, and urgency of each first task to obtain the initial priority score of the first task. The third calculation subunit is used to sum the initial priority scores of all first tasks to obtain the total initial priority scores; The fourth calculation subunit is used to divide the initial priority score of each first task by the sum of the initial priority scores to obtain the task priority of each first task.

8. The apparatus according to claim 6, characterized in that, The allocation unit includes: The allocation subunit is used to allocate the remaining bandwidth to each of the second tasks according to the task priority of each second task and in a weighted proportion, so as to obtain the secondary pre-allocated bandwidth of each second task. The calculation subunit is used to calculate, for each of the second tasks, the difference between the maximum expected transmission bandwidth of the second task and the currently actually allocated bandwidth, as the current available bandwidth margin of the second task. The execution subunit is used to take the minimum value between the secondary pre-allocated bandwidth of each second task and the current available bandwidth margin of the second task as the actual newly added bandwidth of the second task, and update the remaining bandwidth of the task system.

9. A storage medium, characterized in that, The storage medium includes stored instructions, wherein, when the instructions are executed, the device containing the storage medium is controlled to perform the bandwidth allocation method as described in any one of claims 1 to 5.

10. An electronic device, characterized in that, It includes a memory, and one or more instructions, wherein one or more instructions are stored in the memory and configured to be executed by one or more processors as described in any one of claims 1 to 5.