[background technology]
Many action needs of medical image system calculate precise time at interval; as in computed tomography imaging system in order to protect its core component bulb (Tube); prevent that bulb from damaging because frequent scan operation causes overheated; need to calculate the interval between twice scan operation, whether begin to scan next time with decision.
The method that existing computed tomography imaging system calculates above-mentioned interval is to get the system time of twice operating system respectively, calculate the interval of this twice system time, compare with the scan operation interval of standard, if described twice system time interval greater than or equal the scan operation interval of standard, then allow to begin to scan next time; If the interval of described twice system time is less than the scan operation interval of standard, then periodically take off the primary system time and continue relatively with the system time of obtaining for the first time, up to twice system time interval greater than or equal the scan operation interval of standard till.
Yet the computational methods of the interval of above-mentioned computed tomography imaging system operation are not fool proof because between the interval of twice scan operation the operating system time might be modified because of some reason.If system time is transferred soon, the interval that causes calculating increases, the system that then makes might allow beginning scan operation next time under less than the situation of the scan operation interval of standard at the interval of reality, and the temperature of bulb is also very high at this moment, can influence the service life of bulb like this, bulb is burnt; If system time is transferred slowly, the interval that causes calculating reduces, then make system might reality interval greater than or equal still not allow under the situation of scan operation interval of standard to begin next time scan operation, cause the work efficiency of computed tomography imaging system scan operation to reduce.
For addressing the above problem, common way has two kinds at present: a kind of method is third party software to be installed or user right is set to forbid revising system time, yet the increase that third party software can cause cost and maintenance cost is installed, and the open certain authority of sometimes having to makes the user can the retouching operation systematic parameter, therefore can't guarantee that system time is not modified; Another method is to adopt a clock that has nothing to do with the operating system time, calculate described interval by visiting this clock, but this way relate to computed tomography imaging system hardware modification with and the corresponding modify of operating system, in present computed tomography imaging system and infeasible.
Therefore, how to provide a kind of time self-correcting method of medical image system to become the present problem demanding prompt solution of industry.
[summary of the invention]
The objective of the invention is to propose a kind of time self-correcting method of medical image system, even make the application program of this medical image system under the situation that system time is modified, still can obtain accurately the current time and carry out corresponding calculating.
For achieving the above object, the present invention proposes a kind of time self-correcting method of medical image system, and this method may further comprise the steps: use a background program surveillance time, the direction of record modification and index word when system time is modified; Make this application program obtain the record that system time and above-mentioned background program are modified system time; And when background program did not have record that system time is modified, the system time that this application program use obtains was as the current time; When background program had the record that system time is modified, this application program was proofreaied and correct the system time of obtaining according to direction and index word that system time is modified, and used time after overcorrect as the current time.
According to an aspect of the present invention, this background program starts along with the startup of the operating system of described medical image system, and resident as the process of this operating system.
May further comprise the steps during this background program operation:
A) periodically get system time;
B) system time of obtaining system time that step a) is obtained and last time compares;
C) judge whether system time is modified, when through judging that system time is not modified, then redirect execution in step a), when through judging that system time is modified, execution in step d then);
D) the redirect execution in step is a) after the modification direction of recording system time and the index word.
Wherein, described system time that step a) is obtained and the system time obtained last time compare and be meant: the system time that will obtain last time adds that this background program periodically gets the interval of system time and system time that step a) obtains relatively; When both were equal, then described step c) judged that system time is not modified, and when both did not wait, step c) judged that system time is modified.The modification direction of described system time is meant that system time is transferred soon or transferred slowly, and index word is meant that system time is transferred fast or quilt is transferred slow numerical value.This background program is with the registration table and the storage of the modification direction and the index word write operation system of system time.
The application program of this medical system may further comprise the steps when moving:
A) get system time;
B) get the modification direction of the system time of storing on this backstage and the record of index word;
C) judge whether this background program has above-mentioned record, when not having above-mentioned record, execution in step
D), when above-mentioned record, execution in step e);
D) system time obtained of use is as the current time;
E) proofread and correct according to the modification direction and the index word of the system time that writes down;
F) use the gauged time of process as the current time.
Wherein, the registration table of the operating system of this application program by reading this medical image system is obtained the modification direction and the index word of the system time of this background program record.
[specific embodiment]
See also Fig. 1, for solving because of system time is modified the inaccurate problem of the function timing that causes, the time self-correcting method of medical image system of the present invention comprises a background program, and the flow process of this background program work is as described below:
Step S10: start.
This background program is along with the startup of the operating system of medical image system moves automatically, and as the resident process of operating system.
Step S11: get system time.
Operating system is passed through basic input output system (Basic Input Output System when starting; BIOS) to real-time clock (Real Time Clock; RTC) call current date and time information, this background program obtains system time and periodically carries out this step by the registration table of programming function from operating system.Certainly, also can obtain system time by visit RTC.
Step S12: compare with the system time of obtaining last time.
The system time of obtaining described last time is added that the interval of periodically getting system time compares with the time that this is obtained.
Step S13: judge whether system time is modified.
Judge according to the comparative result of step S12 whether system time has modification, if promptly the system time of obtaining the last time described in the step S12 adds that the interval of periodically getting system time is identical with the time that this is obtained, then system time is not modified; If different, then system time is modified.
After not being modified through the judgement system time, above-mentioned steps S11 is carried out in this background program redirect.
After being modified through the judgement system time, this background program circulation execution in step S14.
Step S14: modification direction and the index word of recording system time.
Thereby the purpose of the index word of recording system time and modification direction is to carry out time adjustment for the application program for medical image system reads, the modification direction of so-called time is meant that system time has been transferred is soon still transferred slowly, and index word is meant that then system time transferred concrete time numerical value fast or that transfer slow.Described modification direction and index word to system time is stored into operating system for reading by writing registration table.
Behind the execution of step S14, above-mentioned steps S11 is carried out in this background program redirect.
In sum, whether system time was modified after the background program by described resident process can monitor and judge the os starting of medical image system, if be modified, it is revised direction and index word and is recorded and is stored.
Please refer to Fig. 2, the application program that the figure illustrates a medical image system is how to utilize above-mentioned background program to reach accurate computation time, thereby solve the embodiment that is modified the inaccurate problem of function timing that causes because of system time, the flow process of its work is as described below:
Step S20: finish previous action.
Present embodiment needs accurately to calculate twice operation with this application program, is that example describes as the interval of twice scanning.
Step S21: get system time.
What this application program was got at every turn all is system time, if therefore this application program adopts the computation time of the method at interval of prior art, promptly getting twice system time respectively compares then, then under the situation that system time was modified in described interval, the result of calculation of prior art will be inconsistent with practical situation, thereby cause operating improperly.
Step S22: get the record that background program is preserved.
This step is the committed step that this application program carries out time adjustment because application program whether the surveillance time was not modified the therefore record that need preserve by this background program.Described record be meant that the step S14 of the workflow of this background program preserves to the modification direction of system time and the record of index word.This step of described application program reads above-mentioned record by the visit registration table.
Step S23: judged whether record.
Under the situation that system time was not modified, above-mentioned background program does not have described record; Under the situation that system time was modified, above-mentioned background program stores described record.
When described record, application execution in step S24 being arranged through judging.
Step S24: modification direction and index word according to the system time that writes down are proofreaied and correct.
The system time of obtaining is proofreaied and correct according to the modification direction and the index word of the system time of record by this system time of obtaining, obtained the current time accurately.
Step S25a: use the time after calibrated.
If step S23 judges that background program does not have described record, then execution in step S25b.
Step S25b: the system time that use obtains.
Because system time was not modified through judging, so this system time of obtaining is exactly current time accurately.
Step S26: the time of using with last time compares.
The time of step S25a or employed time of step S25a and the last use of application is compared, and just the correct time with twice use compares.
Step S27: judge whether the value through relatively obtaining satisfies condition.
The purpose of this step is to judge described value through relatively obtaining, just whether interval satisfies the condition that triggers next step, in in this enforcement, the condition of described satisfied triggering next step is meant that this interval is equal to or greater than the interval length of standard.When satisfying above-mentioned condition, i.e. execution in step S28; When not satisfying above-mentioned condition, i.e. redirect execution in step S21.
Step S28: carry out next step operation.
In the present embodiment, next step operation refers to scanning motion next time.
In sum, just can make the application program of operating system under the situation that system time is repeatedly revised, still can access actual time accurately even use the time self-correcting method of medical image system of the present invention, thereby carry out the accurate calculating of the interval of adjacent two steps operation.
In the present embodiment, described operation describes as an example with scan operation, but is appreciated that ground, and accurate computation time of the operation at interval of any needs of medical image system can be used the present invention and is achieved.