主权项 |
1. A real time calculation method for a processor, the method comprising:
receiving a smallest time slice indicating a processing completion time; constantly receiving a plurality of data items that are operands to a calculation; retrieving a first predication model from a plurality of prediction models stored in a memory, wherein the first predication model correlates an amount of data and a calculation processing time; calculating a first calculation processing time based on an amount of data included in the plurality of data items and the first prediction model; determining a new time slice by selectively adding a prescribed period to the smallest time slice based on a priority of the plurality of data items; comparing the first calculation processing time and the new time slice to determine if the first calculation processing time exceeds the new time slice; decreasing the amount of data when the first calculation processing time exceeds the new time slice, wherein the decreasing the amount of data includes:
determining number of iterations based on a convergence model,retrieving a second prediction model from the plurality of prediction models stored in the memory, wherein the second prediction model correlates a calculation processing time, an amount of data, and a number of iterations,calculating a second calculation processing time based on the amount of data, and the number of iterations and the second prediction model,comparing the second calculation processing time to the new time slice to produce a comparison result, anddecreasing the amount of data by a prescribed amount to generate a second amount of data when the comparison result indicates the second calculation processing time exceeds the new time slice; automatically executing the calculation on the amount of data to generate a calculation result when the first calculation processing time does not exceed the new time slice; and automatically executing the calculation on the second amount of data to generate the calculation result when the first calculation processing time exceeds the new time slice. |