CN113900789A - Data processing method, data processing device, magnetic resonance equipment and storage medium - Google Patents

Data processing method, data processing device, magnetic resonance equipment and storage medium Download PDF

Info

Publication number
CN113900789A
CN113900789A CN202111333144.5A CN202111333144A CN113900789A CN 113900789 A CN113900789 A CN 113900789A CN 202111333144 A CN202111333144 A CN 202111333144A CN 113900789 A CN113900789 A CN 113900789A
Authority
CN
China
Prior art keywords
real
time
thread
time thread
control terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111333144.5A
Other languages
Chinese (zh)
Inventor
李建华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen United Imaging Research Institute of Innovative Medical Equipment
Original Assignee
Shenzhen United Imaging Research Institute of Innovative Medical Equipment
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen United Imaging Research Institute of Innovative Medical Equipment filed Critical Shenzhen United Imaging Research Institute of Innovative Medical Equipment
Priority to CN202111333144.5A priority Critical patent/CN113900789A/en
Publication of CN113900789A publication Critical patent/CN113900789A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R33/00Arrangements or instruments for measuring magnetic variables
    • G01R33/20Arrangements or instruments for measuring magnetic variables involving magnetic resonance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5066Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a data processing method, a data processing device, a magnetic resonance equipment and a storage medium. The method comprises the following steps: under the condition that only a real-time thread runs in the control terminal, determining a first execution parameter of the real-time thread in unit time; under the condition that the real-time thread and the non-real-time thread run in the control terminal, determining a second execution parameter of the real-time thread in the unit time; 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 for representing the influence degree of the non-real-time thread on the real-time thread; and determining a detection result aiming at the control terminal according to the real-time index. The method can improve the detection efficiency.

Description

Data processing method, data processing device, magnetic resonance equipment and storage medium
Technical Field
The present application relates to the field of magnetic resonance technology, and in particular, to a data processing method and apparatus, a magnetic resonance device, and a storage medium.
Background
In a magnetic resonance scanning system, a real-time operating system running on a control terminal (generally, a computer) of the magnetic resonance scanning system is mainly responsible for controlling real-time tasks related to sequence timing. The real-time threads corresponding to a plurality of real-time tasks and a large number of non-real-time threads corresponding to non-real-time tasks need to be started and operated simultaneously in the scanning process on the control terminal, and the real-time performance of the real-time threads can be influenced by the real-time threads and the non-real-time threads.
In the scanning process, if the real-time performance of the control terminal is poor, that is, when the real-time performance of the real-time thread is affected, unpredictable abnormality may occur in the real-time operating system, which may cause scanning failure and reduce user experience, and therefore, the real-time performance in the control terminal needs to be detected.
In the related art, the control terminal is placed in a complete magnetic resonance scanning system to operate, and real-time performance passing detection can be calculated without real-time system abnormity continuously within a specified time (for example, three months). However, the method has high dependence on detection environment and has no accurate quantification qualification standard.
Disclosure of Invention
In view of the above, it is necessary to provide a data processing method, an apparatus, a magnetic resonance device, and a storage medium capable of eliminating the dependence of the control terminal on the detection environment during the detection process.
A data processing method is applied to a control terminal, and comprises the following steps:
under the condition that only a real-time thread runs in the control terminal, determining a first execution parameter of the real-time thread in unit time;
under the condition that the real-time thread and the non-real-time thread run in the control terminal, determining a second execution parameter of the real-time thread in the unit time;
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 for representing the influence degree of the non-real-time thread on the real-time thread;
and determining a detection result aiming at the control terminal according to the real-time index.
In one embodiment, the execution parameters include the number of executions and/or the execution duration.
In one embodiment, the method further comprises:
determining an optimization strategy configured for the control terminal system according to the real-time index of the real-time thread under the condition that the detection result represents that the detection fails;
and optimizing the system configuration of the control terminal according to the optimization strategy.
In one embodiment, the optimization policy includes at least one of an adjustment policy for a priority of the real-time thread, an adjustment policy for a scheduling policy of the real-time thread, and an adjustment policy for a processor core running the real-time thread.
In one embodiment, the determining the optimization policy configured for the control terminal system according to the real-time performance indicator of the real-time thread includes:
adjusting the priority of the real-time thread to obtain a first priority of the adjusted real-time thread;
determining a first real-time index of the real-time thread according to the first priority of the real-time thread;
and adjusting the priority of the real-time thread according to the first real-time index to obtain an adjustment strategy aiming at the priority of the real-time thread.
In one embodiment, the determining the optimization policy configured for the control terminal system according to the real-time performance indicator of the real-time thread includes:
adjusting the scheduling strategy of the real-time thread to obtain a first adjustment strategy of the real-time thread;
determining a second real-time index corresponding to the real-time thread under the first scheduling strategy;
and adjusting the scheduling strategy of the real-time thread according to the second real-time index to obtain an adjustment strategy aiming at the scheduling strategy of the real-time thread.
In one embodiment, the determining the optimization policy configured for the control terminal system according to the real-time performance indicator of the real-time thread includes:
determining a first processor core from processor cores, wherein the first processor core is used for running the real-time thread;
determining a third real-time index of the real-time thread when the real-time thread runs in the first processor core;
and adjusting the processor core of the real-time thread according to the third real-time index to obtain a first adjustment strategy aiming at the processor core running the real-time thread.
In one embodiment, the optimization policy further includes a second adjustment policy for a processor core running the real-time thread, and the determining the optimization policy configured for the control terminal system according to the real-time performance indicator of the real-time thread further includes:
dividing the real-time threads into a plurality of thread groups, wherein each thread group comprises at least one real-time thread;
determining a processor core corresponding to each thread group from the first processor cores;
running the real-time threads in each thread group in the CPU core corresponding to each thread group to obtain a fourth real-time index corresponding to the real-time threads;
and adjusting the processor core of the real-time thread according to the fourth real-time index to obtain a second adjustment strategy aiming at the processor core running the real-time thread.
A data processing device applied to a control terminal comprises:
the first determining module is used for determining a first execution parameter of the real-time thread in unit time under the condition that only the real-time thread runs in the control terminal;
the second determining module is used for determining a second execution parameter of the real-time thread in the unit time under the condition that the real-time thread and the non-real-time thread run in the control terminal;
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, where the real-time index is used to represent an influence degree of the non-real-time thread on the real-time thread;
and the fourth determination module is used for determining a detection result aiming at the control terminal according to the real-time performance index.
In one embodiment, the execution parameters include the number of executions and/or the execution duration. In one embodiment, the apparatus further comprises:
a fifth determining module, configured to determine, according to a real-time index of the real-time thread, an optimization strategy configured for the control terminal system when the detection result indicates that the detection fails;
and the optimization module is used for optimizing the system configuration of the control terminal according to the optimization strategy.
In one embodiment, the optimization policy includes at least one of an adjustment policy for a priority of the real-time thread, an adjustment policy for a scheduling policy of the real-time thread, and an adjustment policy for a processor core running the real-time thread.
In one embodiment, the optimization policy includes an adjustment policy for the priority of the real-time thread, and the fifth determining module is further configured to:
adjusting the priority of the real-time thread to obtain a first priority of the adjusted real-time thread;
determining a first real-time index of the real-time thread according to the first priority of the real-time thread;
and adjusting the priority of the real-time thread according to the first real-time index to obtain an adjustment strategy aiming at the priority of the real-time thread.
In one embodiment, the optimization policy includes an adjustment policy of a scheduling policy for the real-time thread, and the fifth determining module is further configured to:
adjusting the scheduling strategy of the real-time thread to obtain a first adjustment strategy of the real-time thread;
determining a second real-time index corresponding to the real-time thread under the first scheduling strategy;
and adjusting the scheduling strategy of the real-time thread according to the second real-time index to obtain an adjustment strategy aiming at the scheduling strategy of the real-time thread.
In one embodiment, the optimization policy includes a first adjustment policy for a processor core running the real-time thread, and the fifth determining module is further configured to:
determining a first processor core from processor cores, wherein the first processor core is used for running the real-time thread;
determining a third real-time index of the real-time thread when the real-time thread runs in the first processor core;
and adjusting the processor core of the real-time thread according to the third real-time index to obtain a first adjustment strategy aiming at the processor core running the real-time thread.
In one embodiment, the optimization policy further includes a second adjustment policy for a processor core running the real-time thread, and the fifth determining module is further configured to:
dividing the real-time threads into a plurality of thread groups, wherein each thread group comprises at least one real-time thread;
determining a processor core corresponding to each thread group from the first processor cores;
running the real-time threads in each thread group in the processor core corresponding to each thread group to obtain a fourth real-time index corresponding to the real-time threads;
and adjusting the processor core of the real-time thread according to the fourth real-time index to obtain a second adjustment strategy aiming at the processor core running the real-time thread.
A magnetic resonance apparatus comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
under the condition that only a real-time thread runs in the control terminal, determining a first execution parameter of the real-time thread in unit time;
under the condition that the real-time thread and the non-real-time thread run in the control terminal, determining a second execution parameter of the real-time thread in the unit time;
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 for representing the influence degree of the non-real-time thread on the real-time thread;
and determining a detection result aiming at the control terminal according to the real-time index.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
under the condition that only a real-time thread runs in the control terminal, determining a first execution parameter of the real-time thread in unit time;
under the condition that the real-time thread and the non-real-time thread run in the control terminal, determining a second execution parameter of the real-time thread in the unit time;
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 for representing the influence degree of the non-real-time thread on the real-time thread;
and determining a detection result aiming at the control terminal according to the real-time index.
According to the data processing method, the data processing device, the magnetic resonance equipment and the storage medium, under the condition that only the real-time thread runs in the control terminal, a first execution parameter of the real-time thread in unit time is determined, under the condition that the real-time thread and the non-real-time thread run in the control terminal, a second execution parameter of the real-time thread in unit time is determined, and according to the first execution parameter and the second execution parameter, a real-time index of the real-time thread is determined, wherein the real-time index is used for representing the influence degree of the non-real-time thread on the real-time thread. Further, the detection result for the control terminal may be determined according to a real-time index. According to the data processing method and device, the magnetic resonance equipment and the storage medium, the performance of the control terminal is detected through the real-time index of the real-time thread, so that the accurate quantitative qualified standard is provided, the actual operation detection in a real scene is not needed, the dependence on a detection environment is reduced, and the detection efficiency and the detection precision are improved.
Drawings
FIG. 1 is a flow diagram illustrating a data processing method according to one embodiment;
FIG. 2 is a diagram of an application environment of a data processing method in one embodiment;
FIGS. 3 a-3 b are schematic diagrams of a data processing method according to an embodiment;
FIG. 4 is a diagram illustrating a data processing method according to an embodiment;
FIG. 5 is a diagram illustrating a data processing method according to an embodiment;
FIG. 6 is a flow diagram illustrating a data processing method according to one embodiment;
FIG. 7 is a flow diagram illustrating a data processing method according to one embodiment;
FIG. 8 is a diagram illustrating a data processing method according to an embodiment;
FIG. 9 is a flow diagram illustrating a data processing method according to one embodiment;
FIG. 10 is a flow diagram illustrating a data processing method according to one embodiment;
FIG. 11 is a diagram illustrating a data processing method according to an embodiment;
FIG. 12 is a flow diagram that illustrates a data processing method according to one embodiment;
FIG. 13 is a diagram illustrating a data processing method according to an embodiment;
FIG. 14 is a diagram illustrating a data processing method according to an embodiment;
FIG. 15 is a block diagram showing the structure of a data processing apparatus according to an embodiment;
FIG. 16 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In one embodiment, as shown in fig. 1, a data processing method is provided, which is applied in a control terminal, and a block diagram of the control terminal can be referred to fig. 2. In this embodiment, the method includes the steps of:
and 102, under the condition that only the real-time thread runs in the control terminal, determining a first execution parameter of the real-time thread in unit time.
For example, the control terminal may be a terminal device capable of running a real-time thread and a non-real-time thread simultaneously, such as a magnetic resonance control terminal in a magnetic resonance scanning system, and the control terminal is generally a computer device. In the embodiment of the application, the same real-time threads can be simulated and operated in the control terminal according to the real-time threads actually operated by the control terminal in the real scene, and the number of the simulated real-time threads is the same as that of the real-time threads actually operated. For example, in the magnetic resonance scanning system, the real-time threads may include real-time threads for reconstruction, sequence scanning, preprocessing, rectification, and the like, and then the real-time threads for reconstruction, sequence scanning, preprocessing, rectification, and the like may be simulated correspondingly. A first execution parameter per unit time of the real-time thread may be determined, where the real-time thread is not interfered by the non-real-time thread (for example, the operation of the thread may be as shown in fig. 3a, where RN is the number of real-time threads). The unit time may be a preset time value, for example: 1 minute, etc., and the specific value of the unit time is not particularly limited in the embodiment of the present application.
In one embodiment, the execution parameters may include a number of executions and/or a length of execution time.
For example, in the case that the execution parameter includes the execution times, referring to fig. 4, each simulated real-time thread may be started in the control terminal, the execution times of any real-time thread in the unit time may be counted, and an average value of the execution times of each real-time thread in the unit time may be used as the first execution times of the real-time thread in the unit time. For example: if the number of the real-time threads is 5, the number of times of execution of the 5 real-time threads in unit time (a1, a2, A3, a4, a5) may be counted, and an average ((a1+ a2+ A3+ a4+ a5)/5) of the number of times of execution of the 5 real-time threads in unit time is determined, which is the first number of times of execution of the real-time threads in unit time.
Alternatively, a statistical time period may be preset, the statistical time period being composed of a plurality of unit times. The execution times of each real-time thread in the statistical time length can be counted, and after the average value of the execution times of each real-time thread in the statistical time length in unit time is determined, the average value of the execution times of each real-time thread in unit time is determined and serves as the first execution times of the real-time thread in unit time. For example: if the unit time is 1 minute, the statistical time duration is 5 minutes, and the number of the real-time threads is 5, then the average of the number of execution times of the 5 real-time threads in the unit time may be counted respectively (B1, B2, B3, B4, and B5), taking B1 as an example, if the number of execution times of the real-time thread 1 corresponding to B1 in the statistical time duration is C1, then the average of the number of execution times of the real-time thread 1 in the unit time B1 is equal to (C1/5).
For example, in the case that the execution parameter includes an execution duration, each simulated real-time thread may be started in the control terminal, for any real-time thread, the elapsed time of the real-time thread executed once in a unit time may be counted, and an average value of the elapsed times of the real-time threads executed once in the unit time may be used as the first execution duration of the real-time thread in the unit time. For example: if the number of the real-time threads is 5, the execution time lengths of the 5 real-time threads in the unit time (a1, a2, A3, a4, a5) can be respectively counted, and an average ((a1+ a2+ A3+ a4+ a5)/5) of the execution time lengths of the 5 real-time threads in the unit time is determined, which is the first execution time length of the real-time threads in the unit time.
Alternatively, a statistical time period may be preset, the statistical time period being composed of a plurality of unit times. After the average value of the execution time length of each real-time thread in the unit time in the statistical time length is determined, the average value of the execution time length of each real-time thread in the unit time is determined and used as the first execution time length of the real-time thread in the unit time. For example: if the unit time is 1 minute, the statistical time duration is 5 minutes, and the number of the real-time threads is 5, then the average value of the execution time durations of the 5 real-time threads in the unit time may be respectively counted (D1, D2, D3, D4, D5), taking D1 as an example, the execution time duration of the real-time thread 1 corresponding to D1 in the statistical time duration is F1, and then the average value of the execution time durations of the real-time threads 1 in the unit time D1 is equal to (F1/5).
It should be noted that, in the embodiments of the present application, the execution parameter may include the execution times and/or the execution duration, and in the following embodiments, the embodiments of the present application are all described by taking the example that the execution parameter includes the execution times.
And 104, determining a second execution parameter of the real-time thread in unit time under the condition that the real-time thread and the non-real-time thread run in the terminal under control.
For example, after determining the first execution parameter of the real-time thread, the non-real-time thread may be continuously started in the control terminal, that is, the real-time thread and the non-real-time thread are simultaneously run in the control terminal (for example, the running condition of the thread at this time may be as shown in fig. 3b, where N is the number of the non-real-time threads), and the real-time thread is interfered by the non-real-time thread at this time, so as to determine the second execution parameter of the real-time thread in the unit time. The same number of non-real-time threads can be simulated to run in the control terminal according to the number of the non-real-time threads actually run in the real scene by the control terminal (in the embodiment of the present disclosure, the non-real-time threads can be simulated through fourier operation). The number of the non-real-time threads actually operated by the control terminal can be obtained from a log generated by the control terminal executing a target task in a real scene, and under the condition that a plurality of logs exist, the number of the non-real-time threads needing to be simulated can be determined by carrying out weighted summation, or averaging, or taking a maximum value and the like on the number of the non-real-time threads in the plurality of logs.
For example, each real-time thread and each non-real-time thread may be started in the control terminal, and the statistical process of the first execution parameter may be referred to for the statistical process of the second execution parameter of the real-time thread, which is not described herein again in the embodiments of the present disclosure.
Referring to fig. 5, in the process of running the non-real-time thread, when the running of the non-real-time thread is finished, the non-real-time thread may sleep for a period of time, where the sleep time may be determined according to the shortest sleep time of the non-real-time thread in the control terminal. And after the real-time thread is dormant, if the running time does not reach the statistical time, repeating the processes of running the non-real-time thread and the dormancy until the running time reaches the statistical time, and performing statistics to obtain a second execution parameter of the real-time thread in unit time.
And 106, 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 for representing the influence degree of the non-real-time thread on the real-time thread.
For example, the real-time performance indicator of the real-time thread may be obtained by determining a ratio between the first execution parameter and the second execution parameter. For example, the ratio of the first execution parameter to the second execution parameter may be determined as a real-time index of the real-time thread, where the larger the real-time index is, the smaller the influence of the non-real-time thread on the real-time thread is, and conversely, the smaller the real-time index is, the larger the influence of the non-real-time thread on the real-time thread is.
Or, it may also be determined that the ratio of the second execution parameter to the first execution parameter is a real-time index of the real-time thread, where the larger the real-time index is, the larger the influence of the non-real-time thread on the real-time thread is, and conversely, the smaller the real-time index is, the smaller the influence of the non-real-time thread on the real-time thread is. In the embodiment of the present disclosure, a real-time performance index is taken as an example of a ratio of a first execution parameter to a second execution parameter, and the real-time performance index is described in the present disclosure.
For example, in the case that the execution parameter includes the execution times, it may be determined that a ratio of the first execution times to the second execution times is a real-time index of the real-time thread; or, in the case that the execution parameter includes an execution duration, determining that a ratio of the first execution duration to the second execution duration is a real-time index of the real-time thread; or, under the condition that the execution parameter includes the execution times and the execution duration, a first ratio of the first execution times to the second execution times and a second ratio of the first execution duration to the second execution duration may be determined, a real-time index of the real-time thread is obtained according to a weighted sum of the first ratio and the second ratio, and weights for the first ratio and the second ratio may be preset, which is not limited in this embodiment of the application.
And step 108, determining a detection result aiming at the control terminal according to the real-time index.
For example, after obtaining the real-time index of the real-time thread, the detection result for the control terminal may be determined according to the real-time index. For example, when the real-time index is greater than or equal to the real-time index threshold, a first detection result for the control terminal may be obtained, where the first detection result may be used to represent that the control terminal passes detection, that is, to determine that the performance of the control terminal reaches the standard; or, under the condition that the real-time index is smaller than the real-time index threshold, a second detection result for the control terminal may be obtained, and the second detection result may be used to represent that the control terminal fails to detect, that is, it is determined that the performance of the control terminal does not reach the standard.
It should be noted that the real-time index threshold may be a preset value close to 1, and a specific value may be set by a user according to a detection precision requirement, which is not specifically limited in the embodiment of the present disclosure.
In the embodiment of the disclosure, under the condition that only a real-time thread runs in a control terminal, a first execution parameter of the real-time thread in unit time is determined, under the condition that the real-time thread and a non-real-time thread run in the control terminal, a second execution parameter of the real-time thread in unit time is determined, and according to the first execution parameter and the second execution parameter, a real-time index of the real-time thread is determined, wherein the real-time index is used for representing the influence degree of the non-real-time thread on the real-time thread. Further, the detection result for the control terminal may be determined according to the real-time index. The data processing method provided by the embodiment of the disclosure detects the performance of the control terminal through the real-time index of the real-time thread, not only provides an accurate quantitative qualified standard, but also does not need to actually operate the control terminal in a real scene for detection, reduces the dependence on a detection environment, and improves the detection efficiency and the detection precision.
In one embodiment, as shown in fig. 6, the method may further include:
step 602, determining an optimization strategy for controlling terminal system configuration according to the real-time index of the real-time thread under the condition that the detection result representation fails in detection;
and step 604, optimizing the system configuration of the control terminal according to the optimization strategy.
For example, when the detection result indicates that the control terminal fails to perform the detection, an optimization strategy for the system configuration of the control terminal may be determined according to the real-time performance 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 in the control terminal to the real-time thread can be reduced, namely, the real-time index of the real-time thread of the control terminal is improved, so that the real-time index of the real-time thread is greater than or equal to the real-time index threshold.
In one possible implementation, the optimization policy includes at least one of an adjustment policy for a priority of the real-time thread, an adjustment policy for a scheduling policy of the real-time thread, and an adjustment policy for a processor core (i.e., CPU core) running the real-time thread.
The adjustment policy for the priority of the real-time thread may include a scheme for adjusting the priority of each real-time thread, the adjustment policy for the scheduling policy of the real-time thread may include a scheme for adjusting the scheduling policy corresponding to each real-time thread, and the adjustment policy for the processor core running the real-time thread may include a scheme for adjusting the processor core running each real-time thread.
In the embodiment of the present disclosure, the optimization strategy may include at least one of the foregoing adjustment strategies, and when the optimization strategy includes a plurality of adjustment strategies, each adjustment strategy may be determined in parallel, or may be determined in series, and when each adjustment strategy is determined in series, the embodiment of the present disclosure does not specifically limit the order of determination of each adjustment strategy.
According to the data processing method provided by the embodiment of the disclosure, under the condition that the detection result represents that the control terminal fails to pass the detection, the optimization strategy for the control terminal system configuration can be automatically determined according to the real-time index of the real-time thread, and the control terminal system configuration is optimized according to the optimization strategy, so that the real-time performance of the real-time thread in the control terminal can be accurately improved, the performance of the control terminal is improved, and the optimization efficiency for the control terminal is improved.
In one embodiment, the optimization policy includes an adjustment policy for the priority of the real-time thread, as shown in fig. 7, step 602 may include:
step 702, adjusting the priority of the real-time thread to obtain a first adjusted priority of the real-time thread;
step 704, determining a first real-time index of the real-time thread according to the first priority of the real-time thread;
step 706, according to the first real-time performance index, adjusting the priority of the real-time thread to obtain an adjustment strategy for the priority of the real-time thread.
In the embodiment of the application, under the condition that the first real-time index meets the first adjusting condition, the priority of the real-time thread is adjusted until the real-time index corresponding to the real-time thread under the adjusted second priority does not meet the first adjusting condition, and an adjusting strategy aiming at the priority of the real-time thread is obtained according to the second priority of the real-time thread; or, under the condition that the first real-time performance index does not meet the first adjusting condition, obtaining an adjusting strategy aiming at the priority of the real-time thread according to the first priority of the real-time thread.
In the embodiment of the present disclosure, when the control terminal fails to detect, the priority of the real-time thread may be adjusted, and after the adjustment, the priority of the real-time thread is a first priority, where the first priority may include a priority corresponding to each real-time thread.
For example, in the process of adjusting the priority of each real-time thread, the priority may be adjusted according to the importance degree of the real-time task corresponding to each real-time thread, for example: in each adjustment process, the higher the importance degree, the larger the priority adjustment amplitude of the real-time thread corresponding to the real-time task is, and conversely, the lower the importance degree, the smaller the priority adjustment amplitude of the real-time thread corresponding to the real-time task is.
Or, in the process of adjusting the priority of each real-time thread, the priority adjustment amplitude of each real-time thread is the same, and is adjusted to a fixed value each time, where the fixed value is a preset value, or may be a value determined according to a dichotomy, that is, after the priority adjustment amplitude space is determined, the dichotomy is adopted to determine the adjusted value from the adjustment amplitude space.
Or, the priority of each real-time thread may be adjusted until the second execution parameter of the real-time thread is not increased after the adjustment, and then the priority interval in which each real-time thread is currently located may be determined to be the most appropriate priority interval, and the priority of each real-time thread may be adjusted within the priority interval. For example, referring to fig. 8, as the priority of the real-time thread is adjusted, the interference of the non-real-time thread on the real-time thread in real-time performance is smaller and smaller, the real-time performance indicator of the real-time thread gradually approaches 1, and when the improvement of the priority cannot improve the second execution parameter (as shown in the above "dashed line 802"), it is indicated that "dashed line 802 to dashed line 804" (the dashed line 804 indicates the highest priority) is the interval most suitable for the priority of the real-time thread.
It should be noted that, in the embodiment of the present disclosure, a manner of adjusting the priority is not particularly limited.
In an embodiment of the present disclosure, the first adjustment condition may include: the real-time index of the real-time thread is smaller than a preset first real-time index threshold value, or the real-time index of the real-time thread still has an ascending trend and is not the maximum real-time index.
After the priority of each real-time thread is adjusted, each real-time thread may be rerun, and a first execution parameter and a second execution parameter of the real-time thread are determined, so as to determine a first real-time index of the real-time thread according to the adjusted first execution parameter and second execution parameter of the real-time thread (the specific process may refer to the relevant description in the foregoing embodiment, which is not described herein again in the embodiments of the present disclosure), and when the first real-time index of the real-time thread does not satisfy a first adjustment condition, the real-time property of the current real-time thread is considered to have satisfied a performance requirement, and no adjustment is needed, then an adjustment policy for the priority of the real-time thread may be determined to include: the priority of the real-time thread is adjusted to a first priority.
Or, under the condition that the first real-time index of the real-time thread satisfies the first adjustment condition, the real-time performance of the current real-time thread is considered to have an adjustment space, so the foregoing process may be repeated, that is, the process of performing priority adjustment and re-operation on each real-time thread is repeated, and determining the real-time index is repeated until the determined real-time index of the real-time thread does not satisfy the first adjustment condition, at this time, the priority of the real-time thread is adjusted to the second priority, and the adjustment policy for determining the priority of the real-time thread includes: the priority of the real-time thread is adjusted to a second priority.
According to the data processing method provided by the embodiment of the disclosure, under the condition that the control terminal fails to detect, the adjustment strategy of the priority of the real-time thread can be determined according to the real-time index of the real-time thread, and the corresponding configuration of the priority of the real-time thread in the system configuration can be adjusted according to the adjustment strategy of the priority of the real-time thread, 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.
In one embodiment, the optimization policy includes an adjustment policy of the scheduling policy for the real-time thread, and as shown in fig. 9, step 602 may include:
step 902, adjusting a scheduling policy of a real-time thread to obtain a first scheduling policy of the real-time thread;
step 904, determining a second real-time index corresponding to the real-time thread under the first scheduling policy;
step 906, adjusting the scheduling policy of the real-time thread according to the second real-time performance index to obtain an adjustment policy of the scheduling policy for the real-time thread.
In the embodiment of the application, under the condition that the second real-time index meets the second adjustment condition, the scheduling strategy of the real-time thread is adjusted until the real-time index corresponding to the real-time thread under the second scheduling strategy does not meet the second adjustment condition, and the adjustment strategy of the scheduling strategy for the real-time thread is obtained according to the second scheduling strategy; or, under the condition that the second real-time property meets the second adjusting condition, obtaining an adjusting strategy of the scheduling strategy aiming at the real-time thread according to the first scheduling strategy.
In the embodiment of the application, under the condition that the control terminal fails to detect, the scheduling policy of the real-time thread may be adjusted to obtain a first scheduling policy after the real-time thread is adjusted, where the first scheduling policy may include a scheduling policy corresponding to a real-time thread with the same priority.
Illustratively, the scheduling policy for real-time threads includes: FIFO (First Input First Output, First in First out) and RR (Round Robin), during the process of adjusting the scheduling policy of each real-time thread, the scheduling policy corresponding to the real-time thread may be adjusted at will until a scheduling policy is obtained that can make the real-time property of the real-time thread satisfy the second adjustment condition. For example, suppose that 10 real-time threads with the same priority are currently used, wherein the real-time threads 1 to 4 adopt an FIFO scheduling policy, and 5 to 10 adopt an RR scheduling policy, the scheduling policy of the real-time threads can be adjusted to 1 to 5 adopt the FIFO scheduling policy, and 6 to 10 adopt the RR scheduling policy. It should be noted that, the adjustment mode of the scheduling policy is not specifically limited in the embodiment of the present disclosure.
In the embodiment of the present disclosure, the second adjustment condition may include: the real-time index of the real-time thread is smaller than a preset second real-time index threshold value, or the real-time index of the real-time thread still has an ascending trend and is not the maximum real-time index. The second real-time indicator threshold may be the same as or different from the first real-time indicator threshold, and if the determination process for the scheduling policy is executed after the adjustment for the priority, the second real-time indicator threshold is greater than the first real-time indicator threshold, otherwise, the second real-time indicator threshold is smaller than the first real-time indicator threshold, which is not specifically limited in the embodiment of the present disclosure.
After the scheduling policy of each real-time thread is adjusted to the first scheduling policy, each real-time thread may be re-run, and the first scheduling policy is used to schedule the real-time threads with the same priority during the running process, and determine the first execution parameter and the second execution parameter of the real-time thread, 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 may refer to the relevant description in the foregoing embodiment, which is not described herein again in the embodiments of the present disclosure), and under the condition that the second real-time index of the real-time thread does not satisfy the second adjustment condition, the real-time of the real-time thread may be considered to satisfy the performance requirement, and no re-adjustment is needed, so the adjustment policy for determining the scheduling policy of the real-time thread includes: and adjusting the scheduling strategy of the real-time thread to be a first scheduling strategy.
Or, under the condition that the second real-time index of the real-time thread satisfies the second adjustment condition, the real-time property of the real-time thread may be considered to not satisfy the performance requirement, and needs to be continuously readjusted, so the foregoing process may be repeated, that is, the process of performing the adjustment and the re-operation of the scheduling policy and determining the real-time index on each real-time thread is repeated until the real-time index of the real-time thread does not satisfy the second adjustment condition, and at this time, the scheduling policy of the real-time thread is adjusted to the second scheduling policy, so the adjustment policy for determining the scheduling policy for the real-time thread includes: and adjusting the scheduling strategy of the real-time thread into a second scheduling strategy.
For example, still referring to fig. 8, for the real-time threads with the same priority, the scheduling policy FIFO and RR may be continuously adjusted, so that the real-time index of the real-time thread is infinitely close to 1, until the scheduling policy scheme that best matches the real-time thread and resists the interference of the non-real-time thread is adjusted.
According to the data processing method provided by the embodiment of the application, under the condition that the control terminal fails to pass 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 the scheduling strategy of the real-time thread in the system configuration of the control terminal is adjusted according to the adjustment strategy of the scheduling strategy for the real-time thread, so that the real-time index of the real-time thread in the adjusted control terminal is greatly improved, the interference of the non-real-time thread to the real-time thread is reduced, and the performance of the control terminal is accurately and efficiently improved.
In one embodiment, the optimization policy includes a first adjustment policy for a processor core running the real-time thread, and as shown in fig. 10, step 602 may include:
step 1002, determining a first processor core from the processor cores, wherein the first processor core is used for running a real-time thread;
step 1004, determining a third real-time index of the real-time thread under the condition that the real-time thread runs in the first processor core;
step 1006, adjusting the processor core of the real-time thread according to the third real-time index, and obtaining a first adjustment strategy for the processor core running the real-time thread.
In the embodiment of the application, under the condition that the third real-time index meets the third adjustment condition, the first processor core is adjusted until the real-time index corresponding to the real-time thread does not meet the third adjustment condition when the real-time thread runs in the adjusted first processor core, and a first adjustment strategy for the processor core running the real-time thread is obtained according to the adjusted first processor core.
In the embodiment of the application, under the condition that the control terminal fails to pass the detection, part of the processor cores can be isolated from the control terminal and serve as the first processor core, and the first processor core is only used for running of the real-time thread, so that the real-time thread can be isolated from the non-real-time thread, and further the interference of the non-real-time thread is avoided.
In an embodiment of the present disclosure, the third adjustment condition may include: the real-time index of the real-time thread is smaller than a preset third real-time index threshold, or the real-time index of the real-time thread still has an ascending trend and is not the maximum real-time index. The third real-time index threshold may be the same as or different from the first real-time index threshold and the second real-time index threshold, and in a case where the adjustment policy for the processor core is determined after the scheduling policy and/or the priority adjustment policy, the third real-time index threshold is greater than the second real-time index threshold and/or the first real-time index threshold, and conversely, the third real-time index threshold is less than the second real-time index threshold and/or the first real-time index threshold, which is not specifically limited in this embodiment of the present disclosure.
Exemplarily, a plurality of processor cores can be isolated at random to serve as a first processor core, a real-time thread runs in the first processor core, a third real-time index of the real-time thread is determined, and under the condition that the third real-time index does not meet a third adjustment condition, the real-time property of the real-time thread can be considered to meet performance requirements without adjustment, so that the first processor core can serve as a first adjustment strategy for the processor core running the real-time thread; or, under the condition that the third real-time index meets the third adjustment condition, the real-time performance of the real-time thread is considered to not meet the performance requirement, and the adjustment needs to be continued, so that the first processor core can be adjusted until the real-time thread runs in the adjusted first processor core, the real-time index of the real-time thread does not meet the third adjustment condition, and the adjusted first processor core is used as a first adjustment strategy for the processor core running the real-time thread.
As shown in fig. 11, the first processor core includes CPU cores 1 to 3, that is, the real-time thread runs in the CPU cores 1 to 3, the non-real-time thread runs in the CPU cores 4 to max, and the CPU core 0 is reserved for the real-time kernel of the operating system, so that the real-time thread and the non-real-time thread run on different CPU cores while the system is stable, and the interference of the non-real-time thread on the real-time thread can be avoided. If the corresponding third real-time index meets a third adjustment condition when the current real-time thread runs in the CPU core 1-3, the first CPU core can be further adjusted, and the adjusted first CPU core comprises the CPU cores 1-5 or the CPU cores 2-4. And continuously verifying 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 a third adjustment condition, and taking the first processor core at the moment as a first adjustment strategy for the processor core running the real-time thread.
According to the data processing method provided by the embodiment of the application, under the condition that the control terminal fails to pass detection, the first adjustment strategy of the processor core for the real-time thread can be determined according to the real-time index of the real-time thread, and the first processor core only used for the real-time thread to run is isolated for the real-time thread in the system configuration of the control terminal according to the first adjustment strategy of the processor core for the real-time thread, so that the interference of the non-real-time thread on the real-time thread can be reduced, the real-time index of the real-time thread in the adjusted control terminal can be greatly improved, the interference of the non-real-time thread on the real-time thread is reduced, and the performance of the control terminal is accurately and efficiently improved.
In one embodiment, the optimization policy further includes a second adjustment policy for a processor core running the real-time thread, as shown in fig. 12, step 602 may further include:
step 1202, dividing the real-time threads into a plurality of thread groups, wherein each thread group comprises at least one real-time thread;
step 1204, determining a processor core corresponding to each thread group from the first processor cores;
step 1206, running the real-time threads in each thread group in the processor core corresponding to each thread group to obtain a fourth real-time index corresponding to the real-time threads;
and 1208, adjusting the processor core of the real-time thread according to the fourth real-time index to obtain a second adjustment strategy for the processor core running the real-time thread.
In the embodiment of the application, under the condition that the fourth real-time index meets the fourth adjustment condition, the processor cores corresponding to the thread groups are adjusted until the real-time index of the adjusted real-time thread does not meet the fourth adjustment condition, and a second adjustment strategy for the processor cores running the real-time thread is obtained according to the adjusted thread groups and the processor cores corresponding to the thread groups.
For example, after determining a first processor core for the real-time threads to run, the real-time threads may be divided into a plurality of thread groups, each thread group including at least one real-time thread, and each thread group may run in a processor core designated for the first processor core, so as to further reduce the influence between the real-time threads.
For example, taking the magnetic resonance system as an example, the real-time threads may be divided into a plurality of thread groups according to the magnetic resonance system requirements according to priority, for example: the thread groups are divided into four levels of V1, V2, V3 and V4, wherein V1 simulates real-time threads which are related to magnetic resonance safety monitoring and the like and possibly affect safety, the first priority level is that V2 simulates real-time threads which possibly cause system scanning failure in a magnetic resonance control scanning system, the second priority level is that V3 and V4 simulate real-time threads which cannot cause serious errors such as capturing common error information by the magnetic resonance system, and the priority level is lowest. That is, the priority level of V1 is highest, and the priority level of V4 is lowest.
The processor cores for operation of the high priority thread groups may be partitioned separately, and the shared processor cores may be partitioned for multiple low priority thread groups. For example: referring to fig. 13, the V1 and V2 thread groups may be divided into an exclusive processor core and the V3 and V4 thread groups may be divided into a shared processor core. After the assigned processor cores are divided for the real-time thread, the real-time thread can be operated, and a fourth real-time index of the real-time thread is determined. It should be noted that the manner of dividing the thread groups according to the priority is only an example in the embodiment of the present disclosure, and actually any manner for dividing the thread groups is applicable to the embodiment of the present disclosure.
In an embodiment of the present disclosure, the fourth adjustment condition may include: and the real-time index of the real-time thread is smaller than a preset fourth real-time index threshold value, or the real-time index of the real-time thread still has an ascending trend and is not the maximum real-time index. The fourth real-time indicator threshold may be the same as or different from the first real-time indicator threshold, the second real-time indicator threshold, and the third real-time indicator threshold, and in a case that the adjustment for the processor core is performed after the adjustment of the scheduling policy and/or the priority, the fourth real-time indicator threshold is greater than the third real-time indicator threshold and/or the second real-time indicator threshold and/or the first real-time indicator threshold, otherwise, the fourth real-time indicator threshold is less than the third real-time indicator threshold and/or the second real-time indicator threshold and/or the first real-time indicator threshold, which is not specifically limited in the embodiment of the present disclosure.
Under the condition that the fourth real-time index does not meet the fourth adjustment condition, the real-time performance of the real-time thread can be considered to meet the performance requirement, adjustment is not needed, and the current thread groups and the processor cores corresponding to the thread groups are used as second adjustment strategies for the processor cores running the real-time thread; or, under the condition that the fourth real-time index satisfies the fourth adjustment condition, the real-time performance of the real-time thread may be considered to not satisfy the performance requirement, and the adjustment needs to be continued, so that the processor cores corresponding to the thread groups may be adjusted until the real-time index of the real-time thread does not satisfy the fourth adjustment condition when the real-time thread in the corresponding thread group is operated 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 operating the real-time thread.
It should be noted that, in the embodiment of the present disclosure, a manner of adjusting the processor core corresponding to each thread group is not specifically limited.
According to the data processing method provided by the embodiment of the disclosure, under the condition that the control terminal fails to detect, the second adjustment strategy of the processor core for the real-time thread can be determined according to the real-time index of the real-time thread, and the corresponding processor core is assigned to the thread group to which each real-time thread belongs in the system configuration of the control terminal according to the second adjustment strategy of the processor core for the real-time thread, so that the real-time threads in each thread group run in the corresponding processor core, the interference between the real-time threads can be reduced, the real-time index of the real-time thread in the adjusted control terminal can be greatly improved, the interference of the non-real-time thread to the real-time thread is reduced, and the performance of the control terminal is accurately and efficiently improved.
In order that those skilled in the art will better understand the embodiments of the present disclosure, the embodiments of the present disclosure are described below by way of specific examples.
In this example, the execution parameter includes the execution times, and the control terminal is a magnetic resonance control terminal in the magnetic resonance scanning system. And simulating and starting RN real-time threads in the control terminal, wherein the RN is the number of the real-time threads in actual operation in the control terminal, and counting the first execution times of the real-time threads in unit time W. And continuously simulating and starting N non-real-time threads in the control terminal, wherein N is the number of the non-real-time threads in actual operation in the control terminal, and counting the second execution times of the real-time threads in the unit time W. And determining a real-time index of the real-time thread according to the first execution times and the second execution times, and detecting the performance of the control terminal according to the real-time index.
In the case that the control terminal fails to detect, referring to fig. 14, the adjustment policy of the system configuration for the control terminal may be determined within S seconds, including at least one of the following adjustment policies: real-time scheduling optimization for real-time threads, comprising: an adjustment strategy for optimizing the priority of real-time thread scheduling and an adjustment strategy for optimizing the scheduling strategy; optimizing a processor core running a real-time thread, comprising: adjusting system parameter configuration, isolating part of processor cores to obtain an adjustment strategy of a first processor core only used for real-time thread operation; the optimization of the assigned processor core of each real-time thread comprises the following steps: and the adjustment strategy of the CPU core bound by each real-time thread is specified from the first processor core.
The data processing method provided by the embodiment of the disclosure can optimize the interference of non-real-time threads on the real-time threads, optimize the interference of real-time threads with each other, and obtain the optimal system configuration scheme of 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 that the detection and optimization of the control terminal can be performed without depending on the detection environments of the magnetic resonance scanning system and the like.
It should be understood that although the various steps in the flow charts of fig. 1-14 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-14 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 15, there is provided a data processing apparatus including: a first determination module 1502, a second determination module 1504, a third determination module 1506, and a fourth determination module 1508, wherein:
a first determining module 1502, configured to determine a first execution parameter of a real-time thread in a unit time when only the real-time thread is running in the control terminal;
a second determining module 1504, configured to determine a second execution parameter of the real-time thread in the unit time when the real-time thread and the non-real-time thread are run in the control terminal;
a third determining module 1506, configured to determine a real-time indicator of the real-time thread according to the first execution parameter and the second execution parameter, where the real-time indicator is used to represent an influence degree of the non-real-time thread on the real-time thread;
a fourth determining module 1508, configured to determine a detection result for the control terminal according to the real-time performance indicator.
The data processing device determines a first execution parameter of the real-time thread in unit time under the condition that the real-time thread runs in the control terminal, determines a second execution parameter of the real-time thread in unit time under the condition that the real-time thread and the non-real-time thread run in the control terminal, and determines 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 for representing the influence degree of the non-real-time thread on the real-time thread. Further, the detection result for the control terminal may be determined according to a real-time index. The data processing device provided by the embodiment of the disclosure detects the performance of the control terminal through the real-time index of the real-time thread, not only provides an accurate quantitative qualified standard, but also does not need actual operation detection in a real scene, reduces the dependence on a detection environment, and improves the detection efficiency and the detection precision.
In one embodiment, the execution parameters include the number of executions and/or the execution duration.
In one embodiment, the apparatus may further include:
a fifth determining module, configured to determine, according to a real-time index of the real-time thread, an optimization strategy configured for the control terminal system when the detection result indicates that the detection fails;
and the optimization module is used for optimizing the system configuration of the control terminal according to the optimization strategy.
In one embodiment, the optimization policy includes at least one of an adjustment policy for a priority of the real-time thread, an adjustment policy for a scheduling policy of the real-time thread, and an adjustment policy for a processor core running the real-time thread.
In one embodiment, the optimization policy includes an adjustment policy for the priority of the real-time thread, and the fifth determining module is further configured to:
adjusting the priority of the real-time thread to obtain a first priority of the adjusted real-time thread;
determining a first real-time index of the real-time thread according to the first priority of the real-time thread;
and adjusting the priority of the real-time thread according to the first real-time index to obtain an adjustment strategy aiming at the priority of the real-time thread.
In one embodiment, the optimization policy includes an adjustment policy of a scheduling policy for the real-time thread, and the fifth determining module is further configured to:
adjusting the scheduling strategy of the real-time thread to obtain a first adjustment strategy of the real-time thread;
determining a second real-time index corresponding to the real-time thread under the first scheduling strategy;
and adjusting the scheduling strategy of the real-time thread according to the second real-time index to obtain an adjustment strategy aiming at the scheduling strategy of the real-time thread. In one embodiment, the optimization policy includes a first adjustment policy for a processor core running the real-time thread, and the fifth determining module is further configured to:
determining a first processor core from processor cores, wherein the first processor core is used for running the real-time thread;
determining a third real-time index of the real-time thread when the real-time thread runs in the first processor core;
and adjusting the processor core of the real-time thread according to the third real-time index to obtain a first adjustment strategy aiming at the processor core running the real-time thread.
In one embodiment, the optimization policy further includes a second adjustment policy for a processor core running the real-time thread, and the fifth determining module is further configured to:
dividing the real-time threads into a plurality of thread groups, wherein each thread group comprises at least one real-time thread;
determining a processor core corresponding to each thread group from the first processor cores;
running the real-time threads in each thread group in the processor core corresponding to each thread group to obtain a fourth real-time index corresponding to the real-time threads;
and adjusting the processor core of the real-time thread according to the fourth real-time index to obtain a second adjustment strategy aiming at the processor core running the real-time thread.
For specific limitations of the data processing apparatus, reference may be made to the above limitations of the data processing method, which are not described herein again. The various modules in the data processing apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 16. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a data processing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 16 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, there is further provided a magnetic resonance apparatus comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the above-described method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (11)

1. A data processing method is applied to a control terminal, and the method comprises the following steps:
under the condition that only a real-time thread runs in the control terminal, determining a first execution parameter of the real-time thread in unit time;
under the condition that the real-time thread and the non-real-time thread run in the control terminal, determining a second execution parameter of the real-time thread in the unit time;
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 for representing the influence degree of the non-real-time thread on the real-time thread;
and determining a detection result aiming at the control terminal according to the real-time index.
2. The method of claim 1, wherein the execution parameters include a number of executions and/or a duration of executions.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
determining an optimization strategy configured for the control terminal system according to the real-time index of the real-time thread under the condition that the detection result represents that the detection fails;
and optimizing the system configuration of the control terminal according to the optimization strategy.
4. The method of claim 3, wherein the optimization policy comprises at least one of an adjustment policy for a priority of the real-time thread, an adjustment policy for a scheduling policy of the real-time thread, and an adjustment policy for a processor core running the real-time thread.
5. The method according to claim 3 or 4, wherein the optimization strategy comprises an adjustment strategy for the priority of the real-time thread, and the determining the optimization strategy configured for the control terminal system according to the real-time performance index of the real-time thread comprises:
adjusting the priority of the real-time thread to obtain a first priority of the adjusted real-time thread;
determining a first real-time index of the real-time thread according to the first priority of the real-time thread;
and adjusting the priority of the real-time thread according to the first real-time index to obtain an adjustment strategy aiming at the priority of the real-time thread.
6. The method according to claim 3 or 4, wherein the optimization strategy comprises an adjustment strategy of a scheduling strategy for the real-time thread, and the determining the optimization strategy configured for the control terminal system according to the real-time performance index of the real-time thread comprises:
adjusting the scheduling strategy of the real-time thread to obtain a first adjustment strategy of the real-time thread;
determining a second real-time index corresponding to the real-time thread under the first scheduling strategy;
and adjusting the scheduling strategy of the real-time thread according to the second real-time index to obtain an adjustment strategy aiming at the scheduling strategy of the real-time thread.
7. The method according to claim 3 or 4, wherein the optimization strategy comprises a first adjustment strategy for a processor core running the real-time thread, and the determining the optimization strategy configured for the control terminal system according to the real-time performance index of the real-time thread comprises:
determining a first processor core from processor cores, wherein the first processor core is used for running the real-time thread;
determining a third real-time index of the real-time thread when the real-time thread runs in the first processor core;
and adjusting the processor core of the real-time thread according to the third real-time index to obtain a first adjustment strategy aiming at the processor core running the real-time thread.
8. The method of claim 7, wherein the optimization strategy further comprises a second adjustment strategy for a processor core running the real-time thread, and wherein determining the optimization strategy configured for the control terminal system according to the real-time performance index of the real-time thread further comprises:
dividing the real-time threads into a plurality of thread groups, wherein each thread group comprises at least one real-time thread;
determining a processor core corresponding to each thread group from the first processor cores;
running the real-time threads in each thread group in the processor core corresponding to each thread group to obtain a fourth real-time index corresponding to the real-time threads;
and adjusting the processor core of the real-time thread according to the fourth real-time index to obtain a second adjustment strategy aiming at the processor core running the real-time thread.
9. A data processing apparatus, applied to a control terminal, the apparatus comprising:
the first determining module is used for determining a first execution parameter of the real-time thread in unit time under the condition that only the real-time thread runs in the control terminal;
the second determining module is used for determining a second execution parameter of the real-time thread in the unit time under the condition that the real-time thread and the non-real-time thread run in the control terminal;
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, where the real-time index is used to represent an influence degree of the non-real-time thread on the real-time thread;
and the fourth determination module is used for determining a detection result aiming at the control terminal according to the real-time performance index.
10. A magnetic resonance apparatus comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of any one of claims 1 to 8 when executing the computer program.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 8.
CN202111333144.5A 2021-11-11 2021-11-11 Data processing method, data processing device, magnetic resonance equipment and storage medium Pending CN113900789A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111333144.5A CN113900789A (en) 2021-11-11 2021-11-11 Data processing method, data processing device, magnetic resonance equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111333144.5A CN113900789A (en) 2021-11-11 2021-11-11 Data processing method, data processing device, magnetic resonance equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113900789A true CN113900789A (en) 2022-01-07

Family

ID=79194019

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111333144.5A Pending CN113900789A (en) 2021-11-11 2021-11-11 Data processing method, data processing device, magnetic resonance equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113900789A (en)

Similar Documents

Publication Publication Date Title
US9430288B2 (en) Job scheduling based on historical job data
CN109586952B (en) Server capacity expansion method and device
Li et al. Sculptor: Flexible approximation with selective dynamic loop perforation
Matias Jr et al. Using accelerated life tests to estimate time to software aging failure
US20230305880A1 (en) Cluster distributed resource scheduling method, apparatus and device, and storage medium
CN115543577A (en) Kubernetes resource scheduling optimization method based on covariates, storage medium and equipment
CN114500578A (en) Load balancing scheduling method and device for distributed storage system and storage medium
CN110691118A (en) Service selection method and device in micro-service cluster
CN109800085A (en) Detection method, device, storage medium and the electronic equipment of resource distribution
CN115756812A (en) Resource adjusting method and device and storage medium
CN113900789A (en) Data processing method, data processing device, magnetic resonance equipment and storage medium
CN111913858A (en) Pressure testing system and method
CN111159038A (en) Method for simulating CPU load and electronic equipment
CN113220463B (en) Binding strategy inference method and device, electronic equipment and storage medium
CN116501468A (en) Batch job processing method and device and electronic equipment
CN114138597B (en) Operating system performance tuning device, method, equipment and storage medium
CN115934512A (en) Storage system dynamic test method and device, computer equipment and storage medium
US9690616B2 (en) Based on natural load determination either adjust processor sleep time or generate artificial load
CN111598390B (en) Method, device, equipment and readable storage medium for evaluating high availability of server
CN115080412A (en) Software update quality evaluation method, device, equipment and computer storage medium
CN112217585A (en) Signal path determination method and device, computer equipment and storage medium
CN111143148A (en) Model parameter determination method, device and storage medium
CN113010269B (en) Virtual machine scheduling method and device, electronic equipment and readable storage medium
CN110197026B (en) Processor core optimization method and system based on near-threshold calculation
CN116521358A (en) Method and device for running power edge computing chip in real-time system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination