A touch correction method and apparatus, an ultrasound device, and a storage medium

By detecting and recording touch events when the touchscreen program of the ultrasound device starts, the problem of abnormal control during startup is solved, resulting in more stable user interaction and improved user experience of the ultrasound device.

CN117666826BActive Publication Date: 2026-11-10SONOSCAPE MEDICAL (WUHAN) CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211020636.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-24
Publication Date
2026-11-10
Estimated Expiration
2042-08-24

AI Technical Summary

Technical Problem

The touchscreen program of the ultrasound equipment is prone to abnormally receiving touch events during startup, leading to abnormal control of the ultrasound program and affecting the user experience.

Method used

When the touch screen program is started, the difference between the reception time of the first touch event and the program start time is detected. If it is less than a preset threshold, the program enters the calibration state, stops responding to all touch events, and records the target touch point and its status. The calibration state is exited after all touch points are released, and control of the ultrasound program is restored.

Benefits of technology

This effectively prevents abnormal touch events from affecting the control of the ultrasound program, thus improving the user experience of using ultrasound equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117666826B_ABST
    Figure CN117666826B_ABST
Patent Text Reader

Abstract

The application provides a touch correction method and device, an ultrasonic equipment and a storage medium, relates to the field of ultrasonic equipment, and the method is applied to the touch screen program of the ultrasonic equipment and includes the following steps: when the program is started, a touch event sent by a touch screen driver is received; when it is determined that the difference between the time when the first touch event is received and the time when the program is started is less than a preset threshold, a correction state is entered and the response to all touch events is stopped; a target touch point corresponding to a target touch event received during the correction and a touch state are recorded; when it is determined that all target touch points are in a release state based on the recorded touch state, the correction state is exited, and the ultrasonic program is controlled based on a touch event received subsequently; the abnormal touch event detection can be performed when the program is started, the touch event response is stopped when the abnormality is found, and the touch event response is restored when the touch point corresponding to the abnormal touch event is released, so that the ultrasonic program can be prevented from being controlled abnormally.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of ultrasonic equipment, and in particular to a touch correction method, apparatus, ultrasonic equipment, and computer-readable storage medium. Background Technology

[0002] When an ultrasound device's touchscreen is started, the touchscreen driver is launched first, followed by the touchscreen program. Before the touchscreen program starts, the driver can already receive touch events generated by the user tapping the touchscreen and send these events to the touchscreen program. However, the touchscreen program is prone to abnormally receiving touch events during startup, which can easily lead to abnormal control of the ultrasound program and a poor user experience. Summary of the Invention

[0003] The purpose of this application is to provide a touch correction method, apparatus, ultrasonic equipment, and computer-readable storage medium that can detect abnormal touch events that may cause abnormal control of the ultrasonic equipment when the touch screen program is started and completed, and stop responding to the touch event and performing touch correction when the event is detected, so as to avoid abnormal touch events from causing abnormal control of the ultrasonic program.

[0004] To address the aforementioned technical problems, this application provides a touch calibration method applied to the touchscreen program of an ultrasonic device, the method comprising:

[0005] When the program starts, it receives touch events sent by the touchscreen driver;

[0006] When the difference between the time of receiving the first touch event and the time of program startup is less than a preset threshold, the system enters a correction state and stops responding to all touch events.

[0007] Record the target touch point and touch state corresponding to the target touch event received during the calibration period;

[0008] When it is determined that all the target touch points are in a released state based on the recorded touch states, the calibration state is exited to control the ultrasound program based on subsequently received touch events.

[0009] Optionally, entering calibration mode includes:

[0010] Set the calibration status flag;

[0011] Accordingly, recording the target touch point and touch state corresponding to the target touch event received during the correction period includes:

[0012] When the touch event is received and it is determined that the calibration status flag has been set, the touch event is set as the target touch event, and the target touch point and touch state corresponding to the target touch event are recorded;

[0013] Accordingly, exiting the calibration state to control the ultrasound program based on subsequently received touch events includes:

[0014] The calibration status flag is canceled so that when the touch event is received and it is determined that the calibration status flag has been canceled, the ultrasound program can be controlled based on the touch event.

[0015] Optionally, recording the target touch point and touch state corresponding to the target touch event received during the correction period includes:

[0016] Determine whether the touch point record contains a target touch point corresponding to the target touch event;

[0017] If so, the touch state of the target touch point is updated according to the type of the target touch event;

[0018] If not, the target touch point is added to the touch point record, and the touch state of the target touch point is updated according to the type of the target touch event.

[0019] Optionally, updating the touch state of the target touch point according to the type of the target touch event includes:

[0020] When the target touch event is determined to be a press event, the touch state is updated to the press state;

[0021] When the target touch event is determined to be a movement event, the touch state is updated to the movement state;

[0022] When the target touch event is determined to be a release event, the touch state is updated to the release state.

[0023] Optionally, before receiving touch events sent by the touchscreen driver, the method further includes:

[0024] Start the timer;

[0025] Accordingly, determining whether the difference between the time of receiving the first touch event and the time of program startup is less than a preset threshold includes:

[0026] Upon receiving the first touch event, the timer reading is read, and it is determined whether the reading is less than the preset threshold.

[0027] Optionally, after recording the target touch point and touch state corresponding to the target touch event received during the calibration period, the method further includes:

[0028] The location of the target touch point on the touch screen is determined, and a preset prompt message is output at the location to prompt the user to release the target touch point.

[0029] Optionally, before receiving touch events sent by the touchscreen driver, the method further includes:

[0030] The target plugin is located in the specified directory and loaded. The target plugin is then used to perform the following steps: entering the correction state when the difference between the receiving time of the first specified touch event and the program startup time is less than a preset threshold; recording the corresponding target touch points and their states based on the target touch events received during the correction period; and exiting the correction state when it is determined that the touch states of all the target touch points are in the release state.

[0031] This application also provides a touch calibration device, which is applied to the touch screen program of an ultrasound device, comprising:

[0032] The touch event receiving module is used to receive touch events sent by the touch screen driver when the program starts.

[0033] The calibration state setting module is used to enter the calibration state and stop responding to all touch events when the difference between the receiving time of the first touch event and the program start time is less than a preset threshold.

[0034] The recording module is used to record the target touch point and touch state corresponding to the target touch event received during the calibration period;

[0035] The calibration state release module is used to exit the calibration state when it is determined based on the recorded touch states that all the target touch points are in the release state, so as to control the ultrasound program based on the subsequently received touch events.

[0036] This application also provides an ultrasonic device, comprising:

[0037] Memory, used to store computer programs;

[0038] A processor for implementing the touch calibration method as described above when executing the computer program.

[0039] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the touch calibration method described above.

[0040] This application provides a touch calibration method applied to a touchscreen program. The method includes: receiving touch events sent by the touchscreen driver when the program starts; entering a calibration state and stopping the response to all touch events when the difference between the receiving time of the first touch event and the program start time is less than a preset threshold; recording the target touch points and touch states corresponding to the target touch events received during the calibration period; and exiting the calibration state when it is determined based on the recorded touch states that all the target touch points are in a released state, so as to control the ultrasound program based on the subsequently received touch events.

[0041] As can be seen, in this application, when the touchscreen program starts up, it can automatically determine the reception time of the first touch event sent by the touchscreen program and determine whether the difference between this time and the program start time is less than a preset threshold. If it is determined that the difference is less than the preset threshold, it can be determined that there is a situation where the user operates the touchscreen during the start-up process of the touchscreen program, which may easily cause the touchscreen program to fail to receive complete touch events. At this time, the touchscreen program can enter a calibration state, stop responding to all touch events, and record the target touch points and touch states corresponding to all target touch events received during the calibration period. Then, it exits the calibration state only when it is determined that the touch states of these target touch points have all become released, so as to control the ultrasound program based on the subsequently received touch events. In this way, touch event reception abnormalities can be detected and handled in a timely manner, avoiding abnormal control problems of the ultrasound equipment caused by this abnormality, thereby improving the user experience of using the ultrasound equipment. This application also provides a touch calibration device, an ultrasound equipment, and a computer-readable storage medium, which have the above-mentioned beneficial effects. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0043] Figure 1 A flowchart illustrating a touch calibration method provided in an embodiment of this application;

[0044] Figure 2 A flowchart of another touch calibration method provided in an embodiment of the present invention;

[0045] Figure 3 This is a structural block diagram of a touch calibration device provided in an embodiment of this application;

[0046] Figure 4This is a structural block diagram of an ultrasonic device provided in an embodiment of this application. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0048] Touch events are used to record user touch operations on the touchscreen. These events are received by the touchscreen driver and sent to the touchscreen program for subsequent control processing. The event typically includes information about the user's touch action, such as pressing, long-pressing, swiping, and releasing, as well as the touch point's ID and location information. It's understood that at least one press action must be performed by the user; in other words, each touch point should correspond to at least one press event. If a touch point only has touch events corresponding to long-press, swiping, or releasing, but not press events, then that touch point is an abnormal touch point, and the corresponding touch event is an abnormal touch event.

[0049] Furthermore, for touchscreen programs, the response to touch events is immediate. In other words, when the program receives a touch event corresponding to a touch point, it immediately executes the corresponding action, such as controlling the ultrasound program to perform ultrasound detection when it determines that the user has clicked the "Start Scan" control on the current display interface, without determining whether the touch point has a corresponding press event. In other words, even if the touchscreen program receives an abnormal touch event, it will still automatically respond to the event. Obviously, if the touchscreen program operates in a scenario where it is prone to receiving abnormal touch events, its existing operating method can easily lead to abnormal control of the ultrasound program. For example, during the startup process of an ultrasound machine touchscreen, the touchscreen program is prone to abnormally controlling the ultrasound program. Specifically, in the general startup process of a touchscreen, the touchscreen driver is usually loaded first, followed by the touchscreen program. During program startup, the touchscreen driver can already receive touch events and forward them to the touchscreen program. However, the touchscreen program cannot receive touch events during startup, which obviously easily leads to the program receiving a large number of abnormal touch events after startup, thus causing abnormal control of the ultrasound program. For example, ultrasound equipment typically includes multiple ultrasound operating modes, such as B-mode ultrasound and color Doppler ultrasound, each with a corresponding selection box on the touchscreen interface. However, a user might accidentally touch a selection box for a certain operating mode during the touchscreen program's startup. Upon completion of startup, the touchscreen program receives a release event corresponding to this accidental touch. In this case, the program will automatically respond to the event and immediately control the ultrasound program to enter the corresponding operating mode, which can obviously cause inconvenience for the user. Therefore, to avoid abnormal control of the ultrasound program by the touchscreen program responding to abnormal touch events, this application provides a touch correction method. This method detects abnormal touch events that might cause abnormal control of the ultrasound program when the touchscreen program completes startup, and stops responding to touch events and performs touch correction upon detection. Please refer to [reference needed]. Figure 1 , Figure 1 A flowchart of a touch calibration method provided in this application embodiment, the method being applied to the touchscreen program of an ultrasound device, may include:

[0050] S101. When the program starts, receive touch events sent by the touch screen driver.

[0051] It should be noted that the embodiments of this application do not limit the specific way in which the touch screen program receives touch events, and relevant touch screen technologies can be referred to.

[0052] S102. When the difference between the reception time of the first touch event and the program start time is less than a preset threshold, enter the correction state and stop responding to all touch events.

[0053] Upon receiving the first touch event, the touchscreen program automatically determines whether the difference between the event's reception time and the program's startup time is less than a preset threshold. If so, it automatically enters a calibration state and stops responding to all touch events. It's understandable that if the first touch event's reception time is very close to the touchscreen program's startup time, it's highly likely the user operated the touchscreen during the program's startup, and the program is very likely to have received an abnormal touch event. If the touchscreen program continues to handle touch events normally in this situation, it could easily cause abnormal control of the ultrasonic program. Therefore, when the difference is determined to be less than the preset threshold, the touchscreen program can first stop responding to all touch events; that is, it will not execute the original response action upon receiving any touch event. Simultaneously, it's understandable that the touchscreen program can only respond to touch events normally after all abnormal touch points have been released. Therefore, to monitor the release of abnormal touch points in real time, while stopping touch event response, it can also enter a calibration state and record the touch points and touch states corresponding to all touch events received during the calibration period in real time. Optionally, the calibration period can be considered as a waiting period during which the touch points are released. Once all touch points have been released, the waiting period is considered to have ended, and the calibration state can be exited.

[0054] It should be noted that the embodiments of this application do not limit the specific method for determining whether the difference between the receiving time of the first touch event and the program startup time is less than a preset threshold. For example, at startup, the current running time of the device can be set as the program startup time, and when the first touch event is received, the current running time of the device can be set as the aforementioned receiving time, thereby calculating whether the difference between the receiving time and the program startup time is less than the preset threshold. Of course, a dedicated counter can also be set, which starts counting immediately when the touch screen program finishes startup, and when the first touch event is received, it is only necessary to obtain the reading of the timer and determine whether the reading is greater than the preset threshold. To improve the ease of setting, the embodiments of this application will use a timer to determine whether the difference between the receiving time of the first touch event and the program startup time is less than the preset threshold.

[0055] In one possible scenario, before receiving the touch event sent by the touchscreen driver, the following may also be included:

[0056] Step 11: Start the timer;

[0057] Accordingly, determining whether the difference between the time of receiving the first touch event and the time of program startup is less than a preset threshold includes:

[0058] Step 12: Upon receiving the first touch event, read the timer reading and determine whether the reading is less than a preset threshold.

[0059] It should be noted that the embodiments of this application do not limit the type of the first touch event, which can be any type of touch event.

[0060] Optionally, the duration of touch events during touchscreen operations on the ultrasound device's touchscreen is determined, and a duration less than or equal to this touch event duration is used as the preset threshold. The process for determining the touch event duration can be as follows: 1) For press keys on the touchscreen (e.g., start scan, select probe, etc.), determine the duration between pressing and releasing the press keys by multiple users in multiple ultrasound device usage scenarios, calculate the average of these durations, and use the average as the touch event duration; 2) For movement keys on the touchscreen (e.g., TGC adjustment keys, LGC adjustment keys, etc.), determine the duration between pressing, dragging, and releasing the movement keys by multiple users in multiple ultrasound device usage scenarios, calculate the average of these durations, and use the average as the touch event duration; 3) For knobs on the touchscreen (e.g., trackball, brightness adjustment knob, etc.), determine the duration between pressing, rotating, and releasing the knobs by multiple users in multiple ultrasound device usage scenarios, calculate the average of these durations, and use the average as the touch event duration.

[0061] Furthermore, to improve the efficiency of recognizing the calibration status, a corresponding calibration status identifier (also known as a reset flag) can be set for the calibration status. Then, when a touch event is received, by simply determining whether this identifier has been set, it can be determined whether to record the target touch point and target touch state corresponding to this touch event, or to respond normally to this touch event. It should be noted that the embodiments of this application do not limit the specific form of the calibration status identifier, and it can be set according to actual application needs.

[0062] S103. Record the target touch point and touch state corresponding to the target touch event received during the calibration period.

[0063] The recording of target touch points and their touch states can be done in the form of a log; however, for ease of subsequent processing, only the latest touch state of the target touch points can be recorded. Specifically, a touch point record can be maintained to record the latest touch state of each target touch point corresponding to the target touch events received during the calibration period. When a target touch event is received, it can be checked whether the touch point record contains the target touch point corresponding to the event. If not, the target touch point can be added to the touch point record, and its touch state can be updated according to the type of the target touch event; if it does, its touch state can be updated directly.

[0064] In one possible scenario, recording the target touch point and touch state corresponding to the target touch event received during the calibration period may include:

[0065] Step 21: Determine whether the touch point record contains a target touch point corresponding to the target touch event; if yes, proceed to step 22; if no, proceed to step 23.

[0066] Step 22: Update the touch state of the target touch point according to the type of the target touch event;

[0067] Step 23: Add the target touch point to the touch point record and update the touch state of the target touch point according to the type of the target touch event.

[0068] Furthermore, the touch state may only include a released state and a non-release state, or it may correspond to the type of the target touch event. For example, when the target touch event is a press event (TouchPointPressed), the touch state should be updated to the press state; when the target touch event is a move event (TouchPointMoved), the touch state should be updated to the move state; when the target touch event is a release event (TouchPointReleased), the touch state should be updated to the release state, and so on. For ease of recording, in this embodiment, the touch state corresponds to the type of the target touch event.

[0069] In one possible scenario, updating the touch state of the target touch point based on the type of the target touch event may include:

[0070] Step 31: When the target touch event is determined to be a press event, update the touch state to the press state;

[0071] Step 32: When the target touch event is determined to be a movement event, update the touch state to the movement state;

[0072] Step 33: When the target touch event is determined to be a release event, update the touch state to the release state.

[0073] Of course, since the touchscreen program cannot respond to any touch events when in calibration mode, meaning the user cannot use the ultrasound device at this time, to avoid inconveniencing the user, corresponding prompts can be output to the touchscreen during calibration to remind the user to release the touch point in time. Specifically, to further facilitate the user in troubleshooting anomalies, after recording the target touch point, the touchscreen program can also additionally obtain the location of the touch point on the touchscreen and output corresponding preset prompts at this location to remind the user to release the touch point.

[0074] In one possible scenario, after recording the target touch point and touch state corresponding to the target touch event received during the calibration period, the process may further include:

[0075] Step 41: Determine the location of the target touch point on the touch screen and output a preset prompt message at the location to prompt the user to release the target touch point.

[0076] It should be noted that the embodiments of this application do not limit the specific form of the preset prompt information. For example, a graphic with a special color (such as red) can be used to mark the position of the target touch point, or other forms of prompt information such as touch screen vibration can be used. The choice can be made according to the actual application requirements.

[0077] S104. When it is determined that all target touch points are in the released state based on the recorded touch states, exit the calibration state to control the ultrasound program based on the subsequently received touch events.

[0078] In this embodiment, the touchscreen program exits the calibration state and resumes responding to touch events only after all target touch points recorded during the calibration period have been released. It then controls the ultrasound program based on subsequently received touch events. This effectively avoids abnormal control of the ultrasound program due to abnormal touch events, thereby significantly improving the user experience of the ultrasound machine. It should be noted that this embodiment does not limit how the touchscreen program controls the ultrasound program based on touch events. For example, it can control the ultrasound program based on the type of touch event and the location of the corresponding touch point in the ultrasound program's interface. For instance, when a touch event is determined to be a normal release event, and the corresponding touch point points to a button in the ultrasound program's interface, the action corresponding to that button is executed. For example, if the button is "Start Detection," the ultrasound program is controlled to start driving the ultrasound device for ultrasound detection; if the button represents a specific working mode, the ultrasound program is controlled to enter the corresponding working mode. Of course, when the touch event is of other types, such as a movement event or a long press event, the touchscreen program can also adopt different response methods, which can be set according to actual application requirements.

[0079] Furthermore, it should be noted that the embodiments of this application do not limit the execution subject of steps S102 to S104, the timer start action, and the reading action to whether it is the touch screen program itself or a plugin set in the touch screen program. Considering that plugins offer greater development flexibility and are easier to deploy, in the embodiments of this application, the execution subject of steps S102 to S104, the timer start action, and the reading action can all be a plugin set in the touch screen program. Therefore, when the touch screen program completes its startup, this plugin should be actively loaded; in addition, to facilitate program loading, the target plugin can be stored in the execution directory for the program to locate.

[0080] In one possible scenario, before receiving the touch event sent by the touchscreen driver, the following may also be included:

[0081] Step 51: Locate the target plugin in the specified directory and load the target plugin to use the target plugin to perform the following steps: when the difference between the receiving time of the first specified touch event and the program start time is less than a preset threshold, enter the correction state; record the corresponding target touch points and their states according to the target touch events received during the correction period; and exit the correction state when it is determined that the touch states of all target touch points are in the release state.

[0082] Based on the above embodiments, in this application, when the touchscreen program completes its startup, it can automatically determine the reception time of the first touch event sent by the touchscreen program and determine whether the difference between this time and the program startup time is less than a preset threshold. If it is determined that the difference is less than the preset threshold, it can be determined that during the startup process of the touchscreen program, there is a situation where the user operates the touchscreen, which may easily cause the touchscreen program to fail to receive complete touch events. At this time, the touchscreen program can enter a calibration state, stop responding to all touch events, and record the target touch points and touch states corresponding to all target touch events received during the calibration period. Then, it exits the calibration state only when it is determined that the touch states of these target touch points have all changed to the release state, so as to control the ultrasound program based on the subsequently received touch events. In this way, the touch event reception anomaly problem can be detected and handled in a timely manner, avoiding abnormal control problems of the ultrasound equipment caused by this anomaly, thereby improving the user experience of using the ultrasound equipment.

[0083] Based on the above embodiments, to improve the recognition efficiency of the correction state, a corresponding correction state identifier can be set for the correction state, so that when a touch event is received, the processing method for the touch event can be determined according to whether this identifier is set. In one possible case, the touch correction method provided by the embodiments of the present invention may include:

[0084] S201. When the program starts, receive touch events sent by the touch screen driver;

[0085] S202. When the difference between the receiving time of the first touch event and the program start time is less than a preset threshold, set the correction status flag and stop responding to all touch events.

[0086] When the reception time of the first touch event is determined to be close to the program startup time, it can be determined that the touchscreen program is prone to receiving abnormal touch events. In this case, a calibration state needs to be set for the program. In this embodiment of the invention, this state can be set by setting a calibration state flag. In this way, when a touch event is received subsequently, it can be determined whether the target touch point and target touch state corresponding to this touch event need to be recorded, or whether the touch event needs to be responded to normally, simply by checking whether this flag has been set.

[0087] S203. When a touch event is received and it is determined that the calibration status flag has been set, the touch event is set as the target touch event, and the target touch point and touch state corresponding to the target touch event are recorded.

[0088] Obviously, when the calibration status flag is set, the touch screen program is in calibration state. Therefore, it cannot respond to newly received touch events at this time, but should record the target touch point and touch state corresponding to this touch event.

[0089] S204. When a touch event is received and it is determined that the calibration status flag is not set, exit the calibration state.

[0090] S205. Based on the recorded touch states, determine whether all target touch points are in the released state; if yes, proceed to step S206; if no, proceed to step S203.

[0091] S206. When it is determined that all target touch points are in the released state based on the recorded touch state, the calibration state flag is canceled so that when a touch event is received and it is determined that the calibration state flag has been canceled, the ultrasound program is controlled based on the touch event.

[0092] Since the target touch points may correspond to abnormal touch events, it is necessary to wait for these touch points to be completely released. Once it is determined that all target touch points are in a released state based on the recorded touch states, the calibration status flag can be canceled. This way, when a new touch event is received subsequently, as long as it is confirmed that the calibration status flag has been canceled, the touch event can be responded to normally to control the ultrasound program.

[0093] The touch calibration method described above is illustrated below with specific examples. Please refer to [link / reference]. Figure 2 , Figure 2This is a flowchart of another touch calibration method provided in an embodiment of this application. The touch calibration process for abnormal touch events in a touchscreen program includes: when the touchscreen program starts, a timer is started; when a touch event is received, it is determined whether the time difference is less than a set threshold; if it is less than the set threshold, it is determined that there is a touchscreen operation during the power-on process, at which point a calibration status flag needs to be set and touch event calibration is performed, while no further touch events are responded to; the state of all touch points is recorded, and when a touch event is received, the state of all touch points is updated; the recorded touch point states are judged, and when all touch points have been released, the touchscreen program needs to cancel the calibration status flag to restart the processing of touch events. Whether to provide a prompt when such an abnormal situation exists can be determined according to user configuration. The prompt method is to display the touch point color as red, while the touch point color is white under normal circumstances. The following is a brief introduction to the touch point state recording process based on a specific example:

[0094] When a touch event is received for touch point id=33554433 and its state is Press, the state of touch point id=33554433 is recorded as Press. If a subsequent touch event is received for touch point id=33554433 and its state is Move, the state of touch point id=33554433 is updated to Move. If a subsequent touch event is received for touch point id=33554433 and its state is Release, the state of touch point id=33554433 is updated to Release. This indicates that touch point id=33554433 has been released and was not pressed.

[0095] The touch calibration device, ultrasonic device, and computer-readable storage medium provided in the embodiments of this application are described below. The touch calibration device, ultrasonic device, and computer-readable storage medium described below can be referred to in correspondence with the touch calibration method described above.

[0096] Please refer to Figure 3 , Figure 3 This is a structural block diagram of a touch calibration device provided in an embodiment of this application. The device is applied to the touch screen program of an ultrasound device and may include:

[0097] The touch event receiving module 301 is used to receive touch events sent by the touch screen driver when the program starts.

[0098] The calibration state setting module 302 is used to enter the calibration state and stop responding to all touch events when the difference between the receiving time of the first touch event and the program start time is less than a preset threshold.

[0099] The recording module 303 is used to record the target touch point and touch state corresponding to the target touch event received during the calibration period;

[0100] The calibration state release module 304 is used to exit the calibration state when it is determined that all target touch points are in the release state based on the recorded touch states, so as to control the ultrasound program based on the subsequently received touch events.

[0101] Optionally, the calibration status setting module 302 may include:

[0102] The flag setting submodule is used to set the calibration status flags;

[0103] Accordingly, the recording module 303 is specifically used for:

[0104] When a touch event is received and it is determined that the calibration status flag has been set, the touch event is set as the target touch event, and the target touch point and touch state corresponding to the target touch event are recorded;

[0105] Correspondingly, the calibration state release module 304 may include:

[0106] The flag cancellation submodule is used to cancel the calibration status flag so that the ultrasound program can be controlled based on the touch event when a touch event is received and it is determined that the calibration status flag has been cancelled.

[0107] Optionally, the recording module 303 includes:

[0108] The judgment submodule is used to determine whether the touch point record contains a target touch point corresponding to the target touch event;

[0109] The update submodule is used to update the touch state of the target touch point according to the type of the target touch event if the condition is met.

[0110] The recording submodule is used to add the target touch point to the touch point record if not, and update the touch state of the target touch point according to the type of the target touch event.

[0111] Optionally, the update submodule and the record submodule may include:

[0112] The first update unit is used to update the touch state to the pressed state when the target touch event is determined to be a press event.

[0113] The second update unit is used to update the touch state to the movement state when the target touch event is determined to be a movement event.

[0114] The third update unit is used to update the touch state to the release state when the target touch event is determined to be a release event.

[0115] Optionally, the device may further include:

[0116] The timer start module is used to start the timer;

[0117] Accordingly, the device may also include:

[0118] The judgment module is used to read the timer reading when the first touch event is received, and to determine whether the reading is less than a preset threshold.

[0119] Optionally, the device may further include:

[0120] The prompting module is used to record the target touch point and touch state corresponding to the target touch event received during the calibration period, determine the position of the target touch point on the touch screen, and output a preset prompt message at the position to prompt the user to release the target touch point.

[0121] Optionally, the device may further include:

[0122] The plugin loading module searches for the target plugin in the specified directory and loads it, so that the target plugin can call the correction state setting module, the recording module, and the correction state release module.

[0123] Please refer to Figure 4 , Figure 4 This is a structural block diagram of an ultrasound device provided in an embodiment of this application. An ultrasound device 20 is disclosed in this application, including a processor 21 and a memory 22; wherein, the memory 22 is used to store a computer program; the processor 21 is used to execute the touch calibration method disclosed in the foregoing embodiment when executing the computer program.

[0124] For details regarding the specific process of the above-mentioned touch calibration method, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0125] Furthermore, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, and the storage method can be temporary storage or permanent storage.

[0126] In addition, the ultrasound device 20 also includes a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26; wherein, the power supply 23 is used to provide operating voltage for each hardware device on the ultrasound device 20; the communication interface 24 can create a data transmission channel between the ultrasound device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0127] Of course, where possible, ultrasound equipment may also include a touch screen and other components, which can be configured according to the actual application requirements.

[0128] Furthermore, embodiments of this application also disclose a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the touch calibration method disclosed in the foregoing embodiments.

[0129] For details regarding the specific process of the above-mentioned touch calibration method, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0130] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0131] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0132] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0133] The foregoing has provided a detailed description of a touch correction method, apparatus, ultrasonic device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A touch calibration method, characterized in that, A touchscreen application for ultrasound equipment, the method comprising: When the program starts, it receives touch events sent by the touch screen driver; the touch screen driver is loaded before the touch screen program; during the startup of the touch screen program, the touch screen driver is already able to receive touch events and forward them to the touch screen program, and the touch screen program does not receive touch events during the startup process. When the difference between the time of receiving the first touch event and the time of program startup is less than a preset threshold, the system enters a correction state and stops responding to all touch events. Record the target touch point and touch state corresponding to the target touch event received during the calibration period; When it is determined that all the target touch points are in a released state based on the recorded touch states, the calibration state is exited to control the ultrasound program based on subsequently received touch events.

2. The touch calibration method according to claim 1, characterized in that, Entering calibration mode includes: Set the calibration status flag; Accordingly, recording the target touch point and touch state corresponding to the target touch event received during the correction period includes: When the touch event is received and it is determined that the calibration status flag has been set, the touch event is set as the target touch event, and the target touch point and touch state corresponding to the target touch event are recorded; Accordingly, exiting the calibration state to control the ultrasound program based on subsequently received touch events includes: The calibration status flag is canceled so that when the touch event is received and it is determined that the calibration status flag has been canceled, the ultrasound program can be controlled based on the touch event.

3. The touch calibration method according to claim 1, characterized in that, The recording of the target touch point and touch state corresponding to the target touch event received during the calibration period includes: Determine whether the touch point record contains a target touch point corresponding to the target touch event; If so, the touch state of the target touch point is updated according to the type of the target touch event; If not, the target touch point is added to the touch point record, and the touch state of the target touch point is updated according to the type of the target touch event.

4. The touch calibration method according to claim 3, characterized in that, The step of updating the touch state of the target touch point according to the type of the target touch event includes: When the target touch event is determined to be a press event, the touch state is updated to the press state; When the target touch event is determined to be a movement event, the touch state is updated to the movement state; When the target touch event is determined to be a release event, the touch state is updated to the release state.

5. The touch calibration method according to claim 1, characterized in that, Before receiving touch events sent by the touchscreen driver, it also includes: Start the timer; Accordingly, determining whether the difference between the time of receiving the first touch event and the time of program startup is less than a preset threshold includes: Upon receiving the first touch event, the timer reading is read, and it is determined whether the reading is less than the preset threshold.

6. The touch calibration method according to claim 1, characterized in that, After recording the target touch point and touch state corresponding to the target touch events received during the calibration period, the process also includes: The location of the target touch point on the touch screen is determined, and a preset prompt message is output at the location to prompt the user to release the target touch point.

7. The touch calibration method according to any one of claims 1 to 6, characterized in that, Before receiving touch events sent by the touchscreen driver, it also includes: The system searches for and loads the target plugin in the specified directory. The target plugin is then used to perform the following steps: when the difference between the receiving time of the first specified touch event and the program startup time is less than a preset threshold, the system enters a correction state; the system records the corresponding target touch points and their states based on the target touch events received during the correction period; and the system exits the correction state when it is determined that the touch states of all the target touch points are in the release state.

8. A touch calibration device, characterized in that, The device is applied to the touchscreen program of an ultrasound device, including: A touch event receiving module is used to receive touch events sent by the touch screen driver when the program starts up; the touch screen driver is loaded before the touch screen program; during the startup process of the touch screen program, the touch screen driver is already able to receive touch events and forward them to the touch screen program, and the touch screen program does not receive the touch events during the startup process. The calibration state setting module is used to enter the calibration state and stop responding to all touch events when the difference between the receiving time of the first touch event and the program start time is less than a preset threshold. The recording module is used to record the target touch point and touch state corresponding to the target touch event received during the calibration period; The calibration state release module is used to exit the calibration state when it is determined based on the recorded touch states that all the target touch points are in the release state, so as to control the ultrasound program based on the subsequently received touch events.

9. An ultrasonic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the touch calibration method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement the touch calibration method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and apparatus for collecting touch event of terminal

    US20110205174A1