CN112558797A - Active pen, control method and device thereof, and computer-readable storage medium - Google Patents

Active pen, control method and device thereof, and computer-readable storage medium Download PDF

Info

Publication number
CN112558797A
CN112558797A CN202110188319.1A CN202110188319A CN112558797A CN 112558797 A CN112558797 A CN 112558797A CN 202110188319 A CN202110188319 A CN 202110188319A CN 112558797 A CN112558797 A CN 112558797A
Authority
CN
China
Prior art keywords
active pen
code
pressure
key
pen
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110188319.1A
Other languages
Chinese (zh)
Other versions
CN112558797B (en
Inventor
钟洪耀
雷俊杰
李林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Qianfenyi Intelligent Technology Co Ltd
Original Assignee
Shenzhen Qianfenyi Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Qianfenyi Intelligent Technology Co Ltd filed Critical Shenzhen Qianfenyi Intelligent Technology Co Ltd
Priority to CN202110188319.1A priority Critical patent/CN112558797B/en
Publication of CN112558797A publication Critical patent/CN112558797A/en
Application granted granted Critical
Publication of CN112558797B publication Critical patent/CN112558797B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • G06F3/03545Pens or stylus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/038Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • G06F3/04162Control or interface arrangements specially adapted for digitisers for exchanging data with external devices, e.g. smart pens, via the digitiser sensing hardware

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Position Input By Displaying (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses an active pen, a control method and a control device thereof, and a computer-readable storage medium, wherein the active pen comprises a display device and an active pen, the active pen periodically sends a coding signal to the display device, and the control method of the active pen comprises the following steps: when the active pen is at the starting time of a code printing signal sending period, executing the generation operation of a lead code, and acquiring the state information of the active pen; determining a target code sent by the active pen to the display equipment according to the state information and the lead code; and when the active pen is at the end time of the period of sending the code printing signal, sending the target code to the display equipment. The technical problem that the active pen has large power consumption loss is solved, and the power consumption of the active pen is optimized.

Description

Active pen, control method and device thereof, and computer-readable storage medium
Technical Field
The present application relates to the field of display technologies, and in particular, to an active pen, a control method and apparatus thereof, and a computer-readable storage medium.
Background
With the development of information technology, more and more touch screen devices enter people's lives, such as a smart television, a mobile phone and a touch pad, and an active pen is needed for realizing the touch screen function.
The active pen realizes synchronous communication with the electronic screen by sending a coding signal. If the user does not need to use the active pen, the active pen still sends the code printing signal, which undoubtedly causes higher energy consumption. In order to reduce the problem of active energy loss, a Gsensor is usually added to an active pen for counting, the idle time of the active pen is counted, when the idle time reaches a preset value, the active pen enters a sleep state, when a pressure sensor detects that the spatial position of the active pen changes, the active pen enters a working state, the power consumption is reduced by controlling the working current and voltage changes of the active pen in different states, but the active pen needs to send coding frequency information to display equipment for multiple times in different working states, so that the active pen still has the problem of large power consumption loss, and the power consumption of the active pen cannot be optimally reduced.
Disclosure of Invention
The embodiment of the application aims to solve the problem that a large power consumption loss still exists in an active pen by providing the active pen, a control method and a control device thereof and a computer readable storage medium.
The active pen periodically sends a coding signal to the display device, and the control method of the active pen comprises the following steps:
when the active pen is at the starting time of a code printing signal sending period, executing the generation operation of a lead code, and acquiring the state information of the active pen;
determining a target code sent by the active pen to the display equipment according to the state information and the lead code;
and when the active pen is at the end time of the period of sending the code printing signal, sending the target code to the display equipment.
Optionally, the status information includes a sleep status, an operating status, and a standby status, and the step of determining a target code sent by the active pen to the display device according to the status information and the preamble includes:
when the active pen is in the working state, acquiring current pressure data, and coding the pressure data to form a pressure code;
combining the preamble code with the pressure code to form the target code;
when the active pen is in the dormant state or the standby state and the key operation is determined to exist, generating a corresponding key code according to the key operation;
combining the preamble code with the key code to form the target code.
Optionally, the step of encoding the current pressure data to form a pressure code includes:
determining a pressure level of the pressure data;
and coding according to the pressure grade and a preset coding mode to form the pressure code.
Optionally, the active pen includes two keys, and the step of generating a corresponding key code according to the key operation includes:
acquiring key information of the key operation;
when the key information is first key information, generating a first key code;
when the key information is second key information, generating a second key code;
and when the key information is the first key information and the second key information, generating a third key code.
Optionally, the step of executing a preamble generation operation to obtain the state information of the active pen when the active pen is at the start time of the period of sending the code signal includes:
and controlling the operation of generating the preamble to be completed within a preset time.
Optionally, before the step of executing a preamble generation operation and acquiring the state information of the active pen when the active pen is at the start time of the period of sending the code signal, the method includes:
acquiring a pressure value of the pressure data;
when the pressure value is smaller than a preset pressure threshold value, acquiring a signal value of the dynamic sensor;
when the time that the signal value is smaller than the signal threshold is larger than a first time threshold, determining that the active pen is in a standby state;
and when the time that the signal value is smaller than the signal threshold is larger than a second time threshold, determining that the active pen is in a dormant state, wherein the second time threshold is larger than the first time threshold.
Optionally, after the step of obtaining the pressure value of the pressure sensor of the active pen, the method further includes:
and when the pressure value is larger than the preset pressure threshold value, determining that the active pen is in the working state.
In order to achieve the above embodiments, the present application further provides a control device of an active pen, including:
the acquisition module is used for executing the generation operation of the lead code when the active pen is at the starting time of the period of sending the code printing signal, and acquiring the state information of the active pen;
the determining module is used for determining a target code sent by the active pen to the display equipment according to the state information and the lead code;
and the sending module is used for sending the target code to the display equipment when the active pen is at the end time of the period of sending the code printing signal.
In order to implement the foregoing embodiments, the present application further provides an active pen, where the active pen includes a processor, a memory, and a control program of the active pen stored on the memory and executable on the processor, and when the control program of the active pen is executed by the processor, the steps of the control method of the active pen are implemented as described above.
To achieve the above embodiments, the present application further provides a computer-readable storage medium, on which a control program of an active pen is stored, and the control program of the active pen, when executed by a processor, implements the steps of the control method of the active pen as described above.
In this embodiment, by controlling the active pen to execute the operation of generating the lead code at the initial time of sending the coding period to the display device, obtaining the state information of the active pen, generating the target code according to the state information and the lead code, and sending the target code to the display device at the end time of sending the coding period, the active pen only needs to send the lead code once to the display device, so that the number of times of sending the lead code to the display device when the active pen is in the period of sending the coding signal is effectively controlled, and the energy consumption problem of the active pen is further optimized.
Drawings
Fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating an embodiment of a method for controlling an active pen according to the present application;
FIG. 3 is a flowchart illustrating a control method of an active pen according to another embodiment of the present disclosure;
fig. 4 is a functional module diagram of a control method of the active pen according to the present application.
The objectives, features, and advantages of the present application will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The main solution of the embodiment of the application is as follows: when the active pen is at the starting time of a code printing signal sending period, executing the generation operation of a lead code, and acquiring the state information of the active pen; determining a target code sent by the active pen to the display equipment according to the state information and the lead code; and when the active pen is at the end time of the period of sending the code printing signal, sending the target code to the display equipment.
The current active pen usually adds a Gsense to the active pen for counting when reducing the active energy loss problem, counts the idle time of the active pen, enters a dormant state when reaching a preset value, enters a working state when a pressure sensor detects that the spatial position of the active pen changes, reduces the power consumption by controlling the changes of the working current and the working voltage of the active pen in different states, but still has the problem of large power consumption loss in different working states, and cannot optimally reduce the power consumption of the active pen.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present application.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, a remote controller, an audio circuit, a WiFi module, a detector, and the like. Of course, the terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer and a temperature sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 does not constitute a limitation of the terminal device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer-readable storage medium, may include therein an operating system, a network communication module, a user interface module, and a control program of the active pen.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call up a control program of the active pen stored in the memory 1005 and perform the following operations:
when the active pen is at the starting time of a code printing signal sending period, executing the generation operation of a lead code, and acquiring the state information of the active pen;
determining a target code sent by the active pen to the display equipment according to the state information and the lead code;
and when the active pen is at the end time of the period of sending the code printing signal, sending the target code to the display equipment.
Referring to fig. 2, fig. 2 is a schematic flowchart of a control method of an active pen according to a first embodiment of the present application.
While the embodiments of the present application provide an embodiment of a method for controlling an active pen, it should be noted that although a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different from that shown or described herein.
The active pen periodically sends a coding signal to the display device, and the control method of the active pen comprises the following steps:
step S10, when the active pen is at the starting time of the period of sending the code signal, executing the generation operation of the lead code, and acquiring the state information of the active pen;
and the code printing signal period is the period T of the code printing signal sent by the active pen to the display equipment. Which includes the time T at which the preamble is generated1And time T for coding the pressure data collected on the active pen to form coded information2I.e. in the present application, the coding signal period T = T1+T2
The state information includes a working state, a standby state, a dormant state, an initialization state and the like, wherein the working state is a state in which the active pen is used by a user, the dormant state is a state in which the active pen closes each functional module to save power, and the standby state is a state in which each functional module is in the standby state to save energy consumption. It can be understood that when the active pen is in a working state, the pressure sensor, the TX module, the RX module and other modules of the active pen normally perform tasks, the energy consumption of the active pen is the highest, and when the active pen is in a dormant state, each functional module of the active pen stops being in a closed state, and the consumption of the active pen is the lowest; in the standby state, the energy loss of the active pen is between the dormant state and the working state.
The step of executing a preamble generation operation and acquiring the state information of the active pen when the active pen is at the start time of a period for sending a code signal includes:
and controlling the operation of generating the preamble to be completed within a preset time.
In the present application, the generation time of the preamble is controlled to be the initial time of the period of transmitting the code signal, and the operation of generating the preamble is completed. Specifically, in this embodiment, the code signal period is 16ms as an example, and the preamble generation time is controlled from the start time to the 2.1ms in one period, so as to complete the operation of generating the preamble. Sufficient time is reserved for generating pressure data and encoding pressure data when the electronic pen is in a working state subsequently by controlling the generation time of the lead code.
Before the step of obtaining the current state information of the active pen, the method comprises the following steps:
step S11, acquiring a pressure value of the pressure data;
step S12, when the pressure value is smaller than a preset pressure threshold value, acquiring a signal value of the dynamic sensor;
step S13, when the time that the signal value is less than the signal threshold is greater than the first time threshold, determining that the active pen is in a standby state;
step S14, when the time when the signal value is smaller than the signal threshold is greater than a second time threshold, it is determined that the active pen is in the sleep state, and the second time threshold is greater than the first time threshold.
In the application, a pressure sensor and a dynamic sensor are arranged in the active pen, a switching key is further arranged, and a processor in the active pen determines state information of the active pen according to the pressure sensor, the switching key and the dynamic sensor.
After the step of obtaining the pressure value of the pressure sensor of the active pen, the method further comprises:
and step S15, when the pressure value is larger than the preset pressure threshold value, determining that the active pen is in the working state.
When the active pen is in a working state, because a user holds the active pen for writing, the pressure value (pressure value) of the pressure sensor is changed frequently, and therefore the state information of the active pen can be determined by collecting the pressure value of the pressure sensor.
The dynamic sensor is an acceleration sensor, a gyroscope or a gravity sensor.
The preset pressure threshold value is the size of the pressure value detected by the pressure sensor when a user uses the active pen to write. In this application, in order to control the state information that the initiative pen goes out more accurately, in this embodiment, still can distinguish according to the habit of writing that acquires different users, for example, in this application, the long-time data acquisition of accessible, acquire the pressure value of user when writing, analyze it, with the state information that the accurate control initiative pen was located, avoid the erroneous judgement of state information, lead to the mistake when the user does not use and start entering operating condition, cause the consumption extravagant, or when the user needs to use, can not in time get into operating condition's problem. The specific distinguishing method may be that, during initial use, the preset pressure threshold of the user is set as a standard value, the standard value is a factory-set value, and the preset pressure threshold is modified by detecting the use habit of the user within 30 days, so that the active pen can more accurately control the active pen to enter different state information.
Specifically, the preset pressure threshold of the active pen set by the factory is 0.5N (that is, the active pen is determined to be in the working state when a force of 0.5N exists by taking the preset pressure threshold as a critical value). Through data acquisition in 30 days, the analysis obtains the habit that the user also can hand the initiative pen even when not writing, but the pressure value that the user often used when writing can be bigger, in order to prevent that the default pressure threshold value of 0.5N from triggering the initiative pen by mistake, leads to extravagant energy consumption, then improve the pressure value of predetermineeing to 0.7N, when the pressure sensor of initiative pen detected the pressure value that is greater than 0.7N, control initiative pen and get into operating condition.
The processor enables the active pen to be in different states such as a dormant state, a standby state and a working state according to the received pressure value of the pressure sensor, the XYZ value of the acceleration sensor and the interruption change of the switching key; when the XYZ value of the acceleration sensor changes (the signal value of the acceleration sensor is greater than the signal threshold value) or an interrupt signal of the switching key is sent to the processor through the communication interface, the processor enables the TX boost circuit to output a coding signal to the pen head circuit, and the coding signal is transmitted to the touch screen TP.
When the pressure value obtained by the pressure sensor is smaller than 0.7N, and the acceleration sensor continuously does not act for 1 minute, namely the time when the signal value of the dynamic sensor is smaller than the signal threshold reaches a first time threshold (one minute), the active pen is controlled to enter a standby state; and when the pressure value acquired by the pressure sensor is less than 0.7N, and the acceleration sensor continuously does not act for 2 minutes, namely the time when the signal value of the dynamic sensor is less than the signal threshold reaches a second time threshold (2 minutes), controlling the active pen to enter a dormant state.
Step S20, determining a target code sent by the active pen to the display device according to the state information and the lead code;
the target code includes a preamble and a code of information generated under different state information according to the active pen.
In the present application, the target code may be formed according to the state of the active pen and the preamble. For example, when the active pen is in a working state, pressure data acquired by the active pen in the working state is acquired, the pressure data is encoded to form pressure codes capable of being transmitted through data, and the pressure codes and the lead codes are combined to generate target codes.
And step S30, when the active pen is at the end time of the period of sending the code printing signal, the target code is sent to the display equipment.
In the application, when the active pen is at the end time of the coding signal period, the generated target code is sent to the display device, so that the display device receives the target code and then decodes the pressure coding information in the target code to obtain pressure data. Specifically, the coding signal period is set to 16ms, when the active pen is at the initial time of the coding signal period, a lead code is generated, the current state information of the active pen is obtained, a target code is generated according to the state information and the lead code, and when the current system time reaches 16ms, the target code is sent to the display device.
When the active pen is actually used, a lead code and pen point pressure information are required to be coded to form a target code which is periodically sent to display equipment, and the lead code is used for displaying handwriting of the active pen by a screen end according to the pen point pressure. It can be understood that the display device executes a decoding operation on the target code after receiving the target code to obtain pressure data carried in the target code, and displays the writing of the user on the display screen according to the pressure data, wherein the magnitude of the pressure is related to the thickness of the writing.
The tip electrode of the active pen may transmit one or more segments of encoded information encoded according to a predetermined rule or format, and the encoded information and the preamble may be combined to generate a target code, which may be transmitted to the display device. The display equipment demodulates and restores the pressure data of the pen point of the active pen carried in the target code according to the signal coding format agreed by the protocol, and finally reports the pressure data to the operating system to execute the relevant operation. The active Pen and the display device may be arranged to encode and decode the pressure data by using, for example, frequency coding of Microsoft Pen Protocol (MPP), Binary Phase Shift Keying (BPSK) Phase coding of universal stylus alliance (USI), and amplitude coding of other protocols.
In this embodiment, by controlling the active pen to execute the operation of generating the lead code at the initial time of sending the coding period to the display device, obtaining the state information of the active pen, generating the target code according to the state information and the lead code, and sending the target code to the display device at the end time of sending the coding period, the active pen only needs to send the lead code once to the display device, so that the number of times of sending the lead code to the display device when the active pen is in the period of sending the coding signal is effectively controlled, and the energy consumption problem of the active pen is further optimized.
Further, referring to fig. 3, another embodiment of the method for controlling the active pen of the present application is provided.
The state information comprises a sleep state, a working state and a standby state, and the step of determining the target code sent by the active pen to the display device according to the state information and the lead code comprises the following steps:
step S21, when the active pen is in the working state, obtaining the current pressure data, and coding the pressure data to form a pressure code;
step S22, combining the lead code and the pressure code to form the target code;
step S23, when the active pen is in the dormant state or the standby state and the key operation is determined to exist, generating a corresponding key code according to the key operation;
step S24, combining the preamble with the key code to form the target code.
In this embodiment, when the active pen is in a sleep state or a standby state, there is no any key operation, or when the active pen is in an operating state but there is no pressure data, the target code is sent to the display device after the period of sending the code printing signal arrives, and at this time, the target code only includes the preamble.
When the active pen is in a working state, a pressure sensor on the active pen acquires pressure data. When the active pen is in a working state, the current pressure data is encoded to form a pressure code.
The step of encoding the current pressure data to form a pressure code comprises:
step S211, determining the pressure grade of the pressure data;
and S212, coding according to the pressure grade and a preset coding mode to form the pressure code.
The preset mode is a mode for coding the pressure data into pressure codes, and the preset mode comprises a binary coding mode, an octal coding mode or a hexadecimal coding mode.
In this embodiment, a binary coding mode is adopted to encode the pressure level of the pressure data and the corresponding code thereof as shown in table 1 below:
TABLE 1
Figure 101143DEST_PATH_IMAGE001
As shown in table 1 above, when the preamble is 10000, the active pen is at the current pressure level, and when the acquired pressure level is 2, the corresponding pressure code is 000000000101 according to table 1, and the target code is 10000000000000101 in combination with the preamble. And after the display equipment receives the target code, decoding the target code according to the encoding and decoding rule agreed when the connection is established in the active pen to obtain pressure data, and displaying the handwriting of the active pen used by the user on a display interface of the display equipment according to the determined position information. In this embodiment, when the active pen is in the working state, pressure data written by a user using the active pen when the active pen is in the working state is further acquired, the level of the pressure data is further determined, and then a pressure code corresponding to the pressure data is obtained, and the pressure code is combined with the lead code to generate a target code, which is sent to the display device.
The active pen comprises two keys, and the step of generating corresponding key codes according to the key operations comprises the following steps:
step S231, acquiring key information of the key operation;
step S232, when the key information is first key information, generating a first key code;
step S233, when the key information is the second key information, generating a second key code;
in step S234, when the key information is the first key information and the second key information, a third key code is generated.
The key information is touch information of specific keys on the electronic pen.
In this embodiment, the electronic pen includes two keys, and when receiving touch information from a certain key, the active pen needs to send the touch information to the display device, specifically, when the touch information is sent from a first key on the electronic pen, it is determined that the key information is first key information, and it needs to generate a first key code and send the first key code to the display device, where the first key code may be in a form of 000000000001, and the first key code is combined with the preamble to generate a target code of 10000000000000001; when touch information is transmitted from a second key on the electronic pen, the key information is determined to be second key information, the first key code is generated and sent to the display equipment, the form of the second key code can be 000000000010, and the second key code is combined with the lead code to generate a target code 10000000000000010; when touch information is transmitted from the first key and the second key on the electronic pen, the key information is determined to be third key information, a third key code is generated and sent to the display device, the form of the third key code can be 000000000011, and the third key code is combined with the lead code to generate a target code 10000000000000011. Therefore, after the display equipment receives the target code, the target code is decoded, and the operation instruction input by the user on the touch pen can be executed. In this embodiment, when the received touch information of the user is that the key on the active pen is touched, the corresponding key information is acquired, the key information is generated into a key code, the key code is combined with the lead code to generate a target code, the lead code is combined with the key code generated by the key information to obtain the target code, and the target code is further sent to the display device.
Referring to fig. 4, fig. 4 is a functional module flow diagram of the present application. In order to achieve the above embodiments, the present application further provides a control device of an active pen, including:
an obtaining module 10, configured to execute a preamble generation operation when the active pen is at a start time of a period of sending a code signal, and obtain state information of the active pen;
a determining module 20, configured to determine, according to the state information and the preamble, a target code that is sent by the active pen to a display device;
and the sending module 30 is configured to send the target code to the display device when the active pen is at the end of the period of sending the code printing signal.
In order to implement the foregoing embodiments, the present application further provides an active pen, where the active pen includes a processor, a memory, and a control program of the active pen stored on the memory and executable on the processor, and when the control program of the active pen is executed by the processor, the steps of the control method of the active pen are implemented as described above.
To achieve the above embodiments, the present application further provides a computer-readable storage medium, on which a control program of an active pen is stored, and the control program of the active pen, when executed by a processor, implements the steps of the control method of the active pen as described above.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While alternative embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following appended claims be interpreted as including alternative embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A control method of an active pen is characterized by comprising a display device and the active pen, wherein the active pen periodically sends a coding signal to the display device, and the control method of the active pen comprises the following steps:
when the active pen is at the starting time of a code printing signal sending period, executing the generation operation of a lead code, and acquiring the state information of the active pen;
determining a target code sent by the active pen to the display equipment according to the state information and the lead code;
and when the active pen is at the end time of the period of sending the code printing signal, sending the target code to the display equipment.
2. The method of claim 1, wherein the status information comprises a sleep state, an active state, and a standby state, and wherein determining the target code for the active pen to send to the display device based on the status information and the preamble comprises:
when the active pen is in the working state, acquiring current pressure data, and coding the pressure data to form a pressure code;
combining the preamble code with the pressure code to form the target code;
when the active pen is in the dormant state or the standby state and the key operation is determined to exist, generating a corresponding key code according to the key operation;
combining the preamble code with the key code to form the target code.
3. The method for controlling an active pen according to claim 2, wherein the step of encoding the current pressure data to form a pressure code comprises:
determining a pressure level of the pressure data;
and coding according to the pressure grade and a preset coding mode to form the pressure code.
4. The method for controlling an active pen according to claim 2, wherein the active pen includes two keys, and the step of generating the corresponding key codes according to the key operations includes:
acquiring key information of the key operation;
when the key information is first key information, generating a first key code;
when the key information is second key information, generating a second key code;
and when the key information is the first key information and the second key information, generating a third key code.
5. The method for controlling an active pen according to claim 1, wherein the step of performing a preamble generation operation to obtain the status information of the active pen when the active pen is at the start time of a period for transmitting a coded signal comprises:
and controlling the operation of generating the preamble to be completed within a preset time.
6. The method for controlling the active pen according to claim 3, wherein the step of performing a preamble generation operation to obtain the status information of the active pen when the active pen is at the start time of the period for transmitting the code signal comprises:
acquiring a pressure value of the pressure data;
when the pressure value is smaller than a preset pressure threshold value, acquiring a signal value of the dynamic sensor;
when the time that the signal value is smaller than the signal threshold is larger than a first time threshold, determining that the active pen is in a standby state;
and when the time that the signal value is smaller than the signal threshold is larger than a second time threshold, determining that the active pen is in a dormant state, wherein the second time threshold is larger than the first time threshold.
7. The active pen control method of claim 6, wherein after the step of obtaining the pressure value of the pressure sensor of the active pen, the method further comprises:
and when the pressure value is larger than the preset pressure threshold value, determining that the active pen is in the working state.
8. A control device for an active pen, comprising:
the acquisition module is used for executing the generation operation of the lead code when the active pen is at the starting time of the period of sending the code printing signal, and acquiring the state information of the active pen;
the determining module is used for determining a target code sent by the active pen to the display equipment according to the state information and the lead code;
and the sending module is used for sending the target code to the display equipment when the active pen is at the end time of the period of sending the code printing signal.
9. Active pen, characterized in that the active pen comprises a processor, a memory and a control program of the active pen stored on the memory and executable on the processor, which control program of the active pen when executed by the processor implements the steps of the control method of the active pen according to any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a control program of an active pen, which when executed by a processor implements the steps of the control method of the active pen according to any one of claims 1 to 7.
CN202110188319.1A 2021-02-19 2021-02-19 Active pen, control method and device thereof, and computer-readable storage medium Active CN112558797B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110188319.1A CN112558797B (en) 2021-02-19 2021-02-19 Active pen, control method and device thereof, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110188319.1A CN112558797B (en) 2021-02-19 2021-02-19 Active pen, control method and device thereof, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN112558797A true CN112558797A (en) 2021-03-26
CN112558797B CN112558797B (en) 2021-07-06

Family

ID=75035975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110188319.1A Active CN112558797B (en) 2021-02-19 2021-02-19 Active pen, control method and device thereof, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN112558797B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114217700A (en) * 2022-02-18 2022-03-22 荣耀终端有限公司 Touch pen switching method and input device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011021823A2 (en) * 2009-08-21 2011-02-24 주식회사 네오랩컨버전스 Method for measuring movement path of a reader, and reader adopting same
CN102866792A (en) * 2012-08-20 2013-01-09 深圳市汇顶科技有限公司 Touch pen, touch controller, touch detecting system and method thereof
CN107533397A (en) * 2015-04-09 2018-01-02 株式会社和冠 Method, system, sensor controller and the active stylus of active stylus and sensor controller are used
WO2018049636A1 (en) * 2016-09-17 2018-03-22 深圳市汇顶科技股份有限公司 Signal generation method, signal parsing method, active pen and touch screen
WO2018155205A1 (en) * 2017-02-22 2018-08-30 株式会社ワコム Method executed by system including active stylus and sensor controller, sensor controller, and active stylus
CN110531874A (en) * 2019-08-05 2019-12-03 深圳市千分一智能技术有限公司 A kind of active capacitance pen and its electricity-saving control method
CN111124158A (en) * 2019-11-11 2020-05-08 华为技术有限公司 Information input equipment, terminal, control method thereof and chip
CN111930269A (en) * 2020-09-22 2020-11-13 深圳市汇顶科技股份有限公司 Code printing signal detection method and device and code printing signal detection system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011021823A2 (en) * 2009-08-21 2011-02-24 주식회사 네오랩컨버전스 Method for measuring movement path of a reader, and reader adopting same
CN102866792A (en) * 2012-08-20 2013-01-09 深圳市汇顶科技有限公司 Touch pen, touch controller, touch detecting system and method thereof
CN107533397A (en) * 2015-04-09 2018-01-02 株式会社和冠 Method, system, sensor controller and the active stylus of active stylus and sensor controller are used
WO2018049636A1 (en) * 2016-09-17 2018-03-22 深圳市汇顶科技股份有限公司 Signal generation method, signal parsing method, active pen and touch screen
WO2018155205A1 (en) * 2017-02-22 2018-08-30 株式会社ワコム Method executed by system including active stylus and sensor controller, sensor controller, and active stylus
CN110531874A (en) * 2019-08-05 2019-12-03 深圳市千分一智能技术有限公司 A kind of active capacitance pen and its electricity-saving control method
CN111124158A (en) * 2019-11-11 2020-05-08 华为技术有限公司 Information input equipment, terminal, control method thereof and chip
CN111930269A (en) * 2020-09-22 2020-11-13 深圳市汇顶科技股份有限公司 Code printing signal detection method and device and code printing signal detection system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114217700A (en) * 2022-02-18 2022-03-22 荣耀终端有限公司 Touch pen switching method and input device

Also Published As

Publication number Publication date
CN112558797B (en) 2021-07-06

Similar Documents

Publication Publication Date Title
CN112558796B (en) Electronic pen, control method and device thereof, and computer-readable storage medium
CN111290665B (en) Pressure detection method and device, active pen, touch chip and electronic equipment
CN111580690B (en) Touch pen mode switching method and device, touch pen and readable storage medium
US7636042B2 (en) Battery life improvement for wireless devices through activity report combining
WO2018006841A1 (en) Qr code information transmission method, device and apparatus
CN107132941B (en) Pressure touch method and electronic equipment
CN108958606B (en) Split screen display method and device, storage medium and electronic equipment
CN108027725B (en) Method, device and equipment for guiding terminal equipment operation
CN106776259B (en) Mobile terminal frame rate detection method and device and mobile terminal
WO2018166204A1 (en) Method for controlling fingerprint recognition module, and mobile terminal and storage medium
US20140334364A1 (en) Remote wake-up system and method
CN112913199A (en) Data transmission method and related product
CN112558798A (en) Communication method and device of active pen, terminal and storage medium
CN110035504B (en) Method for determining spatial relationship, terminal and base station
CN112558797B (en) Active pen, control method and device thereof, and computer-readable storage medium
CN107479744B (en) Method, device, terminal and storage medium for adjusting scheduling priority of touch screen
US11614812B2 (en) Method and apparatus for pressure detection, active pen, touch control chip, and electronic device
CN112987976B (en) Touch pen, handwriting display method and device thereof, and terminal equipment
CN106230919B (en) File uploading method and device
WO2023088198A1 (en) Network connection method and apparatus, and electronic device
CN108170360B (en) Control method of gesture function and mobile terminal
CN112888024A (en) Data processing method, data processing device, storage medium and electronic equipment
CN107621999B (en) Log information reporting method and device, storage medium and mobile terminal
CN105005382A (en) Human body communication based wireless input system and implementation method thereof
CN114297322A (en) Data processing method, device, terminal and storage medium

Legal Events

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