CN-121979612-A - Touch event synchronization method and system for multi-virtual system
Abstract
The application relates to a touch event synchronization method and system of a multi-virtual system. The method comprises the steps of obtaining touch data of a touch event when touch driving of a first virtual system detects the touch event, and simultaneously executing local reporting operation on the touch data, and simultaneously sending the touch data to a second virtual system to enable the second virtual system to report the touch data, wherein the first virtual system is a bottom system which is virtualized by a hardware frame, and the second virtual system is an upper system which is virtualized by the hardware frame. The application solves the technical problems of high delay of reporting touch data under a vehicle-mounted multi-system and slow feedback of touch screen operation.
Inventors
- HOU JIAN
Assignees
- 深圳市广通远驰科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251211
Claims (10)
- 1. A method for synchronizing touch events in a multi-virtual system, comprising: when a touch driver of a first virtual system detects a touch event, touch data of the touch event are acquired; And simultaneously executing local reporting operation on the touch data, and simultaneously transmitting the touch data to a second virtual system so as to enable the second virtual system to report the touch data, wherein the first virtual system is a bottom layer system which is virtualized by a hardware frame, and the second virtual system is an upper layer system which is virtualized by the hardware frame.
- 2. The method of claim 1, wherein concurrently transmitting the touch data to a second virtual system while performing a local reporting operation on the touch data comprises: Determining sub-events which are required to be executed for executing the local reporting operation by the touch data, wherein a plurality of sub-events comprise sequences; transmitting the touch data to the second virtual system before executing the first sub-event; and when each sub-event is executed, notifying the executed sub-event to the second virtual system so as to enable the second virtual system to synchronously execute the corresponding sub-event.
- 3. The method of claim 2, wherein notifying the second virtual system of each sub-event performed as it is performed to cause the second virtual system to synchronously perform the corresponding sub-event comprises: and when each sub-event is executed, taking the executed sub-event as a current sub-event, and adding a special identifier for the event name of the current sub-event, wherein the special identifier is used for marking the current sub-event as the sub-event for executing the local reporting operation on the touch data by the first virtual system.
- 4. A method according to claim 3, wherein said adding a special identification for the event name of said current sub-event comprises: Determining the type of the current sub-event, wherein the type is used for indicating the execution content of the current sub-event; Distributing a type identifier for the current sub-event according to the type; and determining the current time stamp of the current sub-event and the type identifier as the special identifier, and adding the special identifier into the event name of the current sub-event.
- 5. The method of claim 4, wherein the sending the executed sub-event sync to the second virtual system as each sub-event is executed, such that the second virtual system synchronously executes the corresponding sub-event comprises: And synchronously transmitting the event name of each sub-event with the special identifier to the second virtual system, wherein the second virtual system determines the execution sequence of each sub-event according to the current timestamp in the special identifier after receiving the event name of each sub-event, and determines the execution content of each sub-event according to the type identifier and the event name in the special identifier.
- 6. The method of claim 5, wherein said synchronizing the event name of each sub-event with said special identification to said second virtual system comprises: Constructing a plurality of virtualization channels between the first virtual system and the second virtual system, wherein the event name of each sub-event corresponds to one virtualization channel; And sending the event name of each sub-event to the second virtual system by using the corresponding virtualization channel.
- 7. The method of claim 5, wherein said synchronously transmitting each sub-event with said special identification to said second virtual system comprises: And when the sub-event is an end-of-frame sub-event, sending an event name of the end-of-frame sub-event with an end-of-frame identifier to the second virtual system, wherein the second virtual system executes the end-of-frame sub-event according to the end-of-frame identifier when receiving the event name of the end-of-frame sub-event so as to complete the reporting of one frame of data.
- 8. The method of claim 1, wherein after concurrently transmitting the touch data to a second virtual system while performing a local reporting operation on the touch data, the method further comprises: acquiring report data obtained by executing local report operation on the touch data; And sending the reported data to the second virtual system, so that the second virtual system compares the reported data with data obtained by the second virtual system executing local reporting operation on the touch data.
- 9. A method for synchronizing touch events in a multi-virtual system, comprising: Receiving touch data sent by a first virtual system, wherein the touch data is acquired when a touch event is detected by a touch driver of the first virtual system, and the first virtual system is also used for sending the touch data to a second virtual system in parallel while executing a local reporting operation on the touch data; and executing local reporting operation on the touch data.
- 10. A touch event synchronization system for a multi-virtual system, comprising: The touch control system comprises a first virtual system, a second virtual system and a third virtual system, wherein the first virtual system is used for acquiring touch data of a touch event when the touch drive detects the touch event, and transmitting the touch data to the second virtual system in parallel while executing local report on the touch data; And the second virtual system is used for executing local reporting operation on the touch data after receiving the touch data, wherein the first virtual system is a bottom layer system which is virtualized by a hardware frame, and the second virtual system is an upper layer system which is virtualized by the hardware frame.
Description
Touch event synchronization method and system for multi-virtual system Technical Field The application relates to the field of vehicle-mounted systems, in particular to a touch event synchronization method and system of a multi-virtual system. Background With the development of the automobile industry, a vehicle-mounted dual-system scheme is generally adopted by mainstream automobile factories, namely two independent operating systems are operated on the same hardware platform in parallel so as to meet the requirements of different functional scenes. This design promotes flexibility, security and reliability of the system, for example, one system (e.g., yocto-based real-time system) is dedicated to critical on-board controls (e.g., instrument panel) while another system (e.g., android) is responsible for infotainment functions (e.g., navigation and multimedia). In-vehicle dual systems are typically implemented based on virtualization technology. Through a virtual machine Hypervisor (Hypervisor), multiple operating systems can be run simultaneously on a single hardware and ensure strict isolation between them, avoiding mutual interference. Under this architecture, the vehicle manufacturer needs to ensure that the screen touch data can be supplied to both systems (e.g., yocto and Android) simultaneously for application to the respective scenes. However, in the prior art, when the touch driver is deployed at Yocto, the reporting of the touch data needs to be finished in Yocto, then the data is sent to Android by Yocto, and the reporting of the Android side is finished by Android, so that the software or the system is controlled according to the touch data. The method causes high delay of touch data reporting under the vehicle-mounted multi-system and slow feedback of touch screen operation. Disclosure of Invention The application provides a touch event synchronization method and system of a multi-virtual system, and aims to solve the technical problems of high delay of touch data reporting and slow feedback of touch screen operation under a vehicle-mounted multi-system. The application provides a touch event synchronization method of a multi-virtual system, which comprises the steps of acquiring touch data of a touch event when a touch driver of a first virtual system detects the touch event, and simultaneously executing local reporting operation on the touch data and simultaneously transmitting the touch data to a second virtual system so as to enable the second virtual system to report the touch data, wherein the first virtual system is a bottom system which is virtualized by a hardware frame, and the second virtual system is an upper system which is virtualized by the hardware frame. The method includes the steps of determining sub-events needed to be executed when the touch data executes the local reporting operation, sending the touch data to the second virtual system before executing the first sub-event, and notifying the second virtual system of the executed sub-event when executing each sub-event so that the second virtual system synchronously executes the corresponding sub-event. The method for synchronously executing the corresponding sub-events by the second virtual system comprises the steps of taking the executed sub-event as a current sub-event and adding a special identifier for the event name of the current sub-event when each sub-event is executed, wherein the special identifier is used for marking the current sub-event as the sub-event for executing the local reporting operation on the touch data by the first virtual system. The method for adding the special identifier to the event name of the current sub-event comprises the steps of determining the type of the current sub-event, wherein the type is used for indicating the execution content of the current sub-event, distributing the type identifier to the current sub-event according to the type, determining the current timestamp and the type identifier of the current sub-event to be the special identifier, and adding the special identifier to the event name of the current sub-event. The method for synchronously executing the sub-events includes synchronously transmitting the event name of each sub-event with a special identifier to a second virtual system, wherein the second virtual system determines the execution sequence of each sub-event according to the current timestamp in the special identifier after receiving the event name of each sub-event, and determines the execution content of each sub-event according to the type identifier and the event name in the special identifier. The method for synchronously sending the event name of each sub-event with the special identifier to the second virtual system comprises the steps of constructing a plurality of virtualization channels between the first virtual system and the second virtual system, wherein the event name of each sub-event corresponds to one virtualization channel, and sending the ev