CN115629678A - Touch information processing method, device, equipment and storage medium - Google Patents

Touch information processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN115629678A
CN115629678A CN202211525208.6A CN202211525208A CN115629678A CN 115629678 A CN115629678 A CN 115629678A CN 202211525208 A CN202211525208 A CN 202211525208A CN 115629678 A CN115629678 A CN 115629678A
Authority
CN
China
Prior art keywords
touch
information
point
event
data
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
CN202211525208.6A
Other languages
Chinese (zh)
Other versions
CN115629678B (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.)
Nanjing Yihui Information Technology Co ltd
Original Assignee
Nanjing Yihui Information 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 Nanjing Yihui Information Technology Co ltd filed Critical Nanjing Yihui Information Technology Co ltd
Priority to CN202211525208.6A priority Critical patent/CN115629678B/en
Publication of CN115629678A publication Critical patent/CN115629678A/en
Application granted granted Critical
Publication of CN115629678B publication Critical patent/CN115629678B/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/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers

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)

Abstract

The invention discloses a touch information processing method, a touch information processing device, touch information processing equipment and a storage medium. The method is applied to a SylixOS system, and comprises the following steps: acquiring initial touch information by using a preset touch screen; determining touch data according to the reported event code of the single touch point position, the reported event codes of all touch point positions and the initial touch point position information; and writing the touch data into a multi-point touch device node so that a preset application can finish the processing of the touch data by reading the data in the multi-point touch device node. The technical scheme of the embodiment of the invention solves the problem of an interactive mode only supporting single-point touch in a SylixOS system, and improves the use experience of a user.

Description

Touch information processing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of human-computer interaction technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing touch information.
Background
Human-computer interaction refers to the technology of enabling human-computer interaction in an efficient manner through computer input and output devices. Touch interaction is an interaction mode which is widely applied in man-machine interaction. With the application and development of touch screens such as touch screen mobile phones, touch screen computers, touch screen cameras and touch screen electronic billboards, touch interaction is applied to various industries, including but not limited to the fields of industrial control, medical treatment and the like. With the rapid development of business requirements, more and more devices need to use a touch screen under the SylixOS system.
Currently, in the SylixOS system, the core of touch interaction is mainly: the method comprises the steps of touch chip driving, touch screen driving general frames and touch event obtaining. The touch screen chip driver mainly achieves initialization of the touch screen chip and acquisition of position information of a touch point, the touch screen driver universal framework mainly achieves functions of registration of the touch screen driver, generation of equipment nodes and the like, and is responsible for converting position data acquired by the touch screen chip into a uniform kernel touch event and sending the uniform kernel touch event to the application layer, and the application layer acquires the touch event by reading the nodes of the touch equipment and further processes the touch event.
However, in the SylixOS system, only a single-touch interaction mode is usually supported, and a multi-touch interaction mode is not supported, so that compatibility is poor, and user experience is affected.
Disclosure of Invention
The invention provides a touch information processing method, a touch information processing device, touch information processing equipment and a touch information processing storage medium, and aims to solve the problem that only a single-point touch interaction mode is supported in a SylixOS system.
In a first aspect, the present invention provides a method for processing touch information, including:
acquiring initial touch information by using a preset touch screen, wherein the initial touch information comprises multi-point touch information, the multi-point touch information comprises a synchronous event code and initial touch point position information, and the synchronous event code comprises a single touch point position reporting event code and all touch point position reporting event codes;
determining touch data according to the single touch point position reporting event code, all touch point position reporting event codes and the initial touch point position information, wherein the touch data comprises multi-point touch data;
and writing the touch data into a multi-point touch device node so that a preset application can complete the processing of the touch data by reading the data in the multi-point touch device node.
In a second aspect, the present invention provides an apparatus for processing touch information, including:
the touch information determining module is used for acquiring initial touch information by utilizing a preset touch screen, wherein the initial touch information comprises multi-point touch information, the multi-point touch information comprises a synchronous event code and initial touch point position information, and the synchronous event code comprises a single touch point position reported event code and all touch point position reported event codes;
the touch data determining module is used for determining touch data according to the single touch point position reporting event code, all touch point position reporting event codes and the initial touch point position information, wherein the touch data comprises multi-point touch data;
and the data writing module is used for writing the touch data into a multi-point touch device node so that a preset application can finish the processing of the touch data by reading the data in the multi-point touch device node.
In a third aspect, the present invention provides an electronic device, comprising:
at least one processor;
and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the method of processing touch information of the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium storing computer instructions for causing a processor to implement the touch information processing method of the first aspect when executed.
The touch information processing scheme provided by the invention is applied to a SylixOS system, and initial touch information is obtained by using a preset touch screen, wherein the initial touch information comprises multi-point touch information, the multi-point touch information comprises a synchronous event code and initial touch point position information, the synchronous event code comprises a single touch point position reporting event code and all touch point position reporting event codes, and touch data is determined according to the single touch point position reporting event code, all touch point position reporting event codes and the initial touch point position information, wherein the touch data comprises multi-point touch data, and the touch data is written into a multi-point touch equipment node, so that a preset application can complete the processing of the touch data by reading data in the multi-point touch equipment node. By adopting the technical scheme, the multi-point touch information is firstly obtained by utilizing the preset touch screen, the multi-point touch data is determined according to the synchronous event code and the initial touch point position information contained in the multi-point touch information, and finally the multi-point touch data is written into the multi-point touch equipment node, so that the preset application can read the data in the multi-point touch equipment node, and the problem that only a single-point touch interaction mode is supported in a SylixOS system is solved by identifying the multi-point touch data and storing the multi-point touch data into the newly created multi-point touch equipment node, and the use experience of a user is improved.
It should be understood that the statements herein do not identify key or critical features of the invention, nor do they limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for processing touch information according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a process for processing touch information according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for processing touch information according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a touch information processing apparatus according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. In the description of the present invention, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, a and/or B, which may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a method for processing touch information according to an embodiment of the present invention, where the embodiment is applicable to a SylixOS system in which a multi-touch manner is used for human-computer interaction, and the method is applicable to the SylixOS system and is executed by a processing apparatus for touch information, where the processing apparatus for touch information may be implemented in a form of hardware and/or software, and the processing apparatus for touch information may be configured in an electronic device, and the electronic device may be formed by two or more physical entities or may be formed by one physical entity. The SylixOS is an embedded real-time operating system, supports SMP (symmetric Multi-Processing) Multi-core real-time scheduling, and can run on development platforms of various central processor architectures.
As shown in fig. 1, a method for processing touch information according to an embodiment of the present invention includes the following steps:
s101, initial touch information is obtained by using a preset touch screen, wherein the initial touch information comprises multi-point touch information, the multi-point touch information comprises a synchronous event code and initial touch point position information, and the synchronous event code comprises a single touch point position reporting event code and all touch point position reporting event codes.
In this embodiment, multi-touch information input by a user, that is, initial touch information, may be acquired through a touch screen of the electronic device, that is, a preset touch screen. The initial touch information may be understood as touch information sensed by the preset touch screen every time a user performs a touch operation, the start of the touch operation may be defined as the start of the touch operation, the departure from the touch screen may be defined as the end of the touch operation, and if the user performs multiple touch operations, multiple pieces of initial touch information may be correspondingly obtained from the preset touch screen. The multi-touch information may be understood as touch information generated by simultaneously operating a predetermined touch screen with a plurality of touch objects (e.g., a plurality of hands or a plurality of fingers), and the touch information may include position information of a touch point, i.e., initial touch point position information, a synchronization event code, and the like. The effect of the synchronous event code may be understood as that the occurrence of the identification event, for example, the occurrence of the identification multi-touch or single-touch, that is, each time a preset touch screen senses a touch point, a synchronous event code may be generated, where the synchronous event code is a reported event code for a single touch point position, and when the preset touch screen senses the last touch point, a synchronous event code may be generated, where the synchronous event code is a reported event code for all touch point positions. The initial touch point position information may be understood as position information of each touch point on a preset touch screen during each multi-touch operation performed by a user. The touch chip may determine the last touch point of each multi-touch operation according to the logic configured by the touch chip, for example, according to the waiting time of the next touch point sensed by the touch screen, and if the waiting time exceeds a preset threshold, for example, 1s, the current touch point may be determined as the last touch point.
S102, touch data are determined according to the reported event code of the single touch point position, the reported event codes of all the touch point positions and the initial touch point position information, wherein the touch data comprise multi-point touch data.
In this embodiment, the touch data may include information such as the number of touch points and the position of each touch point. The number of touch points may be determined according to a generation rule of the synchronization event code, if the generation rule is the generation rule described in the above example, the number of the synchronization event code is consistent with the number of the touch points, and the position data of each touch point may also be determined according to a generation rule of the initial touch point position information.
S103, writing the touch data into a multi-point touch device node, so that a preset application can complete the processing of the touch data by reading the data in the multi-point touch device node.
In this embodiment, a multi-touch device node may be created in advance by using a touch chip, and then the obtained multi-touch data may be written into the multi-touch device node, so that a preset application in an application layer may read the multi-touch data in the multi-touch device node, and perform further processing on a touch event corresponding to the multi-touch data, where the number of the multi-touch device node is generally the same as that of a preset touch screen.
The touch information processing method provided by the embodiment of the invention obtains initial touch information by using a preset touch screen, wherein the initial touch information comprises multi-point touch information, the multi-point touch information comprises a synchronous event code and initial touch point position information, the synchronous event code comprises a single touch point position reporting event code and all touch point position reporting event codes, and touch data is determined according to the single touch point position reporting event code, all touch point position reporting event codes and the initial touch point position information, wherein the touch data comprises multi-point touch data, and the touch data is written into a multi-point touch equipment node, so that a preset application can complete the processing of the touch data by reading data in the multi-point touch equipment node. According to the technical scheme of the embodiment of the invention, the multi-point touch information is obtained by utilizing the preset touch screen, the multi-point touch data is determined according to the synchronous event code and the initial touch point position information contained in the multi-point touch information, and the multi-point touch data is written into the multi-point touch equipment node, so that the preset application can read the data in the multi-point touch equipment node, and the problem that an interactive mode only supporting single-point touch in a SylixOS system is solved by identifying the multi-point touch data and storing the multi-point touch data into the newly created multi-point touch equipment node, and the use experience of a user is improved.
Optionally, the initial touch information further includes single-point touch information, the touch device nodes include the multi-point touch device node and a single-point touch device node, the single-point touch device node includes a first single-point touch device node and a second single-point touch device node, and the creation mode of the touch device node includes: determining whether to create a multi-touch device node according to first preset configuration information, wherein the first preset configuration information comprises single-touch configuration or multi-touch configuration; if not, judging whether second preset configuration information is matched with the first node function corresponding to the first single-point touch equipment node or not, if so, creating the first single-point touch equipment node, and if not, creating a second single-point touch equipment node; the first single-point touch device node is determined based on a single-point touch device node of a historical version, a second node function corresponding to the second single-point touch device node is more than that of the first node, and the second preset configuration information comprises data reading and writing specification configuration information. The advantages of such a configuration are that by creating a multi-touch device node or a single-touch device node, the compatibility of the SylixOS system is improved, so that the compatibility of the SylixOS system can meet both the requirements of single-touch operations and multi-touch operations, and the specific selection can be determined by developers through presetting configuration information.
Specifically, fig. 2 is a schematic diagram illustrating processing of touch information. The single-point touch information input by the user can also be acquired through a preset touch screen configured with a preset application (the touch device application in fig. 2). The single touch information may be understood as touch information generated by operating a predetermined touch screen with a single finger. The single-point touch device nodes comprise an old single-point touch device node, namely a first single-point touch device node, and a new single-point touch device node, namely a second single-point touch device node. The second single touch device node may be understood as a function extension node of the first single touch device node. According to the requirements of a driver developer or a target user, if the driver developer or the target user needs to make a multi-touch to come through human-computer interaction, configuration information, namely first preset configuration information, can be preset, if the first preset configuration information shows that a multi-touch node does not need to be created, namely the first preset configuration information is in single-touch configuration, the multi-touch device node is not created, and otherwise, the multi-touch node is created. If the multi-touch node does not need to be created, the matching performance of the second preset configuration information and the functions of the first node and the second node can be judged. And if the function of the first single-point touch equipment node is matched with that of the first node, creating a first single-point touch equipment node, and if the function of the second single-point touch equipment node is matched with that of the second node, creating a second single-point touch equipment node. The second preset configuration information may also be preset according to the requirements of a driver developer or a target user, for example, a data read-write speed is preset according to whether a faster response human-computer interaction experience is required, where the data read-write speed is the second preset configuration information, if the first node function can meet the data read-write speed, it may be determined that the first node function is matched with the second preset configuration information, and if the second node function can meet the data read-write speed, it may be determined that the second node function is matched with the second preset configuration information.
Optionally, as shown in fig. 2, if there are multiple preset touch screens (configured with the touch screen applied by the touch device in fig. 2), single-point touch information or multi-point touch information may be simultaneously obtained from different touch devices, and a multi-point touch device node (a new touch device node in fig. 2) and a second single-point touch device node are established, or a multi-point touch device node, a first single-point touch device node, a second single-point touch device node, and the like are established.
Optionally, the initial touch information further includes single-point touch information, and the single-point touch information and the multi-point touch information both include: the touch screen comprises time stamp information, event type information, event code information and event numerical values, wherein the event type information comprises touch position information or synchronous information, the event code information comprises touch position event codes or synchronous event codes, the touch position event codes comprise various types of position identifications, the event numerical values corresponding to the touch position event codes are used for representing position coordinates corresponding to each position identification, and the synchronous event codes of the single-point touch information comprise reported event codes of all touch point positions. The advantage of setting up like this is, through defining the data content of initial touch information, can accurate acquisition by the key information that touch operation produced, improved the accuracy of the touch event that touch operation triggered.
Specifically, the single-touch information and the multi-touch information may be composed of four parts, that is, timestamp information, event type information, event code information, and event value. When the event type information in the single-touch information and the multi-touch information is touch POSITION information, which can be represented by EV _ ABS, the corresponding event code information is a touch POSITION event code, the POSITION identifiers in the touch POSITION event code may be ABS _ MT _ POSITION _ X and ABS _ MT _ POSITION _ Y, ABS _ MT _ POSITION _ X represents an X axis, ABS _ MT _ POSITION _ Y represents a Y axis, and the corresponding event value represents the POSITION coordinate corresponding to each POSITION identifier, such as when the touch POSITION event code is ABS _ MT _ POSITION _ X and the corresponding event value is 10, the abscissa represents the touch point, and when the touch POSITION event code is ABS _ MT _ POSITION _ Y and the corresponding event value is 2, the ordinate represents the touch point. When the event type information in the single-point touch information and the multi-point touch information is the synchronization information, the corresponding event code information is a synchronization event code, which can be represented by EV _ SYN, the synchronization event code of the single-point touch information only includes event codes in which all touch point positions are reported, and can be represented by SYN _ REPORT, the synchronization event code of the multi-point touch information includes an event code in which a single touch point position is reported and event codes in which all touch point positions are reported, the event code in which a single touch point position is reported can be represented by SYN _ MT _ REPORT, and the event number value corresponding to the synchronization event code can be a preset identifier, such as 0.
Optionally, when the initial touch information is the multi-touch information, the multi-touch information includes a plurality of pieces of sub-touch information, each piece of sub-touch information includes the timestamp information, the event type information, the event code information, and the event value, the all-touch-point-position-reported event code is used to indicate that the initial touch point position information of all touch points has been reported, and the single-touch-point-position-reported event code is used to indicate that the initial touch point position information of one touch point has been reported. The touch event triggering method has the advantages that the ordering of the touch information of each touch point is ensured through the plurality of sub-touch information of the initial touch information, and accordingly the accuracy of the touch event corresponding to the touch information triggered subsequently is ensured.
For example, when the initial touch information is multi-touch information and the multi-touch information is touch information of two points, the multi-touch information may include at least 4 sub-touch information including touch position information and 2 sub-touch information including synchronization information, for a total of 6 sub-touch information. In the 4 sub-touch information containing touch position information, every two adjacent sub-touch information containing touch position information are in a group, the group of sub-touch information contains a complete position coordinate of a touch point, namely a position coordinate containing an abscissa and an ordinate, the adjacent sub-touch information after the first group of sub-touch information can be sub-touch information containing a single touch point position reported event code, and the adjacent sub-touch information after the second group of sub-touch information, namely the last group, can be sub-touch information containing all touch point position reported event codes. When the initial touch information is single-point touch information, at least 2 sub-touch information containing touch position information and 1 sub-touch information containing synchronization information in the single-point touch information may be included, and the total number of the sub-touch information is 3. The 2 sub-touch information containing touch position information includes a complete position coordinate of a touch point, that is, a position coordinate including an abscissa and an ordinate, and the sub-touch information adjacent to the 2 sub-touch information may be sub-touch information including event codes reported at all touch point positions.
Example two
Fig. 3 is a flowchart of a method for processing touch information according to a second embodiment of the present invention, where the technical solution of the second embodiment of the present invention is further optimized based on the foregoing optional technical solutions, and a specific manner for processing touch information is given.
Optionally, the determining touch data according to the single touch point position reported event code, all touch point position reported event codes, and the initial touch point position information includes: determining the sum of the reported event codes of the single touch point position and the reported event codes of all the touch point positions as the number of the touch points; determining a corresponding relation between a current position identifier and a current event numerical value aiming at each position identifier contained in the initial touch information; according to the corresponding relation and the timestamp information, according to the sequence of time, integrating the event numerical values corresponding to the position identifications of different types into target touch point position information containing the positions of a plurality of touch points; and determining the number of the touch points and the position information of the target touch point as touch data. The advantage of setting up like this has accurately confirmed the number and the positional information of touch point, has guaranteed human-computer interaction's effect.
Optionally, the writing the touch data into a multi-touch device node includes: storing the number of the touch points and the position information of the target touch point into a preset kernel message queue according to the time sequence according to the timestamp information; and when the multi-point touch equipment node is in an open state, writing the number of the touch points and the position information of the target touch point into the multi-point touch equipment node according to the arrangement sequence in the preset kernel message queue. The method has the advantages that the method can guarantee the follow-up ordered processing of the touch events corresponding to the touch points, and the reliability of human-computer interaction is improved.
As shown in fig. 3, a method for processing touch information according to a second embodiment of the present invention specifically includes the following steps:
s201, acquiring initial touch information by using a preset touch screen.
Optionally, before the obtaining the initial touch information by using the preset touch screen, the method further includes: determining drive registration interface information from a touch device base library, and registering a touch drive by using the drive registration interface information; if the registration is successful, creating a plurality of device interfaces, wherein the plurality of device interfaces comprise an internal integrated circuit (I2C, I-squared-C) interface and a Universal Serial Bus (USB) interface; wherein, utilize and predetermine the touch-sensitive screen and obtain initial touch information, include: and acquiring initial touch information by utilizing a preset touch screen based on the equipment interface. The benefit of this is that the device interface of the SylixOS system is expanded, so that it can support the hot plug process of the universal serial bus touch screen.
Specifically, a touch device base library may be created in advance in the SylixOS system, and the touch device base library may be used to store and manage various information related to the touch operation, such as registration interface information of the touch driver, that is, driver registration interface information, and by calling the driver registration interface information, registration of the touch driver may be completed. If the registration is successful, multiple touch interfaces of the touch device, namely device interfaces such as an internal integrated circuit interface and a universal serial bus interface, can be created, and initial touch information can be acquired from a preset touch screen by using the interfaces. The touch device base library can also be used for storing and managing unloading information of a touch driver, interface information of a touch device node, touch position information, touch device private data and the like, the touch device private data comprises configuration information such as the model of a touch chip and the like, the touch device private data is usually created by the touch driver, in addition, registration and execution of an interrupt processing function and processing of touch chip reset logic are also completed by the touch driver, for example, the touch chip is reset by using a reset pin of a General Purpose Input/Output Port (GPIO), and the function of the interrupt processing function comprises that when a preset touch screen senses a touch point, information is sent to a central processing unit through the GPIO pin to inform the central processing unit of the occurrence of the touch action, the central processing unit can call the interrupt processing function, and the touch position information is acquired from the touch chip and analyzed.
S202, determining the sum of the reported event codes of the single touch point position and the reported event codes of all the touch point positions as the number of the touch points.
Illustratively, if the initial touch information is multi-touch information, the number of reported event codes at a single touch point position is 2, and the number of reported event codes at all touch point positions is 1, the number of touch points is 3.
S203, determining the corresponding relation between the current position identification and the current event numerical value aiming at each position identification contained in the initial touch information.
Specifically, if the POSITION identifiers of the touch POSITION event codes included in the initial touch information are ABS _ MT _ POSITION _ X and ABS _ MT _ POSITION _ Y, that is, X-axis and Y-axis, the correspondence between each event value and the POSITION identifier can be determined. If the event value is 10, as described above, the position identifier may be a position identifier corresponding to 10 according to the position identifier included in the sub-touch information where the event value is located.
And S204, integrating the event numerical values corresponding to the position identifications of different types into target touch point position information containing the positions of the multiple touch points according to the corresponding relation and the timestamp information and the time sequence.
Illustratively, if ABS _ MT _ POSITION _ X corresponds to event values of 1 and 2, ABS _MT _ POSITION _Ycorresponds to event values of 4 and 5, the sub-touch information may be displayed according to the time sequence of the time stamp information in the sub-touch information, such as the sequence of sub-touch information 1, sub-touch information 2, sub-touch information 3 and sub-touch information 4, the ABS _ MT _ POSITION _ X and the event value 1 in the sub-touch information 1, and the ABS _ MT _ POSITION _ Y and the event value 4 in the sub-touch information 2 may be integrated into the POSITION information (1, 4) of one touch point, and similarly, the POSITION information (2, 5), (1, 4) and (2, 5) of another touch point may be integrated into the target touch point POSITION information.
And S205, determining the number of the touch points and the position information of the target touch point as touch data.
Illustratively, as described in the above example, the touch data may include the number of touch points, i.e., 3, and the target touch point position information, i.e., (1, 4) and (2, 5).
S206, storing the number of the touch points and the position information of the target touch point into a preset kernel message queue according to the time sequence according to the timestamp information.
Specifically, the first timestamp information in the initial touch information may be determined as the start time of a single touch action, the last timestamp information may be determined as the end time of the single touch action, and the touch data may be stored in the preset kernel message queue according to the sequence of the start time or the end time. The preset kernel message queue may be a message queue of a kernel space of the SylixOS system.
And S207, when the multi-point touch equipment nodes are in an open state, writing the number of the touch points and the position information of the target touch point into the multi-point touch equipment nodes according to the arrangement sequence in the preset kernel message queue.
Specifically, if the multi-touch device node is in an open state and the arrangement order of the touch data in the kernel message queue is preset as touch data 1, touch data 2 and touch data 3, the three touch data may be sequentially written into the multi-touch device node according to the above order, so that the preset application may read the touch data in the multi-touch device node according to the order. And if the multi-point touch equipment node is in a closed state, the touch data in the preset kernel message queue cannot be written into the multi-point touch equipment node.
The method for processing touch information provided by the embodiment of the invention comprises the steps of firstly obtaining multi-point touch information by using a preset touch screen, then determining the number of touch points according to the sum of the reported event codes of a single touch point position and the reported event codes of all touch point positions in the multi-point touch information, determining the position information of a target touch point according to the corresponding relation between a position identifier and an event numerical value and timestamp information, thereby obtaining multi-point touch data comprising the position information of the target touch point and the number of the touch points, finally writing the multi-point touch data into a preset kernel message queue according to the sequence of time, writing the touch data into a multi-point touch device node when the multi-point touch device node is opened, expanding the device interface of a SylixOS system, enabling the SylixOS system to support the touch screen of multiple types of interfaces, enabling the SylixOS system to be compatible with single-point touch operation and multi-point touch operation, improving the use experience of a user, enabling the drive of the touch chip and a touch device base to be completely responsible for managing the registered and unloaded information of the touch device, the touch device base, and the touch device base to obtain private interface information, and touch device driver chip and the touch chip.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a touch information processing apparatus according to a third embodiment of the present invention. The apparatus can be configured in a SylixOS system, as shown in fig. 4, and comprises: a touch information determination module 301, a touch data determination module 302, and a data writing module 303, wherein:
the touch information determining module is used for acquiring initial touch information by utilizing a preset touch screen, wherein the initial touch information comprises multi-point touch information, the multi-point touch information comprises a synchronous event code and initial touch point position information, and the synchronous event code comprises a single touch point position reported event code and all touch point position reported event codes;
the touch data determining module is used for determining touch data according to the single touch point position reporting event code, all touch point position reporting event codes and the initial touch point position information, wherein the touch data comprises multi-point touch data;
and the data writing module is used for writing the touch data into a multi-point touch device node so that a preset application can finish the processing of the touch data by reading the data in the multi-point touch device node.
According to the processing device of the touch information, the preset touch screen is used for obtaining the multi-point touch information, the multi-point touch data are determined according to the synchronous event codes and the initial touch point position information contained in the multi-point touch information, and the multi-point touch data are written into the multi-point touch equipment nodes, so that the preset application can read the data in the multi-point touch equipment nodes, the multi-point touch data are identified, the multi-point touch data are stored into the newly created multi-point touch equipment nodes, the problem that only a single-point touch interaction mode is supported in a SylixOS system is solved, and the use experience of a user is improved.
Optionally, the apparatus further comprises:
the touch drive registration module is used for determining drive registration interface information from a touch equipment basic library before the initial touch information is acquired by using a preset touch screen, and registering the touch drive by using the drive registration interface information;
and the equipment interface creating module is used for creating a plurality of equipment interfaces if the registration is successful, wherein the plurality of equipment interfaces comprise an internal integrated circuit interface and a universal serial bus interface.
Optionally, the touch information determining module is specifically configured to obtain initial touch information by using a preset touch screen based on the device interface.
Optionally, the initial touch information further includes single-point touch information, the touch device nodes include the multi-point touch device node and a single-point touch device node, the single-point touch device node includes a first single-point touch device node and a second single-point touch device node, and the creation mode of the touch device node includes: determining whether to create a multi-touch device node according to first preset configuration information, wherein the first preset configuration information comprises single-touch configuration or multi-touch configuration; if not, judging whether second preset configuration information is matched with the first node function corresponding to the first single-point touch equipment node or not, if so, creating the first single-point touch equipment node, and if not, creating a second single-point touch equipment node; the first single-point touch device node is determined based on a single-point touch device node of a historical version, a second node function corresponding to the second single-point touch device node is more than that of the first node, and the second preset configuration information comprises data reading and writing specification configuration information.
Optionally, the initial touch information further includes single-point touch information, and the single-point touch information and the multi-point touch information both include: the touch screen comprises timestamp information, event type information, event code information and event numerical values, wherein the event type information comprises touch position information or synchronous information, the event code information comprises touch position event codes or synchronous event codes, the touch position event codes comprise various types of position identifications, the event numerical values corresponding to the touch position event codes are used for representing position coordinates corresponding to each position identification, and the synchronous event codes of the single-point touch information comprise reported event codes of all touch point positions.
Optionally, when the initial touch information is the multi-touch information, the multi-touch information includes a plurality of pieces of sub-touch information, each piece of sub-touch information includes the timestamp information, the event type information, the event code information, and the event value, the event code for reporting the position of all touch points is used to indicate that the position information of the initial touch points of all touch points has been reported, and the event code for reporting the position of a single touch point is used to indicate that the position information of the initial touch point of a touch point has been reported.
Optionally, the touch data determining module includes:
the touch point number determining unit is used for determining the sum of the reported event codes of the single touch point position and the reported event codes of all the touch point positions as the number of the touch points;
a corresponding relation determining unit, configured to determine, for each location identifier included in the initial touch information, a corresponding relation between a current location identifier and a current event value;
a position information determining unit, configured to integrate event values corresponding to different types of position identifiers into target touch point position information including positions of multiple touch points according to the correspondence and the timestamp information and according to a time sequence;
and the touch data determining unit is used for determining the number of the touch points and the position information of the target touch point as touch data.
Optionally, the data writing module includes:
the first writing unit is used for storing the number of the touch points and the position information of the target touch point into a preset kernel message queue according to the time sequence according to the timestamp information;
and a second writing unit, configured to write, when the multi-touch device node is in an open state, the number of touch points and the target touch point location information into the multi-touch device node according to the arrangement order in the preset kernel message queue.
The touch information processing device provided by the embodiment of the invention can execute the touch information processing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example four
FIG. 5 illustrates a schematic diagram of an electronic device 40 that may be used to implement an embodiment of the invention. The SylixOS system may operate in an electronic device that includes a device that can obtain touch information, such as a touch screen or the like, and is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 40 includes at least one processor 41, and a memory communicatively connected to the at least one processor 41, such as a Read Only Memory (ROM) 42, a Random Access Memory (RAM) 43, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 41 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 42 or the computer program loaded from the storage unit 48 into the Random Access Memory (RAM) 43. In the RAM 43, various programs and data necessary for the operation of the electronic apparatus 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other via a bus 44. An input/output (I/O) interface 45 is also connected to bus 44.
A plurality of components in the electronic device 40 are connected to the I/O interface 45, including: an input unit 46 such as a keyboard, a mouse, or the like; an output unit 47 such as various types of displays, speakers, and the like; a storage unit 48 such as a magnetic disk, an optical disk, or the like; and a communication unit 49 such as a network card, modem, wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Processor 41 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 41 executes the respective methods and processes described above, such as the processing method of the touch information.
In some embodiments, the method of processing touch information may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 40 via the ROM 42 and/or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the processing method of touch information described above may be performed. Alternatively, in other embodiments, processor 41 may be configured by any other suitable means (e.g., by way of firmware) to perform the processing method of the touch information.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
The computer device provided by the above can be used to execute the processing method of the touch information provided by any of the above embodiments, and has corresponding functions and advantages.
EXAMPLE five
In the context of the present invention, a computer-readable storage medium may be a tangible medium, which when executed by a computer processor, is for performing a method of processing touch information, which method may be applied in a SylixOS system, the method comprising:
acquiring initial touch information by using a preset touch screen, wherein the initial touch information comprises multi-point touch information, the multi-point touch information comprises a synchronous event code and initial touch point position information, and the synchronous event code comprises a single touch point position reporting event code and all touch point position reporting event codes;
determining touch data according to the single touch point position reporting event code, all touch point position reporting event codes and the initial touch point position information, wherein the touch data comprises multi-point touch data;
and writing the touch data into a multi-point touch device node so that a preset application can finish the processing of the touch data by reading the data in the multi-point touch device node.
In the context of the present invention, a computer readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer device provided by the above can be used to execute the processing method of the touch information provided by any of the above embodiments, and has corresponding functions and advantages.
It should be noted that, in the embodiment of the touch information processing apparatus, the units and modules included in the embodiment are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing description is only exemplary of the invention and that the principles of the technology may be employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for processing touch information is applied to a SylixOS system, and comprises the following steps:
acquiring initial touch information by using a preset touch screen, wherein the initial touch information comprises multi-point touch information, the multi-point touch information comprises a synchronous event code and initial touch point position information, and the synchronous event code comprises a single touch point position reporting event code and all touch point position reporting event codes;
determining touch data according to the single touch point position reporting event code, all touch point position reporting event codes and the initial touch point position information, wherein the touch data comprises multi-point touch data;
and writing the touch data into a multi-point touch device node so that a preset application can finish the processing of the touch data by reading the data in the multi-point touch device node.
2. The method according to claim 1, further comprising, before the acquiring initial touch information by using the preset touch screen:
determining drive registration interface information from a touch equipment base library, and registering a touch drive by using the drive registration interface information;
if the registration is successful, creating a plurality of equipment interfaces, wherein the plurality of equipment interfaces comprise an internal integrated circuit interface and a universal serial bus interface;
wherein, utilizing the preset touch screen to acquire the initial touch information comprises: and acquiring initial touch information by utilizing a preset touch screen based on the equipment interface.
3. The method of claim 1, wherein the initial touch information further comprises single touch information, wherein touch device nodes comprise the multi-touch device node and single-touch device nodes, wherein the single-touch device nodes comprise a first single-touch device node and a second single-touch device node, and wherein the touch device nodes are created in a manner that comprises:
determining whether to create a multi-touch device node according to first preset configuration information, wherein the first preset configuration information comprises a single-touch configuration or a multi-touch configuration;
if not, judging whether second preset configuration information is matched with the first node function corresponding to the first single-point touch equipment node or not, if so, creating the first single-point touch equipment node, and if not, creating a second single-point touch equipment node;
the first single-point touch device node is determined based on a single-point touch device node of a historical version, a second node function corresponding to the second single-point touch device node is more than that of the first node, and the second preset configuration information comprises data reading and writing specification configuration information.
4. The method of claim 1, wherein the initial touch information further comprises single-touch information, and wherein the single-touch information and the multi-touch information each comprise: the touch screen comprises time stamp information, event type information, event code information and event numerical values, wherein the event type information comprises touch position information or synchronous information, the event code information comprises touch position event codes or synchronous event codes, the touch position event codes comprise various types of position identifications, the event numerical values corresponding to the touch position event codes are used for representing position coordinates corresponding to each position identification, and the synchronous event codes of the single-point touch information comprise reported event codes of all touch point positions.
5. The method according to claim 4, wherein when the initial touch information is the multi-touch information, the multi-touch information includes a plurality of sub-touch information, each sub-touch information includes the timestamp information, the event type information, the event code information, and the event value, the all-touch-point-position-reported event code is used to indicate that the initial touch point position information of all touch points has been reported, and the single-touch-point-position-reported event code is used to indicate that the initial touch point position information of one touch point has been reported.
6. The method of claim 5, wherein determining touch data according to the single touch point location reported event code, the all touch point location reported event code, and the initial touch point location information comprises:
determining the sum of the reported event codes of the single touch point position and the reported event codes of all the touch point positions as the number of the touch points;
determining a corresponding relation between a current position identifier and a current event numerical value aiming at each position identifier contained in the initial touch information;
according to the corresponding relation and the timestamp information, according to the sequence of time, integrating the event numerical values corresponding to the position identifications of different types into target touch point position information containing the positions of a plurality of touch points;
and determining the number of the touch points and the position information of the target touch point as touch data.
7. The method of claim 6, wherein writing the touch data into a multi-touch device node comprises:
storing the number of the touch points and the position information of the target touch point into a preset kernel message queue according to the time sequence according to the timestamp information;
and when the multi-point touch equipment node is in an open state, writing the number of the touch points and the position information of the target touch point into the multi-point touch equipment node according to the arrangement sequence in the preset kernel message queue.
8. An apparatus for processing touch information, configured in a SylixOS system, the apparatus comprising:
the touch information determining module is used for acquiring initial touch information by using a preset touch screen, wherein the initial touch information comprises multi-point touch information, the multi-point touch information comprises a synchronous event code and initial touch point position information, and the synchronous event code comprises a single touch point position reporting completion event code and all touch point position reporting completion event codes;
the touch data determining module is used for determining touch data according to the single touch point position reporting event code, all touch point position reporting event codes and the initial touch point position information, wherein the touch data comprises multi-point touch data;
and the data writing module is used for writing the touch data into a multi-point touch device node so that a preset application can finish the processing of the touch data by reading the data in the multi-point touch device node.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the method of processing touch information of any one of claims 1-7.
10. A computer-readable storage medium storing computer instructions for causing a processor to perform the method of processing touch information according to any one of claims 1 to 7 when executed.
CN202211525208.6A 2022-12-01 2022-12-01 Touch information processing method, device, equipment and storage medium Active CN115629678B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211525208.6A CN115629678B (en) 2022-12-01 2022-12-01 Touch information processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211525208.6A CN115629678B (en) 2022-12-01 2022-12-01 Touch information processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115629678A true CN115629678A (en) 2023-01-20
CN115629678B CN115629678B (en) 2023-03-31

Family

ID=84910322

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211525208.6A Active CN115629678B (en) 2022-12-01 2022-12-01 Touch information processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115629678B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102231091A (en) * 2010-09-21 2011-11-02 百度在线网络技术(北京)有限公司 Method and equipment for realizing multi-point recognition based on single-point touch screen
CN102929429A (en) * 2012-10-12 2013-02-13 深圳锐取信息技术股份有限公司 Method for realizing multi-point touch based on advanced reduced instruction set computer (RISC) machines (ARM) by using QT graphics development platform
CN108153454A (en) * 2017-12-22 2018-06-12 奇酷互联网络科技(深圳)有限公司 Multiple point touching switching method, device, storage medium and terminal device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102231091A (en) * 2010-09-21 2011-11-02 百度在线网络技术(北京)有限公司 Method and equipment for realizing multi-point recognition based on single-point touch screen
CN102929429A (en) * 2012-10-12 2013-02-13 深圳锐取信息技术股份有限公司 Method for realizing multi-point touch based on advanced reduced instruction set computer (RISC) machines (ARM) by using QT graphics development platform
CN108153454A (en) * 2017-12-22 2018-06-12 奇酷互联网络科技(深圳)有限公司 Multiple point touching switching method, device, storage medium and terminal device

Also Published As

Publication number Publication date
CN115629678B (en) 2023-03-31

Similar Documents

Publication Publication Date Title
CN105335099A (en) Memory cleaning method and terminal
CN110879742B (en) Method, device and storage medium for asynchronously creating internal snapshot by virtual machine
CN110908865A (en) Memory leakage monitoring method and device and electronic equipment
CN107608609B (en) Event object sending method and device
CN112667405B (en) Information processing method, device, equipment and storage medium
CN116662038B (en) Industrial information detection method, device, equipment and medium based on shared memory
CN112465466A (en) Flow task execution method and device, computer equipment and storage medium
CN112905668B (en) Database derivative method, device and medium based on distributed data stream processing engine
CN114186527A (en) Method and device for realizing automatic wiring of integrated circuit independent of grid point
CN109840151B (en) Load balancing method and device for multi-core processor
CN107436839B (en) Process load acquisition method, electronic terminal and computer readable storage medium
CN113190427A (en) Caton monitoring method and device, electronic equipment and storage medium
CN115629678B (en) Touch information processing method, device, equipment and storage medium
CN111857854A (en) Shutdown resource loading method and device, storage medium and electronic equipment
CN114816772B (en) Debugging method, debugging system and computing device for application running based on compatible layer
CN108121572B (en) Web application starting method and device
CN115617800A (en) Data reading method and device, electronic equipment and storage medium
CN110085237B (en) Recovery method, device and equipment of interactive process
CN116579914B (en) Execution method and device of graphic processor engine, electronic equipment and storage medium
CN114995978A (en) Rendering task processing method, device and equipment and storage medium
CN115983222A (en) EasyExcel-based file data reading method, device, equipment and medium
CN117193726A (en) Parallel design method and device of software, electronic equipment and medium
CN116107927A (en) Data processing device, data processing method and electronic equipment
CN117009000A (en) Component, method, device, apparatus and medium for operating open source buddha system
CN114816433A (en) Encoding method, system, device and medium in project based on asynchronous programming

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