Touch screen device control method, stylus, apparatus, and medium

CN123011078APending Publication Date: 2026-10-30MAXEYE SMART TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611401997.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-09
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0003]然而,在实际使用中,触控笔有可能从用户手中意外跌落至触屏设备的屏幕表面

Benefits of technology

[0011]上述触屏设备控制方法、触控笔、装置和介质,触控笔根据实时加速度在预设加速度区间的持续时长,可以准确地识别出触控笔的运动状态,从而根据运动状态确定触控笔的目标笔尖压力,并将目标笔尖压力发送至触屏设备,这样触控设备会根据目标笔尖压力进行出墨控制。可见,本申请可以使得触控设备上的墨迹宽度与触控笔的运动状态相适配,即在不同的运动状态下,触控笔的墨迹宽度不同,在真正的书写状态之外的其它非书写状态下可以实现停止出墨,即墨迹宽度为0,从而改善了漏墨问题,提高文档整洁度。而且本申请不需要在触控笔中增加额外的组件,因此本申请在改善漏墨问题的同时不会增加硬件成本,具有广泛适用性。而且触控笔的上述控制过程简单易实现,可以实现低功耗的触屏设备控制。本申请不需要对触屏设备进行修改,只需要对触控笔的处理单元进行固件升级即可。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123011078A_ABST
    Figure CN123011078A_ABST
Patent Text Reader

Abstract

The application relates to a touch screen device control method, a stylus, a device and a medium. The method comprises the following steps: acquiring real-time acceleration of the stylus; determining a motion state of the stylus according to a duration of the real-time acceleration in a preset acceleration interval; determining a target stylus tip pressure of the stylus according to the motion state; and sending the target stylus tip pressure to the touch screen device; wherein the target stylus tip pressure is used for ink output control of the touch screen device. The application can improve the ink leakage problem, thereby improving the neatness of a document on the screen.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of touch technology, and in particular to a touch screen device control method, stylus, device and medium. Background Technology

[0002] With the development of digital office and education scenarios, styluses supporting high-precision pressure sensitivity are widely used in touchscreen devices such as tablets and laptops. The styluse contains a pressure sensor that detects the pressure data applied by the user when writing and sends this data to the touchscreen device, which then controls the thickness of the ink strokes based on the pressure data.

[0003] However, in actual use, the stylus may accidentally fall from the user's hand onto the screen of the touchscreen device. Due to the relatively large impact force of the stylus hitting the screen, it may mistakenly trigger the pressure sensor to output a high-pressure signal, causing the touchscreen device to interpret it as heavy writing by the user, thus generating thicker ink marks on the screen, i.e., causing ink leakage, which affects the cleanliness of the document on the screen. Summary of the Invention

[0004] Therefore, it is necessary to provide a touch screen device control method, stylus, device, and medium that can improve the cleanliness of documents on the screen by addressing the above-mentioned technical problems and improving ink leakage issues.

[0005] In a first aspect, this application provides a touch screen device control method for a stylus used in conjunction with a touch screen device. The method includes: acquiring the real-time acceleration of the stylus; determining the motion state of the stylus based on the duration of the real-time acceleration within a preset acceleration range; determining the target tip pressure of the stylus based on the motion state; and sending the target tip pressure to the touch screen device; wherein the target tip pressure is used for ink dispensing control by the touch screen device.

[0006] Secondly, this application provides a stylus, including: a body; an accelerometer sensor disposed in the body for collecting the real-time acceleration of the stylus; and a processing unit disposed in the body and electrically connected to the accelerometer sensor, wherein the processing unit is used to: acquire the real-time acceleration; determine the motion state of the stylus based on the duration of the real-time acceleration within a preset acceleration range; determine the target tip pressure of the stylus based on the motion state; and send the target tip pressure to a touchscreen device; wherein the target tip pressure is used for ink dispensing control by the touchscreen device.

[0007] Thirdly, this application provides a touch screen device control device deployed with a stylus used in conjunction with the touch screen device. The device includes: an acceleration acquisition module for acquiring the real-time acceleration of the stylus; a state determination module for determining the motion state of the stylus based on the duration of the real-time acceleration within a preset acceleration range; a pressure determination module for determining the target tip pressure of the stylus based on the motion state; and a pressure transmission module for transmitting the target tip pressure to the touch screen device; wherein the target tip pressure is used for ink dispensing control by the touch screen device.

[0008] Fourthly, this application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method provided in the first aspect.

[0009] Fifthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method provided in the first aspect.

[0010] In a sixth aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method provided in the first aspect.

[0011] The aforementioned touchscreen device control method, stylus, device, and medium allow the stylus to accurately identify its motion state based on the duration of its real-time acceleration within a preset acceleration range. This allows for the determination of the target tip pressure of the stylus based on the motion state, which is then sent to the touchscreen device. The touchscreen device then controls ink dispensing according to this target tip pressure. Therefore, this application enables the ink width on the touchscreen device to adapt to the stylus's motion state; that is, the ink width varies under different motion states. Ink dispensing can be stopped (ink width is 0) in non-writing states other than actual writing states, thus improving ink leakage and enhancing document neatness. Furthermore, this application does not require additional components in the stylus, therefore improving ink leakage without increasing hardware costs, making it widely applicable. The stylus control process is simple and easy to implement, enabling low-power touchscreen device control. This application does not require modification to the touchscreen device; only a firmware upgrade of the stylus's processing unit is needed. Attached Figure Description

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

[0013] Figure 1A This is a schematic diagram of the structure of an interactive system in one embodiment;

[0014] Figure 1B This is a schematic diagram of the stylus structure in one embodiment;

[0015] Figure 2A This is a flowchart illustrating a touchscreen device control method in one embodiment;

[0016] Figure 2B This is a schematic diagram of the internal structure of a triaxial accelerometer in one embodiment;

[0017] Figure 3 This is a flowchart illustrating the motion state determination steps in one embodiment;

[0018] Figure 4 This is a flowchart illustrating the motion state determination steps in one embodiment;

[0019] Figure 5 This is a flowchart illustrating the steps for determining the target pen tip pressure in one embodiment;

[0020] Figure 6 This is a flowchart illustrating the steps for determining the target pen tip pressure in one embodiment;

[0021] Figure 7 This is a flowchart illustrating the writing process steps in one embodiment;

[0022] Figure 8 This is a structural block diagram of a touchscreen device control device in one embodiment;

[0023] Figure 9 This is a diagram of the internal structure of an electronic device in one embodiment. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0025] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0026] In one embodiment, a method such as Figure 1A The interactive system shown includes a touch device and a stylus, wherein:

[0027] The stylus can be an active stylus (or simply an active pen), but other types of styluses are also possible, and this is not a limitation here.

[0028] See Figure 1B The stylus includes a main body, and an accelerometer, a pressure sensor, and a processing unit disposed within the main body. The processing unit is electrically connected to the accelerometer and the pressure sensor, respectively. Of course, the stylus may also include other components, which are not limited here.

[0029] The main body is an integral shell structure for the stylus, providing a mounting, fixing, protection, and gripping carrier for various electronic components.

[0030] An accelerometer is used to collect the real-time acceleration of the stylus. Specifically, the accelerometer can be a triaxial accelerometer or other accelerometers, and the sampling frequency of the accelerometer is greater than or equal to 200Hz.

[0031] The pressure sensor is located near the tip of the stylus. When the stylus tip is pressed down (for example, when a user holds the stylus and writes on a touch device), the pressure sensor detects the pressure at the tip. Therefore, the function of the pressure sensor is to collect the pressure at the stylus tip.

[0032] The processing unit is a main control processing module built into the stylus body, which has the functions of data reception, logic operation and control command output. For example, the processing unit can receive the pen tip pressure collected by the pressure sensor and the real-time acceleration collected by the accelerometer, and generate control commands based on the pen tip pressure and / or real-time acceleration, and send the control commands to the touch device.

[0033] Touch devices, as display devices, specifically include a screen and a control chip. Of course, touch devices may also include other components, which are not limited here.

[0034] As the brain of a touch device, the control chip also has the functions of receiving data, performing logical operations, and outputting control commands. For example, the control chip can receive control commands from the stylus, calculate the target width of the ink stroke based on the control commands, and then output an ink dispensing command to the screen that includes the target width, so that the width of the ink stroke on the screen is the target width.

[0035] The screen comprises a transparent cover layer, a touch layer, and a display layer. The transparent cover layer is the outermost layer and serves a protective function; the touch layer is the middle layer and is used to sense the pressure position of the stylus; the display layer is the innermost layer and is used to display the image. For example, when a user writes on the screen with a stylus, the stylus sends the target pen tip pressure to the touch device's control chip. Simultaneously, after sensing the pen's pressure position, the screen's touch layer sends the pressure position to the control chip. The control chip then calculates the target width of the ink mark based on the target pen tip pressure and outputs an ink dispensing command to the screen's display layer, including the target width and the pressure position, so that the ink mark width at the pressure position on the display layer is set to the target width.

[0036] Of course, the screen may include other components, which are not limited here.

[0037] Data transmission between the touch device and the stylus is achieved via either wireless or wired communication. Wireless communication methods can include Bluetooth, Wi-Fi (Wireless Fidelity), Wi-Fi Flash, and Near Field Communication (NFC), and other methods are also possible. Different communication methods correspond to different communication protocols; therefore, the specific communication protocol used depends on the chosen communication method.

[0038] In actual use, when a stylus is accidentally dropped from a user's hand onto the screen of a touchscreen device, the impact force of the stylus tip hitting the screen is relatively large. At this time, the pressure sensor detects the large pressure of the stylus tip, and the stylus's processing unit generates a control command based on the pressure of the stylus tip and sends the control command to the touchscreen device. The touchscreen device's control chip generates an ink dispensing command based on the control command and the impact position sensed by the touch layer. As a result, the display layer of the screen displays a wide ink mark at the impact position, which can be seen as causing ink leakage and affecting the cleanliness of documents on the screen.

[0039] To address the aforementioned technical problems, in an exemplary embodiment, a touchscreen device control method is provided. This method is applied to a stylus used in conjunction with a touchscreen device, specifically to the processing unit of the stylus. See also... Figure 2A The method includes:

[0040] S210, obtains the real-time acceleration of the stylus.

[0041] That is, the accelerometer collects the real-time acceleration of the stylus, and the processing unit obtains the real-time acceleration from the accelerometer.

[0042] S220 determines the motion state of the stylus based on the duration of real-time acceleration within a preset acceleration range.

[0043] Different preset acceleration ranges are used to characterize the acceleration state of the stylus. The acceleration state can include high acceleration, medium acceleration, and low acceleration, and of course, other acceleration states can also be included, which are not limited here.

[0044] Specifically, the preset acceleration interval may include a first interval, a second interval, and a third interval that do not overlap; wherein: the first interval is the interval with the first acceleration as the upper limit of the boundary; the second interval is the interval with the second acceleration as the lower limit of the boundary; the third interval is the interval with the third acceleration as the midpoint, and the width of the third interval is a preset width; wherein the first acceleration is less than the third acceleration, and the third acceleration is less than the second acceleration.

[0045] For example, the first acceleration is 0.2g, and the first interval is [0, 0.2g]. If the real-time acceleration of the stylus is in the first interval, it indicates that the stylus is in a low acceleration state. The second acceleration is 8g, and the second interval is [8g, +∞). If the real-time acceleration of the stylus is in the second interval, it indicates that the stylus is in a high acceleration state. The third acceleration is 1g, the preset width is 0.2g, and the third interval is [0.9g, 1.1g]. If the real-time acceleration of the stylus is in the third interval, it indicates that the stylus is in a medium acceleration state.

[0046] In this application, the real-time acceleration is determined based on the acceleration in the three directions of x-axis, y-axis and z-axis. For example, the real-time acceleration is equal to the square root of the sum of the squares of the x-axis acceleration, the y-axis acceleration and the z-axis acceleration.

[0047] Taking a triaxial accelerometer as an example of an acceleration sensor, see [link to relevant documentation]. Figure 2B The triaxial accelerometer consists of a mass block and spring structures along three axes. The principles behind setting each preset acceleration range are explained below:

[0048] (1) When the stylus is in an ideal free fall state, the stylus body and the mass block inside the accelerometer fall together, and the real-time acceleration measured by the accelerometer is theoretically close to 0. Considering factors such as sensor noise, zero bias, air resistance, non-ideal free fall, hand release disturbance, and inter-axis measurement error, the real-time acceleration output by the accelerometer will fluctuate around 0. Therefore, the first acceleration can be set to a positive value close to 0. For example, when the first acceleration is 0.2g, the first interval is [0, 0.2g].

[0049] (2) When the stylus is in free fall and impacts, the peak acceleration generated during the impact process is related to factors such as the drop height, the mass of the stylus, the equivalent stiffness of the pen tip and the contact surface, the damping characteristics, the amount of buffer deformation, the range of the acceleration sensor, the screen sampling frequency, and the filtering parameters.

[0050] If we consider the stylus tip and contact surface as an equivalent mass-spring system, and temporarily neglect the effect of damping, the velocity of the stylus before impact... It can be represented as:

[0051]

[0052] And, maximum impact acceleration It can be approximated as:

[0053]

[0054] In the formula, g is the acceleration due to gravity, h is the drop height, and m is the equivalent mass of the stylus involved in the collision. This represents the equivalent contact stiffness between the pen tip and the contact surface.

[0055] The above formulas illustrate the theoretical relationship between drop height, equivalent mass, equivalent contact stiffness, and maximum impact acceleration. In reality, the maximum impact acceleration is also affected by factors such as damping characteristics, drop attitude, contact surface material, sensor range, screen sampling frequency, and filtering parameters.

[0056] When the stylus is dropped from a height within the range of [4cm, 12cm], the maximum impact acceleration 'a' can be calculated using the above formula. max Theoretically, it could reach 20g, but due to factors such as air resistance, inelastic impact, and energy absorption by the internal structure of the stylus, the actual maximum impact acceleration a is limited. max The value is usually between 8g and 15g, so the second acceleration is set to 8g, that is, the second interval is [8g, +∞).

[0057] (3) When the stylus is stationary, the spring structure of the Z-axis is subjected to a pressure of mass × 1g, while the spring structures of the x-axis and y-axis are not subjected to pressure. Therefore, the real-time acceleration is 1g. However, due to the influence of various factors in the actual scene, the real-time acceleration output by the accelerometer will fluctuate slightly around 1g. Therefore, the third acceleration is 1g, the fluctuation amplitude is 0.1g (i.e. the preset width is 0.2g), and the third interval is [0.9g, 1.1g].

[0058] The motion state can include the falling state, the state after falling and hitting the screen, and the stationary state after hitting the screen. Of course, the motion state can also include other states (e.g., writing state), which are not limited here.

[0059] Understandably, the stylus accelerates differently in different motion states. Since acceleration may change even within the same motion state, a preset acceleration range is used to distinguish between different acceleration states. Furthermore, different motion states typically last for different durations. Therefore, the relationship between the duration of real-time acceleration in different preset acceleration ranges and the corresponding preset duration is used to differentiate between different motion states.

[0060] For example, based on the duration of the stylus's real-time acceleration in the first interval, it can be determined whether the stylus is in a falling state. Based on the duration of the stylus's real-time acceleration in the second interval, it can be determined whether the stylus is in a screen-impacting state. Based on the duration of the stylus's real-time acceleration in the third interval, it can be determined whether the stylus is in a stationary state.

[0061] Understandably, the duration of the falling state is longer than the typical duration of the screen impact state. Of course, the duration of the falling state varies depending on the height from which the stylus is dropped. For example, from a height of 10cm, based on the principle of free fall, the duration of the falling state can be calculated to be 140ms. However, due to air resistance, the actual duration is longer than 140ms. Here, height refers to the height difference between the stylus's initial falling position and the screen position.

[0062] Understandably, the screen impact state is a high-frequency impact state, an instantaneous collision, and its duration usually does not exceed 20ms. The duration of the high-frequency impact state is different from the duration of the low-frequency pressing state when the user is writing, which usually lasts for more than 30ms.

[0063] Understandably, the processing unit can accurately distinguish different motion states of the stylus based on the duration of real-time acceleration in different preset acceleration ranges.

[0064] S230 determines the target pen tip pressure based on the motion state.

[0065] Understandably, the pressure applied to the stylus tip varies depending on the state of motion.

[0066] That is, the target pen tip pressure is determined based on the motion state, rather than directly using the pen tip pressure collected by the pressure sensor as the target pen tip pressure.

[0067] S240 sends the target pen tip pressure to the touchscreen device.

[0068] The target pen tip pressure is used to control the ink output of the touchscreen device.

[0069] Specifically, the processing unit encapsulates the target pen tip pressure in the control command and sends the target pen tip pressure to the touch device. In this way, the control chip in the touch device will generate an ink dispensing command based on the target pen tip pressure in the control command, thereby controlling whether the display layer needs to dispense ink, and the thickness of the ink mark, i.e. the ink mark width, when ink dispensing is required.

[0070] The falling, screen-impact, and stationary states mentioned above are all non-writing states, in which ink is not dispensed. Ink is only dispensed during writing.

[0071] For example, in the falling state and the state after impacting the screen, the corresponding target pen tip pressure will cause the touch screen device to stop ink dispensing, meaning the display layer does not need to dispense ink. Of course, in the stationary state after impacting the screen, the corresponding target pen tip pressure will also cause the touch screen device to stop ink dispensing, thereby avoiding invalid ink dispensing caused by pressure on the screen when the stylus is stationary. When ink dispensing is stopped, the target width of the ink mark is 0.

[0072] The aforementioned touchscreen device control method allows the stylus to accurately identify its motion state based on the duration of its real-time acceleration within a preset acceleration range. This allows the system to determine the target tip pressure of the stylus based on the motion state and send this pressure to the touchscreen device. The touchscreen device then controls ink dispensing according to this target tip pressure. Therefore, this embodiment allows the ink width on the touchscreen device to adapt to the stylus's motion state; that is, the ink width varies under different motion states. Ink dispensing can be stopped (ink width is 0) in non-writing states, thus improving ink leakage and document neatness. Furthermore, this embodiment does not require additional components in the stylus, therefore improving ink leakage without increasing hardware costs, making it widely applicable. The process is simple and easy to implement, enabling low-power touchscreen device control. This embodiment does not require modification to the touchscreen device; only a firmware upgrade of the stylus's processing unit is needed.

[0073] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the motion state determination step in S220 is refined.

[0074] See Figure 3 The detailed steps for determining the motion state include:

[0075] S310 determines the motion state of the stylus based on the relationship between the duration of real-time acceleration within a preset acceleration range and the preset duration corresponding to the preset acceleration range.

[0076] Different preset acceleration intervals correspond to different preset durations. For example, the preset duration for the first interval is the first duration, the preset duration for the second interval is the second duration, and the preset duration for the third interval is the third duration.

[0077] Understandably, based on the relationship between the duration of real-time acceleration in each preset acceleration interval and the preset duration corresponding to the preset acceleration interval, it can be determined whether the duration of real-time acceleration in the preset acceleration interval matches the usual duration of the corresponding motion state, thereby determining whether the stylus is in the corresponding motion state.

[0078] For example, based on the relationship between the duration of the stylus's real-time acceleration in the first interval and the first duration, it can be determined whether the stylus is in a falling state. Based on the relationship between the duration of the stylus's real-time acceleration in the second interval and the second duration, it can be determined whether the stylus is in a screen-impacting state. Based on the relationship between the duration of the stylus's real-time acceleration in the third interval and the third duration, it can be determined whether the stylus is in a stationary state.

[0079] In this embodiment, the motion state of the stylus can be quickly and accurately determined based on the relationship between the duration of real-time acceleration in each preset acceleration interval and the preset duration corresponding to the preset acceleration interval.

[0080] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the motion state determination step in S310 is refined.

[0081] See Figure 4 The detailed steps for determining the motion state include:

[0082] S410 determines the stylus's motion state as falling state when the duration of real-time acceleration in the first interval is greater than the first duration.

[0083] Understandably, the falling state usually lasts for a long time, such as the 140ms mentioned above, so the first duration can be set to a value greater than or equal to 100ms.

[0084] For example, the first interval is [0, 0.2g], and the first duration is 100ms. If the duration of the real-time acceleration within [0, 0.2g] is greater than 100ms, then the movement state of the stylus is considered to be a falling state.

[0085] Of course, the first duration can be set to other values, which are not limited here.

[0086] S420 determines the stylus's motion state as a screen impact state when the duration of real-time acceleration in the second interval is less than the second duration.

[0087] Understandably, the duration of a screen impact is usually short, for example, no more than 20ms as mentioned above, so the second duration can be set to a value less than or equal to 20ms.

[0088] For example, the second interval is [8g, +∞), and the second duration is 20ms. If the duration of the real-time acceleration within [8g, +∞) is less than 20ms, then the movement state of the stylus is the screen impact state.

[0089] Understandably, when a user writes rapidly and forcefully on a touchscreen device with a stylus, the stylus's real-time acceleration may exceed 8g. Therefore, without using duration as an auxiliary factor, misjudgments are likely to occur, such as misidentifying rapid, forceful writing as a falling motion, or vice versa. Thus, this embodiment, by employing a second interval and duration, can accurately distinguish between rapid, forceful writing and screen impact, improving the accuracy of motion state recognition.

[0090] S430 determines the stylus's motion state as stationary when the duration of real-time acceleration in the third interval is greater than the third duration.

[0091] There is no order restriction between S410, S420 and S430.

[0092] Understandably, the interval between when the stylus touches the screen and when the user picks it up again is usually at least 100ms to 500ms. Therefore, the third duration can be set to 100ms or a value greater than 100ms.

[0093] For example, the third interval is [0.9g, 1.1g], and the third duration is 110ms. If the duration of the real-time acceleration within [0.9g, 1.1g] (i.e., the difference between the real-time acceleration and 1g is small, and the real-time acceleration is near 1g) is greater than 110ms, then the movement state of the stylus is a stationary state.

[0094] In real-world scenarios, to improve the accuracy of identifying stationary states, a gyroscope can be used to determine if the angular velocity is also zero or close to zero. If the angular velocity is 0 or close to 0, it indicates that the stylus is not rotating violently. If the stylus is not rotating violently, and the duration of the real-time acceleration in the third interval is greater than the third duration, then the stylus is determined to be stationary.

[0095] The first and third durations are both longer than the second duration.

[0096] In this embodiment, three specific implementation methods are provided to determine the motion state of the stylus based on the relationship between the duration of real-time acceleration in each preset acceleration interval and the preset duration corresponding to the preset acceleration interval, thereby accurately determining the falling state, the screen impact state, and the stationary state.

[0097] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the target pen tip pressure determination step in S230 is refined.

[0098] See Figure 5 The detailed steps for determining the target pen tip pressure include:

[0099] S510, when the motion state is in the first state, determines the target pen tip pressure as the first pressure.

[0100] The first state can be a falling state, a screen impact state, or a stationary state, and the first pressure is used to stop the touch screen device from dispensing ink.

[0101] For example, the first pressure is 0.

[0102] Specifically, when the movement is in a falling state, a screen impact state, or a stationary state, the target pen tip pressure is set to 0, and a control command including the target pen tip pressure being 0 is sent to the touch screen device, so that the touch screen device stops dispensing ink, i.e., the ink width is 0.

[0103] In this embodiment, when the movement is in a falling state, an impact state with the screen, or a stationary state, by sending a first pressure to the touch screen device, the touch screen device stops dispensing ink, thereby avoiding ink leakage and improving document neatness.

[0104] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the target pen tip pressure determination step in S510 is refined.

[0105] See Figure 6 The steps for determining the target pen tip pressure include:

[0106] S610, when the motion state is in the first state, configure the preset flag bit as the first character.

[0107] The first character is used to indicate the pressure data collected by the pressure sensor in the shielded stylus.

[0108] The selectable values ​​for the preset flag are the first character (e.g., true) and the second character (e.g., false).

[0109] When the preset flag is configured as the first character, it indicates that the pressure data collected by the pressure sensor in the stylus is blocked, so that the pressure data collected by the pressure sensor in the stylus cannot be sent to the touch screen device.

[0110] When the preset flag is configured to the second character, it indicates that the shielding of pressure data collected by the pressure sensor in the stylus is canceled, so that the pressure data collected by the pressure sensor in the stylus can be sent to the touch screen device.

[0111] S620, when the preset flag position is the first character, determines the target pen tip pressure as the first pressure.

[0112] In this embodiment, when the motion state is the first state, the preset flag is configured as the first character, thereby shielding the pressure data collected by the pressure sensor in the stylus and preventing the pressure data collected by the pressure sensor in the stylus from being sent to the touch screen device, so as to ensure that there is no ink leakage problem when the motion state is the first state.

[0113] Based on the technical solutions provided in the above embodiments, an optional embodiment is provided, in which the touch screen device control method is refined into writing processing steps.

[0114] See Figure 7 The writing process includes:

[0115] S710, when determining that the stylus is in a writing state based on real-time acceleration and pressure data collected by the pressure sensor in the stylus, configures the preset flag as the second character.

[0116] The second character indicates that the shielding of pressure data collected by the pressure sensor in the stylus should be removed.

[0117] Specifically, if the real-time acceleration is within the acceleration range corresponding to the writing state (e.g., real-time acceleration greater than 1g), and the pressure data collected by the pressure sensor in the stylus is within the pressure range corresponding to the writing state (e.g., pressure data collected by the pressure sensor greater than a preset pressure threshold), then the stylus is considered to be in a writing state. The preset pressure threshold can be set as needed, with the ability to distinguish between the writing state and other states serving as the setting standard. The specific value of the preset pressure threshold is not limited here.

[0118] In addition, during the process of the stylus falling, the preset pressure threshold can be increased to further increase the threshold for judging the writing state and further prevent accidental touches.

[0119] S720, when the preset flag is the second character, determines the target pen tip pressure as the pressure data collected by the pressure sensor in the stylus.

[0120] Understandably, if the preset flag is the second character, it means that the shielding of the pressure data collected by the pressure sensor in the stylus has been removed. Therefore, the pressure data collected by the pressure sensor in the stylus is used as the target pen tip pressure. The stylus processing unit generates a control command including the target pen tip pressure and sends the control command to the control chip of the touch screen device. The control chip generates a corresponding target width according to the target pen tip pressure, thereby setting the ink width on the display layer to the target width.

[0121] In this embodiment, during normal writing, the shielding of pressure data collected by the pressure sensor in the stylus is removed. This allows the pressure data to be used as the target pen tip pressure, enabling the touch device to output ink with a width that matches the pressure data collected by the sensor, thus reflecting the user's writing pressure. Furthermore, if the stylus is dropped and the user picks it up again to write, the writing function is automatically restored without requiring the user to unlock or restart the device, reducing user complexity.

[0122] In real-world scenarios, if the stylus's movement state is determined to be writing based on real-time acceleration and pressure data collected by the pressure sensor in the stylus, a preset flag can be directly cleared. Clearing the preset flag also removes the shielding of the pressure data collected by the pressure sensor in the stylus, thus confirming the target pen tip pressure as the pressure data collected by the pressure sensor.

[0123] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0124] Based on the same inventive concept, this application also provides a touch screen device control apparatus for implementing the touch screen device control method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more touch screen device control apparatus embodiments provided below can be found in the limitations of the touch screen device control method described above, and will not be repeated here.

[0125] In one exemplary embodiment, such as Figure 8 As shown, a touchscreen device control device is provided. This device is deployed on a stylus used in conjunction with the touchscreen device. The device includes: an acceleration acquisition module 810, a status determination module 820, a pressure determination module 830, and a pressure transmission module 840, wherein:

[0126] Acceleration acquisition module 810 is used to acquire the real-time acceleration of the stylus;

[0127] The state determination module 820 is used to determine the motion state of the stylus based on the duration of the real-time acceleration within a preset acceleration range.

[0128] The pressure determination module 830 is used to determine the target pen tip pressure of the stylus based on the motion state.

[0129] The pressure transmission module 840 is used to send the target pen tip pressure to the touch screen device; wherein, the target pen tip pressure is used for the touch screen device to control the ink output.

[0130] In one embodiment, the state determination module includes a state determination unit, configured to determine the motion state of the stylus based on the relationship between the duration of real-time acceleration in a preset acceleration range and the preset duration corresponding to the preset acceleration range.

[0131] In one embodiment, the preset acceleration interval includes a first interval, a second interval, and a third interval that do not overlap; wherein: the first interval is an interval with the first acceleration as the upper limit of the boundary; the second interval is an interval with the second acceleration as the lower limit of the boundary; the third interval is an interval with the third acceleration as the midpoint, and the width of the third interval is a preset width; wherein the first acceleration is less than the third acceleration, and the third acceleration is less than the second acceleration.

[0132] In one embodiment, the preset duration corresponding to the first interval is the first duration, the preset duration corresponding to the second interval is the second duration, and the preset duration corresponding to the third interval is the third duration; both the first duration and the third duration are greater than the second duration; the state determination unit is used to: determine the movement state of the stylus as a falling state when the duration of real-time acceleration in the first interval is greater than the first duration; determine the movement state of the stylus as a screen-impacting state when the duration of real-time acceleration in the second interval is less than the second duration; and determine the movement state of the stylus as a stationary state when the duration of real-time acceleration in the third interval is greater than the third duration.

[0133] In one embodiment, the pressure determination module includes: a first determination unit, configured to determine the target pen tip pressure as a first pressure when the motion state is a first state; wherein the first state is a falling state, a screen impact state, or a stationary state, and the first pressure is used to stop the touch screen device from dispensing ink.

[0134] In one embodiment, the first determining unit is specifically used to: when the motion state is a first state, configure a preset flag bit as a first character; the first character is used to indicate the pressure data collected by the pressure sensor in the shielded stylus; and when the preset flag bit is the first character, determine the target pen tip pressure as a first pressure.

[0135] In one embodiment, the device further includes: a writing processing module, configured to set a preset flag to a second character when the motion state of the stylus is determined to be a writing state based on real-time acceleration and pressure data collected by a pressure sensor in the stylus; wherein the second character is used to indicate the cancellation of the shielding of the pressure data collected by the pressure sensor in the stylus; and when the preset flag is the second character, the target pen tip pressure is determined to be the pressure data collected by the pressure sensor in the stylus.

[0136] Each module in the aforementioned touchscreen device control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the electronic device in hardware form or independent of it, or stored in the memory of the electronic device in software form, so that the processor can call and execute the operations corresponding to each module.

[0137] In one exemplary embodiment, an electronic device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown, the electronic device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a touchscreen device control method.

[0138] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0139] In one exemplary embodiment, an electronic device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring the real-time acceleration of a stylus; determining the motion state of the stylus based on the duration of the real-time acceleration within a preset acceleration range; determining the target pen tip pressure of the stylus based on the motion state; and sending the target pen tip pressure to a touchscreen device; wherein the target pen tip pressure is used for ink dispensing control by the touchscreen device.

[0140] In one embodiment, the step of "determining the motion state of the stylus based on the duration of real-time acceleration within a preset acceleration range" implemented by the processor when executing the computer program includes: determining the motion state of the stylus based on the relationship between the duration of real-time acceleration within the preset acceleration range and the preset duration corresponding to the preset acceleration range.

[0141] In one embodiment, the preset acceleration interval includes a first interval, a second interval, and a third interval that do not overlap; wherein: the first interval is an interval with the first acceleration as the upper limit of the boundary; the second interval is an interval with the second acceleration as the lower limit of the boundary; the third interval is an interval with the third acceleration as the midpoint, and the width of the third interval is a preset width; wherein the first acceleration is less than the third acceleration, and the third acceleration is less than the second acceleration.

[0142] In one embodiment, the preset duration corresponding to the first interval is the first duration, the preset duration corresponding to the second interval is the second duration, and the preset duration corresponding to the third interval is the third duration; both the first duration and the third duration are greater than the second duration; the step of "determining the motion state of the stylus based on the relationship between the duration of real-time acceleration in the preset acceleration interval and the preset duration corresponding to the preset acceleration interval" implemented by the processor when executing the computer program includes: determining the motion state of the stylus to be a falling state when the duration of real-time acceleration in the first interval is greater than the first duration; determining the motion state of the stylus to be a screen-impacting state when the duration of real-time acceleration in the second interval is less than the second duration; and determining the motion state of the stylus to be a stationary state when the duration of real-time acceleration in the third interval is greater than the third duration.

[0143] In one embodiment, the step of "determining the target pen tip pressure of the stylus according to the motion state" implemented by the processor when executing the computer program includes: determining the target pen tip pressure as a first pressure when the motion state is a first state; wherein the first state is a falling state, a screen impact state, or a stationary state, and the first pressure is used to stop the touch screen device from dispensing ink.

[0144] In one embodiment, the step of "determining the target pen tip pressure as a first pressure when the motion state is a first state" implemented by the processor when executing the computer program includes: configuring a preset flag bit as a first character when the motion state is a first state; the first character is used to indicate the pressure data collected by the pressure sensor in the stylus; and determining the target pen tip pressure as a first pressure when the preset flag bit is the first character.

[0145] In one embodiment, when the processor executes the computer program, it further implements the steps of: when the motion state of the stylus is determined to be a writing state based on the real-time acceleration and the pressure data collected by the pressure sensor in the stylus, configuring a preset flag bit as a second character; wherein the second character is used to indicate the cancellation of the shielding of the pressure data collected by the pressure sensor in the stylus; and when the preset flag bit is the second character, determining the target pen tip pressure as the pressure data collected by the pressure sensor in the stylus.

[0146] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it performs the following steps: acquiring the real-time acceleration of a stylus; determining the motion state of the stylus based on the duration of the real-time acceleration within a preset acceleration range; determining the target tip pressure of the stylus based on the motion state; and sending the target tip pressure to a touchscreen device; wherein the target tip pressure is used for ink dispensing control by the touchscreen device.

[0147] In one embodiment, the step of "determining the motion state of the stylus based on the duration of real-time acceleration within a preset acceleration range" implemented when the computer program is executed by the processor includes: determining the motion state of the stylus based on the magnitude relationship between the duration of real-time acceleration within the preset acceleration range and the preset duration corresponding to the preset acceleration range.

[0148] In one embodiment, the preset acceleration interval includes a first interval, a second interval, and a third interval that do not overlap; wherein: the first interval is an interval with the first acceleration as the upper limit of the boundary; the second interval is an interval with the second acceleration as the lower limit of the boundary; the third interval is an interval with the third acceleration as the midpoint, and the width of the third interval is a preset width; wherein the first acceleration is less than the third acceleration, and the third acceleration is less than the second acceleration.

[0149] In one embodiment, the preset duration corresponding to the first interval is the first duration, the preset duration corresponding to the second interval is the second duration, and the preset duration corresponding to the third interval is the third duration; both the first duration and the third duration are greater than the second duration; the step of "determining the motion state of the stylus based on the relationship between the duration of real-time acceleration in the preset acceleration interval and the preset duration corresponding to the preset acceleration interval" implemented by the computer program when executed by the processor includes: determining the motion state of the stylus to be a falling state when the duration of real-time acceleration in the first interval is greater than the first duration; determining the motion state of the stylus to be a screen-impacting state when the duration of real-time acceleration in the second interval is less than the second duration; and determining the motion state of the stylus to be a stationary state when the duration of real-time acceleration in the third interval is greater than the third duration.

[0150] In one embodiment, the step of "determining the target pen tip pressure of the stylus according to the motion state" implemented when the computer program is executed by the processor includes: determining the target pen tip pressure as a first pressure when the motion state is a first state; wherein the first state is a falling state, a screen impact state, or a stationary state, and the first pressure is used to stop the touch screen device from dispensing ink.

[0151] In one embodiment, the step of "determining the target pen tip pressure as a first pressure when the motion state is a first state" implemented by the computer program when executed by the processor includes: configuring a preset flag bit as a first character when the motion state is a first state; the first character is used to indicate the pressure data collected by the pressure sensor in the stylus; and determining the target pen tip pressure as a first pressure when the preset flag bit is the first character.

[0152] In one embodiment, when the computer program is executed by the processor, it further implements the steps of: when the motion state of the stylus is determined to be a writing state based on the real-time acceleration and the pressure data collected by the pressure sensor in the stylus, configuring a preset flag bit as a second character; wherein the second character is used to indicate the cancellation of the shielding of the pressure data collected by the pressure sensor in the stylus; and when the preset flag bit is the second character, determining the target pen tip pressure as the pressure data collected by the pressure sensor in the stylus.

[0153] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps: acquiring the real-time acceleration of a stylus; determining the motion state of the stylus based on the duration of the real-time acceleration within a preset acceleration range; determining the target tip pressure of the stylus based on the motion state; and sending the target tip pressure to a touchscreen device; wherein the target tip pressure is used for ink dispensing control by the touchscreen device.

[0154] In one embodiment, the step of "determining the motion state of the stylus based on the duration of real-time acceleration within a preset acceleration range" implemented when the computer program is executed by the processor includes: determining the motion state of the stylus based on the magnitude relationship between the duration of real-time acceleration within the preset acceleration range and the preset duration corresponding to the preset acceleration range.

[0155] In one embodiment, the preset acceleration interval includes a first interval, a second interval, and a third interval that do not overlap; wherein: the first interval is an interval with the first acceleration as the upper limit of the boundary; the second interval is an interval with the second acceleration as the lower limit of the boundary; the third interval is an interval with the third acceleration as the midpoint, and the width of the third interval is a preset width; wherein the first acceleration is less than the third acceleration, and the third acceleration is less than the second acceleration.

[0156] In one embodiment, the preset duration corresponding to the first interval is the first duration, the preset duration corresponding to the second interval is the second duration, and the preset duration corresponding to the third interval is the third duration; both the first duration and the third duration are greater than the second duration; the step of "determining the motion state of the stylus based on the relationship between the duration of real-time acceleration in the preset acceleration interval and the preset duration corresponding to the preset acceleration interval" implemented by the computer program when executed by the processor includes: determining the motion state of the stylus to be a falling state when the duration of real-time acceleration in the first interval is greater than the first duration; determining the motion state of the stylus to be a screen-impacting state when the duration of real-time acceleration in the second interval is less than the second duration; and determining the motion state of the stylus to be a stationary state when the duration of real-time acceleration in the third interval is greater than the third duration.

[0157] In one embodiment, the step of "determining the target pen tip pressure of the stylus according to the motion state" implemented when the computer program is executed by the processor includes: determining the target pen tip pressure as a first pressure when the motion state is a first state; wherein the first state is a falling state, a screen impact state, or a stationary state, and the first pressure is used to stop the touch screen device from dispensing ink.

[0158] In one embodiment, the step of "determining the target pen tip pressure as a first pressure when the motion state is a first state" implemented by the computer program when executed by the processor includes: configuring a preset flag bit as a first character when the motion state is a first state; the first character is used to indicate the pressure data collected by the pressure sensor in the stylus; and determining the target pen tip pressure as a first pressure when the preset flag bit is the first character.

[0159] In one embodiment, when the computer program is executed by the processor, it further implements the steps of: when the motion state of the stylus is determined to be a writing state based on the real-time acceleration and the pressure data collected by the pressure sensor in the stylus, configuring a preset flag bit as a second character; wherein the second character is used to indicate the cancellation of the shielding of the pressure data collected by the pressure sensor in the stylus; and when the preset flag bit is the second character, determining the target pen tip pressure as the pressure data collected by the pressure sensor in the stylus.

[0160] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0161] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. 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). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0162] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0163] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for controlling a touchscreen device, characterized in that, A stylus pen used in conjunction with a touchscreen device, the method comprising: Obtain the real-time acceleration of the stylus; The motion state of the stylus is determined based on the duration of the real-time acceleration within the preset acceleration range. Based on the motion state, determine the target pen tip pressure of the stylus; The target pen tip pressure is sent to the touch screen device; wherein the target pen tip pressure is used by the touch screen device to control ink output.

2. The method according to claim 1, characterized in that, Determining the motion state of the stylus based on the duration of the real-time acceleration within a preset acceleration range includes: The motion state of the stylus is determined based on the relationship between the duration of the real-time acceleration within the preset acceleration range and the preset duration corresponding to the preset acceleration range.

3. The method according to claim 2, characterized in that, The preset acceleration interval includes a first interval, a second interval, and a third interval that do not overlap; wherein: The first interval is the interval with the first acceleration as the upper limit of the boundary; The second interval is the interval with the second acceleration as its lower limit. The third interval is the interval with the third acceleration as the midpoint, and the width of the third interval is a preset width; Wherein, the first acceleration is less than the third acceleration, and the third acceleration is less than the second acceleration.

4. The method according to claim 3, characterized in that, The preset duration corresponding to the first interval is the first duration, the preset duration corresponding to the second interval is the second duration, and the preset duration corresponding to the third interval is the third duration; both the first duration and the third duration are greater than the second duration; Determining the motion state of the stylus based on the relationship between the duration of the real-time acceleration in each preset acceleration interval and the preset duration corresponding to the preset acceleration interval includes: If the duration of the real-time acceleration in the first interval is greater than the first duration, the movement state of the stylus is determined to be a falling state. If the duration of the real-time acceleration in the second interval is less than the second duration, the movement state of the stylus is determined to be a screen impact state. If the duration of the real-time acceleration in the third interval is greater than the third duration, the motion state of the stylus is determined to be a stationary state.

5. The method according to any one of claims 1 to 4, characterized in that, Determining the target pen tip pressure of the stylus based on the motion state includes: When the motion state is the first state, the target pen tip pressure is determined to be the first pressure; The first state can be a falling state, a screen impact state, or a stationary state, and the first pressure is used to stop the touch screen device from dispensing ink.

6. The method according to claim 5, characterized in that, Determining the target pen tip pressure as the first pressure when the motion state is the first state includes: When the motion state is in the first state, the preset flag is configured as the first character; the first character is used to indicate that the pressure data collected by the pressure sensor in the stylus is blocked. When the preset flag is the first character, the target pen tip pressure is determined to be the first pressure.

7. The method according to any one of claims 1 to 4, characterized in that, The method further includes: When the motion state of the stylus is determined to be writing state based on the real-time acceleration and the pressure data collected by the pressure sensor in the stylus, the preset flag is configured as the second character; wherein, the second character is used to indicate the cancellation of the shielding of the pressure data collected by the pressure sensor in the stylus; When the preset flag is the second character, the target pen tip pressure is determined to be the pressure data collected by the pressure sensor in the stylus.

8. A stylus, characterized in that, include: ontology; An accelerometer sensor, located in the main body, is used to collect the real-time acceleration of the stylus. A processing unit, disposed within the main body, is electrically connected to the acceleration sensor, and the processing unit is used for: Obtain the real-time acceleration; The motion state of the stylus is determined based on the duration of the real-time acceleration in different preset acceleration ranges. Based on the motion state, determine the target pen tip pressure of the stylus; The target pen tip pressure is sent to the touch screen device; wherein the target pen tip pressure is used by the touch screen device to control ink output.

9. A touchscreen device control device, characterized in that, A stylus deployed for use with a touchscreen device, the device comprising: An acceleration acquisition module is used to acquire the real-time acceleration of the stylus. The state determination module is used to determine the motion state of the stylus based on the duration of the real-time acceleration in different preset acceleration ranges. The pressure determination module is used to determine the target pen tip pressure of the stylus based on the motion state. A pressure transmission module is used to send the target pen tip pressure to the touch screen device; wherein the target pen tip pressure is used by the touch screen device to control ink output.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.