Data processing method, device, magnetic resonance equipment and storage medium
By determining the execution parameters of real-time threads in the control terminal of the magnetic resonance scanning system and calculating the real-time index, the problem of poor real-time performance of the control terminal is solved, and accurate performance detection and optimization independent of the detection environment is achieved.
Patent Information
- Application Number
- CN202111333144.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-11
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2041-11-11
AI Technical Summary
In the magnetic resonance scanning system, the real-time performance of the control terminal is poor, resulting in unpredictable abnormalities in the real-time operating system, resulting in scan failure and reducing user experience. The prior art detection environment is highly dependent and lacks accurate quantitative qualification standards.
A data processing method is provided, by determining the first execution parameters and the second execution parameters of the real-time thread respectively when only the real-time thread is run and the real-time thread and the non-real-time thread are simultaneously run in the control terminal. Based on these parameters, the real-time indicators of real-time threads are determined, the degree of impact of non-real-time threads on real-time threads is characterized, and the detection results are determined based on real-time indicators.
This method can accurately quantify the real-time performance of the control terminal, provide detection standards independent of the detection environment, reduce the dependence of the detection environment, improve detection efficiency and accuracy, and improve the real-time performance of the control terminal through optimization strategies.
Smart Images

Figure CN113900789B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of magnetic resonance technology, and in particular to a data processing method, device, magnetic resonance equipment and storage medium. Background Art
[0002] In the magnetic resonance scanning system, the real-time operating system running on the control terminal (usually a computer) is mainly responsible for controlling the real-time tasks related to the sequence timing. During the scanning process, the control terminal not only needs to start the real-time threads corresponding to several real-time tasks, but also needs to run a large number of non-real-time threads corresponding to non-real-time tasks at the same time. The real-time performance of the real-time thread will be affected by the influence of multiple real-time threads on each other and by the influence of non-real-time threads.
[0003] During the scanning process, if the real-time performance of the control terminal is poor, that is, the real-time performance of the real-time thread is affected, the real-time operating system may have unpredictable exceptions, resulting in scanning failure and reduced user experience. Therefore, it is necessary to detect the real-time performance of the control terminal.
[0004] In the related art, by placing the control terminal in a complete magnetic resonance scanning system and running it, if there is no real-time system abnormality for a specified period of time (for example, three months), the real-time performance can be considered to have passed the test. However, this method is highly dependent on the test environment and has no precise quantitative qualification standard. Summary of the invention
[0005] Based on this, it is necessary to provide a data processing method, device, magnetic resonance equipment and storage medium that can eliminate the control terminal's dependence on the detection environment during the detection process in order to address the above technical problems.
[0006] A data processing method, applied to a control terminal, comprising:
[0007] In the case where only the real-time thread is running in the control terminal, determining a first execution parameter of the real-time thread within a unit time;
[0008] When the real-time thread and the non-real-time thread are running in the control terminal, determining a second execution parameter of the real-time thread within the unit time;
[0009] Determining a real-time index of the real-time thread according to the first execution parameter and the second execution parameter, wherein the real-time index is used to characterize the degree of influence of the non-real-time thread on the real-time thread;
[0010] A detection result for the control terminal is determined according to the real-time indicator.
[0011] In one embodiment, the execution parameters include execution times and / or execution duration.
[0012] In one embodiment, the method further comprises:
[0013] In the case where the detection result indicates that the detection has not been passed, determining an optimization strategy for the control terminal system configuration according to the real-time index of the real-time thread;
[0014] According to the optimization strategy, the system configuration of the control terminal is optimized.
[0015] In one of the embodiments, the optimization strategy includes at least one of an adjustment strategy for the priority of the real-time thread, an adjustment strategy for the scheduling strategy of the real-time thread, and an adjustment strategy for the processor core running the real-time thread.
[0016] In one embodiment, the optimization strategy includes an adjustment strategy for the priority of the real-time thread, and the determination of the optimization strategy for the control terminal system configuration according to the real-time index of the real-time thread includes:
[0017] Adjusting the priority of the real-time thread to obtain the adjusted first priority of the real-time thread;
[0018] Determining a first real-time indicator of the real-time thread according to the first priority of the real-time thread;
[0019] According to the first real-time indicator, the priority of the real-time thread is adjusted to obtain an adjustment strategy for the priority of the real-time thread.
[0020] In one embodiment, the optimization strategy includes an adjustment strategy for the scheduling strategy of the real-time thread, and the determination of the optimization strategy for the control terminal system configuration according to the real-time index of the real-time thread includes:
[0021] Adjusting the scheduling policy of the real-time thread to obtain a first adjustment policy of the real-time thread;
[0022] Determine a second real-time indicator corresponding to the real-time thread under the first scheduling strategy;
[0023] The scheduling policy of the real-time thread is adjusted according to the second real-time indicator to obtain an adjustment policy for the scheduling policy of the real-time thread.
[0024] In one embodiment, the optimization strategy includes a first adjustment strategy for a processor core running the real-time thread, and the step of determining the optimization strategy for the control terminal system configuration according to the real-time index of the real-time thread includes:
[0025] Determine a first processor core from the processor cores, where the first processor core is used to run the real-time thread;
[0026] determining a third real-time indicator of the real-time thread when the real-time thread runs in the first processor core;
[0027] The processor core of the real-time thread is adjusted according to the third real-time index to obtain a first adjustment strategy for the processor core running the real-time thread.
[0028] In one embodiment, the optimization strategy further includes a second adjustment strategy for the processor core running the real-time thread, and the determination of the optimization strategy for the control terminal system configuration according to the real-time index of the real-time thread further includes:
[0029] Dividing the real-time threads into a plurality of thread groups, each of the thread groups including at least one real-time thread;
[0030] Determining the processor cores corresponding to the thread groups from the first processor cores;
[0031] Running the real-time threads in each of the thread groups in the CPU cores corresponding to the thread groups to obtain a fourth real-time indicator corresponding to the real-time threads;
[0032] The processor core of the real-time thread is adjusted according to the fourth real-time index to obtain a second adjustment strategy for the processor core running the real-time thread.
[0033] A data processing device, applied to a control terminal, comprising:
[0034] A first determining module, configured to determine a first execution parameter of the real-time thread within a unit time when only the real-time thread is running in the control terminal;
[0035] A second determination module, configured to determine a second execution parameter of the real-time thread within the unit time when the real-time thread and the non-real-time thread are running in the control terminal;
[0036] A third determining module, configured to determine a real-time index of the real-time thread according to the first execution parameter and the second execution parameter, wherein the real-time index is used to characterize the degree of influence of the non-real-time thread on the real-time thread;
[0037] The fourth determination module is used to determine the detection result for the control terminal according to the real-time indicator.
[0038] In one embodiment, the execution parameters include the number of executions and / or the execution duration. In one embodiment, the apparatus further includes:
[0039] A fifth determination module, configured to determine an optimization strategy for the control terminal system configuration according to the real-time index of the real-time thread when the detection result indicates that the detection has not been passed;
[0040] The optimization module is used to optimize the system configuration of the control terminal according to the optimization strategy.
[0041] In one of the embodiments, the optimization strategy includes at least one of an adjustment strategy for the priority of the real-time thread, an adjustment strategy for the scheduling strategy of the real-time thread, and an adjustment strategy for the processor core running the real-time thread.
[0042] In one embodiment, the optimization strategy includes an adjustment strategy for the priority of the real-time thread, and the fifth determination module is further used to:
[0043] Adjusting the priority of the real-time thread to obtain the adjusted first priority of the real-time thread;
[0044] Determining a first real-time indicator of the real-time thread according to the first priority of the real-time thread;
[0045] According to the first real-time indicator, the priority of the real-time thread is adjusted to obtain an adjustment strategy for the priority of the real-time thread.
[0046] In one embodiment, the optimization strategy includes an adjustment strategy for the scheduling strategy of the real-time thread, and the fifth determination module is further used to:
[0047] Adjusting the scheduling policy of the real-time thread to obtain a first adjustment policy of the real-time thread;
[0048] Determine a second real-time indicator corresponding to the real-time thread under the first scheduling strategy;
[0049] The scheduling policy of the real-time thread is adjusted according to the second real-time indicator to obtain an adjustment policy for the scheduling policy of the real-time thread.
[0050] In one embodiment, the optimization strategy includes a first adjustment strategy for a processor core running the real-time thread, and the fifth determination module is further configured to:
[0051] Determine a first processor core from the processor cores, where the first processor core is used to run the real-time thread;
[0052] determining a third real-time indicator of the real-time thread when the real-time thread runs in the first processor core;
[0053] The processor core of the real-time thread is adjusted according to the third real-time index to obtain a first adjustment strategy for the processor core running the real-time thread.
[0054] In one embodiment, the optimization strategy further includes a second adjustment strategy for the processor core running the real-time thread, and the fifth determination module is further configured to:
[0055] Dividing the real-time threads into a plurality of thread groups, each of the thread groups including at least one real-time thread;
[0056] Determining the processor cores corresponding to the thread groups from the first processor cores;
[0057] Running the real-time threads in each of the thread groups in the processor cores corresponding to the thread groups to obtain a fourth real-time indicator corresponding to the real-time threads;
[0058] The processor core of the real-time thread is adjusted according to the fourth real-time index to obtain a second adjustment strategy for the processor core running the real-time thread.
[0059] A magnetic resonance device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0060] In the case where only the real-time thread is running in the control terminal, determining a first execution parameter of the real-time thread within a unit time;
[0061] When the real-time thread and the non-real-time thread are running in the control terminal, determining a second execution parameter of the real-time thread within the unit time;
[0062] Determining a real-time index of the real-time thread according to the first execution parameter and the second execution parameter, wherein the real-time index is used to characterize the degree of influence of the non-real-time thread on the real-time thread;
[0063] A detection result for the control terminal is determined according to the real-time indicator.
[0064] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0065] In the case where only the real-time thread is running in the control terminal, determining a first execution parameter of the real-time thread within a unit time;
[0066] When the real-time thread and the non-real-time thread are running in the control terminal, determining a second execution parameter of the real-time thread within the unit time;
[0067] Determining a real-time index of the real-time thread according to the first execution parameter and the second execution parameter, wherein the real-time index is used to characterize the degree of influence of the non-real-time thread on the real-time thread;
[0068] A detection result for the control terminal is determined according to the real-time indicator.
[0069] The above-mentioned data processing method, device, magnetic resonance device and storage medium determine the first execution parameter of the real-time thread in a unit time when only the real-time thread is running in the control terminal, and determine the second execution parameter of the real-time thread in a unit time when the real-time thread and the non-real-time thread are running in the control terminal, and determine the real-time index of the real-time thread according to the first execution parameter and the second execution parameter, and the real-time index is used to characterize the degree of influence of the non-real-time thread on the real-time thread. Further, the detection result for the control terminal can be determined according to the real-time index. The data processing method, device, magnetic resonance device and storage medium provided by the embodiments of the present disclosure detect the performance of the control terminal through the real-time index of the real-time thread, which not only provides an accurate quantitative qualification standard, but also does not need to actually run the detection in a real scene, reduces the dependence on the detection environment, and improves the detection efficiency and detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 is a flow chart of a data processing method in one embodiment;
[0071] Figure 2 An application environment diagram of a data processing method in an embodiment;
[0072] Figure 3a to Figure 3b is a schematic diagram of a data processing method in one embodiment;
[0073] Figure 4 is a schematic diagram of a data processing method in one embodiment;
[0074] Figure 5 is a schematic diagram of a data processing method in one embodiment;
[0075] Figure 6 is a flow chart of a data processing method in one embodiment;
[0076] Figure 7 is a flow chart of a data processing method in one embodiment;
[0077] Figure 8is a schematic diagram of a data processing method in one embodiment;
[0078] Fig. 9 is a flow chart of a data processing method in one embodiment;
[0079] Fig.10 is a flow chart of a data processing method in one embodiment;
[0080] Fig.11 is a schematic diagram of a data processing method in one embodiment;
[0081] Fig.12 is a flow chart of a data processing method in one embodiment;
[0082] Fig.13 is a schematic diagram of a data processing method in one embodiment;
[0083] Fig.14 is a schematic diagram of a data processing method in one embodiment;
[0084] Fig.15 is a structural block diagram of a data processing device in one embodiment;
[0085] Fig.16 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0086] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0087] In one embodiment, Figure 1 As shown, a data processing method is provided, which is applied to a control terminal. The structural block diagram of the control terminal can refer to Figure 2 In this embodiment, the method includes the following steps:
[0088] Step 102: When only the real-time thread is running in the control terminal, determine a first execution parameter of the real-time thread in a unit time.
[0089] For example, the control terminal may be a terminal device that can run real-time threads and non-real-time threads at the same time, such as a magnetic resonance control terminal in a magnetic resonance scanning system, and the control terminal is generally a computer device. In an embodiment of the present application, the same real-time thread can be simulated and run in the control terminal according to the real-time thread actually run by the control terminal in a real scene, and the number of simulated real-time threads is the same as the number of real-time threads actually run. Exemplarily, in a magnetic resonance scanning system, real-time threads may include reconstruction, sequence scanning, pre-processing, correction and other real-time threads, and correspondingly, reconstruction, sequence scanning, pre-processing, correction and other real-time threads may be simulated. The first execution parameter of the real-time thread in a unit time can be determined, and at this time the real-time thread is not interfered with by the non-real-time thread (exemplarily, at this time, the running status of the thread can refer to Figure 3a As shown, RN is the number of real-time threads. The unit time may be a preset time value, such as 1 minute, etc. The specific value of the unit time is not specifically limited in the embodiment of the present application.
[0090] In one embodiment, the execution parameters may include the number of executions and / or the execution duration.
[0091] Exemplarily, when the execution parameters include the number of executions, refer to Figure 4 As shown, each simulated real-time thread can be started in the control terminal. For any real-time thread, its execution times per unit time can be counted, and the average of the execution times per unit time of each real-time thread can be used as the first execution times per unit time of the real-time thread. For example, if there are 5 real-time threads, the execution times per unit time of the 5 real-time threads (A1, A2, A3, A4, A5) can be counted respectively, and the average of the execution times per unit time of the 5 real-time threads ((A1+A2+A3+A4+A5) / 5) can be determined as the first execution times per unit time of the real-time thread.
[0092] Alternatively, a statistical duration may be preset, and the statistical duration is composed of multiple unit times. The number of executions of each real-time thread within the statistical duration may be counted, and after determining the average number of executions of each real-time thread within the unit time within the statistical duration, the average of the average number of executions of each real-time thread within the unit time is determined as the first number of executions of the real-time thread within the unit time. For example: the unit time is 1 minute, the statistical duration is 5 minutes, and the number of real-time threads is 5. Then, the average number of executions of the 5 real-time threads within the unit time (B1, B2, B3, B4, B5) may be counted respectively. Taking B1 as an example, the number of executions of the real-time thread 1 corresponding to B1 within the statistical duration is C1, and the average number of executions of the real-time thread 1 within the unit time is B1 = (C1 / 5).
[0093] Exemplarily, when the execution parameters include execution time, each simulated real-time thread can be started in the control terminal, and for any real-time thread, the time it takes to execute once per unit time can be counted, and the average time it takes for each real-time thread to execute once per unit time can be used as the first execution time of the real-time thread per unit time. For example: if the number of real-time threads is 5, the execution time of the 5 real-time threads per unit time (A1, A2, A3, A4, A5) can be counted respectively, and the average of the execution time of the 5 real-time threads per unit time ((A1+A2+A3+A4+A5) / 5) can be determined as the first execution time of the real-time thread per unit time.
[0094] Alternatively, a statistical duration may be preset, and the statistical duration is composed of multiple unit times. After determining the average execution duration of each real-time thread in a unit time within the statistical duration, the average execution duration of each real-time thread in a unit time is determined as the first execution duration of the real-time thread in the unit time. For example: the unit time is 1 minute, the statistical duration is 5 minutes, and the number of real-time threads is 5. Then, the average execution durations of the 5 real-time threads in the unit time (D1, D2, D3, D4, D5) can be counted respectively. Taking D1 as an example, the execution duration of the real-time thread 1 corresponding to D1 in the statistical duration is F1, and the average execution duration of the real-time thread 1 in the unit time is D1 = (F1 / 5).
[0095] It should be noted that the execution parameters in the embodiments of the present application may include the number of executions and / or the execution duration. In the following embodiments, the embodiments of the present application are described by taking the execution parameters including the number of executions as an example.
[0096] Step 104: When the real-time thread and the non-real-time thread are running in the controlling terminal, determine a second execution parameter of the real-time thread in a unit time.
[0097] For example, after determining the first execution parameter of the real-time thread, the non-real-time thread can be started in the control terminal, that is, the real-time thread and the non-real-time thread are simultaneously running in the control terminal (for example, the running status of the thread at this time can be referred to Figure 3bAs shown, where N is the number of non-real-time threads), the real-time thread is interfered by the non-real-time thread at this time, and the second execution parameter of the real-time thread in the unit time is determined. According to the number of non-real-time threads actually running in the control terminal in the real scene, the same number of non-real threads can be simulated in the control terminal (the non-real-time threads can be simulated by Fourier operation in the embodiment of the present disclosure). Among them, the number of non-real-time threads actually running in the control terminal can be obtained from the log generated by the control terminal executing the target task in the real scene. In the case of multiple logs, the number of non-real-time threads to be simulated can be determined by weighted summing, averaging, or taking the maximum value of the number of non-real-time threads in the multiple logs.
[0098] Exemplarily, each real-time thread and each non-real-time thread may be started in the control terminal, and the statistical process of the second execution parameter of the real-time thread may refer to the statistical process of the first execution parameter, which will not be described in detail in the embodiments of the present disclosure.
[0099] Reference Figure 5 As shown, during the process of running the non-real-time thread, when the non-real-time thread finishes running, it can sleep for a period of time, wherein the sleep time can be determined according to the shortest sleep time of the non-real-time thread in the control terminal. After sleeping, if the running time does not reach the statistical time, the aforementioned process of running the non-real-time thread and sleeping is repeated until the running time reaches the statistical time, and the second execution parameter of the real-time thread in the unit time is obtained by statistics.
[0100] Step 106: Determine a real-time index of the real-time thread according to the first execution parameter and the second execution parameter. The real-time index is used to characterize the degree of influence of the non-real-time thread on the real-time thread.
[0101] For example, the real-time index of the real-time thread can be obtained by determining the ratio between the first execution parameter and the second execution parameter. Exemplarily, the ratio between the first execution parameter and the second execution parameter can be determined as the real-time index of the real-time thread. At this time, the larger the real-time index, the smaller the impact of the non-real-time thread on the real-time thread. On the contrary, the smaller the real-time index, the greater the impact of the non-real-time thread on the real-time thread.
[0102] Alternatively, the ratio of the second execution parameter to the first execution parameter may be determined as the real-time index of the real-time thread. In this case, the larger the real-time index, the greater the impact of the non-real-time thread on the real-time thread. On the contrary, the smaller the real-time index, the smaller the impact of the non-real-time thread on the real-time thread. In the embodiment of the present disclosure, the ratio of the first execution parameter to the second execution parameter is taken as an example to illustrate the real-time example of the present disclosure.
[0103] Exemplarily, when the execution parameters include the number of executions, the ratio of the first number of executions to the second number of executions can be determined as the real-time index of the real-time thread; or, when the execution parameters include the execution duration, the ratio of the first execution duration to the second execution duration can be determined as the real-time index of the real-time thread; or, when the execution parameters include the number of executions and the execution duration, a first ratio of the first number of executions to the second number of executions, and a second ratio of the first execution duration to the second execution duration can be determined, and the real-time index of the real-time thread is obtained based on the weighted sum of the first ratio and the second ratio. The weights of the first ratio and the second ratio can be set in advance, and the embodiments of the present application are not limited to this.
[0104] Step 108: Determine the detection result for the control terminal according to the real-time index.
[0105] For example, after obtaining the real-time index of the real-time thread, the detection result for the control terminal can be determined according to the real-time index. Exemplarily, when the real-time index is greater than or equal to the real-time index threshold, a first detection result for the control terminal can be obtained, and the first detection result can be used to indicate that the control terminal has passed the detection, that is, to determine that the performance of the control terminal meets the standard; or, when the real-time index is less than the real-time index threshold, a second detection result for the control terminal can be obtained, and the second detection result can be used to indicate that the control terminal has not passed the detection, that is, to determine that the performance of the control terminal does not meet the standard.
[0106] It should be noted that the real-time indicator threshold may be a preset value close to 1, and the specific value may be set by the user according to the detection accuracy requirement, and the embodiments of the present disclosure do not specifically limit this.
[0107] In the embodiment of the present disclosure, when only the real-time thread is running in the control terminal, the first execution parameter of the real-time thread in a unit time is determined, and when the real-time thread and the non-real-time thread are running in the control terminal, the second execution parameter of the real-time thread in a unit time is determined, and the real-time index of the real-time thread is determined according to the first execution parameter and the second execution parameter, and the real-time index is used to characterize the degree of influence of the non-real-time thread on the real-time thread. Further, the detection result for the control terminal can be determined according to the real-time index. The data processing method provided in the embodiment of the present disclosure detects the performance of the control terminal through the real-time index of the real-time thread, which not only provides an accurate quantitative qualification standard, but also does not need to actually run the control terminal in a real scene for detection, reduces the dependence on the detection environment, and improves the detection efficiency and detection accuracy.
[0108] In one embodiment, Figure 6 As shown, the above method may also include:
[0109] Step 602, when the detection result indicates that the detection has not been passed, determining an optimization strategy for the control terminal system configuration according to the real-time index of the real-time thread;
[0110] Step 604: Optimize the system configuration of the control terminal according to the optimization strategy.
[0111] For example, when the detection result indicates that the control terminal has failed the detection, an optimization strategy for the system configuration of the control terminal can be determined based on the real-time index of the real-time thread. After the system configuration of the control terminal is optimized according to the optimization strategy, the interference of the non-real-time thread on the real-time thread in the control terminal can be reduced, that is, the real-time index of the real-time thread of the control terminal can be improved, so that the real-time index of the real-time thread is greater than or equal to the real-time index threshold.
[0112] In one possible implementation, the optimization strategy includes at least one of an adjustment strategy for the priority of a real-time thread, an adjustment strategy for a scheduling strategy of a real-time thread, and an adjustment strategy for a processor core (ie, a CPU core) running a real-time thread.
[0113] Among them, the adjustment strategy for the priority of real-time threads may include a scheme for adjusting the priority of each real-time thread, the adjustment strategy for the scheduling policy of real-time threads may include a scheme for adjusting the scheduling policy corresponding to each real-time thread, and the adjustment strategy for the processor core running the real-time thread may include a scheme for adjusting the processor core running each real-time thread.
[0114] In the embodiment of the present disclosure, the optimization strategy may include at least one of the above-mentioned adjustment strategies. When multiple adjustment strategies are included, each adjustment strategy may be determined in parallel or in series. When each adjustment strategy is determined in series, the embodiment of the present disclosure does not specifically limit the order in which the adjustment strategies are determined.
[0115] The data processing method provided by the embodiment of the present disclosure can automatically determine the optimization strategy for the control terminal system configuration according to the real-time index of the real-time thread when the detection result indicates that the control terminal has failed the detection, and optimize the control terminal system configuration according to the optimization strategy, so as to accurately improve the real-time performance of the real-time thread in the control terminal, improve the performance of the control terminal, and improve the optimization efficiency for the control terminal.
[0116] In one embodiment, the optimization strategy includes an adjustment strategy for the priority of the real-time thread, such as Figure 7 As shown, step 602 may include:
[0117] Step 702, adjusting the priority of the real-time thread to obtain the adjusted first priority of the real-time thread;
[0118] Step 704, determining a first real-time indicator of the real-time thread according to the first priority of the real-time thread;
[0119] Step 706: Adjust the priority of the real-time thread according to the first real-time indicator to obtain an adjustment strategy for the priority of the real-time thread.
[0120] In an embodiment of the present application, when the first real-time indicator satisfies the first adjustment condition, the priority of the real-time thread is adjusted until the real-time indicator corresponding to the real-time thread at the adjusted second priority does not satisfy the first adjustment condition, and an adjustment strategy for the priority of the real-time thread is obtained according to the second priority of the real-time thread; or, when the first real-time indicator does not satisfy the first adjustment condition, an adjustment strategy for the priority of the real-time thread is obtained according to the first priority of the real-time thread.
[0121] In the embodiment of the present disclosure, when the control terminal fails the detection, the priority of the real-time thread can be adjusted. After the adjustment, the priority of the real-time thread is the first priority, and the first priority can include the priority corresponding to each real-time thread.
[0122] Exemplarily, in the process of adjusting the priority of each real-time thread, the priority can be adjusted according to the importance of the real-time task corresponding to each real-time thread. For example, in each adjustment process, the real-time thread corresponding to the more important real-time task has a greater adjustment range, and conversely, the real-time thread corresponding to the less important real-time task has a smaller adjustment range.
[0123] Alternatively, in the process of adjusting the priority of each real-time thread, the priority adjustment range of each real-time thread is the same, and each adjustment is made to a fixed value, where the fixed value is a preset value, or a value determined according to a binary search method, that is, after determining the priority adjustment range space, a binary search method is used to determine the adjusted value from the adjustment range space.
[0124] Alternatively, the priority of each real-time thread can be adjusted until the second execution parameter of the real-time thread no longer increases after the adjustment, then the priority interval of each real-time thread can be determined as the optimal priority interval, and the priority of each real-time thread can be adjusted within the priority interval. Figure 8As shown in the figure, with the adjustment of the priority of the real-time thread, the real-time interference of the non-real-time thread on the real-time thread will become smaller and smaller, and the real-time index of the real-time thread will gradually approach 1. When the increase in priority cannot improve the second execution parameter of the real-time thread (as shown in the "dashed line 802" in the above figure), it means that "dashed line 802 to dashed line 804" (dashed line 804 indicates the highest priority) is the most suitable priority range for the real-time thread.
[0125] It should be noted that the embodiment of the present disclosure does not specifically limit the method for adjusting the priority.
[0126] In the embodiment of the present disclosure, the first adjustment condition may include: the real-time index of the real-time thread is less than a preset first real-time index threshold, or the real-time index of the real-time thread still has an upward trend and is not the maximum real-time index.
[0127] After the priority of each real-time thread is adjusted, each real-time thread can be re-run to determine the first execution parameter and the second execution parameter of the real-time thread, so as to determine the first real-time indicator of the real-time thread according to the adjusted first execution parameter and the second execution parameter of the real-time thread (the specific process can be referred to the relevant description in the aforementioned embodiment, and the embodiments of the present disclosure will not be repeated here), and when the first real-time indicator of the real-time thread does not meet the first adjustment condition, it is considered that the real-time performance of the current real-time thread has met the performance requirement and no further adjustment is required, and then the adjustment strategy for the priority of the real-time thread can be determined to include: adjusting the priority of the real-time thread to the first priority.
[0128] Alternatively, when the first real-time indicator of the real-time thread meets the first adjustment condition, it is considered that there is still room for adjustment of the real-time performance of the current real-time thread, so the aforementioned process can be repeated, that is, the process of adjusting the priority of each real-time thread and re-running it to determine the real-time indicator can be repeated until the real-time indicator of the determined real-time thread does not meet the above-mentioned first adjustment condition. At this time, the priority of the real-time thread is adjusted to the second priority. It can be determined that the adjustment strategy for the priority of the real-time thread includes: adjusting the priority of the real-time thread to the second priority.
[0129] According to the data processing method provided by the embodiment of the present disclosure, when the control terminal fails to pass the detection, the priority adjustment strategy for the real-time thread can be determined according to the real-time index of the real-time thread, and according to the priority adjustment strategy for the real-time thread, the corresponding configuration of the priority of the real-time thread in the system configuration is adjusted, so that the real-time index of the real-time thread in the adjusted control terminal is greatly improved, that is, the interference of the non-real-time thread on the real-time thread is reduced, and the performance of the control terminal can be accurately and efficiently improved.
[0130] In one embodiment, the optimization strategy includes an adjustment strategy for the scheduling strategy of the real-time thread, referring to Fig. 9 As shown, step 602 may include:
[0131] Step 902, adjusting the scheduling policy of the real-time thread to obtain a first scheduling policy of the real-time thread;
[0132] Step 904, determining a second real-time indicator corresponding to the real-time thread under the first scheduling strategy;
[0133] Step 906: adjust the scheduling policy of the real-time thread according to the second real-time indicator to obtain an adjustment policy for the scheduling policy of the real-time thread.
[0134] In an embodiment of the present application, when the second real-time indicator satisfies the second adjustment condition, the scheduling policy of the real-time thread is adjusted until the real-time indicator corresponding to the real-time thread under the second scheduling policy does not satisfy the second adjustment condition, and an adjustment policy for the scheduling policy of the real-time thread is obtained according to the second scheduling policy; or, when the second real-time indicator satisfies the second adjustment condition, an adjustment policy for the scheduling policy of the real-time thread is obtained according to the first scheduling policy.
[0135] In an embodiment of the present application, when the control terminal fails the detection, the scheduling policy of the real-time thread can be adjusted to obtain a first scheduling policy after the real-time thread is adjusted. The first scheduling policy may include a scheduling policy corresponding to a real-time thread of the same priority.
[0136] Exemplarily, the scheduling policies for real-time threads include: FIFO (First Input First Output) and RR (Round Robin). In the process of adjusting the scheduling policies of each real-time thread, the scheduling policies corresponding to the real-time thread can be adjusted arbitrarily until a scheduling policy that can make the real-time performance of the real-time thread meet the second adjustment condition is obtained. For example, assuming that there are currently 10 real-time threads of the same priority, among which real-time threads 1 to 4 use the FIFO scheduling policy and 5 to 10 use the RR scheduling policy, the scheduling policies of the real-time threads can be adjusted to 1 to 5 using the FIFO scheduling policy and 6 to 10 using the RR scheduling policy. It should be noted that the embodiments of the present disclosure do not specifically limit the adjustment method of the scheduling policy.
[0137] In the disclosed embodiment, the second adjustment condition may include: the real-time index of the real-time thread is less than the preset second real-time index threshold, or the real-time index of the real-time thread is still on an upward trend and is not the maximum real-time index. The second real-time index threshold may be the same as the first real-time index threshold, or may be different. If the determination process for the scheduling strategy is performed after the adjustment for the priority, the second real-time index threshold is greater than the first real-time index threshold. Otherwise, the second real-time index threshold is less than the first real-time index threshold. The disclosed embodiment does not specifically limit this.
[0138] After adjusting the scheduling policy of each real-time thread to the first scheduling policy, each real-time thread can be re-run. During the running process, the first scheduling policy is used to schedule the real-time threads with the same priority, and the first execution parameter and the second execution parameter of the real-time thread are determined, so as to determine the second real-time index of the real-time thread according to the adjusted first execution parameter and the second execution parameter of the real-time thread (the specific process can be referred to the relevant description in the aforementioned embodiment, and the embodiment of the present disclosure will not be repeated here), and when the second real-time index of the real-time thread does not meet the second adjustment condition, it can be considered that the real-time performance of the real-time thread meets the performance requirement and no further adjustment is required, so determining the adjustment strategy for the scheduling policy of the real-time thread includes: adjusting the scheduling policy of the real-time thread to the first scheduling policy.
[0139] Alternatively, when the second real-time indicator of the real-time thread meets the second adjustment condition, it can be considered that the real-time performance of the real-time thread does not meet the performance requirement and needs to be further adjusted, so the above process can be repeated, that is, the process of adjusting the scheduling strategy of each real-time thread, re-running, and determining the real-time indicator can be repeated until the real-time indicator of the real-time thread does not meet the above-mentioned second adjustment condition. At this time, the scheduling strategy of the real-time thread is adjusted to the second scheduling strategy, so it can be determined that the adjustment strategy for the scheduling strategy of the real-time thread includes: adjusting the scheduling strategy of the real-time thread to the second scheduling strategy.
[0140] For example, refer to Figure 8 As shown, for real-time threads of the same priority, the scheduling strategies FIFO and RR can be continuously adjusted to make the real-time index of the real-time thread infinitely close to 1, until the best scheduling strategy scheme that matches the real-time thread to resist interference from non-real-time threads is obtained.
[0141] According to the data processing method provided in the embodiment of the present application, when the control terminal fails the detection, the adjustment strategy of the scheduling strategy for the real-time thread can be determined according to the real-time index of the real-time thread, and according to the adjustment strategy of the scheduling strategy for the real-time thread, the scheduling strategy of the real-time thread in the system configuration of the control terminal can be adjusted, so that the real-time index of the real-time thread in the adjusted control terminal is greatly improved, the interference of non-real-time threads on real-time threads is reduced, and the performance of the control terminal is improved accurately and efficiently.
[0142] In one embodiment, the optimization strategy includes a first adjustment strategy for the processor core running the real-time thread, referring to Fig.10 As shown, step 602 may include:
[0143] Step 1002, determining a first processor core from the processor cores, where the first processor core is used to run a real-time thread;
[0144] Step 1004, determining a third real-time indicator of the real-time thread when the real-time thread runs in the first processor core;
[0145] Step 1006: adjust the processor core of the real-time thread according to the third real-time indicator to obtain a first adjustment strategy for the processor core running the real-time thread.
[0146] In an embodiment of the present application, when the third real-time indicator satisfies the third adjustment condition, the first processor core is adjusted until the real-time indicator corresponding to the real-time thread does not satisfy the third adjustment condition when the real-time thread runs in the adjusted first processor core, and based on the adjusted first processor core, a first adjustment strategy for the processor core running the real-time thread is obtained.
[0147] In an embodiment of the present application, when the control terminal fails the detection, some processor cores can be isolated from the control terminal as the first processor core, which is only used for real-time threads to run, so that the real-time threads can be isolated from the non-real-time threads and are not interfered with by the non-real-time threads.
[0148] In the disclosed embodiment, the third adjustment condition may include: the real-time index of the real-time thread is less than the preset third real-time index threshold, or the real-time index of the real-time thread still has an upward trend and is not the maximum real-time index. Among them, the third real-time index threshold may be the same as the first real-time index threshold and the second real-time index threshold, or it may be different. In the case where the adjustment strategy for the processor core is determined after the scheduling strategy and / or the priority adjustment strategy, the third real-time index threshold is greater than the second real-time index threshold and / or the first real-time index threshold. On the contrary, the third real-time index threshold is less than the second real-time index threshold and / or the first real-time index threshold. The disclosed embodiment does not make specific limitations on this.
[0149] Exemplarily, several processor cores can be randomly isolated as the first processor core, and a real-time thread can be run in the first processor core to determine the third real-time index of the real-time thread. When the third real-time index does not meet the third adjustment condition, it can be considered that the real-time performance of the real-time thread meets the performance requirements and no adjustment is required. Therefore, the first processor core can be used as the first adjustment strategy for the processor core running the real-time thread; or, when the third real-time index meets the third adjustment condition, it can be considered that the real-time performance of the real-time thread does not meet the performance requirements and needs to be further adjusted. Therefore, the first processor core can be adjusted until the real-time index of the real-time thread does not meet the third adjustment condition when the real-time thread is run in the adjusted first processor core, and the adjusted first processor core is used as the first adjustment strategy for the processor core running the real-time thread.
[0150] like Fig.11 As shown, the first processor core includes CPU cores 1 to 3, that is, the real-time thread runs in the CPU cores 1-3, the non-real-time thread runs in the CPU cores 4 to max, and CPU core 0 is reserved for the real-time kernel of the operating system. At this time, the system stability can be ensured while the real-time thread and the non-real-time thread run on different CPU cores, which can avoid the interference of the non-real-time thread on the real-time thread. If the current real-time thread runs in the CPU core 1-3, and the corresponding third real-time index meets the third adjustment condition, the first CPU core can be further adjusted. After adjustment, the first CPU core includes CPU cores 1 to 5 or CPU cores 2 to 4. Continue to verify the adjusted first processor core according to the real-time index of the real-time thread until the real-time index of the real-time thread does not meet the third adjustment condition, and use the first processor core at this time as the first adjustment strategy for the processor core running the real-time thread.
[0151] According to the data processing method provided in the embodiment of the present application, when the control terminal fails the detection, the first adjustment strategy for the processor core of the real-time thread can be determined according to the real-time index of the real-time thread, and according to the first adjustment strategy for the processor core of the real-time thread, a first processor core that is only used for the real-time thread to run can be isolated for the real-time thread in the system configuration of the control terminal, which can reduce the interference of non-real-time threads on real-time threads, and can greatly improve the real-time index of the real-time thread in the adjusted control terminal, reduce the interference of non-real-time threads on real-time threads, and accurately and efficiently improve the performance of the control terminal.
[0152] In one embodiment, the optimization strategy also includes a second adjustment strategy for the processor core running the real-time thread, referring to Fig.12 As shown, step 602 may also include:
[0153] Step 1202, divide the real-time threads into a plurality of thread groups, each thread group including at least one real-time thread;
[0154] Step 1204, determining the processor core corresponding to each thread group from the first processor core;
[0155] Step 1206, running the real-time threads in each thread group in the processor core corresponding to each thread group, and obtaining a fourth real-time indicator corresponding to the real-time thread;
[0156] Step 1208: adjust the processor core of the real-time thread according to the fourth real-time indicator to obtain a second adjustment strategy for the processor core running the real-time thread.
[0157] In an embodiment of the present application, when the fourth real-time indicator satisfies the fourth adjustment condition, the processor core corresponding to each thread group is adjusted until the real-time indicator of the real-time thread after adjustment does not satisfy the fourth adjustment condition, and based on the adjusted thread groups and the processor cores corresponding to each thread group, a second adjustment strategy for the processor core running the real-time thread is obtained.
[0158] For example, after determining the first processor core for the real-time thread to run, the real-time thread can be divided into multiple thread groups, each thread group includes at least one real-time thread, and each thread group can run in the processor core designated for it in the first processor core to further reduce the impact between real-time threads.
[0159] For example, taking the magnetic resonance system as an example, the real-time threads can be divided into multiple thread groups according to the requirements of the magnetic resonance system and according to the priority, for example, divided into four levels of thread groups: V1, V2, V3, and V4, where V1 simulates the real-time threads related to magnetic resonance safety monitoring and may affect safety, with the first priority, V2 simulates the real-time threads in the magnetic resonance control scanning system that may cause system scanning failure, with the second priority, and V3 and V4 simulate the real-time threads that will not cause serious errors such as capturing ordinary error information in the magnetic resonance system, with the lowest priority. That is, the above-mentioned V1 has the highest priority and V4 has the lowest priority.
[0160] You can allocate a separate processor core for high-priority thread groups to run on, and allocate a shared processor core for multiple low-priority thread groups. Fig.13 As shown, the V1 and V2 thread groups can be divided into an exclusive processor core respectively, and the V3 and V4 thread groups can be divided into a shared processor core. After the real-time thread is divided into a designated processor core, the real-time thread can be run and the fourth real-time index of the real-time thread can be determined. It should be noted that the above-mentioned method of dividing thread groups according to priority is only used as an example in the embodiment of the present disclosure. In fact, any method for dividing thread groups is applicable to the embodiment of the present disclosure, and the method for dividing thread groups in the embodiment of the present disclosure is not specifically limited.
[0161] In the disclosed embodiment, the fourth adjustment condition may include: the real-time index of the real-time thread is less than the preset fourth real-time index threshold, or the real-time index of the real-time thread still has an upward trend and is not the maximum real-time index. Among them, the fourth real-time index threshold may be the same as the first real-time index threshold, the second real-time index threshold, and the third real-time index threshold, or it may be different. In the case where the adjustment of the processor core is performed after the adjustment of the scheduling strategy and / or priority, the fourth real-time index threshold is greater than the third real-time index threshold and / or the second real-time index threshold and / or the first real-time index threshold. On the contrary, the fourth real-time index threshold is less than the third real-time index threshold and / or the second real-time index threshold and / or the first real-time index threshold. The disclosed embodiment does not specifically limit this.
[0162] When the fourth real-time indicator does not meet the fourth adjustment condition, it can be considered that the real-time performance of the real-time thread meets the performance requirements and no adjustment is required, and the current thread groups and the processor cores corresponding to the thread groups are used as the second adjustment strategy for the processor cores running the real-time threads; or, when the fourth real-time indicator meets the fourth adjustment condition, it can be considered that the real-time performance of the real-time thread does not meet the performance requirements and needs to be further adjusted, so the processor cores corresponding to the thread groups can be adjusted until the real-time indicator of the real-time thread does not meet the fourth adjustment condition when the real-time thread in the corresponding thread group is running in the adjusted processor core, and the adjusted thread groups and the processor cores corresponding to the thread groups are used as the second adjustment strategy for the processor cores running the real-time threads.
[0163] It should be noted that the embodiments of the present disclosure do not specifically limit the manner of adjusting the processor cores corresponding to each thread group.
[0164] According to the data processing method provided by the embodiment of the present disclosure, when the control terminal fails to pass the detection, a second adjustment strategy for the processor core of the real-time thread can be determined according to the real-time index of the real-time thread, and according to the second adjustment strategy for the processor core of the real-time thread, a corresponding processor core is specified for the thread group to which each real-time thread belongs in the system configuration of the control terminal, so that the real-time threads in each thread group run in the corresponding processor core, which can reduce the interference between the real-time threads, and can greatly improve the real-time index of the real-time thread in the adjusted control terminal, reduce the interference of non-real-time threads on the real-time threads, and accurately and efficiently improve the performance of the control terminal.
[0165] In order to enable those skilled in the art to better understand the embodiments of the present disclosure, the embodiments of the present disclosure are described below through specific examples.
[0166] In this example, the execution parameter includes the number of executions, and the control terminal is the magnetic resonance control terminal in the magnetic resonance scanning system. RN real-time threads are simulated to be started in the control terminal, where RN is the number of real-time threads actually running in the control terminal, and the first number of executions of the real-time threads in the unit time W is counted. N non-real-time threads are simulated to be started in the control terminal, where N is the number of non-real-time threads actually running in the control terminal, and the second number of executions of the real-time threads in the unit time W is counted. The real-time index of the real-time thread is determined according to the first number of executions and the second number of executions, and the performance detection of the control terminal is performed according to the real-time index.
[0167] If the control terminal fails the test, refer to Fig.14As shown, the adjustment strategy for the system configuration of the control terminal can be determined within S seconds, including at least one of the following adjustment strategies: real-time scheduling optimization of real-time threads, including: an adjustment strategy for optimizing the priority of real-time thread scheduling and an adjustment strategy for optimizing the scheduling strategy; optimization of processor cores running real-time threads, including: adjusting system parameter configuration, isolating some processor cores, and obtaining an adjustment strategy for the first processor core that is only for real-time threads to run; optimization of designated processor cores for each real-time thread, including: an adjustment strategy for specifying the CPU core to which each real-time thread is bound from the first processor core.
[0168] The data processing method provided by the embodiment of the present disclosure can optimize the interference of non-real-time threads on the real-time performance of real-time threads, optimize the interference of real-time threads with each other on real-time performance, and obtain the optimal system configuration solution for the real-time system of the control terminal to be detected, so as to guide the software development of the magnetic resonance scanning system, and provide accurate quantitative optimization standards, so as to be able to detect and optimize the control terminal without relying on the detection environment such as the magnetic resonance scanning system.
[0169] It should be understood that although Figure 1-14 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-14 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0170] In one embodiment, Fig.15 As shown, a data processing device is provided, including: a first determination module 1502, a second determination module 1504, a third determination module 1506 and a fourth determination module 1508, wherein:
[0171] A first determining module 1502, configured to determine a first execution parameter of the real-time thread within a unit time when only the real-time thread is running in the control terminal;
[0172] A second determination module 1504 is used to determine a second execution parameter of the real-time thread within the unit time when the real-time thread and the non-real-time thread are running in the control terminal;
[0173] A third determining module 1506 is used to determine a real-time index of the real-time thread according to the first execution parameter and the second execution parameter, wherein the real-time index is used to characterize the influence degree of the non-real-time thread on the real-time thread;
[0174] The fourth determination module 1508 is used to determine the detection result for the control terminal according to the real-time indicator.
[0175] The above-mentioned data processing device, when a real-time thread is running in the control terminal, determines the first execution parameter of the real-time thread in a unit time, and when a real-time thread and a non-real-time thread are running in the control terminal, determines the second execution parameter of the real-time thread in a unit time, and determines the real-time index of the real-time thread according to the first execution parameter and the second execution parameter, and the real-time index is used to characterize the degree of influence of the non-real-time thread on the real-time thread. Furthermore, the detection result for the control terminal can be determined according to the real-time index. The data processing device provided by the embodiment of the present disclosure detects the performance of the control terminal through the real-time index of the real-time thread, which not only provides an accurate quantitative qualification standard, but also does not need to actually run the detection in a real scene, reduces the dependence on the detection environment, and improves the detection efficiency and detection accuracy.
[0176] In one embodiment, the execution parameters include execution times and / or execution duration.
[0177] In one embodiment, the device may further include:
[0178] A fifth determination module, configured to determine an optimization strategy for the control terminal system configuration according to the real-time index of the real-time thread when the detection result indicates that the detection has not been passed;
[0179] The optimization module is used to optimize the system configuration of the control terminal according to the optimization strategy.
[0180] In one of the embodiments, the optimization strategy includes at least one of an adjustment strategy for the priority of the real-time thread, an adjustment strategy for the scheduling strategy of the real-time thread, and an adjustment strategy for the processor core running the real-time thread.
[0181] In one embodiment, the optimization strategy includes an adjustment strategy for the priority of the real-time thread, and the fifth determination module is further used to:
[0182] Adjusting the priority of the real-time thread to obtain the adjusted first priority of the real-time thread;
[0183] Determining a first real-time indicator of the real-time thread according to the first priority of the real-time thread;
[0184] According to the first real-time indicator, the priority of the real-time thread is adjusted to obtain an adjustment strategy for the priority of the real-time thread.
[0185] In one embodiment, the optimization strategy includes an adjustment strategy for the scheduling strategy of the real-time thread, and the fifth determination module is further used to:
[0186] Adjusting the scheduling policy of the real-time thread to obtain a first adjustment policy of the real-time thread;
[0187] Determine a second real-time indicator corresponding to the real-time thread under the first scheduling strategy;
[0188] The scheduling strategy of the real-time thread is adjusted according to the second real-time index to obtain an adjustment strategy for the scheduling strategy of the real-time thread. In one embodiment, the optimization strategy includes a first adjustment strategy for the processor core running the real-time thread, and the fifth determination module is further used to:
[0189] Determine a first processor core from the processor cores, where the first processor core is used to run the real-time thread;
[0190] determining a third real-time indicator of the real-time thread when the real-time thread runs in the first processor core;
[0191] The processor core of the real-time thread is adjusted according to the third real-time index to obtain a first adjustment strategy for the processor core running the real-time thread.
[0192] In one embodiment, the optimization strategy further includes a second adjustment strategy for the processor core running the real-time thread, and the fifth determination module is further configured to:
[0193] Dividing the real-time threads into a plurality of thread groups, each of the thread groups including at least one real-time thread;
[0194] Determining the processor cores corresponding to the thread groups from the first processor cores;
[0195] Running the real-time threads in each of the thread groups in the processor cores corresponding to the thread groups to obtain a fourth real-time indicator corresponding to the real-time threads;
[0196] The processor core of the real-time thread is adjusted according to the fourth real-time index to obtain a second adjustment strategy for the processor core running the real-time thread.
[0197] For the specific definition of the data processing device, please refer to the definition of the data processing method above, which will not be repeated here. Each module in the above data processing device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0198] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.16 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data processing method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0199] Those skilled in the art will understand that Fig.16 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0200] In one embodiment, a magnetic resonance device is further provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0201] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0202] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0203] 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.
[0204] 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 scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, 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. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A data processing method, characterized in that: Applied to a control terminal, the method comprises: In the case where only the real-time thread is running in the control terminal, determining a first execution parameter of the real-time thread within a unit time; When the real-time thread and the non-real-time thread are running in the control terminal, determining a second execution parameter of the real-time thread within the unit time; Determining the real-time index of the real-time thread according to the first execution parameter and the second execution parameter, including: obtaining the real-time index of the real-time thread according to the ratio of the first execution parameter to the second execution parameter, or obtaining the real-time index of the real-time thread according to the ratio of the second execution parameter to the first execution parameter; the real-time index is used to characterize the influence of the non-real-time thread on the real-time thread; The detection result for the control terminal is determined according to the real-time index, including: when the real-time index is larger, it means that the influence of the non-real-time thread on the real-time thread is smaller, if the real-time index is greater than or equal to the real-time index threshold, a first detection result is obtained to indicate that the control terminal has passed the detection; when the real-time index is larger, it means that the influence of the non-real-time thread on the real-time thread is greater, if the real-time index is greater than or equal to the real-time index threshold, a second detection result is obtained to indicate that the control terminal has not passed the detection.
2. The method according to claim 1, characterized in that The execution parameters include the number of executions and / or the execution duration.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: In the case where the detection result indicates that the detection has not been passed, determining an optimization strategy for the control terminal system configuration according to the real-time index of the real-time thread; According to the optimization strategy, the system configuration of the control terminal is optimized.
4. The method according to claim 3, characterized in that The optimization strategy includes at least one of an adjustment strategy for the priority of the real-time thread, an adjustment strategy for the scheduling strategy of the real-time thread, and an adjustment strategy for the processor core running the real-time thread.
5. The method according to claim 3 or 4, characterized in that: The optimization strategy includes an adjustment strategy for the priority of the real-time thread, and the optimization strategy for the control terminal system configuration is determined according to the real-time index of the real-time thread, including: Adjusting the priority of the real-time thread to obtain the adjusted first priority of the real-time thread; Determining a first real-time indicator of the real-time thread according to the first priority of the real-time thread; According to the first real-time indicator, the priority of the real-time thread is adjusted to obtain an adjustment strategy for the priority of the real-time thread.
6. The method according to claim 3 or 4, characterized in that: The optimization strategy includes an adjustment strategy for the scheduling strategy of the real-time thread, and the optimization strategy for the control terminal system configuration is determined according to the real-time index of the real-time thread, including: Adjusting the scheduling policy of the real-time thread to obtain a first scheduling policy of the real-time thread; Determine a second real-time indicator corresponding to the real-time thread under the first scheduling strategy; The scheduling policy of the real-time thread is adjusted according to the second real-time indicator to obtain an adjustment policy for the scheduling policy of the real-time thread.
7. The method according to claim 3 or 4, characterized in that: The optimization strategy includes a first adjustment strategy for a processor core running the real-time thread, and the optimization strategy for the control terminal system configuration is determined according to the real-time index of the real-time thread, including: Determine a first processor core from the processor cores, where the first processor core is used to run the real-time thread; determining a third real-time indicator of the real-time thread when the real-time thread runs in the first processor core; The processor core of the real-time thread is adjusted according to the third real-time index to obtain a first adjustment strategy for the processor core running the real-time thread.
8. The method according to claim 7, characterized in that The optimization strategy also includes a second adjustment strategy for the processor core running the real-time thread, and the optimization strategy for the control terminal system configuration is determined according to the real-time index of the real-time thread, and further includes: Dividing the real-time threads into a plurality of thread groups, each of the thread groups including at least one real-time thread; Determining the processor cores corresponding to the thread groups from the first processor cores; Running the real-time threads in each of the thread groups in the processor cores corresponding to the thread groups to obtain a fourth real-time indicator corresponding to the real-time threads; The processor core of the real-time thread is adjusted according to the fourth real-time index to obtain a second adjustment strategy for the processor core running the real-time thread.
9. A data processing device, characterized in that: Applied to a control terminal, the device comprises: A first determining module, configured to determine a first execution parameter of the real-time thread within a unit time when only the real-time thread is running in the control terminal; A second determination module, configured to determine a second execution parameter of the real-time thread within the unit time when the real-time thread and the non-real-time thread are running in the control terminal; a third determination module, configured to determine the real-time index of the real-time thread according to the first execution parameter and the second execution parameter, including: obtaining the real-time index of the real-time thread according to the ratio of the first execution parameter to the second execution parameter, or obtaining the real-time index of the real-time thread according to the ratio of the second execution parameter to the first execution parameter; the real-time index is used to characterize the influence degree of the non-real-time thread on the real-time thread; The fourth determination module is used to determine the detection result for the control terminal according to the real-time index, including: when the real-time index is larger, it means that the influence of the non-real-time thread on the real-time thread is smaller, if the real-time index is greater than or equal to the real-time index threshold, a first detection result is obtained to indicate that the control terminal has passed the detection; when the real-time index is larger, it means that the influence of the non-real-time thread on the real-time thread is greater, if the real-time index is greater than or equal to the real-time index threshold, a second detection result is obtained to indicate that the control terminal has not passed the detection.
10. A magnetic resonance device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Multi-thread processor
CN103778016A
Batch data processing method and device, computer equipment and storage medium
CN110297711A