Multi-task rehabilitation center equipment allocation optimal scheme screening method based on grouped neural network
By using a multi-task optimization method based on grouped neural networks, the problem of collaborative configuration and cross-scenario adaptation of various types of rehabilitation equipment was solved, achieving efficient and stable generation and optimization of equipment allocation schemes, thereby improving the quality of rehabilitation training and the efficiency of resource utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies struggle to effectively handle the collaborative configuration and cross-scenario adaptation of various types of rehabilitation equipment, resulting in low equipment allocation efficiency and poor model adaptability in rehabilitation centers. They are unable to cope with dynamically changing patient flow and rehabilitation stages, and lack versatility, which can easily lead to idle or overused resources.
A multi-task optimization method based on grouped neural networks is adopted, which combines differential evolution algorithm and attention mechanism to construct a multi-task optimization framework. Knowledge sharing and collaborative optimization across rehabilitation groups are realized through neural network transfer mechanism. Self-attention and cross-task attention mechanisms are designed to evaluate the similarity between individuals, and a population reduction strategy is implemented to generate the optimal allocation scheme.
It improves the quality and cross-task transferability of rehabilitation equipment allocation schemes, enhances the overall quality and safety of rehabilitation training, strengthens the efficiency and stability of the allocation optimization process, and provides visualization analysis tools to support continuous optimization in rehabilitation centers.
Smart Images

Figure CN121839129A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of intelligent optimization algorithm and medical resource management, and particularly relates to a multi-task rehabilitation center equipment deployment optimal scheme screening method based on a grouping neural network. BACKGROUND
[0002] In the operation of a community rehabilitation center, multiple types of core rehabilitation equipment such as balance training equipment, treadmills, muscle strength training equipment, and aerobic bicycles are involved. The use logic of different equipment and the rehabilitation needs of patients are significantly different. For example, patients in the neurological rehabilitation group need high-frequency and short-time balance and gait training, patients in the orthopedic rehabilitation group need medium-intensity and continuous muscle strength training, and patients in the elderly chronic disease group need intermittent and low-impact aerobic training. The coordinated configuration of these equipment is a key link for the rehabilitation center to optimize service efficiency and effectiveness. Existing researches mostly use traditional operations research methods (such as integer programming and greedy algorithm) to schedule single-type equipment or single-group patients, and solve the optimal allocation scheme by establishing a linear model. However, such methods are difficult to handle the coupling relationship between multiple equipment and multiple patient groups. For example, the idling of muscle strength training equipment may mean that the rehabilitation progress of orthopedic patients lags behind, and the use conflict of balance training equipment will increase the risk of falling for patients in the neurological rehabilitation group. Moreover, when facing dynamic changes in patient flow and rehabilitation stage progression, the model has poor adaptability and needs frequent manual parameter adjustment.
[0003] The individualized needs of equipment allocation schemes for different rehabilitation groups due to differences in business scenarios are another core challenge for rehabilitation center optimization. The neurological rehabilitation group needs to ensure the core position of balance and gait training and strictly control the risk of falling, the orthopedic rehabilitation group needs to focus on muscle strength recovery and avoid excessive training that may cause pain, and the elderly chronic disease group needs to ensure the intensity and duration of aerobic training and prevent excessive fatigue. Some existing researches design optimization models for a single rehabilitation group type, such as developing muscle strength training scheduling algorithms for the orthopedic group and designing aerobic training scheduling strategies for the elderly group. However, such methods lack universality and cannot reuse the optimization experience of one group of patients in other scenarios. When the business of the rehabilitation center is adjusted (such as the addition of new rehabilitation projects or changes in patient population structure), the model needs to be rebuilt, which is costly in development and maintenance.
[0004] Multi-task optimization algorithms provide a new way to solve multi-type rehabilitation group scheduling problems by virtue of cross-scene knowledge transfer ability and parallel optimization efficiency. Such algorithms can model the equipment allocation needs of neurological rehabilitation groups, orthopedic rehabilitation groups, and geriatric rehabilitation groups as independent optimization tasks. By dynamically adjusting population evolution strategies (such as mutation factors and crossover probabilities of differential evolution), high-quality scheduling experiences are shared among multiple tasks. For example, the "training-rest interval" logic of the orthopedic group is transferred to the neurological rehabilitation group to reduce the risk of falling, or the "short-time multiple rotation" experience of the geriatric group is adapted to the neurological group treadmill usage. However, existing multi-task optimization algorithms still have limitations in the context of rehabilitation equipment allocation: on the one hand, cross-task knowledge transfer is easily affected by scene differences. For example, directly applying the scheduling experience of the orthopedic group "fixed period of strength training" to the geriatric group will lead to excessive fatigue due to the insufficient endurance of elderly patients; on the other hand, the algorithm lacks diversity in allocation schemes, and population evolution easily falls into local optima. For example, in neurological group scheduling, non-dominated solutions may excessively concentrate on using balance instruments during the morning peak period, leading to resource idling or long patient waiting times in other periods.
[0005] Neural network transfer learning provides technical support to improve cross-task adaptability. By constructing a dimension mapping model between tasks, the allocation solution of the source task (such as the orthopedic rehabilitation group) can be converted into the decision variable of the target task (such as the neurological rehabilitation group), reducing the risk of "negative transfer". However, existing methods still have defects: first, the training data relies on the mixed sampling of elite solutions and random solutions. When the business characteristics of two types of rehabilitation groups differ greatly (such as high-frequency switching of multiple equipment in the neurological group vs. continuous use of a single equipment in the geriatric group), the distribution deviation of training samples will lead to a decrease in model generalization ability; second, the integration of rehabilitation constraints is insufficient, and the allocation solution output by the neural network may violate rehabilitation standards (such as exceeding the daily balance training time for patients), requiring additional constraint verification and correction, increasing the complexity of the algorithm. In addition, noise in rehabilitation center scheduling data (such as temporary leave of patients, sudden failure of rehabilitation equipment) will affect the learning accuracy of the neural network, leading to a deviation between the allocation scheme after transfer and the actual demand, further limiting the application of the algorithm in clinical rehabilitation scenarios. Therefore, designing a rehabilitation equipment allocation optimization model that takes into account cross-scene adaptability, scheme diversity, and constraint satisfaction is still a challenge to be addressed. SUMMARY
[0006] The purpose of the present application is to provide a multi-task rehabilitation center equipment deployment optimization scheme screening method based on a grouped neural network, to improve the efficiency of rehabilitation center equipment use and rehabilitation quality, and to achieve efficient use of medical rehabilitation resources.
[0007] In order to achieve the above purposes, the technical scheme adopted by the present application is: a multi-task rehabilitation center equipment allocation optimal scheme screening method based on a grouped neural network, three types of distribution tasks of a neural rehabilitation group, an orthopedic rehabilitation group and an old and chronic disease rehabilitation group are constructed, a multi-task optimization framework is established, a differential evolution algorithm is combined with a grouped neural network migration mechanism to realize knowledge sharing and collaborative optimization across rehabilitation groups.
[0008] As a preferred technical scheme of the present application, the following steps are implemented: Step 1: Construct a multi-task optimization problem of rehabilitation equipment distribution, including three types of tasks of a neural rehabilitation group, an orthopedic rehabilitation group and an old and chronic disease rehabilitation group; Step 2: Initialize the population, including the population of each task, the archive set, the historical record and the shared parameters required for multi-task optimization; Step 3: Use a multi-task differential evolution framework combined with a neural network based on dimension range grouping to realize the cross-task migration of high-quality equipment allocation schemes by training the mapping network from the source task to the target task; Step 4: Design an environment selection based on an attention mechanism; by introducing self-attention and cross-task attention mechanisms, the similarity between individuals is evaluated to maintain population diversity while ensuring convergence, and the optimization direction is adaptively adjusted; Step 5: Execute the population reduction strategy; Step 6: Output the optimal equipment allocation scheme and visualize the analysis.
[0009] As a preferred technical scheme of the present application, the step 1 is specifically: Step 1.1, define the task type and core parameter setting task total number T=3, corresponding to a neural rehabilitation group (task 1), an orthopedic rehabilitation group (task 2) and an old and chronic disease rehabilitation group (task 3), and the decision variable dimension is set according to the task complexity difference; Step 1.2, design the rehabilitation group feature parameters as three types of tasks to construct a differentiated feature structure; Neural rehabilitation group: =(number of patients, number of balance training instruments, number of treadmills, number of four-limb linkage rehabilitation instruments, training intensity level, scheduling period); Orthopedic rehabilitation group: =(number of patients, number of muscle strength training instruments, number of joint activity instruments, number of upper limb lifting training instruments, rehabilitation stage, scheduling period); Old and chronic disease rehabilitation group: =(number of patients, number of aerobic bicycles, number of rowing machines, number of flexibility and balance pads, endurance level, scheduling period).
[0010] Step 1.3, construct a fitness function to target the rehabilitation equipment allocation as a minimization problem; Neurorehabilitation group: =-(0.35 +0.30 +0.15 +0.15 +0.05 (1) in Balance training equipment utilization rate To improve the utilization rate of stepper machines, To improve the utilization rate of limb-mobility rehabilitation devices, For patient waiting time, The risk factor for falling; Orthopedic Rehabilitation Group: =-(0.40 +0.20 +0.10 +0.20 +0.10 (2) in To improve the utilization rate of strength training equipment To improve the utilization rate of joint mobility devices, To improve the utilization rate of the upper limb pressing training machine, For patient waiting time, This represents the pain aggravation factor. Elderly Chronic Disease Rehabilitation Group: =-(0.35 +0.25 +0.10 +0.20 +0.10 (3) in To improve the utilization rate of aerobic bicycles, To improve the utilization rate of rowing machines, To balance flexibility and pad utilization, For patient waiting time, This is the fatigue coefficient.
[0011] As a preferred technical solution of the present invention, step 2 specifically includes: Step 2.1, initialize the population structure; For each task The generation scale is The initial population, initial fitness and constraint violation degree are inf, and the differential evolution parameters are... and
[0012] Step 2.2, establish the auxiliary storage structure; Create an empty archive set Save historical high-quality solutions; initialize historical parameter set. Record the optimal fitness, constraint violation value, and corresponding solution for each generation, initially set to 0 or empty; Step 2.3: Set multi-task sharing parameters; Elite selection ratio Success rate threshold , Adjust step size Population reduction timing coefficient Cross-task attention weights The neural network training interval is 50, and the neural network usage interval is 10.
[0013] As a preferred embodiment of the present invention, step 3 specifically comprises: Step 3.1: Pair the training solution data before training the neural network; Fitness normalization: (4) in, For individual adaptability, such as in the orthopedic rehabilitation group =-(0.40 +0.20 +0.10 +0.20 +0.10 , These are the minimum and maximum fitness of the solution set, respectively; after normalization, the fitness of different tasks can be compared on the same scale. Consideration to the elite of the orthopedic rehabilitation group From the elite of the neurorehabilitation group Find the solution with the most similar normalized fitness. The calculation formula is as follows: (5) The training set T is finally formed: A set T is used to train a neural network for knowledge transfer from a source task to a target task; where... i For the decision variables of the orthopedic rehabilitation group, Decision variables for the neurorehabilitation group ( ); Step 3.2: Automatically group dimensions based on value range. Calculate the range for each dimension of the decision variables for the neurorehabilitation group, and calculate min_vals and max_vals for each dimension to obtain the value range for each dimension. Then, use the k-means clustering method to cluster the dimensions into k groups based on features: Each cluster forms a group; dimensions with similar value ranges are merged into the same output network, which facilitates the selection of unified activation and output constraints; (6) The infinite range dimension and the finite range dimension are separated. For the infinite range dimension, because its distribution is unstable, it needs to be modeled independently, so each is grouped separately. For the finite range dimension, its width is calculated for clustering, and the formula is: (7) Then, dynamic network construction is performed. For each dimension, an appropriate activation function is selected (e.g., for dimensions related to the balance trainer where data fluctuations are large, a suitable activation function is selected). The data related to the flexible pad are relatively stable, so we selected... The specific selection method is shown in the following formula: (8) Step 3.3: Train the neural network model based on dimension grouping. The network input is the complete decision vector of the orthopedic rehabilitation group, and the output is the decision variables of the corresponding dimension group of the neurorehabilitation group. Select the historical elite solution and some random solutions of the orthopedic rehabilitation group, and use the Adam optimizer for bidirectional training. Step 3.4: Determine whether the migration conditions are met. If not, use the mutation method of the differential evolution algorithm (SHADE) based on successful historical evolution to generate offspring using the following formula (9). (9) in, yes mutation vector, It is the optimal value in the neurorehabilitation group population. , They were randomly selected from the neurorehabilitation group population. It is a scaling factor; Equation (9) uses only individuals from a population to create a mutation vector; If the conditions for knowledge transfer are met, then a neural network is used for prediction. The mutation formula is as follows (10). (10) in, This is the value predicted by a neural network based on the optimal value of the orthopedic rehabilitation group population. These are the values predicted by a neural network from two randomly selected individuals in the orthopedic rehabilitation group population. The iterative process generates N offspring, and then merges the parent and offspring populations.
[0014] As a preferred technical solution of the present invention, step 4 specifically comprises: Step 4.1, Elite Selection; The optimal subset of individuals, with a size of 1.2N, is selected based on the objective function value. Step 4.2, Feature Standardization; To eliminate the dimensional differences between different decision variables, the decision variables (Dec) of the candidate pool and the migration pool are standardized. Column standardization (z-score): Eliminating dimensions for each decision variable dimension (column), the formula is: (11) in, It is the j-th decision variable of the i-th allocation scheme in the candidate pool. It is the mean of the j-th dimension. It is the standard deviation of the j-th dimension. Avoid denominators of 0; if the standard deviation of a certain dimension is extremely small ( This indicates that the dimension has no distinguishing power, so it should be set to 0. Row standardization (unit vector): Normalize each individual (row) to ensure fairness in subsequent cosine similarity calculations. The formula is: (12) Where D is the dimension of the decision variable (Prob.D(t)), and the denominator is the L2 norm of the individual; Step 4.3, calculate the self-attention value; The self-attention matrix is used to measure the similarity between individuals in the candidate pool; the lower the similarity, the better the diversity. Taking the candidate pool of the neurorehabilitation group as an example, the self-attention matrix is used to measure the similarity between individuals (assignment schemes) in the pool, which helps the algorithm explore more high-quality assignment schemes. The formula is: (13) The result is an M x M matrix (M was set to 1.2N in the experiment). This represents the cosine similarity (range) between the i-th and j-th allocation schemes in the candidate pool for the neurorehabilitation group. 1,1 1,1); To avoid calculating similarity between an individual and itself, the diagonal elements (i=j) are set to 1,1); ; The self-attention score represents the average similarity between the current individual and the selected individuals, and is used to assess population diversity (the lower the score, the greater the individual differences, and the better the diversity). The formula is: (14) Step 4.4: Calculate the cross-attention value; The cross-attention matrix is used to measure the similarity between individuals in the candidate pool of the neurorehabilitation group and individuals in the transfer pool of the orthopedic rehabilitation group. The higher the similarity, the greater the value of cross-task knowledge reuse. The calculation is performed by multiplying the candidate pool normalized matrix and the transfer pool normalized matrix, using the following formula: (15) The result is matrix, For the migration pool size, This represents the cosine similarity between the i-th allocation scheme in the candidate pool of the neurorehabilitation group and the k-th scheme in the migration pool of the orthopedic rehabilitation group; if the migration pool is empty ( =0), then, Set to 0, relying solely on self-attention; Cross-attention score measures the average similarity between individuals in the neurorehabilitation candidate pool and elite individuals in the orthopedic rehabilitation group, and is used to assess cross-task knowledge matching. Its calculation formula is as follows: (16) Step 4.5: Calculate the overall attention score and select the individual with the highest score; The comprehensive attention score, which balances the self-attention score and cross-attention score by weighting coefficients, is the core evaluation indicator for greedy selection (the higher the score, the more worthwhile the individual is to be retained). Its formula is: (17) The negative sign converts self-attention similarity into a score. is the cross-attention weight coefficient (Beta parameter, with a value of [0,1]).
[0015] As a preferred embodiment of the present invention, step 5 specifically comprises: Step 5.1, determining the timing for reduction; When evolutionary generations Reaching the total number of algebras of When the ratio is reached, the population reduction mechanism is activated; Step 5.2, Elite Individual Selection; For each task, the current population is ranked by constraint violation degree. and fitness Perform non-dominated sorting, select the first The best individuals form a new generation of the population; Step 5.3, Archive Set Management; Eligible individuals are stored in an archive. If the size of the archive exceeds the size of the original population, N individuals are randomly selected to be retained to ensure the rational use of storage space.
[0016] As a preferred technical solution of the present invention, step 6 specifically involves generating a convergence curve, indicator radar chart, and migration improvement rate chart for each task, which visually presents the algorithm performance and the advantages of the allocation scheme.
[0017] The beneficial effects of this invention are: This invention provides a method for selecting the optimal allocation scheme for equipment in a multi-task rehabilitation center based on a grouped neural network, which has the following advantages: Improving the quality of rehabilitation equipment allocation schemes: By constructing a multi-task optimization problem, the equipment allocation needs of three types of tasks—neurological rehabilitation group, orthopedic rehabilitation group, and geriatric chronic disease rehabilitation group—can be coordinated. This allows for a more comprehensive consideration of the functional training characteristics and risk control requirements of different rehabilitation groups, generating more targeted equipment allocation schemes that are more in line with rehabilitation principles for each type of rehabilitation group, thereby improving the overall quality and safety of rehabilitation training.
[0018] Cross-task transfer capability of high-quality allocation schemes: By adopting a multi-task differential evolution framework combined with a neural network based on dimensional range grouping, a mapping network from source task to target task is trained, which can effectively realize the cross-task transfer of high-quality allocation schemes between different rehabilitation groups. This allows the high-quality allocation experience of one type of rehabilitation group (such as the "training-rest interval" strategy of the orthopedic group) to be used by other rehabilitation groups (such as the neurology group), thus accelerating the optimization process of allocation schemes for various rehabilitation groups.
[0019] To improve the efficiency and stability of the rehabilitation equipment allocation optimization process, an environment selection based on attention mechanisms is designed. Self-attention and cross-task attention mechanisms are introduced to assess the similarity between individuals. While ensuring convergence, population diversity is maintained, and the optimization direction is adaptively adjusted to make the equipment allocation optimization process more efficient and steadily move towards generating a better allocation scheme.
[0020] Ensuring the sustainability and analyzability of rehabilitation equipment allocation optimization: Implementing a population reduction strategy can reasonably streamline the population size during the optimization process, improve the efficiency of later iterations, and output the optimal allocation scheme for visualization analysis. This allows for an intuitive understanding of the advantages and disadvantages of the allocation scheme and the characteristics of equipment use, providing a clear basis for subsequent adjustments and optimizations to the rehabilitation center schedule, and enhancing the sustainability and analyzability of allocation optimization. Attached Figure Description
[0021] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a flowchart illustrating the optimal solution selection method for rehabilitation equipment allocation based on multi-task evolution of grouped neural networks, as described in this invention. Figure 2It is a comparison chart of convergence curves for three groups of rehabilitation types and a visual chart of final fitness.
[0022] Figure 3 This is a radar chart of various performance indicators.
[0023] Figure 4 This is a comparison chart of key indicators for the final plan.
[0024] Figure 5 The results of the performance improvement rate for each rehabilitation group are presented in a graph.
[0025] Figure 6 A schematic diagram illustrating the overall process for allocating equipment to community rehabilitation centers. Detailed Implementation
[0026] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0027] Example 1 like Figure 1 As shown, this invention discloses a method for selecting the optimal allocation scheme for equipment in a multi-task rehabilitation center based on a grouped neural network. This method establishes a multi-task optimization framework by constructing three task allocation groups: a neurological rehabilitation group, an orthopedic rehabilitation group, and a geriatric chronic disease rehabilitation group. It utilizes a differential evolution algorithm combined with a group-based neural network transfer mechanism to achieve knowledge sharing and collaborative optimization across rehabilitation groups. The specific implementation follows these steps: Step 1: Construct a multi-task optimization problem for the allocation of rehabilitation equipment, including three types of tasks: neurological rehabilitation group, orthopedic rehabilitation group, and geriatric chronic disease rehabilitation group; Step 2: Initialize the population, including the population, archive set, history, and shared parameters required for multi-task optimization for each task; Step 3: Employ a multi-task differential evolution framework, combined with a neural network based on dimensional range grouping, to achieve cross-task transfer of high-quality equipment allocation schemes by training a mapping network from source task to target task. Step 4: Design an environment selection based on attention mechanisms; by introducing self-attention and cross-task attention mechanisms, evaluate the similarity between individuals, maintain population diversity while ensuring convergence, and adaptively adjust the optimization direction; Step 5: Implement population reduction strategy; Step 6: Output the optimal equipment allocation plan and perform visual analysis.
[0028] Example 2 Unlike Example 1, in Example 2, step 1 of the method for selecting the optimal allocation scheme of equipment in a multi-task rehabilitation center based on a grouped neural network according to the present invention specifically includes: Step 1.1: Define the task type and core parameters, and set the total number of tasks T=3, corresponding to the neurorehabilitation group (task 1), orthopedic rehabilitation group (task 2), and geriatric chronic disease rehabilitation group (task 3). The decision variable dimensions are uniformly set to 54 dimensions (3 types of core equipment × 18 time periods) according to the complexity of rehabilitation training.
[0029] Step 1.2: Design the rehabilitation group's characteristic parameters to construct a differentiated feature structure for the neurorehabilitation group based on three types of tasks: =(Number of patients = 12, Number of balance training devices = 3, Number of steppers = 3, Number of four-limb linkage rehabilitation devices = 2, Training intensity level = 3, Scheduling cycle = 1 day); Orthopedic Rehabilitation Group: =(Number of patients = 10, Number of muscle strength trainers = 3, Number of joint mobility devices = 2, Number of upper limb lifting trainers = 2, Rehabilitation stage = 4, Scheduling cycle = 1 day); Elderly Chronic Disease Rehabilitation Group: =(Number of patients = 15, Number of aerobic bikes = 4, Number of rowing machines = 2, Number of flexibility and balance mats = 5, Endurance level = 3, Scheduling cycle = 1 day).
[0030] Step 1.3: Construct the fitness function.
[0031] Neurorehabilitation group: =-(0.35 +0.30 +0.15 +0.15 +0.05 (1) Orthopedic Rehabilitation Group: =-(0.40 +0.20 +0.10 +0.20 +0.10 (2) Elderly Chronic Disease Rehabilitation Group: =-(0.35 +0.25 +0.10 +0.20 +0.10 (3) Weights are the core parameters for balancing the priorities of multiple objectives. Their determination requires combining three factors: basic weight division based on rehabilitation medicine standards, weight calibration based on historical data, and fine-tuning optimization based on interviews with rehabilitation therapists.
[0032] The specific formulas for calculating the fitness function metrics are as follows: Balance training equipment utilization rate : (18) Stepper utilization rate : (19) Utilization rate of limb-linked rehabilitation devices : (20) Average patient waiting time : (twenty one) in, It is the first The waiting time for each patient This refers to the total number of patients. (Fall risk factor) The initial value is 0, and the estimated fall risk is calculated based on the allocation scheme, for example, if the patient has been undergoing balance training for more than one period of time. Increase by 0.1; balance training will begin after the patient has waited more than 60 minutes. Increase by 0.05.
[0033] Strength training equipment utilization rate : = (twenty two) Joint movement device utilization rate = (twenty three) Utilization rate of upper limb press training equipment = (twenty four) Pain aggravation factor The estimated risk of increased pain, calculated based on the allocation scheme, is initially set to 0. For example, if the interval between two muscle strengthening exercises for the same patient is less than 4 hours, Increase by 0.2.
[0034] Aerobic bicycle utilization rate : = (25) Rowing machine utilization rate : = (26) Flexibility and balancing pad utilization : = (27) Fatigue coefficient The estimated risk of fatigue is calculated based on the allocation scheme, for example, if the same patient performs continuous aerobic training for more than 45 minutes. Increase by 0.25. Example 3 Unlike Example 2, in Example 3, step 2 of the method for selecting the optimal allocation scheme of equipment in a multi-task rehabilitation center based on a grouped neural network of the present invention is specifically as follows: Step 2.1, initialize the population structure.
[0035] For each task The generation scale is The initial population, targeting the neurorehabilitation group, consists of individuals that are structures containing decision variables. (Randomly generated within the range), dimension 54 (corresponding to the number of balance trainers, steppers, and four-limb coordination rehabilitation devices allocated across 18 time periods). Initial fitness value. (set to) (Indicates no assessment was conducted) and degree of constraint violation (set to) (Indicates no constraint violation assessment was performed) Differential evolution parameters 0.5 and =0.5 (a commonly used initial value for the mutation factor in differential evolution algorithms, ensuring exploratory capabilities in the early stages of the search); for the orthopedic rehabilitation group, dimension 54 (corresponding to the allocation of muscle strength trainers, joint mobility devices, and upper limb lifting trainers across 18 time periods). For the elderly chronic disease rehabilitation group, dimension 54 (corresponding to the allocation of aerobic bicycles, rowing machines, and flexibility and balance mats across 18 time periods).
[0036] Step 2.2: Establish auxiliary storage structure.
[0037] Create an empty archive set Used to store historical high-quality solutions that have been replaced during iteration (such as high-quality allocation schemes that have been replaced by better offspring in the neurorehabilitation group), preventing the loss of high-quality solutions due to random operations. Initialize the historical parameter set. Record the optimal fitness, constraint violation value, and corresponding solution for each generation, initially set to 0 or empty. Meanwhile, It also includes a metrics unit to store key operational metrics for each generation (such as equipment utilization, patient waiting time, risk coefficient, etc.) to facilitate subsequent analysis and optimization.
[0038] Step 2.3: Set multi-task sharing parameters.
[0039] Elite selection ratio Control the proportion of elite individuals selected within the task, focusing on high-quality individuals to guide the search (e.g., selecting the top 10% of elite individuals from the neurorehabilitation group population to participate in mutation operations); success rate threshold. This serves as a benchmark for determining whether population updates are successful. If the update success rate is lower than this value, the migration probability is adjusted. Adjust step size Control the adjustment range of RMP to avoid excessive adjustment range leading to algorithm instability; population reduction timing coefficient. When iterative algebra Time-triggered population reduction improves later iteration efficiency; cross-task attention weights To balance the influence of self-attention and cross-task attention, environmental selection takes into account both population diversity and cross-task knowledge utilization; the neural network training interval is 50, training the neural network once every 50 generations to ensure that the network learns population evolution information in a timely manner (such as the allocation experience transfer network between the orthopedic rehabilitation group and the neurological rehabilitation group); the neural network usage interval is 10, the minimum interval between two uses of neural network transfer, avoiding frequent transfers that waste computational resources; the maximum number of network groups is 5, reducing the difficulty of mapping high-dimensional decision variables; the minimum improvement rate is 0.1, which is the benchmark for judging whether the neural network transfer is effective, and transfer is turned off if it is lower than this value.
[0040] Example 4 Unlike Example 3, in Example 4, the optimal solution selection method for multi-task rehabilitation center equipment allocation based on grouped neural networks of the present invention: Step 3 specifically includes: Step 3.1: Before training the neural network, the training solution data is paired. Solution pairing is a crucial step for the model to successfully transfer knowledge. This is because it needs to accurately find the optimal alignment between each solution of two tasks. To achieve cross-task knowledge transfer, the elite solutions of the source task (e.g., orthopedic rehabilitation group) and the target task (e.g., neurorehabilitation group) need to be paired first. We use a fitness normalization similarity pairing method. This method first normalizes the fitness of the solutions, and then matches the solutions based on the distance between these normalized fitness values. In this way, this method can maintain diversity while preserving the individual characteristics of each task, thereby creating a more robust and generalizable transfer model that can efficiently utilize the similarity between tasks with sufficiently diverse solutions.
[0041] Fitness normalization: (4) in, For individual adaptability, such as in the orthopedic rehabilitation group =-(0.40 +0.20 +0.10 +0.20 +0.10 , These represent the minimum and maximum fitness of the solution set, respectively. After normalization, the fitness of different tasks can be compared on the same scale. For example, the normalized fitness of a certain program in the orthopedic rehabilitation group is 0.6, while that of a certain program in the neurorehabilitation group is 0.55, indicating that the two programs have similarities in the balance of "equipment utilization - patient experience - risk control".
[0042] Here, we consider the elite solutions of the orthopedic rehabilitation group. (For example, an allocation scheme with "92% utilization of muscle strength training equipment and low pain coefficient"), from the elite neurorehabilitation group... Find the solution with the most similar normalized fitness. The calculation formula is as follows: (5) For example, if a certain plan in the orthopedic rehabilitation group The normalized fitness was 0.6, and the regimen in the neurorehabilitation group was [not specified]. If the normalized fitness is 0.58, then the two are paired as training samples. The training set T is ultimately formed. The set T is used to train a neural network for knowledge transfer from the source task to the target task. i Decision variables for the orthopedic rehabilitation group (such as time allocation for muscle strength training devices and priority of joint mobility device use). For decision variables in the neurorehabilitation group (such as time allocation for balance training devices, priority of stepper use) ).
[0043] Step 3.2: Automatically group dimensions based on value ranges. Calculate the range for each dimension of the decision variables in the neurorehabilitation group (e.g., "the number of allocations for the balance training device in time period 1, the number of allocations for the stepper in time period 2, the number of allocations for the four-limb linkage rehabilitation device in time period 3," etc.). Calculate min_vals and max_vals for each dimension to obtain its value range. Then, use the k-means clustering method to cluster the dimensions into k groups based on their features. Each cluster forms a group. Dimensions with similar value ranges are merged into the same output network, which facilitates the selection of uniform activation and output constraints.
[0044] (6) The infinite range dimension and the finite range dimension are separated. For the infinite range dimension, because its distribution is unstable, it needs to be modeled independently, so each is grouped separately. For the finite range dimension, its width is calculated for clustering, and the formula is: (7) Then, dynamic network construction is performed. For each dimension, an appropriate activation function is selected (e.g., for dimensions related to the balance trainer where data fluctuations are large, a suitable activation function is selected). The data related to the flexible pad are relatively stable, so we selected... The specific selection method is shown in the following formula: (8) Step 3.3: Train the neural network model based on dimensional grouping. The network input is the complete decision vector for the orthopedic rehabilitation group (such as the allocation time of the muscle strength trainer, the priority of the joint movement device, etc., and other full-dimensional information, rather than just selecting some sub-dimensions). The output is the decision variables for the corresponding dimensional grouping of the neurorehabilitation group (such as the allocation time of the balance trainer, the priority of the stepper, etc.). Select historical elite solutions (such as the high-quality allocation of "95% utilization rate of the muscle strength trainer") and some random solutions (such as the "less optimal but diverse scheme of muscle strength training scheduling") for the orthopedic rehabilitation group, and perform bidirectional training using the Adam optimizer. For example, input the decision vector of "allocating the muscle strength trainer to patient B1 from 9-11 am" for the orthopedic rehabilitation group into the network, and expect to output the decision dimension of "prioritizing support for patient A1 with the balance trainer from 9-11 am" for the neurorehabilitation group. Optimize the network parameters through backpropagation, and store the model and dimensional grouping information (such as "high-intensity training time dimension group" and "auxiliary training equipment dimension group").
[0045] Step 3.4: Determine whether the migration conditions are met. If not, use the mutation method of the differential evolution algorithm (SHADE) based on successful historical evolution to generate offspring using the following formula (9). (9) in, yes mutation vector, It is the optimal value in the neurorehabilitation group population. , They were randomly selected from the neurorehabilitation group population. It is a scaling factor. Equation (9) uses only individuals from a population to create the mutation vector.
[0046] After mutation, the following binary crossover operator is used to produce the final offspring.
[0047] = (28) in, yes Random numbers in the data, yes A randomly selected integer. ∈ The crossover rate determines the number of variables inherited from the mutation vector. It's a scaling factor in the mutation and crossover operators. and cross rate They are generated by Cauchy and Gaussian distributions respectively, as shown below.
[0048] (29) (30) If the conditions for knowledge transfer are met, then a neural network is used for prediction. The mutation formula is as follows (10). (10) in, This is the value predicted by a neural network based on the optimal value of the orthopedic rehabilitation group population. These are the values predicted by a neural network from two randomly selected individuals in the orthopedic rehabilitation group population. The iterative process generates N offspring, and then merges the parent and offspring populations.
[0049] Example 5 Unlike Example 4, step 4 of the method for selecting the optimal allocation scheme of equipment in a multi-task rehabilitation center based on a grouped neural network in Example 5 is specifically as follows: Step 4.1, Elite Selection.
[0050] The optimal subset of individuals, with a size of 1.2N, is selected based on the objective function value. For example, in 50 iterations of the neurorehabilitation group, there are 60 allocation schemes in the parent generation and 60 newly generated schemes in the offspring generation, totaling 120 schemes. From these, the 72 schemes with the lowest fitness are selected to form a candidate pool. These schemes cover potential solutions with high-quality allocations, such as "high utilization of the balance training device" and "short patient waiting time".
[0051] Step 4.2, feature standardization.
[0052] To eliminate the dimensional differences between different decision variables, the decision variables (Dec) of the candidate pool and the migration pool are standardized.
[0053] Column standardization (z-score): Eliminating dimensions for each decision variable dimension (column), the formula is: (11) in, It is the j-th decision variable of the i-th allocation scheme in the candidate pool (such as "the number of allocations of the balance training device in time period 1" for the third scheme). It is the mean of the j-th dimension. It is the standard deviation of the j-th dimension. Avoid having a denominator of 0. If the standard deviation of a certain dimension (such as "the number of flexible mats distributed during off-peak hours") is extremely small ( This indicates that the dimension has no discriminative power and is directly set to 0. For example, the mean of the "balance training device allocation dimension" in the neurorehabilitation group is 0.6, and the standard deviation is 0.2. If the value of this dimension in a certain program is 0.8, then after standardization... This eliminates the dimensional differences with other dimensions.
[0054] Row standardization (unit vector): Normalize each individual (row) to ensure fairness in subsequent cosine similarity calculations. The formula is: (12) Where D is the dimension of the decision variable (Prob.D(t)), and the denominator is the L2 norm of the individual. For example, the standardized values of each dimension of the allocation scheme for the neurorehabilitation group are... After standardization, the vector's magnitude is 1, ensuring fairness in similarity calculation among different schemes. This step lays the foundation for subsequent calculations of self-attention and cross-task attention matrices, allowing the "neurological rehabilitation equipment allocation" scheme to be compared with the "orthopedic rehabilitation equipment allocation" scheme on the same scale.
[0055] Step 4.3, calculate the self-attention value.
[0056] This invention uses a self-attention matrix to measure the similarity between individuals in the candidate pool; the lower the similarity, the better the diversity. Taking the candidate pool of the neurorehabilitation group as an example, the self-attention matrix is used to measure the similarity between individuals (assignment schemes) in the pool, which facilitates the algorithm in exploring more high-quality assignment schemes. The formula is: (13) The result is an MxM matrix. This represents the cosine similarity (range) between the i-th and j-th allocation schemes in the candidate pool for the neurorehabilitation group. 1,1 1,1). To avoid calculating similarity between an individual and itself, the diagonal elements (i=j) are set to 0. .
[0057] The self-attention score represents the average similarity between the current individual and the selected individuals, and is used to assess population diversity (the lower the score, the greater the individual differences, and the better the diversity). The formula is: (14) Step 4.4, calculate the cross-attention value.
[0058] This invention uses a cross-attention matrix to measure the similarity between individuals in the candidate pool of the neurorehabilitation group and individuals in the transfer pool of the orthopedic rehabilitation group. The higher the similarity, the greater the value of cross-task knowledge reuse. The calculation is performed by multiplying the candidate pool normalization matrix and the transfer pool normalization matrix, using the following formula: (15) The result is matrix, For the migration pool size, This represents the cosine similarity between the i-th allocation scheme in the candidate pool of the neurorehabilitation group and the k-th scheme in the migration pool of the orthopedic rehabilitation group. If the migration pool is empty... =0), then, Set to 0, relying solely on self-attention.
[0059] Cross-attention score measures the average similarity between individuals in the neurorehabilitation candidate pool and elite individuals in the orthopedic rehabilitation group, and is used to assess cross-task knowledge matching (the higher the score, the better the individual matches the high-quality knowledge of the neurorehabilitation group individuals). Its calculation formula is as follows: (16) Step 4.5: Calculate the overall attention score and select the individual with the highest score.
[0060] The comprehensive attention score, which balances the self-attention score and cross-attention score by weighting coefficients, is the core evaluation indicator for greedy selection (the higher the score, the more worthwhile the individual is to be retained). Its formula is: (17) The negative sign converts self-attention similarity (lower is better) into a score (higher is better). , where represents the cross-attention weight coefficient (Beta parameter, value [0,1]). Traditional multi-task optimization environment selection relies solely on "performance ranking" or "random diversity," which can easily lead to "premature convergence" (insufficient diversity) or "performance loss" (loss of elites). This algorithm, through a weighted fusion of self-attention (ensuring diversity) and cross-attention (reusing cross-task knowledge), ensures that while "retaining elites," the solution is evenly distributed and can absorb high-quality features from auxiliary tasks, making it particularly suitable for knowledge transfer in multi-task scenarios.
[0061] Example 6 Unlike Example 5, step 5 of the method for selecting the optimal allocation scheme of equipment in a multi-task rehabilitation center based on a grouped neural network in Example 6 of the present invention is specifically as follows: Step 5.1, determine the timing for reduction.
[0062] When evolutionary generations Reaching the total number of algebras of When the ratio is reached, the population reduction mechanism is activated. Taking the neurorehabilitation group as an example, the algorithm explores a wide range of solutions to find a balance between "high utilization of rehabilitation equipment and short patient waiting time". After 125 generations, it is necessary to focus on fine optimization around the high-quality solution. Therefore, the population size is reduced to reduce computational overhead.
[0063] Step 5.2, selection of elite individuals.
[0064] For each task, the current population is ranked by constraint violation degree. and fitness Perform non-dominated sorting, select the first The best individuals form a new generation of population.
[0065] Step 5.3, Archive Set Management.
[0066] Eligible individuals are stored in an archive. If the size of the archive exceeds the size of the original population, N individuals are randomly selected to be retained to ensure the rational use of storage space.
[0067] Example 7 Unlike Example 6, step 6 of the multi-task rehabilitation center equipment allocation optimal scheme selection method based on grouped neural networks in Example 7 specifically involves: generating convergence curves for each task, indicator radar charts (normalized to show the balance of key indicators for each task), a comparison chart of key indicators for the final scheme (the five indicators for the neurorehabilitation group are: balance training device utilization rate 88%, stepper machine utilization rate 89.9%, four-limb linkage rehabilitation device utilization rate 65.9%, average patient waiting time 10 min, and fall risk coefficient 0.3; the five indicators for the orthopedic rehabilitation group are: muscle strength training device utilization rate 95%, joint mobility device utilization rate 90%, upper limb lifting training device utilization rate 83.9%, average patient waiting time 10 min, and pain aggravation coefficient 0.2; the five indicators for the geriatric chronic disease rehabilitation group are: aerobic bicycle utilization rate 86.5%, rowing machine utilization rate 73.7%, flexibility and balance mat utilization rate 75.3%, average patient waiting time 7.1 min, and fatigue coefficient 0.3), and a transfer improvement rate chart, which visually presents the algorithm performance and the advantages of the allocation scheme.
[0068] Figure 2 The graphs show a comparison of convergence curves for three rehabilitation types and a visual representation of the final fitness, demonstrating that the algorithm can effectively optimize the allocation of equipment in rehabilitation centers. Figure 3 It is a radar chart of various performance indicators, with each vertex representing a different performance indicator, which can intuitively show the overall performance profile of different rehabilitation groups. Figure 4This is a comparison chart of key indicators for the final plan. The five indicators for the neurorehabilitation group are: utilization rate of the balance training device, utilization rate of the stepper machine, utilization rate of the four-limb linkage rehabilitation device, average patient waiting time, and fall risk coefficient. The five indicators for the orthopedic rehabilitation group are: utilization rate of the muscle strength training device, utilization rate of the joint mobility device, utilization rate of the upper limb lifting training device, average patient waiting time, and pain aggravation coefficient. The five indicators for the geriatric chronic disease rehabilitation group are: utilization rate of the aerobic bicycle, utilization rate of the rowing machine, utilization rate of the flexibility and balance mat, average patient waiting time, and fatigue coefficient. Figure 5 Presenting the performance improvement rate of each rehabilitation group, it can be clearly seen that the algorithm has improved the performance of equipment allocation in community rehabilitation centers by up to 50%, which greatly optimizes the core efficiency of the algorithm and highlights its significant advantages. Figure 6 The flowchart for the allocation of equipment in community rehabilitation centers clearly breaks down the core points of equipment allocation and fully presents the specific execution process of the algorithm, making the logic clear and easy to understand.
[0069] The foregoing description illustrates and describes several preferred embodiments of the invention. However, as previously stated, it should be understood that the invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the inventive concept described herein through the foregoing teachings or techniques or knowledge in related fields. Any modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the invention should be within the protection scope of the appended claims.
Claims
1. A method for selecting the optimal allocation scheme for equipment in a multi-task rehabilitation center based on a grouped neural network, characterized in that, By constructing three task allocation groups—neurological rehabilitation, orthopedic rehabilitation, and geriatric chronic disease rehabilitation—a multi-task optimization framework is established. The differential evolution algorithm combined with a group-based neural network transfer mechanism is used to achieve knowledge sharing and collaborative optimization across rehabilitation groups.
2. The method for selecting the optimal allocation scheme of equipment in a multi-task rehabilitation center based on a grouped neural network according to claim 1, characterized in that, The specific steps are as follows: Step 1: Construct a multi-task optimization problem for the allocation of rehabilitation equipment, including three types of tasks: neurological rehabilitation group, orthopedic rehabilitation group, and geriatric chronic disease rehabilitation group; Step 2: Initialize the population, including the population, archive set, history, and shared parameters required for multi-task optimization for each task; Step 3: Employ a multi-task differential evolution framework, combined with a neural network based on dimensional range grouping, to achieve cross-task transfer of high-quality equipment allocation schemes by training a mapping network from source task to target task. Step 4: Design an environment selection based on attention mechanisms; By introducing self-attention and cross-task attention mechanisms, the similarity between individuals is evaluated, ensuring convergence while maintaining population diversity and adaptively adjusting the optimization direction. Step 5: Implement population reduction strategy; Step 6: Output the optimal equipment allocation plan and perform visual analysis.
3. The method for selecting the optimal allocation scheme of equipment in a multi-task rehabilitation center based on a grouped neural network according to claim 2, characterized in that, Step 1 specifically includes: Step 1.1, Define the task type and core parameters. Set the total number of tasks T=3, corresponding to the neurorehabilitation group (task 1), orthopedic rehabilitation group (task 2), and geriatric chronic disease rehabilitation group (task 3). The decision variable dimensions are set according to the differences in task complexity. Step 1.2: Design the characteristic parameters of the rehabilitation group to construct a differentiated characteristic structure for three types of tasks; Neurorehabilitation group: =(Number of patients, number of balance training devices, number of steppers, number of four-limb linkage rehabilitation devices, training intensity level, scheduling cycle); Orthopedic Rehabilitation Group: =(Number of patients, number of muscle strength trainers, number of joint mobility devices, number of upper limb lifting trainers, rehabilitation stage, scheduling cycle); Elderly Chronic Disease Rehabilitation Group: =(Number of patients, number of aerobic bikes, number of rowing machines, number of flexibility and balance mats, endurance level, scheduling cycle); Step 1.3: Construct a fitness function to reduce the goal of allocating rehabilitation equipment to a minimization problem; Neurorehabilitation group: =-(0.35 +0.30 +0.15 )+0.15 +0.05 (1) in Balance training equipment utilization rate To improve the utilization rate of stepper machines, To improve the utilization rate of limb-mobility rehabilitation devices, For patient waiting time, The risk factor for falling; Orthopedic Rehabilitation Group: =-(0.40 +0.20 +0.10 )+0.20 +0.10 (2) in To improve the utilization rate of strength training equipment To improve the utilization rate of joint mobility devices, To improve the utilization rate of the upper limb pressing training machine, For patient waiting time, This represents the pain aggravation factor. Elderly Chronic Disease Rehabilitation Group: =-(0.35 +0.25 +0.10 )+0.20 +0.10 (3) in To improve the utilization rate of aerobic bicycles, To improve the utilization rate of rowing machines, To balance flexibility and pad utilization, For patient waiting time, This is the fatigue coefficient.
4. The method for selecting the optimal allocation scheme of equipment in a multi-task rehabilitation center based on a grouped neural network according to claim 3, characterized in that, In step 2, specifically: Step 2.1, initialize the population structure; For each task The generation scale is The initial population, initial fitness and constraint violation degree are inf, and the differential evolution parameters are... and Step 2.2, establish the auxiliary storage structure; Create an empty archive set Save historical high-quality solutions; initialize historical parameter set. Record the optimal fitness, constraint violation value, and corresponding solution for each generation, initially set to 0 or empty; Step 2.3: Set multi-task sharing parameters; Elite selection ratio Success rate threshold , Adjust step size Population reduction timing coefficient Cross-task attention weights The neural network training interval is 50, and the neural network usage interval is 10.
5. The method for selecting the optimal allocation scheme of equipment in a multi-task rehabilitation center based on a grouped neural network according to claim 4, characterized in that, Step 3 specifically includes: Step 3.1: Pair the training solution data before training the neural network; Fitness normalization: (4) in, For individual adaptability, such as in the orthopedic rehabilitation group =-(0.40 +0.20 +0.10 +0.20 +0.10 , These are the minimum and maximum fitness of the solution set, respectively; after normalization, the fitness of different tasks can be compared on the same scale. Consideration to the elite of the orthopedic rehabilitation group From the elite of the neurorehabilitation group Find the solution with the most similar normalized fitness. The calculation formula is as follows: (5) The training set T is finally formed: A set T is used to train a neural network for knowledge transfer from a source task to a target task; where... i For the decision variables of the orthopedic rehabilitation group, Decision variables for the neurorehabilitation group ( ); Step 3.2: Automatically group dimensions based on value range. Calculate the range for each dimension of the decision variables for the neurorehabilitation group, and calculate min_vals and max_vals for each dimension to obtain the value range for each dimension; then use the k-means clustering method to cluster the dimensions into k groups based on features: Each cluster forms a group; dimensions with similar value ranges are merged into the same output network, which facilitates the selection of unified activation and output constraints; (6) The infinite range dimension and the finite range dimension are separated. For the infinite range dimension, because its distribution is unstable, it needs to be modeled independently, so each is grouped separately. For the finite range dimension, its width is calculated for clustering, and the formula is: (7) Then, dynamic network construction is performed. For each dimension, an appropriate activation function is selected (e.g., for dimensions related to the balance trainer where data fluctuations are large, a suitable activation function is selected). The data related to the flexible pad are relatively stable, so we selected... The specific selection method is shown in the following formula: (8) Step 3.3: Train the neural network model based on dimension grouping. The network input is the complete decision vector of the orthopedic rehabilitation group, and the output is the decision variables of the corresponding dimension group of the neurorehabilitation group. Select the historical elite solution and some random solutions of the orthopedic rehabilitation group, and use the Adam optimizer for bidirectional training. Step 3.4: Determine whether the migration conditions are met. If not, use the mutation method of the differential evolution algorithm (SHADE) based on successful historical evolution to generate offspring using the following formula (9). (9) in, yes mutation vector, It is the optimal value in the neurorehabilitation group population. , They were randomly selected from the neurorehabilitation group population. It is a scaling factor; Equation (9) uses only individuals from a population to create a mutation vector; If the conditions for knowledge transfer are met, then a neural network is used for prediction; the mutation formula is as follows (10). (10) in, This is the value predicted by a neural network based on the optimal value of the orthopedic rehabilitation group population. It is the value predicted by a neural network for two randomly selected individuals in the orthopedic rehabilitation group population; the iterative process generates N offspring, and the parent and offspring populations are merged.
6. The method for selecting the optimal allocation scheme of equipment in a multi-task rehabilitation center based on a grouped neural network according to claim 5, characterized in that, Step 4 specifically includes: Step 4.1, Elite Selection; The optimal subset of individuals, with a size of 1.2N, is selected based on the objective function value. Step 4.2, Feature Standardization; To eliminate the dimensional differences between different decision variables, the decision variables (Dec) of the candidate pool and the migration pool are standardized. Column standardization (z-score): Eliminating dimensions for each decision variable dimension (column), the formula is: (11) in, It is the j-th decision variable of the i-th allocation scheme in the candidate pool. It is the mean of the j-th dimension. It is the standard deviation of the j-th dimension. Avoid denominators of 0; if the standard deviation of a certain dimension is extremely small ( This indicates that the dimension has no distinguishing power, so it should be set to 0. Row standardization (unit vector): Normalize each individual (row) to ensure fairness in subsequent cosine similarity calculations. The formula is: (12) Where D is the dimension of the decision variable (Prob.D(t)), and the denominator is the L2 norm of the individual; Step 4.3, calculate the self-attention value; The self-attention matrix is used to measure the similarity between individuals in the candidate pool; the lower the similarity, the better the diversity. Taking the candidate pool of the neurorehabilitation group as an example, the self-attention matrix is used to measure the similarity between individuals (assignment schemes) in the pool, which helps the algorithm explore more high-quality assignment schemes. The formula is: (13) The result is an M x M matrix (M was set to 1.2N in the experiment). This represents the cosine similarity (range) between the i-th and j-th allocation schemes in the candidate pool for the neurorehabilitation group. 1,1 1,1); To avoid calculating similarity between an individual and itself, the diagonal elements (i=j) are set to 1,1); ; The self-attention score represents the average similarity between the current individual and the selected individuals, and is used to assess population diversity (the lower the score, the greater the individual differences, and the better the diversity). The formula is: (14) Step 4.4: Calculate the cross-attention value; The cross-attention matrix is used to measure the similarity between individuals in the candidate pool of the neurorehabilitation group and individuals in the transfer pool of the orthopedic rehabilitation group. The higher the similarity, the greater the value of cross-task knowledge reuse. The calculation is performed by multiplying the candidate pool normalized matrix and the transfer pool normalized matrix, using the following formula: (15) The result is matrix, For the migration pool size, This represents the cosine similarity between the i-th allocation scheme in the candidate pool of the neurorehabilitation group and the k-th scheme in the migration pool of the orthopedic rehabilitation group; if the migration pool is empty ( =0), then, Set to 0, relying solely on self-attention; Cross-attention score measures the average similarity between individuals in the neurorehabilitation candidate pool and elite individuals in the orthopedic rehabilitation group, and is used to assess cross-task knowledge matching. Its calculation formula is as follows: (16) Step 4.5: Calculate the overall attention score and select the individual with the highest score; The comprehensive attention score, which balances the self-attention score and cross-attention score by weighting coefficients, is the core evaluation indicator for greedy selection (the higher the score, the more worthwhile the individual is to be retained). Its formula is: (17) The negative sign converts self-attention similarity into a score. is the cross-attention weight coefficient (Beta parameter, with a value of [0,1]).
7. The method for selecting the optimal allocation scheme of equipment in a multi-task rehabilitation center based on a grouped neural network according to claim 6, characterized in that, Step 5 specifically involves: Step 5.1, determining the timing for reduction; When evolutionary generations Reaching the total number of algebras of When the ratio is reached, the population reduction mechanism is activated; Step 5.2, Elite Individual Selection; For each task, the current population is ranked by constraint violation degree. and fitness Perform non-dominated sorting, select the first The best individuals form a new generation of the population; Step 5.3, Archive Set Management; Eligible individuals are stored in an archive. If the size of the archive exceeds the size of the original population, N individuals are randomly selected to be retained to ensure the rational use of storage space.
8. The method for selecting the optimal allocation scheme of equipment in a multi-task rehabilitation center based on a grouped neural network according to claim 7, characterized in that, Step 6 specifically involves generating a convergence curve, indicator radar chart, and migration improvement rate chart for each task, which visually presents the algorithm performance and the advantages of the allocation scheme.