Event processing method and apparatus, electronic device, and storage medium
By directly sending the touch events of the steering wheel buttons to the target application for processing in the vehicle system, the problem of poor response time caused by the complex broadcast mechanism in the prior art is solved, and more efficient event processing is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-22
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies, touch events of steering wheel buttons in in-vehicle systems are broadcast through the window manager, resulting in complex processing mechanisms, inability to customize communication protocols, difficulty in debugging, and interference with broadcast transmission when AMS is busy. Furthermore, applications need to use complex mechanisms for analysis, leading to poor response timeliness.
When a touch event of a target button on the steering wheel is detected, a candidate application is identified, and the event is sent directly to the target application for processing based on the event type, avoiding the use of a broadcast mechanism and reducing coupling with AMS.
It improves the responsiveness of touch events, simplifies the processing flow, reduces coupling with AMS, and improves processing efficiency.
Smart Images

Figure CN115447501B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of vehicle communication, and particularly relates to an event processing method and device, electronic equipment and storage medium. BACKGROUND
[0002] At present, the touch event of the button on the steering wheel in the vehicle system is broadcasted by the window manager, and the application program needs to register the broadcast to receive the touch event, and then analyze and process the touch event.
[0003] However, the broadcast of the touch event by the window manager has a complex processing mechanism, cannot customize the communication protocol, is difficult to debug, each broadcast holds the ActivityManagerStatue (AMS for short) lock in the broadcast processing process, responds to the performance of the AMS, and when the AMS is busy, the sending of the broadcast is also affected. In addition, the application program needs to use a complex mechanism to analyze the touch event broadcasted by the broadcast, which consumes a long time and leads to poor timeliness of responding to the touch event. SUMMARY
[0004] The present disclosure aims to at least solve one of the above technical problems to some extent.
[0005] To this end, the present disclosure provides an event processing method and device, electronic equipment and storage medium, which can establish the corresponding relationship between the application program and the touch event of the button, avoid using the broadcast mechanism to broadcast the touch event of the button, reduce the coupling with the AMS, and at the same time, the application program can directly process the received touch event, and for the touch event broadcasted by the broadcast, there is no need to use a complex mechanism to analyze it, thereby improving the response timeliness of the touch event.
[0006] The first aspect of the present disclosure provides an event processing method, which comprises the following steps: when a touch event of a target button on a steering wheel is monitored, determining at least one candidate application program for listening to the touch event; determining a target event type to which the touch event belongs; determining a target application program from the at least one candidate application program according to the target event type; and sending the touch event to the target application program, wherein the target application program processes the touch event.
[0007] The second aspect of the present disclosure provides an event processing method, comprising: receiving a touch event sent by a steering wheel button controller, wherein the touch event is sent by the steering wheel button controller after determining at least one candidate application for listening to the touch event when monitoring a touch event of a target button on a steering wheel, and determining a target application from the at least one candidate application according to a target event type to which the touch event belongs; and processing the touch event.
[0008] The third aspect of the present disclosure provides an event processing apparatus, comprising: a first determining module configured to determine at least one candidate application for listening to a touch event when monitoring a touch event of a target button on a steering wheel; a second determining module configured to determine a target event type to which the touch event belongs; a third determining module configured to determine a target application from the at least one candidate application according to the target event type; and a sending module configured to send the touch event to the target application, wherein the target application processes the touch event.
[0009] The fourth aspect of the present disclosure provides an event processing apparatus, comprising: a receiving module configured to receive a touch event sent by a steering wheel button controller, wherein the touch event is sent by the steering wheel button controller after determining at least one candidate application for listening to the touch event when monitoring a touch event of a target button on a steering wheel, and determining a target application from the at least one candidate application according to a target event type to which the touch event belongs; and a processing module configured to process the touch event.
[0010] The fifth aspect of the present disclosure provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method of the first aspect, or implement the method of the second aspect.
[0011] The sixth aspect of the present disclosure provides a non-transitory computer readable storage medium, having a computer program stored thereon, wherein the computer program is executable by a processor to implement the method of the first aspect, or implement the method of the second aspect.
[0012] The seventh aspect of the present disclosure provides a computer program product, comprising computer instructions, wherein the computer program is stored in the computer instructions, and the computer instructions are executable by a processor to implement the method of the first aspect, or implement the method of the second aspect.
[0013] The technical solution of the present disclosure determines at least one candidate application program for listening to the touch event when a touch event of a target key on the steering wheel is monitored, determines a target event type to which the touch event belongs; determines a target application program from the at least one candidate application program according to the target event type; and sends the touch event to the target application program, so that the target application program processes the touch event. Thus, by establishing a corresponding relationship between the application program and the touch event of the target key, the broadcast mechanism for broadcasting the touch event of the target key can be avoided, the coupling with the AMS is reduced, and at the same time, the touch event is sent to the target application program according to the event type of the touch event, the target application program can directly process the received touch event without using a complex mechanism for analysis, and the response timeliness of the touch event is improved.
[0014] Additional aspects and advantages of the present disclosure will be made apparent from the following description, which, taken together with the accompanying drawings, describes or illustrates such aspects and advantages by way of non-limiting examples. BRIEF DESCRIPTION OF DRAWINGS
[0015] The above and / or additional aspects and advantages of the present disclosure will become apparent and be readily appreciated from the following description, taken together with the accompanying drawings, in which:
[0016] Figure 1 A flowchart of an event processing method according to one embodiment of the present disclosure;
[0017] Figure 2 A flowchart of an event processing method according to another embodiment of the present disclosure;
[0018] Figure 3 A flowchart of an event processing method according to another embodiment of the present disclosure;
[0019] Figure 4 A schematic diagram of adding a target function to a steering wheel key according to one embodiment of the present disclosure;
[0020] Figure 5 A flowchart of an event processing method according to one embodiment of the present disclosure;
[0021] Figure 6 A flowchart of an event processing method according to one embodiment of the present disclosure;
[0022] Figure 7 A structural schematic diagram of an event processing device according to one embodiment of the present disclosure;
[0023] Figure 8 A structural schematic diagram of an event processing device according to one embodiment of the present disclosure;
[0024] Figure 9 This is a structural block diagram of an electronic device provided according to an embodiment of the present disclosure. Detailed Implementation
[0025] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.
[0026] In related technologies, touch events of steering wheel buttons in vehicle systems are broadcast by a window manager. Applications need to register to receive the broadcast and then process the touch events.
[0027] However, broadcasting touch events through the window manager has a complex processing mechanism, cannot customize the communication protocol, is difficult to debug, and each broadcast holds a component state management (ActivityManagerStatus, or AMS) lock during the broadcast process, which is affected by AMS performance. Furthermore, when AMS is busy, it will also affect the sending of broadcasts. In addition, the window manager broadcasts the original steering wheel button touch events, which requires the application to use a more complex mechanism to determine the touch events (press events, click events, or long press events), which takes a long time and results in poor timeliness in responding to touch events.
[0028] To address the aforementioned issues, this disclosure provides an event handling method, apparatus, electronic device, and storage medium.
[0029] The event processing method, apparatus, electronic device, and storage medium of embodiments of the present disclosure are described below with reference to the accompanying drawings.
[0030] Figure 1 This is a flowchart illustrating an event handling method provided according to an embodiment of the present disclosure.
[0031] The event handling method of this disclosure can be applied to a steering wheel button controller.
[0032] like Figure 1 As shown, the method may include the following steps:
[0033] Step 101: When a touch event is detected on a button on the steering wheel, determine at least one application for listening to the touch event.
[0034] In the embodiments of the present disclosure, the steering wheel key controller can monitor the key event on the steering wheel, and when a touch event of a target key on the steering wheel is monitored, the touch event can be used to determine a candidate application corresponding to the touch event, wherein the touch event can include a press event, a click event or a long click event, and the candidate application can be an application on the vehicle terminal, such as a video application, a music application, a navigation application, etc. It should be noted that the candidate application that monitors the touch event of the target key on the steering wheel can be at least one. For example, one or more applications monitor the touch event of the target key on the steering wheel.
[0035] In step 102, the target event type to which the touch event belongs is determined.
[0036] As a possible implementation, the target event type to which the touch event belongs can be determined according to the occurrence process of the touch event. For example, when the target key on the steering wheel is pressed, the press state of the target key can be recorded, and whether the target key is in a lift state can be further monitored. According to the time difference between the lift state and the press state, the type of the touch event of the target key can be determined. For example, if the time difference between the lift state and the press state is within a first set time range (for example, within 5 milliseconds), that is, the press state ends within a first time range after the target key is pressed, it can be determined that the type of the touch event is an OnKeyDown event. For another example, if the time difference between the lift state and the press state is within a second set time range (for example, within 5 milliseconds to 7 milliseconds), that is, the press state ends within a second time range after the target key is pressed, it can be determined that the type of the touch event is an OnKeyClick event. For another example, if the time difference between the lift state and the press state is within a third set time range (for example, within 7 milliseconds to 9 milliseconds), that is, the press state ends within a third time range after the target key is pressed, it can be determined that the type of the touch event is an OnKeyLongClick event.
[0037] In step 103, the target application is determined from the at least one candidate application according to the target event type.
[0038] Optionally, the event types of the touch events monitored by each candidate application in the candidate applications are different, and the event types of the touch events monitored by the multiple candidate applications can be the same.
[0039] Further, according to the monitoring event type of the candidate application and the target event type, one or more target applications can be determined. When the target application is multiple, a target application that executes the current touch event can be determined according to a set condition.
[0040] In step 104, the touch event is sent to the target application.
[0041] The target application handles touch events.
[0042] Furthermore, touch events can be sent directly to the target application, which then processes the touch events.
[0043] In summary, by detecting touch events of target buttons on the steering wheel, at least one candidate application for listening to touch events is identified; the target event type of the touch event is determined; based on the target event type, the target application is determined from at least one candidate application; and the touch event is sent to the target application, where the target application processes the touch event. Thus, by establishing a correspondence between applications and touch events of target buttons, the broadcasting of touch events of target buttons can be avoided, reducing coupling with the AMS (Autonomous Mobile Assistant). Furthermore, by sending touch events to the target application based on their event type, the target application can directly process the received touch events without the need for complex analysis mechanisms, improving the timeliness of touch event response.
[0044] To accurately identify the target application, such as Figure 2 As shown, Figure 2 This is a flowchart illustrating an event handling method according to another embodiment of the present disclosure. In this embodiment, a target application can be determined from at least one candidate application based on the event types monitored by at least one candidate application and the target event type. Figure 2 The illustrated embodiment may include the following steps:
[0045] Step 201: When a touch event of a target button on the steering wheel is detected, at least one candidate application is determined for listening to the touch event.
[0046] Step 202: Determine the target event type to which the touch event belongs.
[0047] Step 203: Obtain the listening event type of at least one candidate application.
[0048] As one possible implementation of this disclosure, each candidate application can set the event type it listens to in one or more event listening functions. The steering wheel button controller can determine the event type of each candidate application according to the event listening functions.
[0049] Step 204: Based on the target event type, determine the target application from at least one candidate application whose listening event type matches the target event type.
[0050] As an example, when the event types of the touch events listened by each of the candidate applications are different, a target application whose listened event type matches the target event type of the touch event can be determined from the candidate applications according to the listened event type of each of the candidate applications and the target event type of the touch event.
[0051] As another example, when the event types of the touch events listened by the plurality of candidate applications are the same, target applications whose listened event types match the target event type of the touch event can be determined from the candidate applications according to the listened event type of each of the candidate applications and the target event type of the touch event, and then, an application that executes the current touch event can be determined from the plurality of target applications according to a set condition. For example, the application that executes the current touch event can be determined from the plurality of target applications according to the historical use frequency, the historical use times, or the historical use time of the plurality of target applications; for another example, the plurality of target applications can be set with response priorities, and the target application with a higher priority can respond preferentially; for another example, the plurality of target applications include the current application of the car machine, and the current application can be the application that executes the current touch event.
[0052] In step 205, the touch event is sent to the target application.
[0053] The target application processes the touch event.
[0054] As a possible implementation manner of the embodiments of the present disclosure, the touch event can be processed by the target application through a corresponding event listening function calling a corresponding processing function of the target application.
[0055] It should be noted that the execution processes of steps 201 to 202 can be implemented by any of the embodiments of the present disclosure, and the embodiments of the present disclosure do not limit this, and will not be repeated here.
[0056] In summary, by obtaining the listened event type of the at least one candidate application, and determining the target application whose listened event type matches the target event type from the at least one candidate application according to the target event type, the target application whose listened event type matches the target event type can be accurately determined from the candidate applications according to the listened event type of the candidate application and the target event type.
[0057] In order to accurately determine the at least one candidate application for listening to the touch event, as shown in Figure 3 Figure 3 For the flowchart of the event processing method according to another embodiment of the present disclosure, in the embodiments of the present disclosure, according to the touch event, the registration list can be queried to obtain at least one candidate application program for listening to the touch event, Figure 3 The embodiments shown can include the following steps:
[0058] Step 301, when a touch event of a target key on the steering wheel is monitored, according to the touch event, the registration list is queried to obtain at least one candidate application program for listening to the touch event.
[0059] The registration list includes the correspondence between the touch event and the at least one candidate application program for listening to the touch event.
[0060] In the embodiments of the present disclosure, before the registration list is queried according to the touch event, the touch event listened to by the at least one application program can be registered, or after the at least one candidate application program for listening to the touch event is obtained, the touch event listened to by other candidate application programs can be registered, so that subsequently, according to the touch event, the registration list is queried to obtain at least one candidate application program for listening to the touch event.
[0061] Optionally, a listening registration request sent by the at least one candidate application program is received; wherein the touch event listened to by the corresponding application program is included in the listening registration request, and the correspondence between the at least one candidate application program and the touch event listened to by the at least one candidate application program is written into the registration list in response to the listening registration request.
[0062] That is, the listening registration request sent by the at least one candidate application program can be received, according to the registration request, the correspondence between the at least one candidate application program sending the listening registration request and the touch event listened to by the at least one candidate application program is written into the registration list, and then, when a touch event of a target key on the steering wheel is monitored, according to the touch event, the registration list is queried, and at least one candidate application program for listening to the touch event can be obtained.
[0063] Step 302, determine the target event type to which the touch event belongs.
[0064] Step 303, according to the target event type, determine the target application program from the at least one candidate application program.
[0065] Step 304, send the touch event to the target application program, wherein the target application program processes the touch event.
[0066] It should be noted that the execution process of steps 302 to 304 can be realized by any one of the embodiments of the present disclosure, and the embodiments of the present disclosure do not limit this, and will not be repeated here.
[0067] In summary, when a touch event of a target key on the steering wheel is monitored, the registered list is queried according to the touch event to obtain at least one application program for listening to the touch event, so that the application program for listening to the touch event can be accurately obtained, and the correctness of distributing the event to the corresponding application program and the accuracy of the touch event response are improved.
[0068] In order to improve the diversification of the steering wheel keys and provide users with diversified choices, a target function can also be added to the steering wheel keys, such as Figure 4 As shown in the figure, in the embodiment of the present disclosure, the steering wheel key controller can also receive a request for adding a target function sent by the car machine, and in response to the request for adding the target function, add the target function to the key (such as a custom key) on the steering wheel. For example, the user can select one of the selected functions in the vehicle settings (such as the car machine), wherein the selected functions can include: electronic rearview mirror, co-driver screen switch, low-speed warning sound, hub view angle, etc., and the car machine sends a request for adding a target function to the steering wheel key controller (event distribution device) according to the function selected by the user, and the steering wheel key controller receives the request for adding a target function sent by the car machine, and adds the target function to the key (such as a custom key on the steering wheel, which can be used to add a target function) on the steering wheel according to the request for adding the target function. It should be noted that the user can select the corresponding function through the key on the steering wheel, and the touch event of the key on the corresponding function module will be processed.
[0069] In order to clearly illustrate the above-mentioned embodiments, examples will be given.
[0070] For example, as shown in the figure Figure 5As shown, taking the vehicle system as an example, when the system service monitors a touch event of a key on the steering wheel, if there is a focus window of an application program, the input dispatcher can send the touch event to the view of the application program through the window input event receiver, and the view sends the touch event to a function receiving the touch event, for example, if the touch event is a click event, the view can send the click event to a click function receiving the key, to process the key click. If there is no focus window of an application program, the touch event can be sent to the steering wheel key management service through the window manager, and the steering wheel key management server can analyze the event type of the touch event in a set order through the steering wheel key manager, for example, OnKeyEventListener, OnKeyClickListener or OnKeyLongClickListener, wherein OnKeyEventListener is the first callback interface after receiving the touch event of the key from the steering wheel key management service. If onKeyEvent returns true (second processing flag) (for example, a press event), the press event is sent to an application program that can process the press event, and the touch event processing flow of the key is ended. If it returns false (first processing flag), onKeyClick (a function responding to a click event) or onKeyLongClick (a function responding to a long click event) will be called according to the time of ACTION_UP (key up). Taking an audio application program as an example, which listens to the touch event of the key on the steering wheel, the vehicle audio service calls the corresponding media application program (for example, the press event of steering wheel key 1 corresponds to media application program 1, and the press event of steering wheel key 2 corresponds to media application program 2) through the media session service to respond to the press event of the key.
[0071] The event distribution method of the embodiment of the present disclosure, by monitoring the touch event of the target key on the steering wheel, determining at least one candidate application program for listening to the touch event; determining the target event type to which the touch event belongs; determining the target application program from the at least one candidate application program according to the target event type; and sending the touch event to the target application program, wherein the target application program processes the touch event. Thus, by establishing the corresponding relationship between the application program and the touch event of the target key, the broadcast mechanism for broadcasting the touch event of the target key can be avoided, the coupling between the AMS is reduced, and at the same time, the touch event is sent to the target application program according to the event type of the touch event, and the target application program can directly process the received touch event without using a complex mechanism for analysis, thereby improving the response timeliness of the touch event.
[0072] In order to realize the above-mentioned embodiments, another event processing method is also proposed in the embodiment of the present disclosure.Figure 6 A flowchart of an event processing method according to one embodiment of the present disclosure.
[0073] The event processing method of the embodiments of the present disclosure can be applied to a target application.
[0074] As shown in Figure 6 The method can include the following steps:
[0075] In step 601, a touch event sent by a steering wheel key controller is received.
[0076] The touch event is sent by the steering wheel key controller when the steering wheel key controller monitors a touch event of a target key on a steering wheel, determines at least one candidate application for listening to the touch event, and determines a target application from the at least one candidate application according to a target event type to which the touch event belongs.
[0077] In the embodiments of the present disclosure, the steering wheel key controller can monitor key events on the steering wheel, and when a touch event of a target key on the steering wheel is monitored, the steering wheel key controller can determine a candidate application corresponding to the touch event according to the touch event.
[0078] As a possible implementation, the target event type to which the touch event belongs can be determined according to the occurrence process of the touch event. Further, one or more target applications can be determined according to the listening event type of the candidate application and the target event type. When the target application is multiple, a target application that executes the current touch event can be determined according to a set condition, and then the steering wheel can directly send the touch event to the target application that can execute the current touch event,
[0079] In step 602, the touch event is processed.
[0080] Further, the target application can process the touch event.
[0081] The event processing method of the embodiment of the present disclosure receives a touch event sent by a steering wheel key controller. The steering wheel key controller determines at least one candidate application program for listening to the touch event when monitoring a touch event of a target key on the steering wheel, and sends the touch event to a target application program from the at least one candidate application program according to a target event type to which the touch event belongs. In this way, the steering wheel key controller can avoid using a broadcast mechanism to broadcast the touch event of the target key, reduce the coupling with the AMS, and send the touch event to the target application program according to the event type of the touch event. The target application program can directly process the received touch event without using a complex mechanism for analysis, thereby improving the response timeliness of the touch event.
[0082] To achieve the above object Figure 1 to Figure 5 According to the embodiment shown in the present disclosure, the present disclosure further provides an event processing device.
[0083] Figure 7 The structure diagram of the event processing device provided by an embodiment of the present disclosure is shown. It should be noted that the event processing device can be applied to a steering wheel key controller.
[0084] As shown in Figure 7 The event processing device 700 can include a first determination module 710, a second determination module 720, a third determination module 730, and a sending module 740.
[0085] The first determination module 710 is configured to determine at least one candidate application program for listening to the touch event when monitoring a touch event of a target key on the steering wheel. The second determination module 720 is configured to determine a target event type to which the touch event belongs. The third determination module 730 is configured to determine a target application program from the at least one candidate application program according to the target event type. The sending module 750 is configured to send the touch event to the target application program, and the target application program processes the touch event.
[0086] As a possible implementation manner of the embodiment of the present disclosure, the third determination module 740 is further configured to obtain a listening event type of the at least one candidate application program, and determine a target application program from the at least one candidate application program, in which the listening event type matches the target event type.
[0087] As a possible implementation manner of the embodiment of the present disclosure, the first determining module 710 is further configured to, when the touch event of the target key on the steering wheel is monitored, query the registration list according to the touch event to obtain at least one candidate application program for listening to the touch event, wherein the registration list comprises a corresponding relationship between the touch event and the at least one candidate application program for listening to the touch event.
[0088] As a possible implementation manner of the embodiment of the present disclosure, the event processing apparatus 700 further comprises a receiving module and a registration module.
[0089] The receiving module is configured to receive a listening registration request sent by the at least one candidate application program, wherein the listening registration request comprises a touch event listened to by the corresponding application program; and the registration module is configured to, in response to the listening registration request, write a corresponding relationship between the at least one candidate application program and the touch event listened to by the at least one candidate application program into the registration list.
[0090] As a possible implementation manner of the embodiment of the present disclosure, the touch event comprises a press event, a click event or a long click event.
[0091] The event processing apparatus of the embodiment of the present disclosure determines at least one candidate application program for listening to a touch event when the touch event of a target key on a steering wheel is monitored, determines a target event type to which the touch event belongs, determines a target application program from the at least one candidate application program according to the target event type, and sends the touch event to the target application program, wherein the target application program processes the touch event. In this way, by establishing a corresponding relationship between an application program and a touch event of a target key, the use of a broadcast mechanism to broadcast the touch event of the target key can be avoided, the coupling between the application program and the AMS is reduced, and at the same time, the touch event is sent to a target application program according to the event type of the touch event, so that the target application program can directly process the received touch event without the need for a complex mechanism for analysis, thereby improving the response timeliness of the touch event.
[0092] It should be noted that the foregoing explanation and description of the method embodiments also apply to the apparatus of the embodiments, which will not be described herein again.
[0093] In order to implement Figure 6 the embodiment, the present disclosure further proposes another event processing apparatus. Figure 8 FIG. 1 shows a structural schematic diagram of an event processing apparatus according to an embodiment of the present disclosure, which can be applied to a target application program.
[0094] As Figure 8 shown, the event processing apparatus 800 comprises a receiving module 810 and a processing module 820.
[0095] The receiving module 810 is used to receive touch events sent by the steering wheel button controller. The touch event is sent by the steering wheel button controller after detecting a touch event of a target button on the steering wheel, determining at least one candidate application for listening to the touch event, and determining the target application from at least one candidate application according to the target event type to which the touch event belongs. The processing module 820 is used to process the touch event.
[0096] To implement the above embodiments, this disclosure also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the following... Figure 1 to Figure 5 The event handling method described in the embodiments, or, implementation thereof. Figure 6 The event handling method described in the embodiment.
[0097] To implement the above embodiments, this disclosure also proposes a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements... Figure 1 to Figure 5 The event handling method described in the embodiments, or, implementation thereof. Figure 6 The event handling method described in the embodiment.
[0098] To implement the above embodiments, this disclosure also proposes a computer program product on which a computer program is stored, and which, when executed by a processor, implements... Figure 1 to Figure 5 The event handling method described in the embodiments, or, implementation thereof. Figure 6 The event handling method described in the embodiment.
[0099] Figure 9 This is a structural block diagram of an electronic device provided according to an embodiment of the present disclosure. Figure 9 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0100] like Figure 9 As shown, the electronic device 900 includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a memory 906 into a random access memory (RAM) 903. The RAM 903 also stores various programs and data required for the operation of the electronic device 900. The processor 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0101] The following components are connected to the I / O interface 905: a storage 906 including a hard disk or the like; and a communication section 907 including a network interface card such as a LAN (Local Area Network) card, a modem, or the like, which performs communication processing via a network such as the Internet; and a drive 908 is also connected to the I / O interface 905 as necessary.
[0102] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program carried on a computer-readable medium, which contains program codes for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by the communication section 907. When the computer program is executed by the processor 901, the above-described functions defined in the methods of the present disclosure are executed.
[0103] In an exemplary embodiment, a storage medium including instructions, such as the storage 906 including instructions, is also provided, which can be executed by the processor 901 of the electronic device 900 to complete the above-described methods. Optionally, the storage medium can be a non-transitory computer-readable storage medium, such as a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0104] In the description of the present specification, the description referring to the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific feature, structure, material or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. Illustrative expressions of the above-described terms in the present specification do not necessarily refer to the same embodiment or example. Also, the specific feature, structure, material or characteristic described can be combined in any appropriate manner in any one or more embodiments or examples. Furthermore, the person skilled in the art can combine and combine the different embodiments or examples described in the present specification and the features of the different embodiments or examples, without contradiction.
[0105] In addition, the terms "first", "second", etc. are used only for the purpose of description and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Thus, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise explicitly specified.
[0106] Any processes or methods described in the flowcharts or otherwise described herein can be understood as representing modules, segments, or portions of code that include one or more executable instructions for implementing specific logic functions (or steps) and / or can be implemented entirely in hardware. The various embodiments of the present disclosure can include additional or fewer steps or methods as desired for a given implementation. The scope of the present disclosure is not limited to the order in which the steps are presented in the flowcharts or otherwise described herein.
[0107] Logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be embodied in computer-readable instructions, such as software and / or firmware, which can be executed by a processing unit or other controller of a computer-based system, or other system, to implement the functions / acts specified in the flowcharts and / or other flow diagram for achieving the results presented or otherwise described herein. Alternatively, computer- readable instructions can be downloaded to the system or other system from a computer- readable storage medium or to an external system or internal system from the internet or other communication network. Whether from a computer-readable storage medium, a computer-readable signal medium, or the internet, the present disclosure applies to any computer-readable medium, alone or in combination with others, that can be read by a processing unit or other controller of a computer-based system, or other system, to implement the functions / acts specified in the flowcharts and / or other flow diagram for achieving the results presented or otherwise described herein.
[0108] It should be understood that aspects of the present disclosure can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. As such, in some embodiments, specifically configured computer-readable medium (for example, memory) is provided with the instructions stored thereon that, when executed by a machine (for example, a computer-based system, or other system), cause the machine to perform the steps or methods described herein. Alternatively, in some embodiments, the steps or methods described herein can be implemented in hardware, for example, as a combination of logic gates in an application-specific integrated circuit (ASIC) or other implementation known to those of skill in the art.
[0109] Those skilled in the art of the present technology can understand that all or part of the steps carried out by the above-mentioned embodiment method can be completed by programs instructing related hardware, and the programs can be stored in a computer readable storage medium. When the program is executed, it includes one of the steps of the method embodiment or a combination thereof.
[0110] In addition, each functional unit in each embodiment of the present disclosure can be integrated into one processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The integrated module can be realized in the form of hardware or in the form of a software functional module. When the integrated module is realized in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer readable storage medium.
[0111] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it should be understood that the above-mentioned embodiments are exemplary and cannot be understood as limiting the present disclosure, and those skilled in the art can make changes, modifications, replacements and variations to the above-mentioned embodiments within the scope of the present disclosure.
Claims
1. An event processing method, characterized by, The method comprises the following steps: when a touch event of a target button on a steering wheel is monitored, determining at least one candidate application program for listening to the touch event; determining a target event type to which the touch event belongs according to a process of occurrence of the touch event; determining a target application program from the at least one candidate application program according to the target event type; sending the touch event to the target application program, wherein the target application program processes the touch event.
2. The method of claim 1, wherein, The step of determining a target application program from the candidate application program according to the target event type comprises the following steps: obtaining a listening event type of the at least one candidate application program; determining a target application program from the at least one candidate application program, in which the listening event type matches the target event type.
3. The method of claim 1, wherein, The step of determining at least one candidate application program for listening to the touch event when a touch event of a target button on a steering wheel is monitored comprises the following steps: when a touch event of a target button on a steering wheel is monitored, querying a registration list according to the touch event to obtain at least one candidate application program for listening to the touch event, wherein the registration list comprises a corresponding relationship between a touch event and at least one candidate application program for listening to the touch event.
4. The method of claim 3, wherein, The method further comprises the following steps: receiving a listening registration request sent by the at least one candidate application program, wherein the listening registration request comprises a touch event listened to by a corresponding application program; in response to the listening registration request, writing a corresponding relationship between the at least one candidate application program and a touch event listened to by the at least one candidate application program into the registration list.
5. The method according to any one of claims 1-4, characterized in that, The touch event comprises a press event, a click event or a long click event.
6. An event handling method characterized by, The method comprises the following steps: receiving a touch event sent by a steering wheel button controller, wherein the touch event is sent by the steering wheel button controller after determining at least one candidate application program for listening to the touch event when a touch event of a target button on a steering wheel is monitored, determining a target event type to which the touch event belongs according to a process of occurrence of the touch event, and determining a target application program from the at least one candidate application program according to the target event type to which the touch event belongs; processing the touch event.
7. An event processing apparatus, characterized by comprising: The method comprises the following steps: a first determining module is configured to determine at least one candidate application program for listening to a touch event of a target button on a steering wheel when the touch event of the target button on the steering wheel is monitored; a second determining module is configured to determine a target event type to which the touch event belongs according to a process of occurrence of the touch event; a third determining module is configured to determine a target application program from the at least one candidate application program according to the target event type; a sending module is configured to send the touch event to the target application program, wherein the target application program processes the touch event.
8. An event processing apparatus, characterized by comprising: The method comprises the following steps: The receiving module is configured to receive a touch event sent by the steering wheel key controller, wherein the steering wheel key controller determines at least one candidate application for listening to the touch event when monitoring a touch event of a target key on the steering wheel, determines a target event type to which the touch event belongs according to a process of the touch event, and sends the touch event according to the target event type to which the touch event belongs and the target application determined from the at least one candidate application; The processing module is configured to process the touch event.
9. An electronic device, comprising: The computer program is stored in the memory and executable on the processor, and when the processor executes the program, the method in any one of claims 1-5 is implemented, or the method in claim 6 is implemented.
10. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is stored in the memory and executable on the processor, and when the processor executes the program, the method in any one of claims 1-5 is implemented, or the method in claim 6 is implemented.
11. A computer program product comprising computer instructions, characterized in that, The computer program is stored in the memory and executable on the processor, and when the processor executes the program, the method in any one of claims 1-5 is implemented, or the method in claim 6 is implemented.
Citation Information
Patent Citations
Application control method and device, terminal device and computer readable storage medium
CN109885245A