3.3.1 Build the fault tolerant model of intermediate data
In the process of cost-benefit analysis and execution of other accounting service tasks in cloud computing accounting service platform, due to the large amount of data, massive intermediate data will be generated, which also has a high importance. Due to the uncertainty of cloud computing environment, it is easy to have a low fault tolerance rate. Therefore, this study introduces dynamic fault-tolerant technology in the design of cloud computing accounting service platform.
An effective intermediate data fault-tolerant model requires some assumptions, which are as follows:
(1) If some accounting service node in the cloud computing accounting service platform has intermediate data, the accounting service data can be obtained in real time, and the intermediate data information generated by the accounting service can be broadcast to other nodes in the platform.
(2) Under the isolation protection mechanism of the cloud computing account service platform, when the intermediate data appears on an accounting service node, the same intermediate data does not appear on other accounting service node.
(3) If an accounting service node has intermediate data and cannot execute the task normally, it can continue to execute the task through other alternative operations.
(4) The real-time task cycle is equal to the time limit.
Based on the above assumptions, the following intermediate data fault-tolerant model is constructed: in order to complete the accounting service task of the cloud computing accounting service platform, it is necessary to ensure the maximum tolerance of the intermediate data generated by the platform accounting service within the corresponding time limit. When the intermediate data appears in the cloud computing accounting service platform, the data can be reasonably divided into various processors.
Assume that the accounting service task set of cloud computing accounting service platform with n cycles is:
$$S=\left\{ {{s_1},{s_2},...,{s_n}} \right\}$$
2
The accounting service tasks in S can be reasonably allocated to m processors. The accounting service tasks can be described as \({s_i}=\left( {{A_i},{B_i}} \right)\). In it, \({A_i}\) represents the fastest execution time and \({B_i}\) represents the deadline. In S, each accounting service task contains four elements, namely, constituent cycle, time limit, basic version and minor version. Figure 2 is used to represent the specific flow of the intermediate data fault tolerance model.
When there is intermediate data in the cloud computing accounting service platform, the platform will open the sub-version of the task and express the implementation in the following form:
$$R=\left\{ \begin{gathered} Y+f\left( {{s_i}} \right) \leqslant d,0 \hfill \\ Y+f\left( {{s_i}} \right)>d,1 \hfill \\ \end{gathered} \right.$$
3
In Formula (3), "0" indicates that the task is not executed; and "1" indicates that the task is executed. The completion time of the minor version task is represented by Y. Periodic tasks are represented by \({s_i}\) whose execution time is \(f\left( {{s_i}} \right)\). Task deadlines are represented by d.
The design of cloud computing accounting service platform can enhance the reliability of the platform. But it will lead to the occupation of platform data and cause redundancy. In this regard, after obtaining the intermediate data of tasks, it is necessary to eliminate the secondary version tasks immediately to avoid occupying the platform space.
3.3.2 Intermediate data fault tolerance technology based on the ant colony algorithm
When performing the accounting service task, each data has set corresponding parameters, such as bandwidth, current load, etc., which can be used to calculate the initial pheromone value. Assume that the combination of each data i and the accounting service task j is \(P{V_{ij}}\), and the initial pheromone value can be calculated by Formula (4) :
$$P{V_{ij}}=\left[ {\frac{{{S_j}}}{{bandwidt{h_i}}}+\frac{{{C_j}}}{{MIP{S_i}\left( {1 - Loa{d_i}} \right)}}} \right]$$
4
In Formula (4), the size of the given accounting service task j is described by \({S_j}\). The bandwidth available for data i is described by \(bandwidt{h_i}\). The CPU time occupied during the execution of accounting service task j is described by \({C_j}\). The processor speed is described by \(MIP{S_i}\).The current load of data i is described by \(Loa{d_i}\).
The initial pheromone value is allocated at the beginning of the algorithm and then used as the data pheromone value. Calculate the initial pheromone value between each data and the accounting service task, and save the calculated results in the PV matrix, as shown in Formula (5) :
$$P{V_{matrix}}=\left[ \begin{gathered} P{V_{1,1}}\mathop {}\nolimits_{{}}^{{}} P{V_{1,2}}\mathop {}\nolimits_{{}}^{{}} P{V_{1,n - 1}}\mathop {}\nolimits_{{}}^{{}} P{V_{1,n}} \hfill \\ P{V_{2,1}}\mathop {}\nolimits_{{}}^{{}} P{V_{2,2}}\mathop {}\nolimits_{{}}^{{}} P{V_{2,n - 1}}\mathop {}\nolimits_{{}}^{{}} P{V_{2,n}} \hfill \\ P{V_{m - 1,1}}\mathop {}\nolimits_{{}}^{{}} P{V_{m - 1,2}}\mathop {}\nolimits_{{}}^{{}} P{V_{m - 1,n - 1}}\mathop {}\nolimits_{{}}^{{}} P{V_{m - 1,n}} \hfill \\ P{V_{m,1}}\mathop {}\nolimits_{{}}^{{}} P{V_{m,2}}\mathop {}\nolimits_{{}}^{{}} P{V_{m,n - 1}}\mathop {}\nolimits_{{}}^{{}} P{V_{m,n}} \hfill \\ \end{gathered} \right]$$
5
In Formula (5), accounting service tasks and total number of data are represented by n and m respectively. The logical state of ant colony topology is described by \(P{V_{matrix}}\). Under one index, the colony migrates to another index to get the best data.
If the data of the cloud computing service platform has certain correlation in the operation process, it indicates that if a task comes from a specific data, the accounting service task can be assigned to all available data. Feasible accounting service task lists of data i and accounting service task j are listed by \(P{V_{matrix}}\)and displayed in each column that can be passed by \(P{V_{matrix}}\).
In each column of the matrix\(P{V_{matrix}}\), the maximum pheromone of ant colony is recognized as the most appropriate data. When the task is assigned, the data within the matrix \(P{V_{matrix}}\)of pheromone will update the global pheromone according to the formula (6) in order to reduce the amount of current pheromone of data acquisition. Make the next ant colony not be attracted to the current data and be able to continue to search for other data:
$${\tau _{ij}}=\left( {1 - \rho } \right) \cdot {\tau _{ij}}+\rho \cdot \vartriangle {\tau _{ij}}$$
6
In Formula (6), the pheromone quantity in the data is represented by \({\tau _{ij}}\), \({\tau _{ij}}=1/{L_{best}}\), and \({L_{best}}\) is the length of the global optimal route. If \({\tau _{ij}}=0\), which indicates that the global optimal route is not obtained. When m and n are taken as data and task respectively, their dynamically controllable evaporation rate is represented by \(\rho\)and calculated by formula (7) :
$$\rho ={\left[ {{{\left( {\frac{n}{m}} \right)}^2}} \right]^{ - 1}}$$
7
When the accounting service task has completed its assignment, the previously assigned task can be executed again. If the task cannot be executed, the task can be submitted again to other appropriate data at the last stored checkpoint. The information on the checkpoint can be used to record all currently executed tasks, and the information can also be used as a historical execution record for each data update. For each checkpoint, the pheromone can be used to reduce its historical record, and a new round of local pheromone can be updated by using formula (8) so that the pheromone value can be reduced as much as possible. When the task is successfully executed, the semaphore will be reduced accordingly. If the task is not successfully executed, the semaphore will be in an abnormal reduction state:
$${\tau _{ij}}=\left( {1 - \rho } \right) \cdot {\tau _{ij}}+\rho \cdot {\tau _0}\left( {{E_i}} \right)$$
8
The calculation process of the ant colony algorithm is realized through the following steps:
Step 1: Initialize parameters: configure all parameters, use formula (4) to calculate the initial pheromone value, create an independent ant colony for each task, and select the data with the highest initial pheromone in the first iteration.
Step 2: Start the loop: obtain the most suitable data according to the ant colony algorithm theory, send out the accounting service task submission signal, update the global pheromone by using the formula (6), and analyze whether to implement the task. If the accounting service task is completed, end it. If not, continue to analyze the execution status of the accounting service tasks. If the accounting service task is executed successfully, that is, the storage checkpoint, the new success count is added, and the local pheromone value is updated according to Formula (4)-Formula (8). And if that account service task fails to be execute, retrieve the check point at the tail end, then resubmit, add a failure count, update the local pheromone by using a formula (8), and return to the step (2) after updating until the accounting service task which fails to be executed does not occur.
Step 3: Task completion: When there is no accounting service task with execution failure, complete the operation and terminate the execution.