CN116737016A - Control method and device for touch data scanning, computer equipment and storage medium - Google Patents

Control method and device for touch data scanning, computer equipment and storage medium Download PDF

Info

Publication number
CN116737016A
CN116737016A CN202310789821.7A CN202310789821A CN116737016A CN 116737016 A CN116737016 A CN 116737016A CN 202310789821 A CN202310789821 A CN 202310789821A CN 116737016 A CN116737016 A CN 116737016A
Authority
CN
China
Prior art keywords
touch data
data
scanning
touch
state
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
CN202310789821.7A
Other languages
Chinese (zh)
Other versions
CN116737016B (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.)
Shanghai Shuimu Blue Whale Semiconductor Technology Co ltd
Original Assignee
Shanghai Shuimu Blue Whale Semiconductor 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 Shanghai Shuimu Blue Whale Semiconductor Technology Co ltd filed Critical Shanghai Shuimu Blue Whale Semiconductor Technology Co ltd
Priority to CN202310789821.7A priority Critical patent/CN116737016B/en
Publication of CN116737016A publication Critical patent/CN116737016A/en
Application granted granted Critical
Publication of CN116737016B publication Critical patent/CN116737016B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • G06F3/04166Details of scanning methods, e.g. sampling time, grouping of sub areas or time sharing with display driving
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

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)
  • User Interface Of Digital Computer (AREA)
  • Position Input By Displaying (AREA)

Abstract

The application relates to a control method, a control device, a computer device, a storage medium and a computer program product for touch data scanning. The method comprises the following steps: scanning the touch data; in the scanning process of the touch data, carrying out validity detection on the touch data to obtain a detection result; when the detection result is effective, entering an effective state, and transmitting the touch data to an application layer as effective state data; and when the detection result is invalid, entering an invalid state, and taking the touch data as invalid state data. By adopting the method, the complexity of the touch data in the use process can be reduced.

Description

Control method and device for touch data scanning, computer equipment and storage medium
Technical Field
The present application relates to the field of touch technologies, and in particular, to a method and apparatus for controlling touch data scanning, a computer device, and a storage medium.
Background
With the continuous development of touch technologies in areas such as screens, such as mobile phones, the internal logic of a touch control module is more and more complex.
In the prior art, in order to reduce complexity, the encapsulation processing of the driving interface is performed on the touch control module, and then the application layer directly calls the encapsulated driving interface, so that the acquisition of touch control data is realized. In this case, the application engineer needs to understand the implementation logic of the bottom layer to know how to disassemble the touch data of the different processing mode mashup, and the use of the touch data is too complex.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device, and a computer-readable storage medium for controlling touch data scanning, which can reduce complexity of touch data usage.
In a first aspect, the present application provides a method for controlling touch data scanning, applied to a scanning controller, where the method includes:
scanning the touch data;
in the scanning process of the touch data, carrying out validity detection on the touch data to obtain a detection result;
when the detection result is effective, entering an effective state, and transmitting the touch data to an application layer as effective state data;
and when the detection result is invalid, entering an invalid state, and taking the touch data as invalid state data.
In one embodiment, before the scanning the touch data, the method further includes:
under the initialized state, acquiring scanning parameters of a target mode;
parameter configuration is carried out based on the scanning data, and after the configuration is completed, the initialization state is changed into a working state;
the scanning the touch data includes:
and in the working state, scanning the touch data.
In one embodiment, the scanning the touch data includes:
detecting whether screen mode switching occurs in the process of scanning the touch data;
and if the screen mode switching does not occur, continuing to scan the residual data of the touch data of the current frame until the touch data of the current frame is scanned.
In one embodiment, the touch data includes at least two frames of touch data; in the process of scanning the touch data, detecting whether the screen mode is switched or not further comprises:
and if the screen mode is switched, stopping the touch data scanning of the current frame, scanning based on the touch data of the next frame of the current frame, and entering a working state.
In one embodiment, the detecting the validity of the touch data to obtain a detection result includes:
judging whether screen mode switching occurs according to the screen mode information of the touch data;
if the screen mode switching does not occur, the touch data is valid;
and if the screen mode is switched, determining that the touch data is invalid.
In one embodiment, the screen mode is switched between a bright screen mode and a dead screen mode, and the bright screen mode and the dead screen mode respectively adopt different scanning parameters.
In one embodiment, the touch data includes at least two frames of touch data, and the adjacent frames of touch data are respectively stored in different buffer areas.
In a second aspect, the present application further provides a control device for scanning touch data, where the device includes:
the scanning module is used for scanning the touch data;
the detection module is used for detecting the validity of the touch data in the scanning process of the touch data to obtain a detection result;
the transmission module is used for entering an effective state when the detection result is effective, and transmitting the touch data to an application layer as effective state data;
and the mark module is used for entering an invalid state when the detection result is invalid, and taking the touch control data as invalid state data.
In a third aspect, the present application also provides a computer device, where the computer device includes a memory and a processor, where the memory stores a computer program, and where the processor implements the steps of controlling the touch data scanning in any of the above embodiments when the computer program is executed.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of controlling the scanning of touch data in any of the embodiments described above.
The control method, the control device, the computer equipment and the storage medium for the touch data scanning are used for detecting the validity of the touch data in the touch data scanning process; when the touch control device is effective, the complexity is relatively low, the scanning controller enters an effective state, and touch control data in the effective state is used as effective state data to be transmitted to an application layer; and when the touch control data is invalid, the scanning controller enters an invalid state, and the touch control data is used as invalid state data. Therefore, the effective state and the ineffective state of the scanning controller are determined through the effectiveness detection, the touch data are divided into the effective state data and the ineffective state data, an application layer engineer is not required to disassemble the touch data, and the effective state data are directly transmitted to the application layer, so that the complexity of calling the touch data by the application layer is reduced.
Drawings
FIG. 1 is an application environment diagram of a control method for touch data scanning in one embodiment;
FIG. 2 is a flow chart illustrating a method for controlling touch data scanning in an embodiment;
FIG. 3 is a schematic diagram illustrating a state of a scan controller in one embodiment;
FIG. 4 is a schematic diagram of a software framework of a scan controller according to another embodiment;
FIG. 5 is a flow chart of data processing performed by the scan controller in one embodiment;
FIG. 6 is a flowchart illustrating a control method of touch data scanning in another embodiment;
FIG. 7 is a block diagram illustrating a touch data scanning control device according to an embodiment;
fig. 8 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The control method for touch data scanning provided by the embodiment of the application can be applied to an application environment as shown in fig. 1. The terminal 102 may execute a control method of touch data scanning through a chip such as a central processing unit (Central Processing Unit, CPU), a micro control unit (Microcontroller Unit, MCU), etc., and the chip is provided with an application layer, an automatic scan controller (auto scan manager, ASM) and a touch control layer, the scan controller transmits data between the application layer and the touch control layer, and the application layer relates to a driving interface for receiving valid state data input by the scan controller; the scanning controller is used for determining invalid state data according to a data scanning process and determining valid state data for inputting an application layer; the touch control layer is used for acquiring and outputting touch control data to the scanning controller; the scan controller may be software or hardware based; and the scan controller is also used for determining an initialization state and a working state so as to define the process of scan parameter configuration.
In one embodiment, as shown in fig. 2, there is provided a control method for scanning touch data, where the method is applied to a scan controller, and the method includes the following steps:
in step 202, the touch data is scanned.
The touch data is data output at the touch control layer. The touch control layer is a front end control module (AFE), and data output by the front end control module is touch data. The touch data are data processed by the application layer, the application layer is provided with a plurality of modes, the modes have driving interfaces corresponding to the touch data, and the recognition process of different touch behaviors can be realized through the driving interfaces in the modes.
Because the touch data is difficult to control at the time of generating, and the application layer calls different driving interfaces of the touch data in different modes, when the touch data is directly sent to the application layer for processing, each frame of touch data may involve a switching process adopting different modes, and the logic called by the driving interfaces is too complex.
Optionally, the scanning process of the touch data is controlled by a touch and display driver integrated chip (Touch and Display Driver Integration, TDDI), and a touch subsystem (touch) in the touch and display driver integrated chip can identify the finger touch behavior of the human body by collecting the capacitance variation on the screen.
Optionally, the touch data is scanned frame by frame, where each frame of touch data may be acquired at a frequency of a certain Hertz (HZ), and encapsulated with data acquired during a certain period of time. For example: the touch data are collected according to the frequency of 60 hertz (namely, 60 data are collected every second), and the data obtained by collecting every 16 milliseconds (ms) are packaged into one frame of touch data, and each frame of touch data is scanned according to the collection sequence.
In step 204, in the process of scanning the touch data, validity detection is performed on the touch data to obtain a detection result.
Optionally, in the process of scanning the touch data, if the interrupt condition is detected to be met, judging whether to detect the touch data of the current frame and the touch data of the next frame of the current frame. And stopping the scanning process by the touch data when the interrupt condition is met. The interrupt condition may be set for each frame of touch data; interrupt conditions may be used to characterize the execution of certain interrupt events. For example: when the scanning of a certain frame of touch data is completed, the frame of touch data meets an interrupt condition; when a certain frame of touch data is not scanned completely and the frame of touch data which is not scanned completely triggers a scanning parameter adjustment event of a certain mode, the frame of touch data meets an interrupt condition.
And 206, entering a valid state when the detection result is valid, and transmitting the touch data to an application layer as valid state data.
The effective state is a scanning state of the scanning controller, touch data obtained by scanning in the effective state is effective state data, and the effective state data can be used as input data of an application layer in a certain processing mode, so that the application layer can carry out interface calling according to the effective state data, and a certain function is realized.
In one embodiment, the front end control module generates touch data based on capacitance variation of the screen; the front-end control module inputs touch data to the scanning controller, and the scanning controller determines whether the touch data belongs to a certain mode; if the mode is a certain mode, the front-end control module can be used as valid state data to be transmitted to an application layer in the certain mode. For example, the valid state data may be used to identify a gesture in a bright screen mode, or the valid state data may be used to identify a finger in a bright screen mode, or to identify a gesture in a dead screen mode.
In one embodiment, using the touch data as valid state data includes: storing the touch data in a memory, and marking the touch data through a valid state mark to obtain valid state data; the valid state data in the memory can be transmitted to the application layer according to the valid state flag.
In one embodiment, after transmitting the touch data as valid status data to the application layer, the method further includes: identifying mode information in the valid state data by the application layer; determining a calling mode of the driving interface according to the identified mode information; and according to the calling mode, calling the driving interface through the valid state data. For example: recognizing the touch control of the finger through the effective state data in the bright screen mode; the gesture is recognized by the valid state data in the off screen mode.
And step 208, when the detection result is invalid, entering an invalid state, and taking the touch data as invalid state data.
The invalid state is a scanning state of the scanning controller, touch data obtained by scanning in the invalid state is invalid state data, the invalid state data cannot be used as input data of an application layer in a certain processing mode, and because logic confusion exists in a touch mode of the touch data of the invalid state data, interface calling is difficult to be accurately carried out on an interface of the application layer.
In one embodiment, using the touch data as invalid state data includes: and storing the touch data in a memory, and marking the touch data through an invalid state mark to obtain invalid state data.
In one embodiment, after the touch data is used as the invalid state data, the method further includes: storing invalid state data of the current frame in a memory; and in the next frame touch data scanning process of the current frame, covering invalid state data in the memory by the data scanned by the next frame touch data.
In an exemplary embodiment, when the touch data belongs to one processing mode, the detection result is that the touch data is valid, and the touch data belongs to valid state data in the one processing mode; when the touch data relates to two processing modes, the detection result is that the touch data is invalid, and the touch data belongs to invalid state data.
In the control method for scanning the touch data, the validity of the touch data is detected in the process of scanning the touch data; when the touch control device is effective, the complexity is relatively low, the scanning controller enters an effective state, and touch control data in the effective state is used as effective state data to be transmitted to an application layer; and when the touch control data is invalid, the scanning controller enters an invalid state, and the touch control data is used as invalid state data. Therefore, the effective state and the ineffective state of the scanning controller are determined through the effectiveness detection, the touch data are divided into the effective state data and the ineffective state data, an application layer engineer is not required to disassemble the touch data, and the effective state data are directly transmitted to the application layer, so that the complexity of calling the touch data by the application layer is reduced.
In one embodiment, before scanning the touch data, the method further includes: under the initialized state, acquiring scanning parameters of a target mode; and carrying out parameter configuration based on the scanning data, and changing the initialization state into the working state after completing the configuration.
Correspondingly, scanning the touch data comprises the following steps: and in the working state, scanning the touch data.
The initialization state is a state of parameter configuration for the scanning process of the touch data, is obtained by logic induction in the bottom layer configuration process, and can reduce the complexity of the parameter configuration process.
The target modes are used for controlling corresponding rules of scanning the touch data, and different scanning parameters can be configured for different target modes. Optionally, the target mode may be a screen mode, where the screen mode includes a screen off mode and a screen on mode; the screen-off mode and the screen-on mode relate to different driving interfaces of touch data. Alternatively, the screen mode may be a state of the LCD screen.
The operation state is a state in which touch data is performed for scanning, and may be referred to as busy state. The data in the working state is used for determining that each frame of touch data is valid state data or invalid state data.
In one embodiment, in an initialized state, acquiring scan parameters of a target pattern includes: in the initialized state, a configuration instruction of the scanning parameters is received.
Correspondingly, the parameter configuration based on the scanning data comprises the following steps: the configuration instructions are added to the running form of the scan controller. The operation table is used for controlling the scanning process of the scanning controller in the working state and is used for outputting or deleting data when the scanning controller enters the effective state or the ineffective state.
Optionally, the scan parameters include, but are not limited to; a valid flag of data, a scan command, a scan mode parameter, a scan mode command control table, wherein the parameters specifically include:
flag whether data is valid:
typedef enum
{
scan_data_idle=0,// null
Scan_DATA_OK,// Scan done DATA valid
Scan_DATA_DROP,// Scan done DATA invalidity
}ENUM_SCAN_DATA;
Scanning command:
typedef struct
{
uint16_tdone_frame; number of completed frames
st_scan_info_t info; parameters of/(and/or scanning)
}ST_SCAN_CMD;
Scan mode parameters:
typedef struct
{
uint8_t mode; /(scan pattern determined by screen pattern)
uin8_tsrame; number of required work frames
}st_scan_info_t;
Scan mode command control table:
typedef struct
{
uint8_tcmd_num; number of ID in one scan +.
uint8_t cmd_idx; mode ID in this scan
uint8_t done_idx; mode ID for this scan completion,/, number of supplies is
uint8_t status;/*Work state*/
uint 8_tdata_valid; data is/are valid
St_scan_cmd tab [ afe_scan_mode_max ]; information of all modes is stored,/, cmd+rawdata address
}ST_SCAN_TBL。
In one exemplary embodiment, as shown in FIG. 3, the behavior of the scan is visualized by the scan controller to account for 4 states:
the method comprises the steps of being in an initialized state idle state for carrying out scan parameter configuration; when the configuration of the scanning parameters is completed, scanning is started, and the working state busy state is entered;
when the busy state scanning of the working state is completed and the detection result is effective, and the touch data is effective state data, the scanning controller enters an effective state scan ok state, so that the effective state data can be sent to an upper layer application;
when the busy state scanning of the working state is completed and the detection result is invalid, the scanning controller enters an invalid state scan fail state, and the invalid state data is discarded. It can be understood that the busy state can be re-entered into the working state or the busy state can be exited to the idle state according to the configuration parameters when different scanning succeeds or fails.
In one exemplary embodiment, the scan controller is a behavior visualization of the scan, the parameters of which are illustrated as follows:
typedef enum
{
scan_status_idle=0,// IDLE state
SCAN_STATUS_BUSY,//busy
SCAN_STATUS_OK,//ok
SCAN_STATUS_FAILED//Failed
}ENUM_SCAN_STATUS;
Based on the method, the configuration process of the scanning parameters is carried out through the initialization state, and the control method of the touch data scanning is carried out through the working state, so that the calling process of the touch data is classified through different states, and the complexity of the touch data in the using process is reduced.
In an exemplary embodiment, as shown in fig. 4, the data collected by the touch control layer is scanned by the scan controller, and the data output by the scan controller is output to the application layer. Thus, for a complex module, namely a touch control module, an object, namely a scanning controller, is constructed in the middle layer, so that the driving and the application are stripped; the driving engineer realizes specific register operation, and the application engineer directly calls the scanning controller to acquire required acquisition data; the embedded application embodies an object-oriented programming idea, has clear structure and definite division of labor, and is favorable for the readability and the health of software. Correspondingly, the application engineering layer can be correctly used without understanding the realization logic of the bottom layer, and the requirements of clients are matched; the learning cost is low, the maintenance is easy, and the error is not easy.
In one exemplary embodiment, as shown in FIG. 5, the description is given of the 4 states of the scan controller from this solution;
firstly, an initialization function lib_drv_asm_init (), and controlling a scan controller to be in an initialization state idle state;
then, the scanning parameters in the screen mode are configured, and the scanning parameters can be data such as a screen-off mode, a screen-on mode, a scanning frame number and the like. When the configuration is completed, lib_drv_asm_init () is called to load the mode parameter into the running form;
then, invoking lib_drv_asm_init () to start scanning, and enabling the scanning controller to be in a working state;
next, waiting for the scan to complete to trigger an interrupt event, thereby executing an interrupt service function; and when the touch data is valid, loading the touch data into a memory, setting a data validity completion flag, and obtaining valid state data so as to transmit the valid state data to an application layer.
Finally, the main program of the application layer acquires the effective state data obtained by sampling, processes the data, completes the touch data processing of one frame, and the like. Therefore, an application layer engineer only needs to understand four state machines of the ASM, determines various data based on the state machines, and then matches the data with actual application scenes such as screen modes and the like, so that the function requirement can be realized quickly, the specific logic of touch data scanning is not needed to be concerned, the logic function of a scanning controller is realized by a driving engineer, the division of work is clear, the operation is simple and easy, and the popularization and the maintenance of products are facilitated.
The above embodiments are described in terms of four states of the scan controller, and the following embodiments are described in terms of related events before and after the triggering of an interrupt event during a scan. Optionally, when the touch data scanning of a certain frame is completed, generating an interrupt event of the frame; after the interrupt event of the frame, corresponding steps of the control method of touch data scanning are executed. Optionally, according to some information of the touch data, it may be determined to perform touch data scanning of the current frame, or perform touch data scanning of a next frame of the current frame, or end scanning.
In one embodiment, scanning touch data includes: detecting whether screen mode switching occurs in the process of scanning the touch data; if the screen mode switching does not occur, continuing to scan the residual data of the touch data of the current frame until the touch data of the current frame is scanned.
The screen modes relate to scanning parameters of touch data, the scanning parameters of different screen modes are different, and the touch data and the driving interface required by the application layer are different in different screen modes. When the screen mode switching does not occur, the touch data of the current frame is low in complexity, the touch data of the current frame can be scanned to obtain complete touch data of one frame, and the complete touch data can be used for effectiveness detection.
Correspondingly, the complexity of the effective state data used at the application layer is lower than that of the ineffective state data, so that the effective state data is input to the application layer, and the complexity of data processing can be lower. The complexity of the application layer using invalid state data is high; the complexity can be reduced without inputting the invalid state data into the application layer, and the probability of occurrence of the invalid state data is relatively small under the condition of normal use of the terminal, the processing procedure of the application layer is relatively less, and even a user does not find that the invalid state data exists.
In one embodiment, in a process of scanning touch data, detecting whether a screen mode switch occurs includes: judging whether the current screen mode is finished or not in the process of scanning the touch data; if the screen mode is finished, the screen mode is not switched; if not, a screen mode switch occurs. Whether the current screen mode is ended or not can be determined by a screen mode switching instruction received in the process of scanning the touch data.
In this embodiment, during the process of scanning the touch data, whether the screen mode is switched is detected, so as to evaluate the complexity of the touch data of the current frame. When the screen mode switching does not occur, the touch data of the current frame has lower complexity, the residual data of the touch data of the current frame can be continuously scanned, and the touch data finally scanned by the current frame is used as the touch data meeting the interrupt condition so as to perform effectiveness detection.
In one embodiment, the touch data includes at least two frames of touch data. When the touch data comprises at least two frames of touch data, the touch data of each frame are sequentially arranged, so that the touch data of the next frame of the current frame is formed; the touch data of the next frame is arranged and determined according to the scanning sequence of the touch data of each frame. It is understood that the process of scanning the touch data for the next frame may be the same as or different from the touch data scanning process of the current frame.
Correspondingly, in the process of scanning the touch data, detecting whether the screen mode is switched or not further comprises: if the screen mode is switched, stopping the touch data scanning of the current frame, scanning based on the touch data of the next frame of the current frame, and entering a working state.
In the scanning process, when the event of screen mode switching occurs, the touch data of the current frame has higher complexity, the rest data of the touch data of the current frame should not be continuously scanned, but the touch data of the next frame of the current frame is scanned, so that the data complexity of effectiveness detection is relatively lower, and the scanning efficiency of the touch data is improved.
In one embodiment, performing validity detection on touch data to obtain a detection result includes: judging whether screen mode switching occurs according to screen mode information of the touch data; if the screen mode switching does not occur, the touch data is valid; if the screen mode switching occurs, the touch data is determined to be invalid.
The mode information of the touch data is used for representing the processing mode of the touch data in the acquisition process. Alternatively, the validity of the touch data may be determined based on the number of processing modes characterized by the mode information. When the touch data belongs to a certain processing mode, a driving interface in the processing mode can be adopted to process the touch data input to the application layer; when the touch data belongs to at least two processing modes, the touch data in the processing modes is not suitable for a driving interface in any processing mode to process the touch data input to an application layer. The detection result is used for judging whether the touch data are valid or not.
In one possible implementation, determining whether the screen mode switch occurs according to the screen mode information of the touch data includes: counting screen mode identifiers carried by the touch data to obtain the number of the screen mode identifiers; if the number of the identifiers is larger than the threshold value of the number of the identifiers, screen mode switching occurs; if the number of identifications is less than the identification number threshold, no screen mode switching occurs. Illustratively, the number of identifications threshold is 1.
In one possible implementation, the mode information of the touch data may be a mode identifier carried by the touch data; correspondingly, judging whether the screen mode switching occurs according to the screen mode information of the touch data comprises the following steps: when the touch data has a mode identifier of one processing mode, the touch data belongs to valid state data in the one processing mode; when the touch data has mode identifiers of two processing modes, the touch data belongs to invalid state data. For example: when the touch data has the A mark of the A processing mode, the touch data belongs to the effective state data in the A processing mode; when the touch data has the A mark of the A processing mode and the B mark of the B processing mode, the touch data belongs to invalid state data.
In another possible implementation manner, according to screen mode information of the touch data, determining whether the screen mode switching occurs includes: detecting whether the touch data carries different screen mode identifiers or not; if yes, screen mode switching occurs; if not, no screen mode switching occurs.
In this embodiment, according to the screen mode information of the touch data, whether the screen mode switching occurs or not is judged, and whether the screen mode switching occurs or not is used as the validity detection; when the screen mode is switched, the complexity of the touch data is relatively high, and in order to reduce the complexity, the part of touch data is determined to be invalid; when the screen mode switching does not occur, the complexity of the touch data is relatively low, and the touch data can be determined to be valid.
Optionally, the screen mode is switched to a switching mode between a bright screen mode and a dead screen mode, and the bright screen mode and the dead screen mode respectively adopt different scanning parameters.
The screen-on mode and the screen-off mode are different screen modes, and the scanning parameters adopted by the screen-on mode and the screen-off mode are different. The bright screen mode is a mode in which the screen displays the content, and the off screen mode is a mode in which the screen does not display the content. Optionally, the bright screen mode and the off screen mode are identified by different IDs.
In this embodiment, the screen mode switching between the bright screen mode and the off screen mode may cause a higher complexity in the calling process of the touch data, so when detecting that a certain portion of the touch data characterizes the switching between the bright screen mode and the off screen mode, determining that the portion of the touch data is invalid.
Optionally, the touch data includes at least two frames of touch data, and the adjacent frames of touch data are respectively stored in different buffer areas.
The adjacent frame touch data are all frames of touch data which are scanned sequentially according to a preset scanning sequence. Optionally, the touch data of adjacent frames are updated gradually in time sequence.
In an alternative embodiment, before scanning the touch data, the method further includes: caching touch data of the current frame through a first cache region; and determining the touch data of the next frame of the current frame, and caching the touch data of the next frame through a second cache region. It can be understood that after the touch data of the original current frame is completely cached in the first cache region, the touch data of the original next frame is used as the touch data of the current frame, and the second cache region where the touch data of the original next frame is located is changed into the first cache region, so that the alternate use of different cache regions is realized.
In one exemplary embodiment, the function lib_drv_asm_next_run () main function is to perform processing of subsequent actions; the data buffer area is arranged, so that a double buffer area mechanism (a double buffer mechanism) is facilitated, and memory conflicts are avoided; two buffer areas, buffer1 and buffer2, are used to alternately use the current frame data and the next frame data.
In addition, the different buffer areas can also be used for judging whether the scanning of the touch data of the next frame needs to be started; if so, starting scanning of the touch data of the next frame, and entering a working state; and if the scanning of the touch data of the next frame is not needed, exiting the scanning to enter an initialization state.
In one exemplary embodiment, the screen mode may be an LCD mode. If the LCD mode is changed during the scanning, the touch data has higher complexity and is unreliable, and the touch data is required to be used as invalid state data; if the LCD mode is unchanged during scanning, the touch data is low in complexity and reliable, the touch data is effective state data, the effective state data of the bottom layer is copied to a memory, and a data effective flag is set so that the effective state data is transmitted to an application layer through the effective flag.
In an exemplary embodiment, as shown in FIG. 6, it includes lib_drv_asm_next_run corresponding to the embodiment of step 202 described above, and lib_drv_asm_get_data corresponding to steps 204-208 described above.
In the lib_drv_asm_next_run, firstly, a double buffer (including an original buffer area (raw buffer) of touch data of a current frame and a next frame) of data is set, then, whether the current mode is ended is judged, if so, the next frame of data is scanned, and otherwise, the corresponding step of lib_drv_asm_get_data is entered.
In lib_drv_asm_get_data, firstly, step 204 corresponds to the step of judging whether the LCD state is changed; if step 204 reaches step 206, a valid state is entered, i.e. data_valid=ok, and then, in step 206, if the touch data of the current frame is scanned, the touch data of the current frame is transmitted to the application layer as valid state data.
In lib_drv_asm_get_data, if yes, step 204 reaches step 208, an invalid state is entered, and the touch data is taken as invalid state data, i.e. frame dropping is performed, and data_valid=drop.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a control device for realizing the control method of the touch data scanning. The implementation scheme of the device for solving the problem is similar to that described in the above method, so the specific limitation in the embodiments of the control device for scanning one or more touch data provided below may refer to the limitation of the control method for scanning the touch data hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 7, there is provided a control device for scanning touch data, the device including:
the scanning module 702 is configured to scan the touch data;
the detection module 704 is configured to perform validity detection on the touch data in a scanning process of the touch data, so as to obtain a detection result;
a transmission module 706, configured to enter a valid state when the detection result is valid, and transmit the touch data to the application layer as valid state data;
and the marking module 708 is used for entering an invalid state when the detection result is invalid, and taking the touch data as invalid state data.
In one embodiment, the scanning module 702 is configured to:
under the initialized state, acquiring scanning parameters of a target mode;
parameter configuration is carried out based on the scanning data, and after the configuration is completed, the initialization state is changed into the working state;
and in the working state, scanning the touch data.
In one embodiment, the scanning module 702 is configured to:
detecting whether screen mode switching occurs in the process of scanning the touch data;
if the screen mode switching does not occur, continuing to scan the residual data of the touch data of the current frame until the touch data of the current frame is scanned.
In one embodiment, the touch data includes at least two frames of touch data; a scanning module 702 for:
if the screen mode is switched, stopping the touch data scanning of the current frame, scanning based on the touch data of the next frame of the current frame, and entering a working state.
In one embodiment, the detection module 704 is configured to:
judging whether screen mode switching occurs according to screen mode information of the touch data;
if the screen mode switching does not occur, the touch data is valid;
if the screen mode switching occurs, the touch data is determined to be invalid.
In one embodiment, the screen mode is switched between a bright screen mode and a dead screen mode, and the bright screen mode and the dead screen mode respectively adopt different scanning parameters.
In one embodiment, the touch data includes at least two frames of touch data, and the adjacent frames of touch data are respectively stored in different buffer areas.
All or part of the modules in the control device for touch data scanning can be realized by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure thereof may be as shown in fig. 8. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program, when executed by the processor, implements a method for controlling the scanning of touch data. The display unit of the computer equipment is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device, wherein the display screen can be a liquid crystal display screen or an electronic ink display screen, the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on a shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 8 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A control method for scanning touch data, which is applied to a scanning controller, the method comprising:
scanning the touch data;
in the scanning process of the touch data, carrying out validity detection on the touch data to obtain a detection result;
when the detection result is effective, entering an effective state, and transmitting the touch data to an application layer as effective state data;
and when the detection result is invalid, entering an invalid state, and taking the touch data as invalid state data.
2. The method of claim 1, wherein prior to the scanning the touch data, the method further comprises:
under the initialized state, acquiring scanning parameters of a target mode;
parameter configuration is carried out based on the scanning data, and after the configuration is completed, the initialization state is changed into a working state;
the scanning the touch data includes:
and in the working state, scanning the touch data.
3. The method of claim 1, wherein the scanning the touch data comprises:
detecting whether screen mode switching occurs in the process of scanning the touch data;
if the screen mode switching does not occur, continuing to scan the residual data of the touch data of the current frame until the touch data of the current frame is scanned
4. The method of claim 3, wherein the touch data comprises at least two frames of touch data; in the process of scanning the touch data, detecting whether the screen mode is switched or not further comprises:
and if the screen mode is switched, stopping the touch data scanning of the current frame, scanning based on the touch data of the next frame of the current frame, and entering a working state.
5. The method of claim 1, wherein the performing validity detection on the touch data to obtain a detection result includes:
judging whether screen mode switching occurs according to the screen mode information of the touch data;
if the screen mode switching does not occur, the touch data is valid;
and if the screen mode is switched, determining that the touch data is invalid.
6. The method of claim 5, wherein the screen mode is switched between a bright screen mode and a dead screen mode, the bright screen mode and the dead screen mode respectively employing different scan parameters.
7. The method of claim 1, wherein the touch data comprises at least two frames of touch data, and adjacent frames of touch data are respectively stored in different buffers.
8. A control device for touch data scanning, the device comprising:
the scanning module is used for scanning the touch data;
the detection module is used for detecting the validity of the touch data in the scanning process of the touch data to obtain a detection result;
the transmission module is used for entering an effective state when the detection result is effective, and transmitting the touch data to an application layer as effective state data;
and the mark module is used for entering an invalid state when the detection result is invalid, and taking the touch control data as invalid state data.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202310789821.7A 2023-06-29 2023-06-29 Control method and device for touch data scanning, computer equipment and storage medium Active CN116737016B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310789821.7A CN116737016B (en) 2023-06-29 2023-06-29 Control method and device for touch data scanning, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310789821.7A CN116737016B (en) 2023-06-29 2023-06-29 Control method and device for touch data scanning, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116737016A true CN116737016A (en) 2023-09-12
CN116737016B CN116737016B (en) 2024-04-30

Family

ID=87918379

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310789821.7A Active CN116737016B (en) 2023-06-29 2023-06-29 Control method and device for touch data scanning, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116737016B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117406845A (en) * 2023-12-11 2024-01-16 深圳曦华科技有限公司 Reset method, reset device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113885708A (en) * 2021-10-22 2022-01-04 Oppo广东移动通信有限公司 Screen control method and device of electronic equipment, electronic equipment and storage medium
CN114298709A (en) * 2020-09-21 2022-04-08 北京小米移动软件有限公司 Data processing method and device for touch screen, terminal and storage medium
CN115390689A (en) * 2021-05-24 2022-11-25 广州视源电子科技股份有限公司 Touch data compression method and device, storage medium and interactive panel
CN115525176A (en) * 2022-04-01 2022-12-27 荣耀终端有限公司 Data transmission method, touch control pen and storage medium
WO2023029940A1 (en) * 2021-08-31 2023-03-09 华为技术有限公司 Touch screen control method and related device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114298709A (en) * 2020-09-21 2022-04-08 北京小米移动软件有限公司 Data processing method and device for touch screen, terminal and storage medium
CN115390689A (en) * 2021-05-24 2022-11-25 广州视源电子科技股份有限公司 Touch data compression method and device, storage medium and interactive panel
WO2023029940A1 (en) * 2021-08-31 2023-03-09 华为技术有限公司 Touch screen control method and related device
CN113885708A (en) * 2021-10-22 2022-01-04 Oppo广东移动通信有限公司 Screen control method and device of electronic equipment, electronic equipment and storage medium
CN115525176A (en) * 2022-04-01 2022-12-27 荣耀终端有限公司 Data transmission method, touch control pen and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王立欣;马国华;刘双宝;: "VXI总线高速大容量数据采集模块", 电子测量技术, no. 06 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117406845A (en) * 2023-12-11 2024-01-16 深圳曦华科技有限公司 Reset method, reset device, computer equipment and storage medium
CN117406845B (en) * 2023-12-11 2024-05-03 深圳曦华科技有限公司 Reset method, reset device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN116737016B (en) 2024-04-30

Similar Documents

Publication Publication Date Title
CN107544272B (en) Terminal control method, device and storage medium
CN116737016B (en) Control method and device for touch data scanning, computer equipment and storage medium
KR102056806B1 (en) Terminal and server providing a video call service
US20070050470A1 (en) Display method and system of computer information
CN108008992B (en) Input operation processing method, processing device and computer readable storage medium
CN111782492A (en) Page first screen loading duration testing method and device, computer equipment and medium
CN114995862B (en) Method, device and system for calling diagnosis module
CN112286825A (en) Screen testing method and device for intelligent cabin and electronic equipment
CN110955390A (en) Data processing method and device and electronic equipment
CN111381748A (en) Image display method, device, equipment and storage medium
CN114791780B (en) Display screen touch control method, device, equipment and storage medium
CN114764363B (en) Prompting method, prompting device and computer storage medium
CN113934198A (en) Vehicle diagnosis method, vehicle diagnosis device, electronic device, and storage medium
CN114115673A (en) Control method of vehicle-mounted screen
CN107491205B (en) Integrated machine
CN111352529A (en) Method, device, terminal and storage medium for reporting touch event
KR101373291B1 (en) Method for controlling electronic machine of communication terminal and apparatus implemented therefor
CN110704247A (en) Application memory exception processing method and device, electronic equipment and device
CN111190574A (en) Method, device, equipment and storage medium for selecting options of multi-stage linkage assembly
CN111930425B (en) Data control method and device and computer readable storage medium
US20220357824A1 (en) Machine learning assisted contactless control of a physical device through a user device
CN116204336B (en) User state core state synchronization method and system based on registry callback mechanism
JP7383684B2 (en) Information processing device, information processing method, and program
CN112988283A (en) Screenshot obtaining method and device, terminal equipment and storage medium
CN109005308B (en) Image acquisition method, test device 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