Method for mapping avionics resident applications to physical resources based on heuristic algorithm

By combining a hybrid search algorithm that integrates exact solution and heuristic search, and utilizing a reinforcement learning framework for avionics residency application mapping, the problems of low solution efficiency and poor mapping effect in existing technologies are solved, achieving efficient application allocation and reduced system cost.

CN116610438BActive Publication Date: 2026-05-19CHINESE AERONAUTICAL RADIO ELECTRONICS RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINESE AERONAUTICAL RADIO ELECTRONICS RES INST
Filing Date
2023-03-20
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing mapping methods for avionics residency applications suffer from low solution efficiency and poor mapping results when faced with multiple constraints, especially in large-scale problems where it is difficult to achieve optimization within a specified time.

Method used

A hybrid search algorithm combining exact solution and heuristic search is adopted. The reinforcement learning framework is used for efficient search. Feasible solutions are obtained in a short time through heuristic search algorithm. The mapping scheme is optimized by using the open source ILP solver and applied mapping by combining ERDSE and ACDSE algorithms.

Benefits of technology

It improves the solution efficiency and effectiveness of avionics dwell application mapping, and can design a mapping scheme that meets the constraints and has good comprehensive performance within a specified time, thereby reducing the total system cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116610438B_ABST
    Figure CN116610438B_ABST
Patent Text Reader

Abstract

The application discloses a method for mapping avionics resident applications to physical resources based on a heuristic algorithm, and comprises the following steps: step one, modeling the mapping of resident applications to physical resources; step two, taking application features and constraint conditions as inputs of the model, sampling mapping schemes in a mapping space formed by all possible application mapping schemes by using a search algorithm, and evaluating the mapping schemes; repeating the sampling and evaluation until a scheduled sampling number is reached, and taking the best mapping scheme obtained as an output; and step three, mapping the resident applications to the physical resources according to the best mapping scheme; wherein the search algorithm adopts a hybrid search algorithm combining exact solution and heuristic search, the hybrid search algorithm firstly obtains a group of feasible solutions with better performance in a short time through the heuristic search algorithm, and then takes the feasible solutions as initial values and upper bounds during solving by a solver, so that most solutions with poor performance are filtered and the solving efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of avionics networks in avionics systems, and relates to a method for mapping resident applications to physical resources under multiple constraints. Background Technology

[0002] Since the application of avionics systems in aircraft, the proportion of total R&D expenditure for airborne avionics systems and their supporting software has been increasing year by year, and their importance has grown, even critically determining the flight performance and combat capability of aircraft. With the development of DIMA (Distributed Integrated Modular Avionics System), the inherent number of functions and technical degrees of freedom in aircraft are constantly increasing, making the selection of the optimal DIMA architecture a complex task. Therefore, treating avionics residency application mapping as a mathematical optimization problem and utilizing heuristic algorithms can reduce design complexity.

[0003] Currently, common application mapping schemes on cloud computing platforms fall into two categories: dynamic scheduling and static scheduling. Dynamic scheduling methods typically target a single application, using a greedy strategy to map the application to the node with the least load. However, due to the lack of global planning, this can lead to getting stuck in local optima and failing to meet constraints. Static scheduling methods typically target multiple applications, employing exact solution algorithms or heuristic search algorithms for application mapping. They offer better global exploration capabilities than dynamic scheduling methods, but still suffer from low solution efficiency and poor mapping results. Exact algorithm methods mostly use integer linear programming, branch and bound methods, etc., for application mapping, but their solution time expands exponentially with the problem size, making it difficult to achieve the required solution time for large problems. Heuristic algorithm methods extensively use particle swarm optimization, reinforcement learning, etc., for application mapping, but may suffer from excessive sampling points and low sampling efficiency. Therefore, this invention optimizes the static scheduling method by combining exact solution algorithms and heuristic search algorithms to simultaneously improve mapping results and solution efficiency. Summary of the Invention

[0004] The purpose of this invention is to provide a method for mapping avionics-resident applications to physical resources based on heuristic algorithms. For a given aircraft architecture and set of resident applications, the method comprehensively considers indicators such as processor resources, network load, and resource utilization, and uses a reinforcement learning framework to efficiently search the mapping scheme space. Within a specified time, a mapping scheme that meets the constraints and performs well in terms of comprehensive indicators is designed, which efficiently allocates different applications to resource nodes and reduces the total cost of the system.

[0005] The objective of this invention is achieved through the following technical solution:

[0006] A method for mapping avionics residency applications to physical resources based on heuristic algorithms includes the following steps:

[0007] Step 1: Model the physical resources mapped to the resident application;

[0008] Step 2: Using application features and constraints as input to the model, a search algorithm is used to sample and evaluate mapping schemes in the mapping space composed of all possible application mapping schemes. This includes statistically analyzing the performance of the mapping schemes and determining whether they can meet the constraints. The sampling and evaluation are repeated until the predetermined number of samplings is reached, and the best mapping scheme obtained is taken as the output.

[0009] Step 3: Map the resident applications to physical resources according to the optimal mapping scheme;

[0010] The search algorithm employs a hybrid search algorithm that combines exact solution and heuristic search. The exact solution part will be built using the open-source ILP solver, while the heuristic search part will be built using the efficient discrete search algorithms ERDSE and ACDSE based on reinforcement learning. The hybrid search algorithm will first obtain a set of feasible solutions with good performance in a short time through the heuristic search algorithm. Then, the feasible solutions will be used as the initial values ​​and upper bounds for the solver to filter out most of the poor-performing solutions and speed up the solution process.

[0011] Preferably, the method for evaluating the mapping scheme includes the following steps:

[0012] The first step is to input the relevant information for each application into a dictionary, and then store the dictionary in a list; at the same time, store the number of nodes N and the relevant constraints C of the resource nodes in another separate list.

[0013] The second step is to select the mapping matrix X according to the hybrid search algorithm;

[0014] The third step involves conducting an evaluation using one of the following two methods:

[0015] The precise sampling evaluation method samples the task arrival time distribution to determine the actual arrival time of the task in the cycle. Then, it allocates the application to the corresponding node and distributes the application to the corresponding core in the node according to a certain allocation strategy. Based on the resource requirements recorded in the application schedule, it allocates memory and bandwidth to the corresponding application and generates a resource configuration table. The resource usage in different time periods is calculated through the time axis obtained after allocation. Different values ​​are obtained for different resources, and it is determined whether the relevant constraints are met. Then, various indicators are calculated, and a weighted summation method is used to obtain the value of the multi-objective optimization function. The above process is repeated multiple times to obtain the worst evaluation value. Finally, the worst evaluation value is output along with a time axis graph.

[0016] The queuing theory evaluation method calculates the arrival rate and service rate of the application, then uses relevant queuing theory to calculate the required relevant values, and finally calculates the evaluation value and returns it.

[0017] The fourth step is to evaluate the result of the multi-objective optimization function. If the result is smaller than the previously obtained minimum value and satisfies the constraints, proceed directly to the fifth step; otherwise, execute the output function to output the mapping matrix of this state and proceed to the sixth step.

[0018] Fifth step: Update the minimum value of the multi-objective optimization function and the minimum value of X;

[0019] Step 6: Increment the application time slice by one, then determine if the maximum number of iterations has been reached. If not, proceed to step 2. If the number of iterations has exceeded the specified number, output the mapping matrix and perform subsequent operations on the resulting mapping matrix.

[0020] Preferably, the heuristic search algorithm performs the following steps:

[0021] Step ①: Initialize the parameter θ of the policy function;

[0022] Step ②, loop N S Second-rate;

[0023] Step 3: Randomly generate a perturbation value based on the Gaussian distribution, and superimpose the perturbation value on the probability distribution output by the policy function to form a noisy policy function;

[0024] Step 4, map the current mapping scheme X i The input noise-adding strategy function is used, and Monte Carlo sampling is performed based on the output probability distribution. In each complete round of Monte Carlo sampling, the algorithm samples all mapping variables once, and the sampling method is described as follows:

[0025] First, the algorithm maps scheme X. i The corresponding vector V i Input the noise-adding strategy function to obtain the probability distribution of the first mapping variable x0, and perform a sampling based on this probability distribution, and assign the sampled value to the mapping variable x0;

[0026] Next, the algorithm will convert vector V i Input the noise-adding strategy function again to obtain the probability distribution of the second mapping variable x1. Similarly, perform another sampling based on this probability distribution and assign the sampled value to the mapping variable x1.

[0027] Repeat the above process to sample the other mapping variables in turn;

[0028] After completing the mapping of variable x MAfter sampling, this round of Monte Carlo sampling is complete, and a new mapping scheme X is obtained. i+1 and its corresponding sampling trajectory τ i+1 ;

[0029] The sampling trajectory τ i+1 The reward value G(τ) is calculated from the input reward function G;

[0030] Step 5, map the current mapping scheme X i+1 and its trajectory τ i+1 Put it in the cache and return it to G(τ) i+1 The solution X is compared with the rewards of other solutions in the cache, and the solution with the highest reward value is selected and denoted as the optimal solution X. best Let the trajectory and reward be denoted as τ. max and G(r) max );

[0031] Step 6: Retrieve the current optimal solution X from the cache. best According to its trajectory τ max and return G(τ) max Calculate the optimization gradient of the policy function. And update the parameter θ of the policy function;

[0032] Step 7: When the number of samples reaches the upper limit, exit the loop and select the optimal solution X from the cache. best As the output of the algorithm.

[0033] The beneficial effects of this invention are as follows:

[0034] This invention proposes an efficient heuristic search algorithm based on reinforcement learning to solve application mapping schemes: taking application features and constraints as input, the algorithm samples and evaluates mapping schemes in the mapping space (composed of all possible application mapping schemes), including statistically analyzing the performance of the mapping schemes and determining whether the mapping schemes can meet the constraints; the sampling and evaluation are repeated until a predetermined number of samplings is reached, and the best mapping scheme obtained is output. Attached Figure Description

[0035] Figure 1 This section outlines the steps for mapping and evaluating resident applications.

[0036] Figure 2 This is a schematic diagram of a multilayer perceptron (MLP) structure.

[0037] Figure 3 This is a schematic diagram of the probability distribution.

[0038] Figure 4 This is a schematic diagram of the probability distribution of noise addition. Detailed Implementation

[0039] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.

[0040] This embodiment illustrates a method for mapping avionics residency applications to physical resources based on heuristic algorithms, which mainly includes the following steps:

[0041] Step 1: Model the physical resources mapped to the resident application.

[0042] Step 2: Evaluate the application mapping scheme, supporting multi-objective optimization. Using application features and constraints as input to the model, a search algorithm is used to sample and evaluate mapping schemes within a mapping space comprised of all possible schemes. This includes statistically analyzing the performance of each scheme and determining whether it satisfies the constraints. Sampling and evaluation are repeated until a predetermined number of samplings is reached, and the optimal mapping scheme is output.

[0043] Step 3: Map the resident applications to physical resources using the optimal mapping scheme.

[0044] The search algorithm employs a hybrid approach combining exact solution and heuristic search. The exact solution component utilizes the open-source ILP solver, while the heuristic search component employs the efficient reinforcement learning-based discrete search algorithms ERDSE and ACDSE. The hybrid search algorithm first obtains a set of high-performing feasible solutions quickly through heuristic search. These feasible solutions are then used as initial values ​​and upper bounds for the solver, filtering out most of the poorly performing solutions and accelerating the solution process. This hybrid search algorithm combines the advantages of global search by the solver with the efficient exploration capabilities of heuristic algorithms, making it better suited for large-scale task mapping problems.

[0045] The steps for evaluating the mapping scheme are as follows: Figure 1 As shown:

[0046] First, we need to define the relationship matrix Mat X between the application and the nodes;

[0047] The specific implementation of the X-mapping vector definition is shown in the following formula:

[0048]

[0049]

[0050] Input function: Task_mapping(list, N, C_m, C_upbw, C_downbw, Algorithm, Re = False):

[0051] a) param list (dictionary list) application list;

[0052] b)param N (integer) Number of nodes;

[0053] c)param C_m (integer) memory constraints;

[0054] d)param C_upbw (integer) Uplink bandwidth constraint;

[0055] e)param C_downbw (integer) Downlink bandwidth constraint;

[0056] f)param Algorithm (string) Algorithm name;

[0057] g)return(dictionary list) mapping list, (integer) number of nodes.

[0058] exist Figure 1 In the specific implementation algorithm shown:

[0059] 1) In the first step, the input module reads the file from the input file path, parses the content of the file, and then inputs the relevant information for each application into a dictionary. The key-value pairs and contents of a single dictionary are shown in Table 1. The dictionary is then stored in a list. Simultaneously, the number of nodes N obtained from the previous resource planning, and the relevant constraints C of the resource nodes, such as periodic constraints, memory constraints, and uplink / downlink constraints, are stored in another separate list. This step converts the externally input file data into the system's internal data format, and the output data is a list containing specific information about each application.

[0060] Table 1 Application Characteristics Table

[0061]

[0062] 2) The second step is to select the mapping matrix X according to the hybrid search algorithm.

[0063] 3) The third step involves one of two evaluation methods: The precise sampling evaluation method samples the task arrival time distribution to determine the actual arrival time of tasks within a given period. Applications are then allocated to corresponding nodes according to a specific allocation strategy, such as prioritizing allocation to the core with the lowest load or using a first-come, first-served scheduling strategy. Based on the resource requirements recorded in the application scheduler, memory and bandwidth are allocated to the corresponding applications. A resource configuration table is generated. The precise calculation module uses the timeline obtained after allocation to calculate resource usage for different time periods, obtaining different values ​​for different resources and determining whether relevant constraints are met. It then calculates various indicators such as core load rate, cost, execution time, and period fulfillment rate, and uses a weighted summation method to obtain the value of the multi-objective optimization function. This process is repeated multiple times to obtain the worst-case evaluation value, which is then output along with a timeline graph. The queuing theory evaluation method calculates the application arrival rate and service rate. Then, relevant queuing theory is used to calculate the required values, and the evaluation value is returned.

[0064] 4) The fourth step is to evaluate the result of the multi-objective optimization function. If the result is smaller than the previously obtained minimum value and satisfies the constraints, proceed directly to the fifth step. Otherwise, execute the output function to output the mapping matrix of this state and proceed to the sixth step.

[0065] 5) The fifth step is to update the minimum value of the multi-objective optimization function and the minimum value of X. In this step, the search results will be updated synchronously based on the obtained optimal values ​​of the function.

[0066] 6) The sixth step is to increment the application time slice by one, and then determine whether the maximum number of iterations has been reached. If not, continue to the second step; if the number of iterations has exceeded the specified number, output the mapping matrix and output the obtained mapping matrix to the output module for subsequent operations.

[0067] Figure 1 The second step involves using a hybrid solution method for searching. This method combines an exact solution algorithm with a heuristic search algorithm. The heuristic search algorithm is used to quickly obtain feasible solutions, which serve as an upper bound for the exact solution method to filter out most suboptimal solutions, thereby improving the solution efficiency and algorithm performance.

[0068] The heuristic application mapping configuration algorithm is built upon the reinforcement learning exploration model ERDSE, continuously optimizing the sampling strategy through online learning to obtain better feasible solutions. The specific execution steps of the heuristic application mapping configuration algorithm are as follows:

[0069]

[0070]

[0071] The inputs include the application feature table R, the number of applications M, the number of nodes N, the reward function G, the sampling strategy π(θ), and the number of sampling times N. S The application feature table R can be obtained from the static resource planning algorithm A. sta Or dynamic resource planning algorithm A dya Provided; if only static mapping of the application is required, then static resource planning algorithm A is used. sta The provided application feature table is shown in Table 1. If dynamic resource reconfiguration is required, adaptive programming algorithm A is used. dya The system provides an application feature table and calculates application mapping schemes for different time slices. The number of applications M is given by the user based on the actual situation, while the number of nodes N is determined using static resource planning algorithm A. sta Or dynamic resource planning algorithm A dya The output of .

[0072] The reward function R and the return function G are used to quantify and evaluate the mapping scheme obtained during the search process. For example, formula (1) is the reward function used in this method, where [α·D(N)+β·W(N,W)] -1 The objective function D(N) represents the system construction cost, expressed as a linear function of the number of nodes N, D(N) = η·N, and W(N, W) represents the average execution time of the application. It is a constraint function (S, B) in B out These represent memory usage, uplink bandwidth, and downlink bandwidth, respectively. s C Bin c Bout (These represent the constraint thresholds for memory usage, uplink bandwidth, and downlink bandwidth, respectively). It can be seen that the smaller the system cost D(N) and average application execution time, the larger the value of the reward function. Conversely, the larger the memory usage, uplink bandwidth, or downlink bandwidth after exceeding the threshold, the smaller the value of the reward function. A larger reward function indicates that the corresponding application mapping scheme can achieve lower construction costs and better performance, while ensuring that memory usage and uplink / downlink bandwidth do not exceed the constraint thresholds (because once any metric exceeds the threshold, the value of the reward function will decrease rapidly). Trajectory τ represents all mapping variables x obtained in one complete sampling. t The policy function π(θ) is used in the ERDSE model to guide sampling, implemented through a multi-layer perceptron (MLP, a simple neural network; this method will use the open-source software PyTorch 3.6 for implementation) (MLP structure as follows). Figure 2As shown in the diagram, its input is a certain mapping scheme, and its output is a sampling probability distribution. Using the reward function as the objective function of the MLP, by training and optimizing the MLP, its output sampling probability distribution can be made more favorable for sampling good mapping schemes. The number of sampling times N... S The value can be specified by the user and, based on experience, can be between 1,000 and 10,000. If the value is too small, it will be difficult to find a mapping scheme that satisfies the constraints. If the value is too large, it will lead to excessively long search time and affect computational efficiency.

[0073]

[0074]

[0075]

[0076] The output includes the application mapping configuration scheme X, which records the mapping of the application on different nodes.

[0077] In step ①, the parameters of the strategy function need to be initialized before the search begins. Parameter initialization is done automatically by PyTorch, using random initialization by default.

[0078] Steps ② to ⑧ are repeated continuously to perform the "sampling-optimization strategy function" process, and the configuration scheme X obtained from sampling is used. i All data is stored in the cache. The process is described in detail below:

[0079] In step ③, a perturbation value is randomly generated according to a Gaussian distribution, and this perturbation value is superimposed on the probability distribution output by the policy function to form a noisy policy function. Figure 3 Taking the probability distribution shown as an example, we need to sample the mapping cases of application 0; the mapping cases include four cases: mapping to "node 1", "node 2", "node 3" and "node 4", and their probability distributions are as follows. Figure 3 As described above; the resulting perturbation values ​​are -0.02 (for "Node 1"), 0.05 (for "Node 2"), -0.08 (for "Node 3"), and 0.05 (for "Node 4"), respectively. The new probability distribution formed after superimposing these perturbation values ​​is as follows: Figure 4 As shown. The purpose of superimposing noise perturbations is to ensure that the search always has a certain degree of random exploration capability, and that the search capability will not decrease due to the convergence of the policy function.

[0080] In step ④, the current mapping scheme X is... i The input noise-adding strategy function is used, and Monte Carlo sampling is performed based on the output probability distribution. In each complete round of Monte Carlo sampling, the algorithm samples all mapping variables once, and the sampling method is described below:

[0081] First, the algorithm maps scheme X. i The corresponding vector V i Input the noise-adding strategy function to obtain the probability distribution of the first mapping variable x0, and perform a sampling based on this probability distribution, and assign the sampled value to the mapping variable x0;

[0082] Next, the algorithm will convert vector V i Re-enter the noise-adding strategy function (note that, at this point, because the value of the mapping variable x0 has changed, V...). i The value of x1 also changed, and the probability distribution of the second mapping variable x1 was obtained. Similarly, a sampling was performed again based on this probability distribution, and the sampled value was assigned to the mapping variable x1.

[0083] Repeat the above process to sample the other mapping variables in turn;

[0084] After completing the mapping of variable x M After sampling, this round of Monte Carlo sampling is complete, and a new mapping scheme X is obtained. i+1 and its corresponding sampling trajectory τ i+1 ;

[0085] The sampling trajectory τ i+1 The return value G(τ) is calculated in the input return function G. For details on the calculation method of the return value, please refer to formula (1) and formula (2).

[0086] In step ⑤, the algorithm will map the current mapping scheme X. i+1 and its trajectory τ i+1 Put it in the cache and return it to G(τ) i+1 The solution X is compared with the rewards of other solutions in the cache, and the solution with the highest reward value is selected and denoted as the optimal solution X. best Let its trajectory and reward be denoted as τ. max and G(τ) max ).

[0087] Steps 6-8: Retrieve the current optimal solution X from the cache. best According to its trajectory τ max and return G(τ) max Calculate the optimization gradient of the policy function. The policy function parameter θ is then updated, and its calculation formula has been described in the algorithm flow. In practice, the policy function parameter update can be achieved using the forward() and step() functions provided by PyTorch.

[0088] Step 9: When the number of samples reaches the upper limit, exit the loop and select the optimal solution X from the cache.best As the output of the algorithm.

[0089] The application in Table 2 is used as an example to illustrate the heuristic application mapping configuration algorithm process.

[0090] Table 2. Input Form Format for Adaptive Resource Planning Algorithm

[0091]

[0092] The example includes 5 applications: m1, m2, m3, m4, and m5. The dynamic characteristics of these applications under two time slices, ΔT0 and ΔT1, have been statistically analyzed. The characteristics of m1, m2, and m3 changed between the two time slices. Assume each node can provide a total memory of 1000 and uplink / downlink bandwidth of 300. Assuming the application mapping configuration algorithm is called at time slice ΔT0, Table 3 shows that the optimal resource planning quantity for this time slice ΔT0 is 2, meaning the application can be mapped on 2 nodes. The policy function is represented by a 4-layer neural network using a multilayer perceptron (MLP) structure. The number of nodes in the input layer is the same as the number of applications (5), and the number of nodes in the output layer is the same as the number of nodes (2, outputting the sampling distribution of a certain application). The number of nodes in the two hidden layers are 256 and 128 respectively (the number of hidden layer nodes is set as an empirical value and can be adjusted based on subsequent experiments). The weights of all neurons in the policy function are called the parameters of the policy function, denoted as... θ Strategy functions can be configured using PyTorch.

[0093] Table 3 Resource Planning Table Format

[0094]

[0095] ① The parameter θ of the policy function is randomly initialized by PyTorch. Assume the initial mapping scheme X0 = [x1 = 1, x2 = 1, x3 = 1, x4 = 1, x5 = 1], that is, initially all applications are mapped to node 1.

[0096] ② Determine the upper limit of the loop and begin the first round of sampling and optimization:

[0097] ③ Add Gaussian noise to the policy function. The noise distribution can be specified by the user. By default, a Gaussian distribution with a mean of 0 and a standard deviation of 0.1 is used to generate noise. This produces relatively small noise values ​​that will not significantly affect the probability distribution of the policy function output.

[0098] ④ Perform a Monte Carlo sampling within the mapping scheme space. First, input x0 = [x1 = 1, x2 = 1, x3 = 1, x4 = 1, x5 = 1] into the noise-adding policy function to obtain the probability distribution of x1 [0.4: x1 = 1, 0.6: x1 = 2]. Obtain the sampled value x1 = 2 through random sampling. After x1 is sampled, input X0 = [x1 = 2, x2 = 1, x3 = 1, x4 = 1, x5 = 1] into the noise-adding policy function again to obtain the probability distribution of x1 [0.55: x2 = 1, 0.45: x2 = 2]. Obtain the sampled value x2 = 1 through random sampling. Repeat the above process to sample x3, x4, and x5 to complete one round of Monte Carlo sampling. Finally, obtain the new mapping scheme X1 = [x1 = 2, x2 = 1, x3 = 2, x4 = 1, x5 = 1]. Substitute X1 and its trajectory τ1 into the reward function G to calculate the reward value G(τ1) = 0.2 (all indicators are calculated using the event-triggered evaluation model in 3.3.2, assuming α = 0.5, β = 0.5, γ = 0). The mapping scheme X1 satisfies all constraints, so X1, τ1, and G(τ1) are recorded in the cache.

[0099] ⑤ The current optimal reward in the cache is G(τ1) = 0.2, so τ max =τ1,G(τ) max )=G(τ1)=0.2

[0100] ⑥, ⑦, ⑧ Let the optimal trajectory be τ max and its return G(τ) max The gradient is calculated using the `forward()` and `step()` functions provided by PyTorch, and the policy function parameter θ is optimized. Since the loop limit has not been reached, we jump to step ② for the next round of sampling and optimization. In reinforcement learning: each round of policy function optimization makes the sampling direction more inclined towards the current optimal mapping scheme; at the same time, due to the perturbation of the policy function by random noise, the sampling direction of the policy function will not completely coincide with the optimal mapping scheme, but will fluctuate around it. The optimization process of reinforcement learning is similar to the human learning process: in the early stages of learning, a better learning strategy is determined through various attempts (analogous to a mapping scheme); then, the overall direction of the learning strategy is maintained while new learning strategies are continuously tried, such as changing the learning methods of only one or two subjects without changing the learning methods of other subjects (analogous to changing the mapping nodes of one or two applications without changing the mapping nodes of most applications); the optimization process of reinforcement learning can ensure that the policy is always moving in a better direction, with good exploration efficiency, while random noise perturbation further enhances its exploration ability. Therefore, reinforcement learning can achieve better efficiency and results than traversal and random search.

[0101] ⑨ After the loop is complete, extract the optimal trajectory τ. maxThe corresponding scheme X is taken as the final output of the algorithm.

[0102] It is understood that those skilled in the art can make equivalent substitutions or modifications to the technical solution and inventive concept of the present invention, and all such substitutions or modifications should fall within the protection scope of the appended claims.

Claims

1. A method for mapping avionics residency applications to physical resources based on heuristic algorithms, characterized in that... Includes the following steps: Step 1: Model the physical resources mapped to the resident application; Step 2: Using application features and constraints as input to the model, a search algorithm is used to sample and evaluate mapping schemes in the mapping space composed of all possible application mapping schemes. This includes statistically analyzing the performance of the mapping schemes and determining whether they can meet the constraints. The sampling and evaluation are repeated until the predetermined number of samplings is reached, and the best mapping scheme obtained is taken as the output. Step 3: Map the resident applications to physical resources according to the optimal mapping scheme; The search algorithm employs a hybrid search algorithm that combines exact solution and heuristic search. The exact solution part will be built using the open-source ILP solver, while the heuristic search part will be built using the efficient discrete search algorithms ERDSE and ACDSE based on reinforcement learning. The hybrid search algorithm will first obtain a set of feasible solutions with good performance in a short time through the heuristic search algorithm. Then, the feasible solutions will be used as the initial values ​​and upper bounds for the solver to filter out most of the poor-performing solutions and speed up the solution process.

2. The method for mapping avionics residency applications to physical resources based on heuristic algorithms according to claim 1, characterized in that... The method for evaluating a mapping scheme includes the following steps: The first step is to input the relevant information for each application into a dictionary, and then store the dictionary in a list; at the same time, store the number of nodes N and the relevant constraints C of the resource nodes in another separate list. The second step is to select the mapping matrix X according to the hybrid search algorithm; The third step involves conducting an evaluation using one of the following two methods: The precise sampling evaluation method samples the task arrival time distribution to determine the actual arrival time of the task in the cycle. Then, it allocates the application to the corresponding node and distributes the application to the corresponding core in the node according to a certain allocation strategy. Based on the resource requirements recorded in the application schedule, it allocates memory and bandwidth to the corresponding application and generates a resource configuration table. The resource usage in different time periods is calculated through the time axis obtained after allocation. Different values ​​are obtained for different resources, and it is determined whether the relevant constraints are met. Then, various indicators are calculated, and a weighted summation method is used to obtain the value of the multi-objective optimization function. The above process is repeated multiple times to obtain the worst evaluation value. Finally, the worst evaluation value is output along with a time axis graph. The queuing theory evaluation method calculates the arrival rate and service rate of the application, then uses relevant queuing theory to calculate the required relevant values, and finally calculates the evaluation value and returns it. The fourth step is to evaluate the result of the multi-objective optimization function. If the result is smaller than the previously obtained minimum value and the constraints are satisfied, proceed directly to the fifth step. Otherwise, execute the output function to output the mapping matrix of this state, and proceed to step six; Fifth step: Update the minimum value of the multi-objective optimization function and the minimum value of X; Step 6: Increment the application time slice by one, then determine if the maximum number of iterations has been reached. If not, proceed to step 2. If the number of iterations has exceeded the specified number, output the mapping matrix and perform subsequent operations on the obtained mapping matrix.

3. The method for mapping avionics residency applications to physical resources based on heuristic algorithms according to claim 1, characterized in that... The steps of the heuristic search algorithm are as follows: Step ①: Initialize the parameter θ of the policy function; Step ②, loop N S Second-rate; Step 3: Randomly generate a perturbation value based on the Gaussian distribution, and superimpose the perturbation value on the probability distribution output by the policy function to form a noisy policy function; Step 4, map the current mapping scheme X i The input noise-adding strategy function is used, and Monte Carlo sampling is performed based on the output probability distribution. In each complete round of Monte Carlo sampling, the algorithm samples all mapping variables once, and the sampling method is described as follows: First, the algorithm maps scheme X. i The corresponding vector V i Input the noise-adding strategy function to obtain the probability distribution of the first mapping variable x0, and perform a sampling based on this probability distribution, and assign the sampled value to the mapping variable x0; Next, the algorithm will convert vector V i Input the noise-adding strategy function again to obtain the probability distribution of the second mapping variable x1. Similarly, perform another sampling based on this probability distribution and assign the sampled value to the mapping variable x1. Repeat the above process to sample the other mapping variables in turn; After completing the mapping of variable x M After sampling, this round of Monte Carlo sampling is complete, and a new mapping scheme X is obtained. i+1 and its corresponding sampling trajectory τ i+1 ; The sampling trajectory τ i+1 The reward value G(τ) is calculated from the input reward function G; Step 5, map the current mapping scheme X i+1 and its trajectory τ i+1 Put it in the cache and return it to G(τ) i+1 The solution X is compared with the rewards of other solutions in the cache, and the solution with the highest reward value is selected and denoted as the optimal solution X. best Let the trajectory and reward be denoted as τ. max and G(τ) max ); Step 6: Retrieve the current optimal solution X from the cache. best According to its trajectory τ max and return G(τ) max Calculate the optimization gradient of the policy function. And update the parameter θ of the policy function; Step 7: When the number of samples reaches the upper limit, exit the loop and select the optimal solution X from the cache. best As the output of the algorithm.