Monte Carlo Algorithm-Based Multimodal Magnetic Resonance Imaging Prognosis Prediction in Analysis of Rehabilitation Effect of Exercise Learning on Stroke Patients and Influencing Factors of Memory Function

Based on Monte Carlo algorithm and multimodal MRI diagnosis, the effect of motor learning on motor memory function recovery in stroke patients was investigated in this research. A total of 26 stroke patients with hemiplegia treated in hospital in the past three years were recruited. Patients were rolled into routine group (13 cases) and experimental group (13 cases) according to different follow-up rehabilitation methods. All patients were treated with intravenous thrombolysis. After treatment, the conventional group received conventional rehabilitation therapy and the experimental group received restraint induced exercise therapy (CIMT). )en, T1-weighted imaging, T2-weighted imaging, 3D anatomical imaging, and resting state examinations were performed on the patients before and after treatment. All image data and image processing were performed by the Monte Carlo algorithm. Before treatment and six weeks after rehabilitation treatment, the patients’ mental state and memory function were tested using Addenbrooke’s Cognitive Examination (ACE-III) and Montreal Cognitive Assessment (MoCA). In addition, the Fugl-Meyer motor assessment, the simple test for evaluating hand function, and the modified Barthel index were used to evaluate the patient’s ability of daily living. After processing, the quality of multimode MRI image was improved obviously, and the lesion was more prominent.)e fractional amplitude of low frequency fluctuation of supplement motor area in stroke patients increased after treatment combined with exercise rehabilitation (P< 0.05) and ReHo decreased compared with that before treatment. )e connection function of the left and right hippocampus was enhanced.)e difference in ACE-III (experimental group: 16 versus 21; control group: 17.1 versus 19) scores between the two groups after treatment and before treatment was remarkable (P< 0.05), but the score of patients in experimental group improved better. )e MoCA (experimental group: 24.38 versus 26.47; control group: 23.13 versus 23.37) scores of the two groups of patients changed greatly from those before treatment (P< 0.05), and the MoCA score ratio between the two groups was also statistically different (26.47 versus 23.37; P< 0.05).)ere was a statistical difference in the living ability of the two groups of patients before and after treatment (P< 0.05). )e Monte Carlo algorithm had a good processing effect on multimodal MRI images. )e recovery of the experimental group was evidently better, and the difference between the two groups was substantial (P< 0.05). CIMT had a good effect on the recovery of exercise rehabilitation and memory function of patients with ischemic stroke.


Introduction
As a common disease with high disability rate, mortality rate, and morbidity, stroke is a serious threat to human life and health. Research data showed that there were more than two million new stroke patients in China every year, ranking second in the world. At present, there are up to seven million stroke patients in China, of which 4.5 million have lost the ability to live and work, and the disability rate is 75% [1]. Upper limb dysfunction is the most common and main motor dysfunction caused by stroke. Research data showed that 80% of current stroke patients had upper limb dysfunction. Upper limb dysfunction occurs in 55% to 75% of patients three months after onset [2]. It greatly hinders the recovery of the patients' function of locomotion and the ability of daily living and seriously affects the patients' life and physical and mental health. erefore, how to promote the postoperative recovery of stroke patients has become a hot topic in the field of rehabilitation in recent years. In the middle and late 20th century, neurodevelopmental therapies represented by Bobath technology and Brunnstrom technology and Rod technology were widely applied in postoperative rehabilitation of stroke patients [3]. Clinical studies suggested that these methods can promote the recovery of patients' motor function. However, with the continuous in-depth study of stroke, it was found that although this method can help patients restore motor function, patients cannot use their abilities in daily life [4]. In addition, long-term clinical studies found that neurodevelopmental therapy was not much different from traditional treatments. erefore, scientists are committed to finding a new and effective rehabilitation training method for stroke patients, such as antigroup retraining, exercise relearning, functional electrical stimulation, and constraintinduced movement therapy (CIMT). One of the most concerned is CIMT [5]. A large number of clinical data showed that it had a good effect on helping stroke patients to recover their exercise and life ability [6]. erefore, this method was selected in this research to help patients recover their motor function.
In addition to that motor dysfunction often occurs in stroke patients, cognitive dysfunction is also a common complication. Research data showed that the incidence of cognitive dysfunction in stroke patients was as high as 44% to 74% after six months of onset [7]. Impaired brain dismissal function, decreased memory, and loss of language ability are the main manifestations. e cause of cognitive dysfunction in stroke patients may be that ischemia or hemorrhage can cause damage to the cognitive function area of the patient's brain or damage the relationship between the functional areas when a stroke occurs [8]. Cognitive function treatment cycles are often long, which will consume a lot of manpower and material resources and put huge economic pressure on patients early. erefore, it is very necessary to develop a scientific and effective exercise method to help patients recover their cognition. Clinical studies indicated that CIMT was not only beneficial to the recovery of motor function of stroke patients but also helpful to the recovery of cognitive function and memory function [9]. erefore, the impact of CIMT on the recovery of motor function in stroke patients was explored, and its impact on the recovery of memory function in patients was analyzed. It was expected to provide reference and basis for finding an effective rehabilitation method to restore the motor and memory function of stroke patients in clinical practice.
Magnetic resonance occupies a very important position in the evaluation of the diagnosis and treatment of brain diseases. It is the most important method and basis for the diagnosis of clinical brain-related diseases. However, due to the disadvantages of MRI and the complexity of brain structure and function, a variety of magnetic resonance methods are combined for disease diagnosis in clinical practice, which is called multimode magnetic resonance, to diagnose accurately and have a more grasp of the progress of the disease. Compared with other imaging techniques, multimodal MRI has the advantages of being safe, noninvasive, and capable of providing rich and comprehensive information. With the deepening of the development of imaging technology and the increasing application of multimode magnetic resonance, it increases the workload of doctors invisibly while bringing convenience to the diagnosis of brain diseases. Due to the continuous in-depth research of brain diseases, new requirements are put forward for the processing of imaging data. erefore, it is necessary to develop a faster and more efficient MRI data processing system. With the continuous development of computer technology, all kinds of image processing technology also have rapid development. Computers and algorithms have gradually penetrated into the field of medical imaging, such as the application of neural network computing in medical image processing and the research and development of various computer-aided diagnosis systems. e Monte Carlo algorithm is one of the most promising and valuable algorithms. At present, it has been widely used in various bionics fields, such as the metrology research of the cancer treatment device based on the Monte Carlo algorithm. However, its application in the field of medical image processing is not much.
e Monte Carlo algorithm has strong computing power, which makes it show great potential in MRI image processing [10]. In recent years, the number of related studies has gradually increased, and the research results showed that it can process MRI images well and greatly improve the work efficiency of doctors. erefore, the Monte Carlo algorithm was used to process multimodal MRI images of stroke patients, and the effect of motor learning on rehabilitation and memory function of stroke patients was explored. It was hoped to provide reference and basis for clinical treatment of related diseases.

Research Objects.
Twenty-six stroke patients with upper limb dyskinesia treated in hospital in the past three years were selected. Among them, 12 were male patients and 14 were female patients, aged between 43 and 78 years, with an average age of 55.7 ± 7.7 years. e passive range of motion of the affected joint of the patient was shoulder joint flexion, extension, and abduction >90°, external rotation >45°, elbow joint extension <30°, and forearm pronation and supination >45°. ey can maintain a certain balance after wearing a pair of finger gloves. Exclusion criteria are as follows: patients with a history of drug abuse; patients with epilepsy; patients with severe liver, kidney, and heart dysfunction; persons with metal foreign bodies in the body or other contraindications for MRI examination. According to different follow-up rehabilitation methods, patients were rolled into regular group (13 cases) and experimental group (13 cases). Patient informed consent was obtained, and all study process met the requirements of medical ethics.

MRI Data Collection.
All MRI data were collected in the 3.0 T MR room. Before the examination, the examiner should introduce the purpose, process, and precautions of the examination, so did the possible conditions during the examination, such as the darkness in the magnetic resonance room, the noise of the machine, and the vibration of the examination bed. e patient's tension should be alleviated as much as possible to strive for the maximum patient cooperation, so as to minimize the error. During the scan, the patient lay flat on the examination bed in the supine position with the head advanced. Patients should wear rubber earplugs and special nonmagnetic earphones, and the space between the head and the coil was filled with a sponge pad. Before the examination, the patient should be instructed to be quiet, close eyes, relax, keep his head still, and try not to do subjective system thinking.

Image Processing.
Denoising process is as follows. It is supposed that an image f(x,y) is an array of M × N, the processed image is g(x, y), and its gray level is determined by the average value of the gray levels of several pixels in the field containing (x,y). e processed image is represented as follows: Among them, x, y � 0, 1, 2, N − 1, S is the field collection centered on point (x,y), and M is the total number of internal coordinate points in S.
For multiple images, let the original image be f(x,y) and the image noise be n(x,y), then the noisy image g(x, y) is the following equation: If the noises are not correlated with each other and the mean value is zero, the following equation is given: Among them, E[g(x, y)] is the expected value of g(x, y), and a noisy image M satisfies the following equation after averaging: δ 2 g(x,y) and δ 2 n(x,y) are the variance of g and n at point (x, y).
Edge detection is as follows: Define , , , e phase angle is the following equation: Scientific Programming e specific detailed image processing flowchart is shown in Figure 1.

Image Processing Effect Evaluation Indexes.
e required calculation is adopted to evaluate the image processing effect of the algorithm proposed in this article and the traditional algorithm. e lower the amount of calculation, the higher the efficiency of image processing. e specific calculation process is as follows.
e one-dimensional calculation amount of the proposed algorithm N points is a function of the transformation length IV, denoted by A(N), A(N) � O(Nlog 2 N). e calculation amount for the first step of filtering is A(2N) times multiplication and addition. e calculation amount in the second step is 2N times multiplication, and the calculation amount in the third step is the same as that in the first step. erefore, to complete the filtering of azimuth projection data, the amount of calculation required is shown as follows: .
2.6. Rehabilitation Training Methods 2.6.1. Regular Group. Patients with hemiplegia should lie on their side and turn over on a regular basis. At the beginning, the patient was mainly passive. After the patient grasped the essentials, the patient would turn over autonomously. Passive movements of the limb scapular band, shoulder joint, elbow joint, wrist, and finger joint were made until the patient can move autonomously. Stimulation receptors and control key points were used to suppress muscle spasm. Muscle endurance, balance, and coordination were built through daily life skills such as pegging, picking up beads, kneading dough, building blocks, and pulling cuff buttons.

Experimental
Group. e rehabilitation treatment method of the experimental group was restrained induced exercise therapy (CIMT). e specific details and process were as follows. Upper finger gloves were placed on the tendon-side of patients to limit flexion activities of tendonside limbs, which were removed at times that may affect the patient's balance and safety, such as when using the toilet, bathing, or sleeping. e fixation time of the tendon limb was greater than 90% of the patient's waking time. 2 to 3 toning sessions were made a day, with 5 min of relaxation before and 5 min of pulling in between. e main contents of the training included holding a cup, using chopsticks, picking up soybeans or steel balls, holding a ball, twisting nuts, jack practice, and playing chess. Appropriate training methods were selected according to the patient's own defects. Intensive training was performed 1 h a day, 5 days a week training; other time were daily life training, and training time should not be less than 2 h a day, with a total of 6 weeks training.

Simple Fugl-Meyer Motor Assessment (FMA) and Cognitive and Memory Function
Evaluation. FMA is one of the commonly used quantitative evaluation methods in stroke. e lowest score of each item is 0, and the highest score is 2. 0 point is for unable to complete a movement, 1 point for able to complete part of the movement, and 2 points for completing the movement. ere was a total of 33 upper limb evaluation items, with a total of 66 points. e lower the score, the more severe the motor dysfunction, and the higher the score, the less severe the motor dysfunction. In addition, the simple test for evaluating hand function (STEF) and the modified Barthel index (MBI) were used to evaluate the daily living ability of the patients. e cognitive function of the patients was evaluated by Addenbrooke's Cognitive Examination (ACE-III) and the Montreal Cognitive Assessment (MoCA).

Basic Data and Demographic Characteristics of the Patients.
e basic information and demographic characteristics of the patients are shown in Table 1. It is showed that a total of 26 patients were included in this experiment. e average age of regular group patients was 64 ± 7.5 years, the average height was 169 ± 4.7 cm, and the average weight was 71 ± 4.9 kg. e average age of the patients in the experimental group was 67 ± 6.5 years, the average height was 168±9 cm, and the average weight was 73 ± 11 kg. e comparisons of these basic indicators between the two groups showed that P was greater than 0.05, which was not statistically significant. e comparisons of the demographic characteristics of the two groups of patients in terms of marital status, enrollment time, affected side, and disease type showed that P was also greater than 0.05, which was not statistically significant. erefore, the two groups of patients were comparable.  Scientific Programming Figure 2 shows that the images before and after the multimodal MRI image of a typical case were processed by the Monte Carlo algorithm. After the Monte Carlo algorithm processing, the quality of multimodal MRI images of stroke patients was significantly improved, and the lesions became more prominent. is showed that the Monte Carlo algorithm had a good processing effect on multimodal MRI images of stroke patients.

Comparison of the Amount of Calculation Required for
Image Processing between Monte Carlo Algorithm and Traditional Algorithm. Table 2

Changes in the Brain Hippocampal Connection Function of Patients before and after Intervention.
e changes in the hippocampal connections of the patients before and after the intervention are shown in Figures 3 and 4 and Tables 3 and 4. Figure 3 and Table 3 show that the right hippocampus and right superior temporal gyrus, left middle frontal gyrus, left superior frontal gyrus, left inferior frontal gyrus, and right middle frontal gyrus increased, and the connection with the left top inferior gyrus decreased in patients with stroke compared with that before intervention. Figure 4 and Table 4 show that the connection between the left hippocampus and the bilateral thalamus, the right superior frontal gyrus, the left middle frontal gyrus, and the right anterior cingulate gyrus increased, and the connection with the right middle frontal gyrus decreased in stroke patients. In summary, the patient's left and right hippocampal connection functions were strengthened under the intervention of CIMT, which meant that CIMT had a certain effect on the improvement of cognitive and memory functions of stroke patients.

ACE-III Test Results.
e comparison of the ACE-III measurement results of the two groups of patients before and after rehabilitation is shown in Figure 5. ACE-III scores of patients were increased compared with those before rehabilitation, and P < 0.05, which meant that the difference was considerable. e ACE-III scores between the two groups were compared after rehabilitation, and P < 0.05, which meant that the difference was considerable, indicating that the experimental group had a better treatment effect.

MoCA Test Results.
e MoCA test scores and comparison results of the two groups of patients before rehabilitation are shown in Figures 6-9. Figure 6 shows that the difference of the MoCA scores between the two groups before treatment was not remarkable (P < 0.05). e comparison results of each MoCA item score of experimental group and control group patients before and after rehabilitation are shown in Figure 7. e scores of the two groups of patients were improved compared with those before the rehabilitation, but the experimental group improved more than that before the rehabilitation; the difference was great (P < 0.05). e improvement of regular group was not obvious compared with that before treatment, and there was no substantial difference (P > 0.05). e MoCA scores of the two groups of patients after rehabilitation are shown in Figures 8 and 9. Patients in the experimental group had higher performance, delayed memory, and attention compared with the control group, with remarkable difference (P < 0.05). e abstract and naming scores were also improved, but the difference was not statistically significant (P > 0.05). e changes of FMA, STEF, and MBI before and after rehabilitation are shown in Figure 10. Figure 10(a) is the change before and after FMA rehabilitation, Figure 10(b) is the changes before and after STEF rehabilitation, and Figure 10(c) is the changes before and after MBI rehabilitation.
ere was substantial difference in the comparison of the three evaluation indicators before and after treatment (P < 0.05). e score of the two indicators of the experimental group was greatly higher than that of the regular group, and the difference was significant (P < 0.05).

Discussion
ere are about seven million stroke patients in China, and 75 percent of them have lost their jobs. Stroke is a serious threat to human life and health [11]. Upper limb dysfunction is the most common motor dysfunction caused by stroke, and research data showed that 80% of existing stroke patients had upper limb dysfunction. Upper limb dysfunction occurred in 55 to 75 percent of patients three months after onset, which seriously affects their life and physical and mental health [12]. erefore, how to promote the postoperative recovery of stroke patients is a hot spot in the field T1-weighted imaging T2-weighted imaging 3D anatomical imaging Before processing A er processing   of rehabilitation in recent years [13]. Although early neurodevelopmental therapy can help patients recover their motor function, they cannot use their abilities in daily life. People have developed various therapies such as antigroup retraining, exercise relearning, functional electrical      stimulation, and CIMT based on neurotherapy. One of the most concerned is CIMT. A large number of clinical data showed that it had a relatively good effect on helping stroke patients to recover their exercise and life ability [14]. In addition to motor dysfunction, cognitive dysfunction is also a common complication in stroke patients. Research data showed that the incidence of cognitive dysfunction in stroke patients was as high as 44% to 74% after six months of onset. Impaired brain dismissal function, decreased memory, and loss of language ability are the main manifestations [15]. Cognitive function treatment cycles are often long, which will consume a lot of manpower and material  Figure 10: Changes of (a) FMA, (b) STEF, and (c) MBI before and after rehabilitation. Note: compared with that after treatment, * P < 0.05. resources and put huge economic pressure on patients early. erefore, it is very necessary to develop a scientific and effective exercise method to help patients recover their cognition. Clinical studies indicated that CIMT was not only beneficial to the recovery of motor function of stroke patients but also helpful to the recovery of cognitive function and memory function [16].
Multimode magnetic resonance is now an important method for diagnosing brain diseases. In recent years, it has been widely used in clinical diagnosis of brain diseases [17]. As a result, a large amount of image data needs to be processed. In addition, with the continuous in-depth study of stroke disease, new requirements for image pictures have been put forward. A large number of clinical data showed that MCDB can perform excellent MRI image data extraction and analysis work [18][19][20].
In this research, the Monte Carlo algorithm was used to process multimodal MRI images of stroke patients, and the effects of CIMT and traditional rehabilitation methods on motor function and cognitive function recovery of patients were compared. It was found that the clarity and quality of multimodal MRI images processed by the Monte Carlo algorithm were greatly improved, and the amount of computation required was far lower than that of traditional algorithms. e fractional amplitude of low frequency fluctuation of supplement motor area in stroke patients increased after treatment combined with exercise rehabilitation (P < 0.05), and ReHo decreased compared with that before treatment. e connection function of the left and right hippocampus was enhanced. e difference in ACE-III (experimental group: 16 versus 21; control group: 17.1 versus 19) scores between the two groups after treatment and before treatment was remarkable (P < 0.05), but the score of patients in experimental group improved better. e MoCA (experimental group: 24.375 versus 26.467; control group: 23.13 versus 23.37) scores of the two groups of patients changed greatly from those before treatment (P < 0.05), and the MoCA score ratio between the two groups was also statistically different (26.467 versus 23.37; P < 0.05). ere was a statistical difference in the living ability of the two groups of patients before and after treatment (P < 0.05).

Conclusion
Based on the multimode magnetic resonance and MCDB, the effect of CIMT on the recovery of motor, cognitive, and memory functions of stroke patients was studied. e results showed that CIMT can promote the recovery of motor, cognitive, and memory functions in stroke patients. It can be used as an effective auxiliary treatment method for the treatment of clinical stroke patients. However, there are still some problems and shortcomings in this work. For example, this work only processes images in three modes of TIweighted imaging, T2-weighted imaging, and 3D anatomical imaging. In the future study and work, the Monte Carlo algorithm will be used to process images in more modes, so as to more comprehensively analyze the application value of the Monte Carlo algorithm in the diagnosis and treatment of stroke patients. In addition, the sample size studied in this article is only 26 patients when the effect of exercise learning on the recovery of motor and cognitive function in stroke patients is studied, and the sample size is not large enough. In the future study and work, we will expand the sample to further address this problem.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest.