A method and system for generating a sports rehabilitation training program for knee joint injury
By introducing the contribution rate and reward value of the status action group of target patients and sample patients in the Q learning, a more accurate knee joint injury training plan is generated to solve the problem of inaccurate schemes in the existing technology, and improved the adaptation of the plan to adapt to the plan. Sex and effect.
Patent Information
- Application Number
- CN202411336331.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-09-25
AI Technical Summary
The knee injury exercise rehabilitation training program generated using Q learning is inaccurate and cannot adapt well to different patients.
By concentrating the status, action and reward value of various sample patients in accordance with the target patients and training, determine the contribution rate of the status action group of various patients to patients to the target patient, and determine the target reward value of the status action group based on the contribution rate and the reward value. Learn Q to generate personalized sports rehabilitation training schemes.
The accuracy of the sports rehabilitation training program for knee joint injuries is improved, making the generated program more suitable for the target patients, thus improving the rehabilitation effect and resource utilization efficiency.
Smart Images

Figure CN118866248B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical care informatics, and in particular to a method and system for generating a sports rehabilitation training program for knee joint injuries. Background Art
[0002] The automatic generation of sports rehabilitation training programs for knee injuries is crucial to the recovery of patients with knee injuries. It can dynamically adjust the sports rehabilitation training programs according to the actual progress of the patients, which can not only improve the effect of sports rehabilitation training, but also ensure the safety of patients, improve resource utilization efficiency, and provide psychological support for patients, which is crucial to the overall rehabilitation process.
[0003] Q-learning is generally used to generate sports rehabilitation training programs for knee injuries. Q-learning is a reinforcement learning method that constructs a reward value matrix corresponding to the state-action of sample patients in the rehabilitation process in the training set, and then performs Q-learning based on the reward value matrix to generate sports rehabilitation training programs for patients with knee injuries. Q-learning can continuously adjust the training strategy according to the patient's specific condition and feedback, provide personalized rehabilitation programs, and can identify which training actions are most effective and have the greatest long-term returns, so it can provide a more comprehensive rehabilitation program. However, since the reward value matrix constructed based on the training set is fixed and cannot adapt well to the conditions of different patients, the sports rehabilitation training program for knee injuries generated using Q-learning is inaccurate. Summary of the invention
[0004] In order to solve the technical problem that the knee joint injury exercise rehabilitation training program generated by Q learning is inaccurate, the purpose of the present invention is to provide a method and system for generating a knee joint injury exercise rehabilitation training program. The technical solution adopted is as follows:
[0005] In a first aspect, the present invention provides a method for generating a sports rehabilitation training program for knee joint injury, comprising:
[0006] According to the states, actions and reward values of the target patient and the sample patients in the training set, the contribution rate of each state-action group of each sample patient relative to the target patient is determined; the state represents the range of motion of the patient's knee joint; the action represents the rehabilitation training program; the state-action group is a pair of state and action;
[0007] For each state-action group, respectively, according to the contribution rate of each sample patient relative to the target patient under the state-action group and the obtained reward value, determine the target reward value corresponding to the state-action group;
[0008] Q learning is performed according to the target reward values corresponding to each of the state-action groups, and a knee joint injury exercise rehabilitation training program for the target patient is generated according to the results of Q learning and the state of the target patient.
[0009] In one embodiment, determining the contribution rate of each state-action group of each sample patient to the target patient according to each state, each action taken and each reward value obtained by the target patient and each sample patient in the training set includes:
[0010] According to each state, each action taken and the reward value obtained by each sample patient in the training set, determine the overall generality corresponding to each state-action group of each sample patient;
[0011] According to the states, actions taken and reward values obtained by the target patient and the sample patients in the training set, determining the similarity of the rehabilitation process of each sample patient with that of the target patient in each state-action group;
[0012] According to the overall generality and the similarity of the rehabilitation process, the contribution rate of each state-action group of each sample patient relative to the target patient is determined.
[0013] In one embodiment, the determining of the overall generality of each state-action group of each sample patient according to each state, each action taken and each reward value obtained of each sample patient in the training set includes:
[0014] Determine the generality of the rehabilitation training program for each sample patient according to each state and each action taken by each sample patient in the training set;
[0015] Each of the sample patients is respectively used as a sample patient to be analyzed, and according to a first difference between a reward value set of each state-action group of the sample patient to be analyzed and a sample patient with the same scheme, and the corresponding generality of the scheme, the generality of the recovery of the sample patient to be analyzed under the generality of the scheme is determined; the sample patient with the same scheme is a sample patient with the same states and corresponding actions as the sample patient to be analyzed;
[0016] Each state-action group of the sample patient to be analyzed is taken as the target state-action group respectively, and the overall generality corresponding to the target state-action group of the sample patient to be analyzed is determined according to the difference between the first difference and the second difference after removing the target state-action group, and the generality of the recovery situation under the generality of the scheme; the second difference is the difference between the reward value sets of the remaining state-action groups of the sample patient to be analyzed and the sample patients of the same scheme after removing the target state-action group.
[0017] In one embodiment, determining the generality of the rehabilitation training program for each sample patient according to each state and each action taken by each sample patient in the training set includes:
[0018] Taking each sample patient as a sample patient to be analyzed, and determining a sample patient with the same scheme having the same states and actions as the sample patient to be analyzed according to each state and action taken by each sample patient in the training set;
[0019] The generality of the entire rehabilitation training program for the sample patients to be analyzed is determined according to the proportion of the number of sample patients with the same program in the total number of sample patients in the training set.
[0020] In one embodiment, determining the generality of the recovery of the sample patient to be analyzed under the generality of the scheme according to the first difference between the reward value sets of each state-action group of the sample patient to be analyzed and the sample patient of the same scheme, and the corresponding generality of the scheme, includes:
[0021] Determine the first difference according to the correlation coefficient between the reward value sets of each state-action group of the sample patient to be analyzed and the sample patient of the same scheme;
[0022] The generality of the recovery of the patient with the sample to be analyzed under the generality of the regimen is determined based on the first difference and the generality of the regimen.
[0023] In one embodiment, determining the overall generality corresponding to the target state-action group of the sample patient to be analyzed according to the difference between the first difference and the second difference without the target state-action group, and the generality of the recovery situation under the generality of the scheme, includes:
[0024] Determining the second difference according to the correlation coefficient between the reward value sets of the remaining state-action groups of the sample patients to be analyzed and the sample patients of the same scheme after removing the target state-action group;
[0025] According to the difference between the first difference and the second difference, and the generality of the recovery situation under the generality of the scheme, the overall generality corresponding to the target state-action group of the sample patient to be analyzed is determined.
[0026] In one embodiment, the determining of the similarity of the rehabilitation process of each sample patient with that of the target patient in each state-action group according to each state, action taken and reward value obtained by each sample patient in the training set includes:
[0027] Determine the overall similarity between the sample patients and the target patient in the rehabilitation process according to the states, actions taken and reward values obtained of the target patient and the sample patients in the training set;
[0028] For each state-action group of each sample patient, the similarity of the rehabilitation process between the sample patient and the target patient under the state-action group is determined based on the difference between the reward value of the sample patient under the state-action group and the reward value of the target patient under the state corresponding to the state-action group and the overall similarity.
[0029] In one embodiment, determining the overall similarity between the sample patients and the target patient in the rehabilitation process according to the states, actions taken and reward values obtained of the target patient and the sample patients in the training set includes:
[0030] For each of the sample patients, the overall similarity between the sample patient and the target patient in the rehabilitation process is determined according to the difference between the reward values of the sample patient and the target patient in each state that the target patient has experienced.
[0031] In one embodiment, for each state-action group, determining the target reward value corresponding to the state-action group according to the contribution rate of each sample patient relative to the target patient under the state-action group and the reward value obtained includes:
[0032] For each state-action group, the contribution rate of each sample patient under the state-action group relative to the target patient is used as a weight, and the reward value obtained by each sample patient under the state-action group is weighted averaged, and the target reward value corresponding to the state-action group is determined according to the result of the weighted average.
[0033] In a second aspect, the present invention further provides a system for generating a knee joint injury exercise rehabilitation training program, comprising a memory and a processor; the memory is used to store executable program codes; the processor is used to call and run the executable program codes from the memory to implement the following steps:
[0034] According to the states, actions and reward values of the target patient and the sample patients in the training set, the contribution rate of each state-action group of each sample patient relative to the target patient is determined; the state represents the range of motion of the patient's knee joint; the action represents the rehabilitation training program; the state-action group is a pair of state and action;
[0035] For each state-action group, respectively, according to the contribution rate of each sample patient relative to the target patient under the state-action group and the obtained reward value, determine the target reward value corresponding to the state-action group;
[0036] Q learning is performed according to the target reward values corresponding to each of the state-action groups, and a knee joint injury exercise rehabilitation training program for the target patient is generated according to the results of Q learning and the state of the target patient.
[0037] The present invention has the following beneficial effects:
[0038] According to the states of the target patient and each sample patient in the training set, the actions taken and the reward values obtained, the contribution rates of each state-action group of each sample patient relative to the target patient are determined. For each state-action group, the target reward value corresponding to the state-action group is determined according to the contribution rate of each sample patient relative to the target patient and the reward value obtained under the state-action group. When the same state-action group corresponds to the reward values of multiple sample patients, the target reward value can be determined according to the contribution rate of each sample patient relative to the target patient and the reward value obtained under the state-action group, so that the target reward value is more targeted to the target patient. Then, Q learning is performed according to the more targeted target reward values corresponding to each state-action group for the target patient. According to the results of Q learning and the state of the target patient, a knee injury sports rehabilitation training program for the target patient is generated, so that the knee injury sports rehabilitation training program is more suitable for the target patient, thereby improving the accuracy of the knee injury sports rehabilitation training program generated using Q learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A schematic flow chart of a method for generating a sports rehabilitation training program for knee joint injury provided by one embodiment of the present invention;
[0041] Figure 2 A schematic diagram of a flow chart for determining a contribution rate of a state-action group of a sample patient relative to a target patient provided by an embodiment of the present invention;
[0042] Figure 3 A schematic diagram of an overall general flow chart of a state action group for determining a sample patient provided by an embodiment of the present invention;
[0043] Figure 4 A schematic diagram of the overall process of a method for generating a sports rehabilitation training program for knee joint injuries provided by an embodiment of the present invention;
[0044] Figure 5 An architectural diagram of a system for generating a knee injury exercise rehabilitation training program provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a method and system for generating a sports rehabilitation training program for knee injuries proposed in accordance with the present invention, in combination with the accompanying drawings and preferred embodiments, and its specific implementation methods, structures, features and effects are described as follows. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0046] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0047] The specific scheme of the method and system for generating a sports rehabilitation training program for knee joint injury provided by the present invention is described in detail below in conjunction with the accompanying drawings.
[0048] See also Figure 1 , which shows a method flow chart of a method for generating a knee joint injury exercise rehabilitation training program provided by an embodiment of the present invention, including the following steps 102 to 106:
[0049] Step 102, according to the states, actions taken and reward values obtained by the target patient and each sample patient in the training set, determine the contribution rate of each state-action group of each sample patient relative to the target patient; the state represents the patient's knee joint range of motion; the action represents the rehabilitation training program; the state-action group is a pair of state and action.
[0050] The target patient refers to the patient for whom a sports rehabilitation training program for knee injury needs to be generated. The sample patient refers to the patient in the training set. The reward value represents the size of the reward obtained by the patient after taking a certain action in a certain state.
[0051] In one embodiment, the range of motion of the knee joint can be divided into multiple intervals, each of which corresponds to a state. For example, assuming that the range of motion of the knee joint is 0 to 180 degrees, and each 10 degrees is divided into an interval, then each 10 degrees corresponds to a state, and there are a total of 18 states. For example, 0 to 10 degrees is the first state, 11 to 20 degrees is the second state, and so on.
[0052] In one embodiment, different rehabilitation training programs can be used as different actions. For example, assuming that the rehabilitation training program includes none, ice pack, strength training, flexibility training, balance training, functional training and movement pattern training, each of these rehabilitation training programs is an action.
[0053] In one embodiment, the reward value obtained by a patient taking a certain action in a certain state can be determined according to the recovery time of the patient from the state to the next state. The reward value is negatively correlated with the recovery time. The reward value of the sample patient in each state can be determined according to the recovery time of the sample patient from each state to the next state. The reward value of the target patient in the state that has been experienced can be determined according to the recovery time of the target patient from the state to the next state. The reward value of the target patient in the state that has not been experienced is 0.
[0054] In one embodiment, the reward value may be determined based on the inverse of the recovery time.
[0055] In one embodiment, the actions taken by each sample patient in each state in the training set can be collected, and the reward value of the sample patient in the state-action group can be determined according to the recovery time of the sample patient from each state-action group to the next state.
[0056] It can be understood that in the traditional method, after collecting the actions taken by the sample patients in various states and the reward values obtained, a reward matrix can be directly constructed, and the reward values corresponding to each state-action group of each sample patient can be filled in the reward matrix. For example: the rows in the reward matrix represent states, the columns represent actions, and the reward values are filled in the reward matrix accordingly. If there are reward values for multiple sample patients corresponding to a state-action group, the reward values of the multiple sample patients corresponding to the state-action group are averaged, and the average value is used as the value of the corresponding position of the state-action group in the reward matrix, thereby obtaining a fixed reward matrix. For each target patient, Q learning is performed based on this fixed reward matrix, so the knee injury exercise rehabilitation training program generated by the traditional method is not accurate enough.
[0057] Step 104 , for each state-action group, according to the contribution rate of each sample patient relative to the target patient under the state-action group and the reward value obtained, determine the target reward value corresponding to the state-action group.
[0058] In one embodiment, if the state-action group corresponds to only one sample patient's reward value, the reward value of the sample patient corresponding to the state-action group is directly used as the target reward value corresponding to the state-action group. In one embodiment, if the state-action group corresponds to multiple sample patients' reward values, the target reward value corresponding to the state-action group is determined based on the contribution rate and reward value obtained by each sample patient relative to the target patient under the state-action group.
[0059] Step 106, performing Q learning according to the target reward values corresponding to each state-action group, and generating a knee joint injury exercise rehabilitation training program for the target patient according to the result of Q learning and the state of the target patient.
[0060] In one embodiment, a target reward matrix can be established according to the target reward values corresponding to each state-action group, and then Q learning can be performed based on the target reward matrix. The rows in the target reward matrix can represent states, and the columns can represent actions. The target reward values corresponding to each state-action group are filled in the corresponding positions of each state-action group in the target reward matrix.
[0061] In one embodiment, the result of Q learning includes a target Q matrix. First, an initialized Q matrix is established, and then starting from the initialized Q matrix, Q learning is performed according to the target reward values corresponding to each state-action group, so as to iteratively update the Q matrix until the iteration is completed, and the target Q matrix is obtained. According to the target Q matrix and the state of the target patient, a knee joint injury sports rehabilitation training program for the target patient is generated.
[0062] In one embodiment, the rows of the Q matrix represent states, the columns represent actions, and the values in the Q matrix are Q values. The Q values in the initialized Q matrix are all 0. Assuming there are 18 states and 7 actions in total, the Q matrix is an 18×7 matrix.
[0063] In one embodiment, the initialized Q matrix can be used as the current Q matrix, the state of the target patient can be used as the current state, a current action can be selected according to the current state and the current Q matrix using a preset strategy, and then the target reward value corresponding to the current state-action group (the current state and the current action) can be determined, and the Q values corresponding to each action in the next state can be determined according to the current Q matrix, and the maximum Q value can be determined therefrom, and the updated Q value can be determined according to the target reward value and the maximum Q value corresponding to the current state-action group, and the Q value corresponding to the current state-action group in the current Q matrix can be updated. Then the next state can be used as the new current state, and the step of selecting a current action according to the preset strategy according to the current state and the current Q matrix and the subsequent steps are returned until the last state is traversed, and the step of selecting a current action according to the preset strategy according to the current state and the current Q matrix and the subsequent steps are returned to iteratively update the Q value in the Q matrix until the iteration stop condition is met to obtain the target Q matrix.
[0064] In one embodiment, the iteration stopping condition may be the Q value convergence.
[0065] In one embodiment, the preset strategy may be an ε-greedy strategy.
[0066] In one embodiment, the product of the learning parameter and the maximum Q value may be added to the target reward value corresponding to the current state-action group to determine the updated Q value.
[0067] In one embodiment, the updated Q value may be determined according to the following formula:
[0068] ;
[0069] Among them, s represents the current state and a represents the current action. Indicates the updated Q value corresponding to the current state-action group. Indicates the target reward value corresponding to the current state-action group. represents the learning parameter, which satisfies A constant of 1. Indicates the next state. Indicates the action to be taken in the next state. Indicates the maximum Q value among the Q values corresponding to each action in the next state.
[0070] In one embodiment, the action with the largest Q value corresponding to the state of the target patient can be found from the target Q matrix, and a knee joint injury exercise rehabilitation training program for the target patient can be generated based on the rehabilitation training program represented by the action with the largest Q value.
[0071] In the above-mentioned method for generating a knee joint injury exercise rehabilitation training program, the contribution rate of each state-action group of each sample patient relative to the target patient is determined according to each state of the target patient and each sample patient in the training set, the actions taken respectively and the reward values obtained, and for each state-action group, the target reward value corresponding to the state-action group is determined according to the contribution rate of each sample patient relative to the target patient under the state-action group and the reward value obtained. When the same state-action group corresponds to the reward values of multiple sample patients, the target reward value can be determined according to the contribution rate of each sample patient relative to the target patient under the state-action group and the reward value obtained, so that the target reward value is more targeted to the target patient, and then Q learning is performed according to the more targeted target reward values corresponding to each state-action group for the target patient. According to the results of Q learning and the state of the target patient, a knee joint injury exercise rehabilitation training program for the target patient is generated, so that the knee joint injury exercise rehabilitation training program is more suitable for the target patient, thereby improving the accuracy of the knee joint injury exercise rehabilitation training program generated using Q learning.
[0072] In one embodiment, Figure 2 As shown, according to the states of the target patient and each sample patient in the training set, the actions taken and the reward values obtained, the contribution rate of each state-action group of each sample patient relative to the target patient is determined, including the following steps 202 to 206:
[0073] Step 202, according to each state of each sample patient in the training set, the actions taken respectively and the reward value obtained, determine the overall generality corresponding to each state-action group of each sample patient.
[0074] Among them, overall generality is used to measure the universality of the rehabilitation training program corresponding to the state-action group of sample patients.
[0075] In one embodiment, the generality of the entire rehabilitation training program for each sample patient can be determined first based on each state and each action taken by each sample patient in the training set, and then the generality of the recovery of each sample patient under the generality of the program can be determined based on each state, each action taken and the reward value obtained, as well as the generality of the program. Finally, the overall generality of each state-action group of each sample patient can be determined based on each state, each action taken and the reward value obtained, as well as the generality of the recovery of each sample patient in the training set.
[0076] The whole set of rehabilitation training programs refers to the set of rehabilitation training programs (actions) taken for each state experienced by the patient. The generality of the program is used to measure the universality of the whole set of rehabilitation training programs for the sample patients. The generality of the recovery situation is used to measure the universality of the recovery situation of the sample patients among the sample patients who adopt the same rehabilitation training program.
[0077] Step 204, according to the states, actions taken and reward values obtained by the target patient and each sample patient in the training set, determine the similarity of the rehabilitation process of each sample patient with that of the target patient in each state-action group.
[0078] Among them, the rehabilitation process similarity is used to measure the similarity between the rehabilitation process of the sample patient under the state-action group and the rehabilitation process of the target patient under the state corresponding to the state-action group.
[0079] In one embodiment, the overall similarity between the rehabilitation process of each sample patient and the target patient can be first determined based on the various states, actions taken and reward values obtained of the target patient and each sample patient in the training set. Then, the similarity between the rehabilitation process of each sample patient and the target patient in each state-action group can be determined based on the various states, actions taken and reward values obtained of the target patient and each sample patient in the training set as well as the overall similarity.
[0080] Among them, the overall similarity is used to measure the similarity between the entire recovery process of the sample patient and the target patient.
[0081] Step 206 , determining the contribution rate of each state-action group of each sample patient relative to the target patient based on the overall generality and the similarity of the rehabilitation process.
[0082] In one embodiment, for each state-action group of each sample patient, the contribution rate of the state-action group of the sample patient relative to the target patient can be determined according to the product of the overall generality and the similarity of the rehabilitation process of the sample patient under the state-action group.
[0083] In one embodiment, the contribution rate of the state-action group of the sample patient to the target patient can be determined according to the following formula:
[0084] ;
[0085] in, Represents the contribution rate of the state-action group k of the sample patient Q to the target patient. Represents the overall generality of sample patient Q under state-action group k. Represents the similarity of the recovery process of the sample patient Q under the state-action group k with the target patient.
[0086] In the above embodiment, the higher the overall generality of the state-action group of the sample patient, the higher the universality of the rehabilitation training program corresponding to the state-action group of the sample patient. Since the data with higher universality can improve the accuracy of the recommendation, the contribution rate is determined according to the overall generality, which can improve the accuracy of the contribution rate. On this basis, if the sample patient has a higher similarity with the target patient's rehabilitation process under the state-action group, the more effective strategies that match the target patient's condition can be better captured, thereby improving the accuracy of personalized recommendations for the target patient. Therefore, the contribution rate can be accurately determined by combining the overall generality and the similarity of the rehabilitation process, thereby improving the accuracy of the knee injury sports rehabilitation training program generated using Q learning.
[0087] In one embodiment, Figure 3 As shown, according to each state of each sample patient in the training set, the actions taken and the reward values obtained, the overall generality corresponding to each state-action group of each sample patient is determined, including the following steps 302 to 306:
[0088] Step 302 , determining the generality of the rehabilitation training program for each sample patient according to each state and each action taken by each sample patient in the training set.
[0089] Step 304, respectively taking each sample patient as the sample patient to be analyzed, and determining the generality of the recovery of the sample patient to be analyzed under the generality of the scheme according to the first difference between the reward value sets of each state-action group of the sample patient to be analyzed and the sample patient with the same scheme, and the corresponding generality of the scheme; the sample patient with the same scheme is a sample patient with the same states and corresponding actions as the sample patient to be analyzed.
[0090] In one embodiment, the first difference between the reward value sets of each state-action group of the sample patient to be analyzed and the sample patient of the same protocol can be determined based on the difference between the reward values corresponding to each state in the reward value sets of each state-action group of the sample patient to be analyzed and the sample patient of the same protocol.
[0091] In another embodiment, the first difference may be determined based on a correlation coefficient between reward value sets of each state-action group of the sample patient to be analyzed and the sample patient of the same protocol.
[0092] In one embodiment, the generality of recovery of the patient of the sample to be analyzed under the generality of the regimen can be determined based on the product of the value of the first difference and the generality of the regimen.
[0093] Step 306, taking each state-action group of the sample patient to be analyzed as the target state-action group, and determining the overall generality corresponding to the target state-action group of the sample patient to be analyzed according to the difference between the first difference and the second difference after removing the target state-action group, and the generality of the recovery situation under the generality of the scheme; the second difference is the difference between the reward value sets of the remaining state-action groups of the sample patient to be analyzed and the sample patients of the same scheme after removing the target state-action group.
[0094] In one embodiment, the second difference between the reward value sets of the remaining state-action groups of the sample patient to be analyzed and the sample patient of the same scheme after removing the target state-action group can be determined. Then, according to the difference between the first difference and the second difference after removing the target state-action group, and the generality of the recovery situation under the generality of the scheme, the overall generality corresponding to the target state-action group of the sample patient to be analyzed is determined.
[0095] In one embodiment, the second difference can be determined based on the difference between the reward values corresponding to each state in the reward value sets of the remaining state-action groups of the sample patients to be analyzed and the sample patients with the same regimen after removing the target state-action group. In another embodiment, the second difference can be determined based on the correlation coefficient between the reward value sets of the remaining state-action groups of the sample patients to be analyzed and the sample patients with the same regimen after removing the target state-action group.
[0096] In the above embodiment, first, according to each state of each sample patient in the training set and the actions taken respectively, the program generality of the rehabilitation training program of each sample patient is determined, which can accurately measure the universality of the rehabilitation training program of the sample patient, and then each sample patient is used as a sample patient to be analyzed, and according to the first difference between the reward value set of each state-action group of the sample patient to be analyzed and the sample patient of the same program, and the corresponding program generality, the generality of the recovery of the sample patient to be analyzed under the program generality is determined, which can accurately measure the universality of the recovery of the sample patient, and then each state-action group of the sample patient to be analyzed is used as the target state-action group, and according to the difference between the first difference and the second difference after removing the target state-action group, and the generality of the recovery under the program generality, the overall generality corresponding to the target state-action group of the sample patient to be analyzed is determined, which can accurately measure the universality of the state-action group of the sample patient, thereby improving the accuracy of the contribution rate obtained subsequently, and then improving the accuracy of the knee injury sports rehabilitation training program generated using Q learning.
[0097] In one embodiment, the generality of the rehabilitation training program for each sample patient is determined based on each state and each action taken by each sample patient in a training set, including: taking each sample patient as a sample patient to be analyzed, and determining sample patients with the same program who have the same states and actions as the sample patient to be analyzed based on each state and each action taken by each sample patient in the training set; determining the generality of the entire rehabilitation training program for the sample patient to be analyzed based on the proportion of the number of sample patients with the same program in the total number of sample patients in the training set.
[0098] Among them, sample patients with the same program refer to sample patients in the training set who have the same states and actions as the sample patients to be analyzed (that is, the same whole set of rehabilitation training programs).
[0099] In one embodiment, the proportion of the number of sample patients with the same regimen in the total number of sample patients in the training set may be normalized to obtain the generality of the entire rehabilitation training regimen for the sample patients to be analyzed.
[0100] In one embodiment, the normalization step may include: determining the number of users of the entire rehabilitation training program for each sample patient in the training set, determining the minimum number of users and the maximum number of users, and then determining a first proportion of the minimum number of users in the total number of sample patients in the training set, and a second proportion of the maximum number of users in the total number of sample patients in the training set. Determine a first difference between the proportion of the number of sample patients with the same program in the total number of sample patients in the training set and the first proportion, determine a second difference between the first proportion and the second proportion, and determine the generality of the entire rehabilitation training program for the sample patient to be analyzed based on the ratio of the first difference to the second difference.
[0101] The number of users of the whole rehabilitation training program refers to the number of sample patients who use the whole rehabilitation training program in the training set. The minimum number of users is the minimum number of users corresponding to each whole rehabilitation training program. The maximum number of users is the maximum number of users corresponding to each whole rehabilitation training program.
[0102] In one embodiment, the generality of the entire rehabilitation training program for the sample patient to be analyzed can be determined according to the following formula:
[0103] ;
[0104] in, Represents the generality of the entire rehabilitation training program for sample patient Q. Represents the number of patients in the same sample. Represents the total number of sample patients in the training set. Indicates the first proportion. Indicates the second proportion.
[0105] In the above embodiment, the higher the proportion of the number of sample patients with the same regimen in the total number of sample patients in the training set, the more people use the whole rehabilitation training regimen for the sample patients to be analyzed in the training set, which means the universality is higher, and therefore the generality of the whole rehabilitation training regimen is higher. Therefore, the generality of the whole rehabilitation training regimen for the sample patients to be analyzed can be accurately determined based on the proportion of the number of sample patients with the same regimen in the total number of sample patients in the training set.
[0106] In one embodiment, based on a first difference between a set of reward values for each state-action group of a sample patient to be analyzed and a sample patient with the same regimen, and the corresponding generality of the regimen, the generality of the recovery of the sample patient to be analyzed under the generality of the regimen is determined, including: determining the first difference based on a correlation coefficient between a set of reward values for each state-action group of a sample patient to be analyzed and a sample patient with the same regimen; determining the generality of the recovery of the sample patient to be analyzed under the generality of the regimen based on the first difference and the generality of the regimen.
[0107] In one embodiment, the correlation coefficient may be a Pearson correlation coefficient.
[0108] In one embodiment, if there are multiple sample patients with the same regimen, the first difference is determined according to the average value of the correlation coefficients between the sample patients to be analyzed and the reward value sets of each sample patient with the same regimen.
[0109] In one embodiment, the generality of the recovery of the sample patients to be analyzed under the generality of the regimen is positively correlated with the first difference determined according to the average value of the correlation coefficient, and is positively correlated with the generality of the regimen.
[0110] In one embodiment, the generality of the recovery of the patient of the sample to be analyzed under the generality of the regimen can be determined based on the product of the value of the first difference and the generality of the regimen.
[0111] In one embodiment, the generality of the recovery of the patient of the sample to be analyzed under the generality of the scheme can be determined according to the following formula:
[0112] ;
[0113] in, It indicates the general recovery of the sample patient Q to be analyzed under the general scheme. Represents the number of patients in the same sample. Represents the Pearson correlation coefficient between the reward value sets of each state-action group of the sample patient Q to be analyzed and the i-th patient with the same regimen. It represents the generality of the whole rehabilitation training program for the sample patient Q to be analyzed.
[0114] In the above embodiment, the Pearson correlation coefficient between the reward value sets of each state-action group of the sample patient to be analyzed and the sample patient of the same scheme indicates that the more similar the recovery conditions of the sample patient to be analyzed are to those of the sample patient of the same scheme, the higher the generality of the recovery conditions. Therefore, the first difference is determined based on the correlation coefficient between the reward value sets of each state-action group of the sample patient to be analyzed and the sample patient of the same scheme, and then the generality of the recovery conditions of the sample patient to be analyzed under the generality of the scheme can be accurately determined based on the first difference and the generality of the scheme. Compared with the method of determining the first difference based on the difference between the reward values in the reward value sets of each state-action group of the sample patient to be analyzed and the sample patient of the same scheme, the overall influence of factors such as age on the recovery conditions of the sample patients can be better avoided. For example, the recovery conditions of older sample patients are generally slower, while the recovery conditions of younger sample patients are generally faster. The use of correlation coefficients can well avoid such overall influence of factors such as age on the recovery conditions.
[0115] In one embodiment, the overall generality corresponding to the target state-action group of the sample patient to be analyzed is determined based on the difference between the first difference and the second difference after removing the target state-action group, and the generality of the recovery situation under the generality of the scheme, including: determining the second difference based on the correlation coefficient between the reward value sets of the remaining state-action groups of the sample patient to be analyzed and the sample patients of the same scheme after removing the target state-action group; determining the overall generality corresponding to the target state-action group of the sample patient to be analyzed based on the difference between the first difference and the second difference, and the generality of the recovery situation under the generality of the scheme.
[0116] In one embodiment, the correlation coefficient may be a Pearson correlation coefficient.
[0117] In one embodiment, if there are multiple sample patients with the same regimen, the overall generality of the target state action group of the sample patients to be analyzed can be determined based on the average of the differences between the first difference and the second difference corresponding to each sample patient with the same regimen and the generality of the recovery situation under the generality of the regimen.
[0118] In one embodiment, the Pearson correlation coefficient between the reward value sets of the remaining state-action groups of the sample patients to be analyzed and the sample patients with the same scheme after removing the target state-action group can be determined to obtain the second difference. The first difference is determined based on the Pearson correlation coefficient between the reward value sets of the state-action groups of the sample patients to be analyzed and the sample patients with the same scheme. The overall generality corresponding to the target state-action group of the sample patients to be analyzed is determined based on the average value of the difference between the first difference and the second difference corresponding to each sample patient with the same scheme and the generality of the recovery under the generality of the scheme. The overall generality is negatively correlated with the average value of the difference between the first difference and the second difference, and is positively correlated with the generality of the recovery under the generality of the scheme.
[0119] In one embodiment, an exponential function with base e may be applied to the inverse of the average value of the difference between the first difference and the second difference to obtain a result of the exponential function, and the overall generality may be determined based on the product of the result of the exponential function and the generality of the recovery situation under the generality of the solution.
[0120] In one embodiment, the overall generality of the target state-action group corresponding to the sample patient to be analyzed can be determined according to the following formula:
[0121] ;
[0122] in, Represents the overall generality of the target state-action group k corresponding to the sample patient Q to be analyzed. Represents an exponential function with base e. Represents the number of patients in the same sample. Represents the Pearson correlation coefficient between the reward value sets of each state-action group of the sample patient Q to be analyzed and the i-th patient with the same regimen. The Pearson correlation coefficient between the reward value sets of the remaining state-action groups of the sample patient Q to be analyzed and the i-th sample patient with the same scheme after removing the target state-action group k. It indicates the general recovery of the sample patient Q to be analyzed under the general scheme. Represents the average of the differences between the first difference and the second difference.
[0123] In the above embodiment, since the generality of the recovery of the sample patients to be analyzed under the generality of the scheme is relative to all state actions of the sample patients to be analyzed, on this basis, the correlation coefficient between the reward value sets of the remaining state action groups of the sample patients to be analyzed and the sample patients of the same scheme after removing the target state action group is determined to obtain the second difference, and the first difference without removing the target state action group is compared with the second difference. The smaller the difference, the smaller the target state action group will not have a greater impact on the whole, and the overall generality of the target state action group is relatively high. Therefore, the overall generality corresponding to each state action group of each sample patient can be accurately determined.
[0124] In one embodiment, the similarity of the rehabilitation process of each sample patient with that of the target patient in each state-action group is determined according to each state of the target patient and each sample patient in the training set, the actions taken respectively and the reward values obtained, including: determining the overall similarity of the rehabilitation process of each sample patient with that of the target patient according to each state of the target patient and each sample patient in the training set, the actions taken respectively and the reward values obtained; determining the similarity of the rehabilitation process of the sample patient with that of the target patient in each state-action group according to the difference between the reward value of the sample patient in the state-action group and the reward value of the target patient in the state corresponding to the state-action group and the overall similarity for each state-action group of each sample patient.
[0125] In one embodiment, the similarity of the rehabilitation process is negatively correlated with the difference between the reward value of the sample patient in the state-action group and the reward value of the target patient in the state corresponding to the state-action group, and is positively correlated with the overall similarity.
[0126] In one embodiment, the similarity of the rehabilitation process between the sample patient and the target patient under the state-action group can be determined based on the ratio between the state number (state sequence number) corresponding to the state-action group of the sample patient and the state number that the target patient has experienced (i.e., the sequence number of the state that the target patient is currently in), the difference between the reward value of the sample patient under the state-action group and the reward value of the target patient under the state corresponding to the state-action group, and the overall similarity. The similarity of the rehabilitation process is positively correlated with the ratio between the state number corresponding to the state-action group of the sample patient and the state number that the target patient has experienced.
[0127] In one embodiment, an exponential function with base e as the inverse of the difference between the reward value of the sample patient under the state-action group and the reward value of the target patient under the state corresponding to the state-action group can be taken to obtain the result of the exponential function. The similarity of the rehabilitation process between the sample patient and the target patient under the state-action group can be determined based on the result of the exponential function, the ratio between the number of states corresponding to the state-action group of the sample patient and the number of states that the target patient has experienced, and the product of the overall similarities.
[0128] In one embodiment, the similarity of the recovery process of the sample patient and the target patient under the state-action group can be determined according to the following formula:
[0129] ;
[0130] in, It represents the similarity of the recovery process between the sample patient Q and the target patient under the state-action group k. Represents the number of states corresponding to the state-action group k of sample patient Q. Indicates the number of states the target patient has experienced. Represents an exponential function with base e. Represents the reward value of the state-action group k of sample patient Q. Indicates that the target patient is in state The reward value below. Represents the overall similarity between the sample patient Q and the target patient in the recovery process.
[0131] In the above embodiment, based on the overall similarity, the sample patient does not have the same similarity in every state that the target patient has experienced, because the state of a patient usually changes gradually, so the recommended state that is closer to the state of the target patient can ensure that the action selection is performed near the state of the target patient, thereby reducing the uncertainty of state transfer, so the closer the state, the higher the similarity of the state is. Therefore, under the premise of overall similarity, the closer the state corresponding to the state-action group of the sample patient is to the state of the target patient, and the higher the similarity of the recovery situation, the higher the similarity of the rehabilitation process of the sample patient under the state-action group with the target patient. Therefore, according to the various states of the target patient and each sample patient in the training set, the actions taken respectively and the reward values obtained, the overall similarity of each sample patient and the target patient in the rehabilitation process is determined, and for each state-action group of each sample patient, according to the difference between the reward value of the sample patient under the state-action group and the reward value of the target patient in the state corresponding to the state-action group and the overall similarity, the similarity of the rehabilitation process of the sample patient under the state-action group with the target patient can be accurately determined.
[0132] In one embodiment, the overall similarity between the sample patients and the target patient in the rehabilitation process is determined based on the various states, actions taken and reward values obtained by the target patient and the sample patients in the training set, including: for each sample patient, the overall similarity between the sample patient and the target patient in the rehabilitation process is determined based on the difference between the reward values of the sample patient and the target patient in various states that the target patient has experienced.
[0133] In one embodiment, the average value of the difference between the reward values of the sample patient and the target patient in each state that the target patient has experienced can be determined, and then the overall similarity of the sample patient and the target patient in the rehabilitation process can be determined based on the average value of the difference. The overall similarity of the target patient in the rehabilitation process is negatively correlated with the average value of the difference.
[0134] In one embodiment, an exponential function with base e may be applied to the inverse of the average value of the difference to obtain a result of the exponential function, and the overall similarity between the sample patient and the target patient in the rehabilitation process may be determined based on the result of the exponential function.
[0135] In one embodiment, the overall similarity between the sample patient and the target patient in the recovery process can be determined according to the following formula:
[0136] ;
[0137] in, Represents the overall similarity between the sample patient Q and the target patient in the recovery process. Represents an exponential function with base e. Indicates the number of states that the target patient has experienced. represents the reward value of sample patient Q in the i-th state, represents the reward value of the target patient in the i-th state. Represents the average value of the difference between the reward values of the sample patient and the target patient in each state that the target patient has experienced.
[0138] In the above embodiment, the reward values of various states experienced by the sample patient and the target patient during the rehabilitation process are compared. The smaller the difference, the closer the recovery effects of the sample patient and the target patient during the rehabilitation process, and the greater the overall similarity of the rehabilitation process. Therefore, the overall similarity between the sample patient and the target patient during the rehabilitation process can be accurately determined.
[0139] In one embodiment, for each state-action group, the target reward value corresponding to the state-action group is determined according to the contribution rate of each sample patient relative to the target patient under the state-action group and the reward value obtained, including: for each state-action group, the contribution rate of each sample patient relative to the target patient under the state-action group is used as a weight, and the reward value obtained by each sample patient under the state-action group is weighted averaged, and the target reward value corresponding to the state-action group is determined according to the result of the weighted average.
[0140] Among them, weighted average refers to the process of multiplying each data with its corresponding weight, summing up each product, and dividing the summed result by the sum of all weights. Specifically, the reward value obtained by each sample patient under the state-action group can be multiplied by the corresponding contribution rate, and then the products are summed up, and the summed result is divided by the sum of the contribution rates to obtain the weighted average result. In one embodiment, the target reward value corresponding to the state-action group can be determined according to the following formula:
[0141] ;
[0142] in, represents the target reward value corresponding to the (a, b) position (i.e., state a action b) in the target reward matrix. m represents the number of sample patient reward values corresponding to the (a, b) position (i.e., state a action b) in the matrix. Represents the contribution rate of the state-action group k of the i-th sample patient corresponding to the position (a, b) relative to the target patient. Represents the sum of the contribution rates of the state-action group k of each sample patient corresponding to the position (a, b) relative to the target patient. Represents the reward value obtained by the i-th sample patient corresponding to the position (a, b) under the state-action group k.
[0143] In the above embodiment, since one position (i.e., one state-action group) in the reward matrix corresponds to the reward values of multiple sample patients, the reward values of each sample patient are weighted averaged using their contribution rates to the target patient, so that the reward values with high contribution rates to the target patients have a greater weight on the target reward value, and the reward values with low contribution rates to the target patients have a smaller weight on the target reward value, so that the target reward value more accurately reflects the condition of the target patient, thereby improving the accuracy of the target reward value.
[0144] like Figure 4As shown, it is a schematic diagram of the overall process of the method for generating a sports rehabilitation training program for knee joint injury, which includes the following steps: designing a collection program; collecting the reward value of each state-action group of the sample patients in the training set during the rehabilitation process; determining the overall generality corresponding to each state-action group of each sample patient according to each state of each sample patient in the training set, the actions taken respectively and the reward values obtained; determining the similarity of the rehabilitation process of each sample patient with the target patient under each state-action group according to each state of the target patient and each sample patient in the training set, the actions taken respectively and the reward values obtained; determining the contribution rate of each state-action group of each sample patient relative to the target patient according to the overall generality and the similarity of the rehabilitation process; determining the target reward value corresponding to the state-action group according to the contribution rate of each sample patient under the state-action group relative to the target patient and the reward value obtained; performing Q learning according to the target reward value corresponding to each state-action group, and generating a sports rehabilitation training program for knee joint injury for the target patient according to the result of Q learning and the state of the target patient.
[0145] Based on the same inventive concept, the embodiment of the present application also provides a system for generating a sports rehabilitation training program for knee joint injury for implementing the above-mentioned method for generating a sports rehabilitation training program for knee joint injury. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more embodiments of the system for generating a sports rehabilitation training program for knee joint injury provided below can refer to the limitations of the method for generating a sports rehabilitation training program for knee joint injury above, and will not be repeated here.
[0146] like Figure 5 As shown, an embodiment of the present invention also provides a system for generating a sports rehabilitation training program for knee joint injury. The system includes a memory and a processor; the memory is used to store executable program codes; the processor is used to call and run the executable program codes from the memory to implement the following steps: according to the states, actions taken and reward values obtained by the target patient and each sample patient in the training set, the contribution rate of each state-action group of each sample patient relative to the target patient is determined; the state represents the range of motion of the patient's knee joint; the action represents the rehabilitation training program; the state-action group is a pair of states and actions; for each state-action group, according to the contribution rate and reward value obtained by each sample patient under the state-action group relative to the target patient, the target reward value corresponding to the state-action group is determined; Q learning is performed according to the target reward values corresponding to each state-action group, and a sports rehabilitation training program for knee joint injury for the target patient is generated according to the result of Q learning and the state of the target patient.
[0147] In one embodiment, the contribution rate of each state-action group of each sample patient relative to the target patient is determined according to each state of the target patient and each sample patient in the training set, the contribution rate includes: determining the overall generality corresponding to each state-action group of each sample patient according to each state of the sample patient in the training set, the actions taken and the reward values obtained; determining the similarity of the rehabilitation process of each sample patient with the target patient under each state-action group according to each state of the target patient and each sample patient in the training set, the actions taken and the reward values obtained; determining the contribution rate of each state-action group of each sample patient relative to the target patient according to the overall generality and the similarity of the rehabilitation process.
[0148] In one embodiment, the overall generality corresponding to each state-action group of each sample patient is determined according to each state, each action taken and the reward value obtained of each sample patient in the training set, including: determining the program generality of the rehabilitation training program of each sample patient according to each state and each action taken of each sample patient in the training set; taking each sample patient as a sample patient to be analyzed, and determining the generality of the recovery of the sample patient to be analyzed under the generality of the program according to the first difference between the reward value set of each state-action group of the sample patient to be analyzed and the sample patient with the same program, and the corresponding generality of the program; the sample patient with the same program is a sample patient with the same states and corresponding actions as the sample patient to be analyzed; taking each state-action group of the sample patient to be analyzed as a target state-action group, and determining the overall generality corresponding to the target state-action group of the sample patient to be analyzed according to the difference between the first difference and the second difference after removing the target state-action group, and the generality of the recovery under the generality of the program; the second difference is the difference between the reward value sets of the remaining state-action groups of the sample patient to be analyzed and the sample patient with the same program after removing the target state-action group.
[0149] In one embodiment, the generality of the rehabilitation training program for each sample patient is determined based on each state and each action taken by each sample patient in a training set, including: taking each sample patient as a sample patient to be analyzed, and determining sample patients with the same program who have the same states and actions as the sample patient to be analyzed based on each state and each action taken by each sample patient in the training set; determining the generality of the entire rehabilitation training program for the sample patient to be analyzed based on the proportion of the number of sample patients with the same program in the total number of sample patients in the training set.
[0150] In one embodiment, based on a first difference between a set of reward values for each state-action group of a sample patient to be analyzed and a sample patient with the same regimen, and the corresponding generality of the regimen, the generality of the recovery of the sample patient to be analyzed under the generality of the regimen is determined, including: determining the first difference based on a correlation coefficient between a set of reward values for each state-action group of a sample patient to be analyzed and a sample patient with the same regimen; determining the generality of the recovery of the sample patient to be analyzed under the generality of the regimen based on the first difference and the generality of the regimen.
[0151] In one embodiment, the overall generality corresponding to the target state-action group of the sample patient to be analyzed is determined based on the difference between the first difference and the second difference after removing the target state-action group, and the generality of the recovery situation under the generality of the scheme, including: determining the second difference based on the correlation coefficient between the reward value sets of the remaining state-action groups of the sample patient to be analyzed and the sample patients of the same scheme after removing the target state-action group; determining the overall generality corresponding to the target state-action group of the sample patient to be analyzed based on the difference between the first difference and the second difference, and the generality of the recovery situation under the generality of the scheme.
[0152] In one embodiment, the similarity of the rehabilitation process of each sample patient with that of the target patient in each state-action group is determined according to each state of the target patient and each sample patient in the training set, the actions taken respectively and the reward values obtained, including: determining the overall similarity of the rehabilitation process of each sample patient with that of the target patient according to each state of the target patient and each sample patient in the training set, the actions taken respectively and the reward values obtained; determining the similarity of the rehabilitation process of the sample patient with that of the target patient in each state-action group according to the difference between the reward value of the sample patient in the state-action group and the reward value of the target patient in the state corresponding to the state-action group and the overall similarity for each state-action group of each sample patient.
[0153] In one embodiment, the overall similarity between the sample patients and the target patient in the rehabilitation process is determined based on the various states, actions taken and reward values obtained by the target patient and the sample patients in the training set, including: for each sample patient, the overall similarity between the sample patient and the target patient in the rehabilitation process is determined based on the difference between the reward values of the sample patient and the target patient in various states that the target patient has experienced.
[0154] In one embodiment, for each state-action group, the target reward value corresponding to the state-action group is determined according to the contribution rate of each sample patient relative to the target patient under the state-action group and the reward value obtained, including: for each state-action group, the contribution rate of each sample patient relative to the target patient under the state-action group is used as a weight, and the reward value obtained by each sample patient under the state-action group is weighted averaged, and the target reward value corresponding to the state-action group is determined according to the result of the weighted average.
[0155] The above-mentioned knee injury exercise rehabilitation training program generation system determines the contribution rate of each state-action group of each sample patient relative to the target patient according to the various states, actions taken and reward values obtained by the target patient and each sample patient in the training set, and determines the target reward value corresponding to the state-action group according to the contribution rate of each sample patient relative to the target patient and the reward value obtained under the state-action group for each state-action group. When the same state-action group corresponds to the reward values of multiple sample patients, the target reward value can be determined according to the contribution rate of each sample patient relative to the target patient and the reward value obtained under the state-action group, so that the target reward value is more targeted to the target patient, and then Q learning is performed according to the more targeted target reward values corresponding to each state-action group for the target patient. According to the results of Q learning and the state of the target patient, a knee joint injury exercise rehabilitation training program for the target patient is generated, so that the knee joint injury exercise rehabilitation training program is more suitable for the target patient, thereby improving the accuracy of the knee joint injury exercise rehabilitation training program generated using Q learning.
[0156] It should be noted that the sequence of the above embodiments of the present invention is for description only and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0157] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0158] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0159] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the protection scope of the present application. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.
Claims
1. A method for generating a knee joint injury exercise rehabilitation training program, characterized in that: The method comprises: According to the states, actions and reward values of the target patient and the sample patients in the training set, the contribution rate of each state-action group of each sample patient relative to the target patient is determined; the state represents the range of motion of the patient's knee joint; the action represents the rehabilitation training program; the state-action group is a pair of state and action; For each of the state-action groups, respectively, according to the contribution rate of each of the sample patients relative to the target patient under the state-action group and the obtained reward value, determine the target reward value corresponding to the state-action group; Perform Q learning according to the target reward values corresponding to each of the state-action groups, and generate a knee joint injury exercise rehabilitation training program for the target patient according to the result of Q learning and the state of the target patient; Determining the contribution rate of each state-action group of each sample patient to the target patient according to each state of the target patient and each sample patient in the training set, the actions taken respectively and the reward values obtained, includes: According to each state, each action taken and the reward value obtained by each sample patient in the training set, determine the overall generality corresponding to each state-action group of each sample patient; According to the states, actions taken and reward values obtained by the target patient and the sample patients in the training set, determining the similarity of the rehabilitation process of each sample patient with that of the target patient in each state-action group; According to the overall generality and the similarity of the rehabilitation process, the contribution rate of each state-action group of each sample patient relative to the target patient is determined, and the contribution rate of the state-action group of the sample patient relative to the target patient is determined according to the following formula: ; in, represents the contribution rate of the state-action group k of the sample patient Q to the target patient, represents the overall generality of the sample patient Q under the state-action group k, Indicates the similarity of the recovery process of the sample patient Q under the state-action group k with the target patient; Determining the overall generality corresponding to each state-action group of each sample patient according to each state, each action taken and the reward value obtained of each sample patient in the training set includes: Determine the generality of the rehabilitation training program for each sample patient according to each state and each action taken by each sample patient in the training set; Each of the sample patients is respectively used as a sample patient to be analyzed, and according to a first difference between a reward value set of each state-action group of the sample patient to be analyzed and a sample patient with the same scheme, and the corresponding generality of the scheme, the generality of the recovery of the sample patient to be analyzed under the generality of the scheme is determined; the sample patient with the same scheme is a sample patient with the same states and corresponding actions as the sample patient to be analyzed; Each state-action group of the sample patient to be analyzed is respectively used as the target state-action group, and the overall generality corresponding to the target state-action group of the sample patient to be analyzed is determined according to the difference between the first difference and the second difference after removing the target state-action group, and the generality of the recovery situation under the generality of the scheme; the second difference is the difference between the reward value sets of the remaining state-action groups of the sample patient to be analyzed and the sample patients of the same scheme after removing the target state-action group, and the overall generality corresponding to the target state-action group of the sample patient to be analyzed is determined according to the following formula: ; in, represents the overall generality of the target state-action group k corresponding to the sample patient Q to be analyzed, represents the exponential function with base e, represents the number of sample patients in the same scheme, represents the Pearson correlation coefficient between the reward value sets of each state-action group of the sample patient Q to be analyzed and the i-th patient with the same scheme, The Pearson correlation coefficient between the reward value sets of the remaining state-action groups of the sample patient Q to be analyzed and the i-th sample patient with the same scheme after removing the target state-action group k, It indicates the general recovery of the patient Q under the general scheme. represents the average of the differences between the first difference and the second difference; Determining the similarity of the rehabilitation process of each sample patient with that of the target patient in each state-action group according to each state, action taken and reward value obtained by each sample patient in the training set includes: Determine the overall similarity between the sample patients and the target patient in the rehabilitation process according to the states, actions taken and reward values obtained of the target patient and the sample patients in the training set; For each state-action group of each sample patient, the similarity of the rehabilitation process between the sample patient and the target patient under the state-action group is determined according to the difference between the reward value of the sample patient under the state-action group and the reward value of the target patient under the state corresponding to the state-action group and the overall similarity. The similarity of the rehabilitation process between the sample patient and the target patient under the state-action group is determined according to the following formula: ; in, represents the similarity of the recovery process between the sample patient Q and the target patient under the state-action group k, represents the state number corresponding to the state-action group k of the sample patient Q, which refers to the state sequence number. Indicates the number of states that the target patient has experienced. This state number refers to the sequence number of the state that the target patient is currently in. represents the exponential function with base e, represents the reward value of the state-action group k of the sample patient Q, Indicates that the target patient is in state The reward value under represents the overall similarity between the sample patient Q and the target patient in the recovery process; The determining, for each of the state-action groups, a target reward value corresponding to the state-action group according to the contribution rate of each of the sample patients relative to the target patient under the state-action group and the obtained reward value, comprises: For each state-action group, the contribution rate of each sample patient under the state-action group relative to the target patient is used as a weight, and the reward value obtained by each sample patient under the state-action group is weighted averaged, and the target reward value corresponding to the state-action group is determined according to the result of the weighted average.
2. The method for generating a knee joint injury exercise rehabilitation training program according to claim 1, characterized in that: Determining the generality of the rehabilitation training program for each sample patient according to each state and each action taken by each sample patient in the training set includes: Taking each sample patient as a sample patient to be analyzed, and determining a sample patient with the same scheme having the same states and actions as the sample patient to be analyzed according to each state and action taken by each sample patient in the training set; The generality of the entire rehabilitation training program for the sample patients to be analyzed is determined according to the proportion of the number of sample patients with the same program in the total number of sample patients in the training set.
3. The method for generating a knee joint injury exercise rehabilitation training program according to claim 1, characterized in that: The determining, based on the first difference between the reward value sets of each state-action group of the sample patient to be analyzed and the sample patient of the same scheme, the generality of the corresponding scheme, of the recovery status of the sample patient to be analyzed under the generality of the scheme includes: Determine the first difference according to the correlation coefficient between the reward value sets of each state-action group of the sample patient to be analyzed and the sample patient of the same scheme; The generality of the recovery of the patient with the sample to be analyzed under the generality of the regimen is determined based on the first difference and the generality of the regimen.
4. The method for generating a knee joint injury exercise rehabilitation training program according to claim 1, characterized in that: Determining the overall generality corresponding to the target state-action group of the patient sample to be analyzed according to the difference between the first difference and the second difference without the target state-action group, and the generality of the recovery situation under the generality of the scheme, includes: Determining the second difference according to the correlation coefficient between the reward value sets of the remaining state-action groups of the sample patients to be analyzed and the sample patients of the same scheme after removing the target state-action group; According to the difference between the first difference and the second difference, and the generality of the recovery situation under the generality of the scheme, the overall generality corresponding to the target state-action group of the sample patient to be analyzed is determined.
5. The method for generating a knee joint injury exercise rehabilitation training program according to claim 1, characterized in that: Determining the overall similarity between the sample patients and the target patient in the rehabilitation process according to the states, actions taken and reward values obtained of the target patient and the sample patients in the training set includes: For each of the sample patients, the overall similarity between the sample patient and the target patient in the rehabilitation process is determined according to the difference between the reward values of the sample patient and the target patient in each state that the target patient has experienced.
6. A system for generating a knee joint injury exercise rehabilitation training program, characterized in that: The system includes a memory and a processor; the memory is used to store executable program code; the processor is used to call and run the executable program code from the memory to implement the method for generating a knee injury sports rehabilitation training program according to any one of claims 1 to 5.
Citation Information
Patent Citations
Intelligent physical health management system
CN114512213A
Eye movement training scene generation method and device, electronic equipment and storage medium
CN118538366A