CN117707395A - Response processing method, electronic device and storage medium - Google Patents
Response processing method, electronic device and storage medium Download PDFInfo
- Publication number
- CN117707395A CN117707395A CN202310947660.XA CN202310947660A CN117707395A CN 117707395 A CN117707395 A CN 117707395A CN 202310947660 A CN202310947660 A CN 202310947660A CN 117707395 A CN117707395 A CN 117707395A
- Authority
- CN
- China
- Prior art keywords
- window
- mouse
- event
- electronic device
- application
- 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
Links
- 230000004044 response Effects 0.000 title claims abstract description 77
- 238000003672 processing method Methods 0.000 title claims abstract description 17
- 238000000034 method Methods 0.000 claims abstract description 126
- 230000008569 process Effects 0.000 claims description 83
- 230000006870 function Effects 0.000 claims description 50
- 238000001514 detection method Methods 0.000 claims description 21
- 238000012545 processing Methods 0.000 description 43
- 238000000605 extraction Methods 0.000 description 40
- 238000010586 diagram Methods 0.000 description 22
- 238000004891 communication Methods 0.000 description 18
- 238000007726 management method Methods 0.000 description 16
- 238000010295 mobile communication Methods 0.000 description 10
- 230000001960 triggered effect Effects 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 5
- 229920001621 AMOLED Polymers 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000004590 computer program Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 238000013519 translation Methods 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000003321 amplification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000001976 improved effect Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000003199 nucleic acid amplification method Methods 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 230000003190 augmentative effect Effects 0.000 description 1
- 238000013529 biological neural network Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001149 cognitive effect Effects 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000007667 floating Methods 0.000 description 1
- 230000003862 health status Effects 0.000 description 1
- 230000001939 inductive effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000002096 quantum dot Substances 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000001568 sexual effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04842—Selection of displayed objects or displayed text elements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
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
Description
技术领域Technical field
本申请涉及终端技术领域,尤其涉及一种响应处理方法、电子设备及存储介质。The present application relates to the field of terminal technology, and in particular, to a response processing method, electronic device and storage medium.
背景技术Background technique
在用户使用电子设备(如终端)的过程中,电子设备会以窗口的形式为用户显示相关内容,以便用户在窗口内执行相关操作或查看相关内容等。例如,用户使用输入设备(如鼠标设备)在电子设备所显示的窗口上执行相关操作(如点击操作)时,窗口会触发相应的响应。When a user uses an electronic device (such as a terminal), the electronic device will display relevant content to the user in the form of a window so that the user can perform relevant operations or view relevant content in the window. For example, when a user uses an input device (such as a mouse device) to perform a related operation (such as a click operation) on a window displayed by the electronic device, the window will trigger a corresponding response.
发明内容Contents of the invention
本申请提供了一种响应处理方法、电子设备及存储介质,用于解决因新显示的窗口抢夺焦点而导致当前窗口不响应的问题。This application provides a response processing method, electronic device, and storage medium to solve the problem of the current window not responding due to a newly displayed window grabbing focus.
为达到上述目的,本申请采用如下技术方案:In order to achieve the above purpose, this application adopts the following technical solutions:
第一方面,提供了一种响应处理方法,应用于电子设备,该方法包括:The first aspect provides a response processing method applied to electronic devices. The method includes:
该电子设备显示第一窗口,在该第一窗口的第一对象上显示光标;The electronic device displays a first window and displays a cursor on a first object of the first window;
该电子设备接收来自该电子设备的输入设备的鼠标按下事件;The electronic device receives a mouse press event from an input device of the electronic device;
该电子设备显示第二窗口,且焦点被该第二窗口占用,该电子设备接收来自该电子设备的输入设备的鼠标释放事件;The electronic device displays a second window, and the focus is occupied by the second window, and the electronic device receives a mouse release event from an input device of the electronic device;
在该光标显示在该第一对象上的情况下,该电子设备基于该鼠标按下事件和该鼠标释放事件,对该第一对象的操作进行响应。When the cursor is displayed on the first object, the electronic device responds to the operation of the first object based on the mouse press event and the mouse release event.
在上述技术方案中,在该第一窗口的第一对象上显示光标且接收来自该电子设备的输入设备的鼠标按下事件之后,如若新显示第二窗口且焦点被该第二窗口占用,在接收来自该电子设备的输入设备的鼠标释放事件之后,可通过判断光标是否显示在该第一对象上,来确定是否在该第一窗口内对该第一对象的操作进行响应。进而,在该光标显示在该第一对象上的情况下,基于该鼠标按下事件和该鼠标释放事件,对该第一对象的操作进行响应,能够在该第一窗口内对本次鼠标操作事件顺利作出响应。如此,通过设置上述光标位置的判断条件,能够确定当前第一窗口是否需要处理本次鼠标操作事件。进而,在新显示第二窗口的情况下,使需要处理本次鼠标操作事件的当前第一窗口继续作出响应,能够解决因新显示的窗口抢夺焦点而导致当前窗口不响应的问题,提升了响应处理的可靠性。In the above technical solution, after the cursor is displayed on the first object of the first window and the mouse press event from the input device of the electronic device is received, if the second window is newly displayed and the focus is occupied by the second window, After receiving a mouse release event from the input device of the electronic device, it can be determined whether to respond to the operation of the first object in the first window by determining whether the cursor is displayed on the first object. Furthermore, when the cursor is displayed on the first object, based on the mouse press event and the mouse release event, the mouse operation can be performed in the first window in response to the operation of the first object. The incident was responded to smoothly. In this way, by setting the judgment condition of the cursor position, it can be determined whether the current first window needs to process this mouse operation event. Furthermore, when the second window is newly displayed, the current first window that needs to process the mouse operation event continues to respond, which can solve the problem of the current window not responding due to the newly displayed window grabbing focus, and improve the response. Processing reliability.
在第一方面的一种可能的实现方式中,该电子设备包括事件监控器,该事件监控器用于监控该电子设备的输入设备的鼠标按下事件和鼠标释放事件;In a possible implementation of the first aspect, the electronic device includes an event monitor, the event monitor is used to monitor mouse press events and mouse release events of an input device of the electronic device;
该方法还包括:The method also includes:
该事件监控器将该鼠标按下事件和该鼠标释放事件发送至该第一窗口对应的进程。The event monitor sends the mouse press event and the mouse release event to the process corresponding to the first window.
在该种可能的实现方式中,提供了一种为第一窗口获取本次鼠标操作事件的方式。其中,在接收到来自该电子设备的输入设备的鼠标按下事件时,需向该第一窗口对应的进程发送该鼠标按下事件,以便后续该第一窗口对应的进程基于所接收的该鼠标按下事件进行处理。在新显示第二窗口的情况下,在接收到来自该电子设备的输入设备的鼠标释放事件时,需向该第一窗口对应的进程发送该鼠标释放事件,以便后续该第一窗口对应的进程基于所接收的该鼠标释放事件进行处理。如此,能够确保在第一窗口内对本次鼠标操作事件顺利作出响应,提升了响应处理的可靠性。In this possible implementation, a method for obtaining the current mouse operation event for the first window is provided. Wherein, when receiving a mouse press event from the input device of the electronic device, the mouse press event needs to be sent to the process corresponding to the first window, so that the subsequent process corresponding to the first window can based on the received mouse press event. Press event to handle. When the second window is newly displayed, when receiving a mouse release event from the input device of the electronic device, the mouse release event needs to be sent to the process corresponding to the first window so that the process corresponding to the first window can be followed. Processing based on the mouse release event received. In this way, it can be ensured that the mouse operation event is successfully responded to in the first window, thereby improving the reliability of the response processing.
在第一方面的另一种可能的实现方式中,该事件监控器将该鼠标按下事件和该鼠标释放事件发送至该第一窗口对应的进程,包括:In another possible implementation of the first aspect, the event monitor sends the mouse press event and the mouse release event to the process corresponding to the first window, including:
在该鼠标按下事件和该鼠标释放事件属于预设鼠标事件的情况下,该事件监控器将该鼠标按下事件和该鼠标释放事件发送至该第一窗口对应的进程。When the mouse press event and the mouse release event are preset mouse events, the event monitor sends the mouse press event and the mouse release event to the process corresponding to the first window.
在该种可能的实现方式中,提供了一种基于预设鼠标事件来触发发送本次鼠标操作事件的方式。其中,在接收到来自该电子设备的输入设备的鼠标按下事件时,通过判断该鼠标按下事件是否属于预设鼠标事件,确保在该鼠标按下事件属于预设鼠标事件的情况下向该第一窗口对应的进程发送该鼠标按下事件。在新显示第二窗口的情况下,在接收到来自该电子设备的输入设备的鼠标释放事件时,通过判断该鼠标释放事件是否属于预设鼠标事件,确保在该鼠标释放事件属于预设鼠标事件的情况下向该第一窗口对应的进程发送该鼠标释放事件。如此,能够确保在第一窗口内对本次鼠标操作事件顺利作出响应,提升了响应处理的可靠性。In this possible implementation, a method of triggering and sending this mouse operation event based on a preset mouse event is provided. Wherein, when receiving a mouse press event from the input device of the electronic device, by judging whether the mouse press event belongs to a preset mouse event, it is ensured that the mouse press event belongs to the preset mouse event. The process corresponding to the first window sends the mouse press event. When the second window is newly displayed, when a mouse release event from the input device of the electronic device is received, it is determined whether the mouse release event belongs to the preset mouse event to ensure that the mouse release event belongs to the preset mouse event. In this case, the mouse release event is sent to the process corresponding to the first window. In this way, it can be ensured that the mouse operation event is successfully responded to in the first window, thereby improving the reliability of the response processing.
在第一方面的另一种可能的实现方式中,该事件监控器将该鼠标释放事件发送至该第一窗口对应的进程之后,该方法还包括:In another possible implementation of the first aspect, after the event monitor sends the mouse release event to the process corresponding to the first window, the method further includes:
将该焦点从该第二窗口切换至该第一窗口。Switch the focus from the second window to the first window.
在该种可能的实现方式中,在新显示第二窗口的情况下,通过继续向该第一窗口对应的进程发送该鼠标释放事件,能够将焦点重新切换回第一窗口,从而能够解决因新显示的窗口抢夺焦点而导致当前窗口不响应的问题,提升了响应处理的可靠性。In this possible implementation, when the second window is newly displayed, by continuing to send the mouse release event to the process corresponding to the first window, the focus can be switched back to the first window, thereby solving the problem of the new window. The problem of the displayed window grabbing focus and causing the current window to become unresponsive has improved the reliability of response processing.
在第一方面的另一种可能的实现方式中,该电子设备接收来自该电子设备的输入设备的鼠标释放事件之后,该方法还包括:In another possible implementation of the first aspect, after the electronic device receives a mouse release event from the input device of the electronic device, the method further includes:
该事件监控器获取该光标的位置检测结果,该位置检测结果用于指示该光标是否显示在该第一对象上。The event monitor obtains a position detection result of the cursor, and the position detection result is used to indicate whether the cursor is displayed on the first object.
在该种可能的实现方式中,提供了一种获取光标的位置检测结果的方式,能够快速且准确的确定出该光标是否显示在第一对象上。In this possible implementation, a method of obtaining the position detection result of the cursor is provided, which can quickly and accurately determine whether the cursor is displayed on the first object.
在第一方面的另一种可能的实现方式中,该鼠标按下事件包括鼠标按下时对应显示屏中的第一位置,该鼠标释放事件包括鼠标释放时对应显示屏中的第二位置;In another possible implementation of the first aspect, the mouse press event includes a first position in the display screen corresponding to the mouse press, and the mouse release event includes a second position in the display screen corresponding to the mouse release;
该电子设备基于该鼠标按下事件和该鼠标释放事件,对该第一对象的操作进行响应,包括:The electronic device responds to the operation of the first object based on the mouse press event and the mouse release event, including:
在该第一位置与该第二位置均位于该第一窗口内的情况下,该电子设备在该第一窗口内,对该第一对象的操作进行响应。When both the first position and the second position are located within the first window, the electronic device responds to the operation of the first object within the first window.
在该种可能的实现方式中,通过判断本次鼠标操作事件中该鼠标按下事件对应的第一位置与鼠标释放事件对应的第二位置是否均位于该第一窗口内,来判断该鼠标按下事件与该鼠标释放事件是否属于同一次鼠标操作事件,以确保针对同一次鼠标操作事件作出响应,避免出现异常响应的问题,提升了响应处理的可靠性。In this possible implementation, the mouse press is determined by determining whether the first position corresponding to the mouse press event and the second position corresponding to the mouse release event in this mouse operation event are both located within the first window. Whether the next event and the mouse release event belong to the same mouse operation event are ensured to respond to the same mouse operation event, avoid abnormal response problems, and improve the reliability of response processing.
在第一方面的另一种可能的实现方式中,该第一窗口为包括目标控件的窗口;In another possible implementation of the first aspect, the first window is a window including a target control;
该在该第一位置与该第二位置均位于该第一窗口内的情况下,该电子设备在该第一窗口内,对该第一对象的操作进行响应,包括:When both the first position and the second position are located within the first window, the electronic device responds to the operation of the first object within the first window, including:
在该第一位置与该第二位置均位于该第一窗口内的情况下,该电子设备在该第一窗口内,将该目标控件的显示状态由第一状态切换为第二状态。When both the first position and the second position are located in the first window, the electronic device switches the display state of the target control from the first state to the second state in the first window.
在该种可能的实现方式中,提供了一种以控件窗口为例的响应处理方案,能够在新显示第二窗口的情况下,使需要处理本次鼠标操作事件的控件窗口继续作出响应,也即是将该目标控件的显示状态由第一状态切换为第二状态,提升了响应处理的可靠性。In this possible implementation, a response processing solution using a control window as an example is provided, which can enable the control window that needs to process this mouse operation event to continue to respond when the second window is newly displayed, and also That is, the display state of the target control is switched from the first state to the second state, which improves the reliability of response processing.
在第一方面的另一种可能的实现方式中,该第一窗口为包括文本内容的窗口;In another possible implementation of the first aspect, the first window is a window including text content;
该在该第一位置与该第二位置均位于该第一窗口内的情况下,该电子设备在该第一窗口内,对该第一对象的操作进行响应,包括:When both the first position and the second position are located within the first window, the electronic device responds to the operation of the first object within the first window, including:
在该第一位置与该第二位置均位于该第一窗口内的情况下,该电子设备在该第一窗口内显示第三窗口,该第三窗口包括与该文本内容相关的至少一个功能控件。When both the first position and the second position are located within the first window, the electronic device displays a third window within the first window, the third window including at least one functional control related to the text content .
在该种可能的实现方式中,提供了一种以文本窗口为例的响应处理方案,能够在新显示第二窗口的情况下,使需要处理本次鼠标操作事件的文本窗口继续作出响应,也即是显示包括至少一个功能控件的第三窗口,提升了响应处理的可靠性。In this possible implementation, a response processing solution using a text window as an example is provided, which can enable the text window that needs to process this mouse operation event to continue to respond when the second window is newly displayed, and also That is, the third window including at least one functional control is displayed, which improves the reliability of response processing.
第二方面,本申请提供了一种电子设备,包括:显示屏、存储器和处理器。显示屏用于提供显示功能。存储器用于存储程序代码,处理器用于调用存储器存储的程序代码,从而实现第一方面提供的任意一种方法。In a second aspect, this application provides an electronic device, including: a display screen, a memory, and a processor. The display screen is used to provide display functions. The memory is used to store program code, and the processor is used to call the program code stored in the memory, thereby implementing any method provided in the first aspect.
第三方面,提供了一种计算机可读存储介质,包括程序代码,程序代码在电子设备上运行时,使得电子设备执行第一方面提供的任意一种方法。In a third aspect, a computer-readable storage medium is provided, including program code. When the program code is run on an electronic device, it causes the electronic device to execute any method provided in the first aspect.
第四方面,提供了一种计算机程序产品,包括程序代码,当程序代码在电子设备上运行时,使得电子设备执行第一方面提供的任意一种方法。A fourth aspect provides a computer program product, including program code. When the program code is run on an electronic device, it causes the electronic device to execute any method provided in the first aspect.
需要说明的是,第二方面至第四方面中的任一种实现方式所带来的技术效果可参见第一方面中对应实现方式所带来的技术效果,此处不再赘述。It should be noted that the technical effects brought by any implementation method in the second to fourth aspects can be referred to the technical effects brought by the corresponding implementation method in the first aspect, and will not be described again here.
附图说明Description of the drawings
图1为本申请实施例提供的一种电子设备的示意图;Figure 1 is a schematic diagram of an electronic device provided by an embodiment of the present application;
图2为本申请实施例提供的一种电子设备的显示屏的示意图;Figure 2 is a schematic diagram of a display screen of an electronic device provided by an embodiment of the present application;
图3为本申请实施例提供的一种电子设备的显示屏的示意图;Figure 3 is a schematic diagram of a display screen of an electronic device provided by an embodiment of the present application;
图4为本申请实施例提供的一种电子设备的显示屏的示意图;Figure 4 is a schematic diagram of a display screen of an electronic device provided by an embodiment of the present application;
图5为本申请实施例提供的一种电子设备的显示屏的示意图;Figure 5 is a schematic diagram of a display screen of an electronic device provided by an embodiment of the present application;
图6为本申请实施例提供的一种电子设备的硬件结构示意图;Figure 6 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application;
图7为本申请实施例提供的一种电子设备的软件结构示意图;Figure 7 is a schematic diagram of the software structure of an electronic device provided by an embodiment of the present application;
图8为本申请实施例提供的一种响应处理方法的流程示意图;Figure 8 is a schematic flowchart of a response processing method provided by an embodiment of the present application;
图9为本申请实施例提供的一种响应处理方法的架构示意图;Figure 9 is an architectural schematic diagram of a response processing method provided by an embodiment of the present application;
图10为本申请实施例提供的一种响应处理方法的架构交互图;Figure 10 is an architectural interaction diagram of a response processing method provided by an embodiment of the present application;
图11为本申请实施例提供的一种响应处理装置的结构框图。Figure 11 is a structural block diagram of a response processing device provided by an embodiment of the present application.
具体实施方式Detailed ways
在本申请的描述中,除非另有说明,“/”表示“或”的意思,例如,A/B可以表示A或B。本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。此外,“至少一个”是指一个或多个,“多个”是指两个或两个以上。“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。In the description of this application, unless otherwise stated, "/" means "or". For example, A/B can mean A or B. "And/or" in this article is just an association relationship that describes related objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone these three situations. In addition, "at least one" means one or more, and "plurality" means two or more. Words such as "first" and "second" do not limit the quantity and order of execution, and words such as "first" and "second" do not limit the number or order of execution.
需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design described herein as "exemplary" or "such as" is not intended to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the words "exemplary" or "such as" is intended to present the concept in a concrete manner.
在一些实施例中,本申请实施例提供的响应处理方法,可应用于如图1所示的电子设备100。示例性的,图1为本申请实施例提供的一种电子设备的示意图。In some embodiments, the response processing method provided by the embodiment of the present application can be applied to the electronic device 100 as shown in FIG. 1 . Illustratively, FIG. 1 is a schematic diagram of an electronic device provided by an embodiment of the present application.
其中,电子设备100可以是终端设备。示例性的,电子设备100可以是智能手机、智能手表、台式电脑、手提电脑、虚拟现实终端、增强现实终端、无线终端和膝上型便携计算机等设备中的至少一种。Wherein, the electronic device 100 may be a terminal device. Exemplarily, the electronic device 100 may be at least one of a smart phone, a smart watch, a desktop computer, a laptop computer, a virtual reality terminal, an augmented reality terminal, a wireless terminal, a laptop computer, and other devices.
本申请实施例中,电子设备100可以连接有输入设备101。示例性的,输入设备101可以是鼠标设备、触摸板、触屏笔等。例如,电子设备100可通过有线或无线的方式连接输入设备101。In this embodiment of the present application, the electronic device 100 may be connected to an input device 101 . For example, the input device 101 may be a mouse device, a touch pad, a touch screen pen, etc. For example, the electronic device 100 may be connected to the input device 101 in a wired or wireless manner.
在一些实施例中,电子设备100提供有基于输入设备101来触发窗口响应的功能。示例性的,参见图1,在用户使用电子设备100的过程中,电子设备100会以窗口的形式为用户显示相关内容,以便用户在窗口内执行相关操作或查看相关内容等。进而,用户使用输入设备101在电子设备100所显示的窗口上执行相关操作(如点击操作)时,窗口会触发相应的响应。In some embodiments, the electronic device 100 is provided with functionality to trigger a window response based on the input device 101 . For example, referring to FIG. 1, when the user uses the electronic device 100, the electronic device 100 will display relevant content to the user in the form of a window, so that the user can perform relevant operations or view relevant content in the window. Furthermore, when the user uses the input device 101 to perform relevant operations (such as click operations) on the window displayed by the electronic device 100, the window will trigger a corresponding response.
本申请实施例提供的响应处理方法,可应用于电子设备100所显示的窗口的响应场景中。The response processing method provided by the embodiment of the present application can be applied to the response scenario of the window displayed by the electronic device 100.
其中,窗口可以是应用窗口,也即是与应用显示相关的窗口。例如,应用窗口可以划分为应用主窗口和应用子窗口。应用主窗口用于显示应用界面,如包括文本内容的界面。应用子窗口用于显示应用的弹窗,如悬浮窗等辅助窗口。The window may be an application window, that is, a window related to application display. For example, an application window can be divided into an application main window and an application sub-window. The application main window is used to display the application interface, such as an interface including text content. The application sub-window is used to display application pop-up windows, such as floating windows and other auxiliary windows.
示例性的,以文本应用(如wps应用、word应用、excel应用、ppt应用或txt应用)为例,窗口可以是文本应用的应用主窗口,也即用于显示文本内容的窗口。或者,窗口也可以是文本应用的应用子窗口,如功能控件所在的窗口。For example, taking a text application (such as a wps application, word application, excel application, ppt application, or txt application), the window may be the application main window of the text application, that is, a window used to display text content. Alternatively, the window can also be an application sub-window of the text application, such as the window where the function control is located.
又示例性的,以社交应用(如聊天应用)为例,窗口可以是社交应用的应用主窗口,也即用于显示会话内容的窗口。或者,窗口也可以是社交应用的应用子窗口,如功能控件所在的窗口。As another example, taking a social application (such as a chat application) as an example, the window may be the application main window of the social application, that is, a window used to display conversation content. Alternatively, the window can also be an application sub-window of the social application, such as the window where the function control is located.
又示例性的,以邮件应用为例,窗口可以是邮件应用的应用主窗口,也即用于显示邮件内容的窗口。或者,窗口也可以是邮件应用的应用子窗口,如功能控件所在的窗口。As another example, taking an email application as an example, the window may be the application main window of the email application, that is, a window used to display email content. Alternatively, the window can also be an application sub-window of the mail application, such as the window where the function control is located.
为了简化描述,后续可以将包括文本内容的窗口简称为文本窗口,将包括功能控件的窗口简称为控件窗口,将包括会话内容的窗口简称为会话窗口,将包括邮件内容的窗口简称为邮件窗口。To simplify the description, the window containing text content may be referred to as the text window, the window containing functional controls as the control window, the window containing session content as the session window, and the window containing email content as the mail window.
下面以电子设备所提供的取词应用为例,对方案进行示例性说明。其中,该取词应用用于文本取词或图片取词。下面先对该取词应用进行介绍。The following takes the word extraction application provided by the electronic device as an example to illustrate the solution. Among them, the word extraction application is used for text word extraction or picture word extraction. The word extraction application is first introduced below.
在电子设备所提供的电脑管家应用、侧边快捷栏或其他位置,均可以提供该取词应用的入口。示例性的,以电脑管家应用中的入口为例,图2为本申请实施例提供的一种电子设备的显示屏的示意图。电子设备在接收到用户对电脑管家应用的开启操作后,参见图2,作为响应,电子设备可显示电脑管家界面201。其中,该电脑管家界面201中包括各种功能控件,如包括取词控件202。应理解地,该取词控件202也即是上述取词应用的入口。The entrance to the word extraction application can be provided in the computer housekeeper application, side shortcut bar or other locations provided by the electronic device. Illustratively, taking the entrance in the computer housekeeper application as an example, FIG. 2 is a schematic diagram of a display screen of an electronic device provided by an embodiment of the present application. After the electronic device receives the user's opening operation of the computer housekeeper application, see Figure 2, in response, the electronic device can display the computer housekeeper interface 201. Among them, the computer housekeeper interface 201 includes various functional controls, such as a word retrieval control 202. It should be understood that the word extraction control 202 is also the entrance to the above word extraction application.
用户通过对该取词应用的入口实施触发操作,能够开启取词应用。示例性的,图3为本申请实施例提供的一种电子设备的显示屏的示意图。电子设备在接收到用户对该取词应用的入口的触发操作之后,参见图3,作为响应,电子设备可显示该取词应用的至少一个功能控件。例如,该至少一个功能控件可以包括复制全部控件301、翻译全部控件302、朗读全部控件303、收藏全部控件304及截屏取词控件305。其中,该复制全部控件301用于对所选取的文本内容全部进行复制。该翻译全部控件302用于对所选取的文本内容全部进行翻译。该朗读全部控件303用于对所选取的文本内容全部进行朗读。该收藏全部控件304用于对所选取的文本内容全部进行收藏。该截屏取词控件305用于触发截屏并对截屏得到的图像进行图像识别以得到文本内容。应理解地,电子设备显示上述至少一个功能控件,也即表示此时开启了取词应用。The user can start the word fetching application by performing a triggering operation on the entrance of the word fetching application. Exemplarily, FIG. 3 is a schematic diagram of a display screen of an electronic device provided by an embodiment of the present application. After the electronic device receives the user's triggering operation on the entrance of the word-taking application, see FIG. 3 , in response, the electronic device may display at least one functional control of the word-taking application. For example, the at least one functional control may include a copy all control 301, a translate all control 302, a read all control 303, a favorite all control 304, and a screenshot word capture control 305. Among them, the copy all control 301 is used to copy all the selected text content. The translate all control 302 is used to translate all the selected text content. The read all control 303 is used to read all the selected text content. The collect all control 304 is used to collect all selected text contents. The screenshot word capture control 305 is used to trigger a screenshot and perform image recognition on the image obtained by the screenshot to obtain text content. It should be understood that when the electronic device displays at least one of the above function controls, it means that the word extraction application is turned on at this time.
在一些实施例中,以文本取词场景为例,电子设备可显示一个包括文本内容的文本窗口。如文本窗口可以为wps应用的窗口、word应用的窗口、excel应用的窗口、ppt应用的窗口或txt应用的窗口等。在取词应用开启后,用户可以使用输入设备(如鼠标设备)在该文本窗口内实施滑动取词操作(即按压鼠标设备左键并移动鼠标设备,在选取到所需文本后释放鼠标左键这一操作),则电子设备响应于该滑动取词操作,显示文本取词的功能窗口。其中,该功能窗口可以包括至少一个功能控件,如复制控件、翻译控件、搜索控件、跳转控件、朗读控件、收藏控件等等。In some embodiments, taking the text word extraction scenario as an example, the electronic device may display a text window including text content. For example, the text window can be a window of a wps application, a window of a word application, a window of an excel application, a window of a ppt application, or a window of a txt application, etc. After the word-retrieval application is opened, the user can use an input device (such as a mouse device) to perform a sliding word-retrieval operation in the text window (i.e., press the left button of the mouse device and move the mouse device, and release the left mouse button after selecting the required text) This operation), the electronic device responds to the sliding word retrieval operation and displays a function window for text word retrieval. The function window may include at least one function control, such as a copy control, a translation control, a search control, a jump control, a reading control, a collection control, and so on.
示例性的,图4为本申请实施例提供的一种电子设备的显示屏的示意图。参见图4,电子设备在接收到用户在该文本窗口内的滑动取词操作之后,参见图4,作为响应,电子设备可显示文本取词的功能窗口401。其中,该文本取词的功能窗口401中包括各种功能控件,如包括复制控件402、翻译控件403、搜索控件404、跳转控件405、朗读控件406、收藏控件407。Exemplarily, FIG. 4 is a schematic diagram of a display screen of an electronic device provided by an embodiment of the present application. Referring to FIG. 4 , after the electronic device receives the user's sliding word-retrieval operation in the text window, see FIG. 4 , in response, the electronic device may display a text word-retrieval function window 401 . Among them, the text word extraction function window 401 includes various functional controls, such as a copy control 402, a translation control 403, a search control 404, a jump control 405, a reading control 406, and a collection control 407.
在另一些实施例中,以图片取词场景为例,电子设备可显示一个包括图片的窗口1(可简称为图片窗口),该图片包括文本。此时,用户可以使用输入设备(如鼠标设备)对截屏取词控件进行点击操作。这里,可将包括截屏取词控件的组件也称为窗口,那么,用户使用鼠标设备对截屏取词控件进行点击操作,也可以理解为,用户使用鼠标设备在包括截屏取词控件的窗口2内实施点击操作(即按压鼠标设备左键并释放鼠标设备左键这一操作)。电子设备响应于该点击操作,在该窗口2内将该截屏取词控件的显示状态由状态1切换为状态2。其中,状态1用于指示该截屏取词控件未被触发,状态2用于指示该截屏取词控件已被触发,如状态1为灰色,状态2为蓝色。另外,电子设备响应于该点击操作,对电子设备的显示屏中显示的内容进行截屏并对截屏得到的图像进行图像识别以得到文本。进而,电子设备在上述窗口1上显示经图像识别得到的文本。另外,文本呈可选状态(如置灰状态,即文本背景为灰色)。之后,用户可以使用鼠标设备在所显示的文本中实施滑动取词操作,则电子设备响应于该滑动取词操作,显示文本取词的功能窗口。In other embodiments, taking the word-picking scene from a picture as an example, the electronic device may display a window 1 including a picture (which may be referred to as a picture window for short), and the picture includes text. At this time, the user can use an input device (such as a mouse device) to click on the screenshot word capture control. Here, the component including the screenshot and word capture control can also be called a window. Then, the user uses the mouse device to click on the screen capture and word capture control. It can also be understood that the user uses the mouse device to click on the screen capture word capture control in the window 2 including the screen capture and word capture control. Perform a click operation (i.e., press and release the left button of the mouse device). In response to the click operation, the electronic device switches the display state of the screenshot word capture control from state 1 to state 2 in window 2 . Among them, state 1 is used to indicate that the screen capture word capture control has not been triggered, and state 2 is used to indicate that the screen capture word capture control has been triggered. For example, state 1 is gray and state 2 is blue. In addition, in response to the click operation, the electronic device takes a screenshot of the content displayed on the display screen of the electronic device and performs image recognition on the image obtained by the screenshot to obtain the text. Furthermore, the electronic device displays the text obtained through image recognition on the above-mentioned window 1 . In addition, the text is in an optional state (such as grayed out, that is, the text background is gray). Afterwards, the user can use the mouse device to perform a sliding word-retrieval operation in the displayed text, and the electronic device displays a text word-retrieval function window in response to the sliding word-retrieval operation.
示例性的,图5为本申请实施例提供的一种电子设备的显示屏的示意图。参见图5,上述包括图片的窗口1可以是图5所示的窗口501。上述包括截屏取词控件的窗口2可以是图5所示的窗口502。电子设备在接收到用户在该窗口502内的点击操作之后,作为响应,电子设备可在该窗口502内,将该截屏取词控件的显示状态由灰色状态切换为蓝色状态,且,对电子设备的显示屏中显示的内容进行截屏并对截屏得到的图像进行图像识别得到文本。进而,电子设备在窗口501中显示经图像识别得到的文本503,在接收到用户在所显示的文本503中的滑动取词操作之后,参见图5,作为响应,电子设备可显示文本取词的功能窗口504。其中,功能窗口504与上述功能窗口401相同,不再赘述。Exemplarily, FIG. 5 is a schematic diagram of a display screen of an electronic device provided by an embodiment of the present application. Referring to FIG. 5 , the above-mentioned window 1 including pictures may be the window 501 shown in FIG. 5 . The above-mentioned window 2 including the screenshot word capture control may be the window 502 shown in FIG. 5 . After the electronic device receives the user's click operation in the window 502, in response, the electronic device can switch the display state of the screenshot word capture control from a gray state to a blue state in the window 502, and, for the electronic device Take a screenshot of the content displayed on the display screen of the device and perform image recognition on the image obtained by the screenshot to obtain the text. Furthermore, the electronic device displays the text 503 obtained through image recognition in the window 501. After receiving the user's sliding word-picking operation in the displayed text 503, see FIG. 5, in response, the electronic device may display a text word-picking operation. Function window 504. Among them, the function window 504 is the same as the above-mentioned function window 401 and will not be described again.
应理解地,针对文本取词场景,由于文本窗口本身支持滑动选择文本,则无需利用该取词应用的截屏取词控件,直接进行文本取词即可。而在图片取词场景中,由于图片窗口不支持滑动选择文本,则需要利用该取词应用的截屏取词控件,先进行截屏再对截屏得到的图像进行图像识别得到文本,从而完成文本取词。当然,在一些实施例中,在文本取词场景中,通过触发该取词应用的截屏取词控件,对显示屏进行截屏并对截屏得到的图像进行图像识别得到文本,同样能够实现文本取词。It should be understood that for text word extraction scenarios, since the text window itself supports sliding text selection, there is no need to use the screenshot word extraction control of the word extraction application and the text word extraction can be performed directly. In the picture word extraction scenario, since the picture window does not support sliding text selection, you need to use the screenshot word extraction control of the word extraction application to first take a screenshot and then perform image recognition on the screenshot image to obtain the text, thereby completing the text word extraction. . Of course, in some embodiments, in a text word extraction scenario, text word extraction can also be achieved by triggering the screenshot word extraction control of the word extraction application, taking a screenshot of the display screen and performing image recognition on the image obtained by the screenshot to obtain the text. .
目前,如若在用户使用输入设备(如鼠标设备)执行相关操作时新显示窗口,会因新显示的窗口抢夺焦点而导致当前窗口不响应。Currently, if a new window is displayed when the user uses an input device (such as a mouse device) to perform related operations, the current window will become unresponsive due to the newly displayed window grabbing focus.
例如,以上述取词应用为例,在点击截屏取词控件时,若新显示窗口,焦点会变为新显示的窗口,导致点击截屏取词控件不响应。又如,以文本窗口为例,在文本窗口中滑动取词时,若新显示窗口,焦点会变为新显示的窗口,导致滑动取词不响应。For example, taking the above word extraction application as an example, when clicking the screenshot word extraction control, if a new window is displayed, the focus will change to the newly displayed window, causing the screen capture word extraction control to become unresponsive. For another example, take the text window as an example. When sliding to retrieve words in the text window, if a new window is displayed, the focus will change to the newly displayed window, causing the sliding to retrieve words to become unresponsive.
在一些实施例中,本申请实施例提供的响应处理方法,可应用于上述取词应用所涉及的窗口的响应场景中,如文本窗口、图片窗口(包含可选文本)、复制全部控件所在窗口、翻译全部控件所在窗口、朗读全部控件所在窗口、收藏全部控件所在窗口、包括截屏取词控件的窗口等。应理解地,这里,与包括截屏取词控件的窗口类似,可将包括复制全部控件的组件也称为窗口,将包括翻译全部控件的组件也称为窗口,将包括朗读全部控件的组件也称为窗口,将包括收藏全部控件的组件也称为窗口。In some embodiments, the response processing method provided by the embodiments of the present application can be applied to the response scenarios of the windows involved in the word extraction application, such as text windows, picture windows (including optional text), and windows where all controls are copied. , translate the window where all controls are located, read the window where all controls are located, collect the window where all controls are located, including the window where screenshots and word capture controls are located, etc. It should be understood that here, similar to the window including the screenshot word capture control, the component including all the controls for copying can also be called a window, the component including all the controls for translating can also be called a window, and the component including all the controls for reading aloud can also be called a window. For a window, the component that contains all the controls is also called a window.
需要说明的是,取词应用可以为文本应用附带的程序插件,随着文本应用的开启而运行。或者,取词应用也可以是独立于文本应用以外的单独运行的取词应用,如MagicText AI等。本申请实施例对取词应用不作限定。It should be noted that the word extraction application can be a program plug-in attached to the text application and runs when the text application is opened. Alternatively, the word extraction application can also be a word extraction application that runs independently from the text application, such as MagicText AI, etc. The embodiments of this application do not limit the application of word selection.
鉴于此,本申请实施例提供了一种响应处理方法,在该第一窗口的第一对象上显示光标且接收来自该电子设备的输入设备的鼠标按下事件之后,如若新显示第二窗口且焦点被该第二窗口占用,在接收来自该电子设备的输入设备的鼠标释放事件之后,可通过判断光标是否显示在该第一对象上,来确定是否在该第一窗口内对该第一对象的操作进行响应。进而,在该光标显示在该第一对象上的情况下,基于该鼠标按下事件和该鼠标释放事件,对该第一对象的操作进行响应,以便后续在该第一窗口内对本次鼠标操作事件顺利作出响应。如此,通过设置上述光标位置的判断条件,能够确定当前第一窗口是否需要处理本次鼠标操作事件。进而,在新显示第二窗口的情况下,使需要处理本次鼠标操作事件的当前第一窗口继续作出响应,能够解决因新显示的窗口抢夺焦点而导致当前窗口不响应的问题,提升了响应处理的可靠性。In view of this, embodiments of the present application provide a response processing method. After the cursor is displayed on the first object of the first window and a mouse press event from the input device of the electronic device is received, if the second window is newly displayed and The focus is occupied by the second window. After receiving a mouse release event from the input device of the electronic device, it can be determined whether the cursor is displayed on the first object in the first window. to respond to the operation. Furthermore, when the cursor is displayed on the first object, based on the mouse press event and the mouse release event, respond to the operation of the first object, so as to subsequently respond to the current mouse operation in the first window. Smooth response to operational events. In this way, by setting the judgment condition of the cursor position, it can be determined whether the current first window needs to process this mouse operation event. Furthermore, when the second window is newly displayed, the current first window that needs to process the mouse operation event continues to respond, which can solve the problem of the current window not responding due to the newly displayed window grabbing focus, and improve the response. Processing reliability.
可以理解的是,在电子设备与输入设备(如鼠标设备)连接后,可在电子设备的显示屏上显示光标(或鼠标指针),以用于向用户提示已成功接入输入设备。本申请实施例中,电子设备用于显示第一窗口,在该第一窗口的第一对象上显示光标;接收来自该电子设备的输入设备的鼠标按下事件;显示第二窗口,且焦点被该第二窗口占用,接收来自该电子设备的输入设备的鼠标释放事件;在该光标显示在该第一对象上的情况下,基于该鼠标按下事件和该鼠标释放事件,对该第一对象的操作进行响应。It can be understood that after the electronic device is connected to the input device (such as a mouse device), a cursor (or mouse pointer) can be displayed on the display screen of the electronic device to prompt the user that the input device has been successfully connected. In the embodiment of the present application, the electronic device is used to display a first window, display a cursor on a first object of the first window; receive a mouse press event from an input device of the electronic device; display a second window, and the focus is The second window is occupied and receives a mouse release event from the input device of the electronic device; when the cursor is displayed on the first object, based on the mouse press event and the mouse release event, the first object is to respond to the operation.
示例性的,图1中的电子设备100的结构示意图如图6所示。图6为本申请实施例提供的一种电子设备的硬件结构示意图。For example, a schematic structural diagram of the electronic device 100 in FIG. 1 is shown in FIG. 6 . FIG. 6 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
参见图6,电子设备100可以包括处理器610、外部存储器接口620、内部存储器621、通用串行总线(universal serial bus,USB)接口630、充电管理模块640、电源管理模块641、电池642、天线1、天线2、移动通信模块650、无线通信模块660、音频模块670、传感器模块680、按键690、显示屏691。其中传感器模块680可以包括压力传感器680A、触摸传感器680B等。Referring to Figure 6, the electronic device 100 may include a processor 610, an external memory interface 620, an internal memory 621, a universal serial bus (USB) interface 630, a charging management module 640, a power management module 641, a battery 642, and an antenna. 1. Antenna 2, mobile communication module 650, wireless communication module 660, audio module 670, sensor module 680, buttons 690, and display screen 691. The sensor module 680 may include a pressure sensor 680A, a touch sensor 680B, and the like.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figures, or some components may be combined, some components may be separated, or some components may be arranged differently. The components illustrated may be implemented in hardware, software, or a combination of software and hardware.
处理器610可以包括一个或多个处理单元,例如:处理器610可以包括应用处理器(application processor,AP)、调制解调处理器、图形处理器(graphics processingunit,GPU)、图像信号处理器(image signal processor,ISP)、控制器、存储器、视频编解码器、数字信号处理器(digital signal processor,DSP)、基带处理器、和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 610 may include one or more processing units. For example, the processor 610 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), an image signal processor ( image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and/or neural-network processing unit (NPU), etc. . Among them, different processing units can be independent devices or integrated in one or more processors.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 100 . The controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
处理器610中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器610中的存储器为高速缓冲存储器。该存储器可以保存处理器610刚用过或循环使用的指令或数据。如果处理器610需要再次使用该指令或数据,可从该存储器中直接调用。避免了重复存取,减少了处理器610的等待时间,因而提高了系统的效率。The processor 610 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in processor 610 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 610 . If the processor 610 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 610 is reduced, thus improving the efficiency of the system.
在一些实施例中,处理器610可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口、集成电路内置音频(inter-integrated circuitsound,I2S)接口、脉冲编码调制(pulse code modulation,PCM)接口、通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口、移动产业处理器接口(mobile industry processor interface,MIPI)、通用输入输出(general-purposeinput/output,GPIO)接口、用户标识模块(subscriber identity module,SIM)接口、和/或USB接口603等。In some embodiments, processor 610 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (PCM) interface, or a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/or USB interface 603, etc.
USB接口630是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口、USB Type C接口等。USB接口630可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。例如,USB接口630可以用于连接输入设备,如鼠标设备。又如,USB接口630也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 630 is an interface that complies with USB standard specifications, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 630 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. For example, USB interface 630 may be used to connect an input device, such as a mouse device. For another example, the USB interface 630 can also be used to connect headphones and play audio through the headphones. This interface can also be used to connect other electronic devices, such as AR devices, etc.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationships between the modules illustrated in the embodiment of the present invention are only schematic illustrations and do not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块640用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块640可以通过USB接口630接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块640可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块640为电池642充电的同时,还可以通过电源管理模块641为电子设备供电。The charge management module 640 is used to receive charging input from the charger. Among them, the charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 640 may receive charging input from the wired charger through the USB interface 630 . In some wireless charging embodiments, the charging management module 640 may receive wireless charging input through the wireless charging coil of the electronic device 100 . While charging the battery 642, the charging management module 640 can also provide power to the electronic device through the power management module 641.
电源管理模块641用于连接电池642、充电管理模块640与处理器610。电源管理模块641接收电池642和/或充电管理模块640的输入,为处理器610、内部存储器621、外部存储器、显示屏691和无线通信模块660等供电。电源管理模块641还可以用于监测电池容量、电池循环次数、电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块641也可以设置于处理器610中。在另一些实施例中,电源管理模块641和充电管理模块640也可以设置于同一个器件中。The power management module 641 is used to connect the battery 642, the charging management module 640 and the processor 610. The power management module 641 receives input from the battery 642 and/or the charging management module 640, and supplies power to the processor 610, internal memory 621, external memory, display screen 691, wireless communication module 660, etc. The power management module 641 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters. In some other embodiments, the power management module 641 may also be provided in the processor 610. In other embodiments, the power management module 641 and the charging management module 640 can also be provided in the same device.
电子设备100的无线通信功能可以通过天线1、天线2、移动通信模块650、无线通信模块660、调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 650, the wireless communication module 660, the modem processor and the baseband processor, etc.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be reused as a diversity antenna for a wireless LAN. In other embodiments, antennas may be used in conjunction with tuning switches.
移动通信模块650可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块650可以包括至少一个滤波器、开关、功率放大器、低噪声放大器(low noise amplifier,LNA)等。移动通信模块650可以由天线1接收电磁波,并对接收的电磁波进行滤波、放大等处理,传送至调制解调处理器进行解调。移动通信模块650还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块650的至少部分功能模块可以被设置于处理器610中。在一些实施例中,移动通信模块650的至少部分功能模块可以与处理器610的至少部分模块被设置在同一个器件中。The mobile communication module 650 can provide solutions for wireless communication including 2G/3G/4G/5G applied on the electronic device 100 . The mobile communication module 650 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 650 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 650 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of the mobile communication module 650 may be disposed in the processor 610 . In some embodiments, at least part of the functional modules of the mobile communication module 650 and at least part of the modules of the processor 610 may be provided in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器,受话器等)输出声音信号,或通过显示屏691显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器610,与移动通信模块650或其他功能模块设置在同一个器件中。A modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs sound signals through audio devices (not limited to speakers, receivers, etc.), or displays images or videos through the display screen 691. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 610 and may be provided in the same device as the mobile communication module 650 or other functional modules.
无线通信模块660可以提供应用在电子设备100上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络)、蓝牙(bluetoo2,BT)、全球导航卫星系统(global navigation satellite system,GNSS)、调频(frequency modulation,FM)、近距离无线通信技术(near field communication,NFC)、红外技术(infrared,IR)等无线通信的解决方案。无线通信模块660可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块660经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器610。无线通信模块660还可以从处理器610接收待发送的信号,对其进行调频、放大,经天线2转为电磁波辐射出去。在一些实施例中,电子设备100通过无线通信模块660中的蓝牙,能够连接输入设备,如鼠标设备。The wireless communication module 660 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), Bluetooth (bluetoo2, BT), and global navigation satellite system. Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR). The wireless communication module 660 may be one or more devices integrating at least one communication processing module. The wireless communication module 660 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 610. The wireless communication module 660 can also receive the signal to be sent from the processor 610, perform frequency modulation and amplification on it, and convert it into electromagnetic waves through the antenna 2 for radiation. In some embodiments, the electronic device 100 can connect to an input device, such as a mouse device, through Bluetooth in the wireless communication module 660 .
在一些实施例中,电子设备100的天线1和移动通信模块650耦合,天线2和无线通信模块660耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 650, and the antenna 2 is coupled to the wireless communication module 660, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
电子设备100通过GPU、显示屏691以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏691和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器610可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements display functions through a GPU, a display screen 691, an application processor, and the like. The GPU is an image processing microprocessor and is connected to the display screen 691 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 610 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏691用于显示图像,视频等。显示屏691包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD)、有机发光二极管(organic light-emittingdiode,OLED)、有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED)、柔性发光二极管(flex light-emittingdiode,FLED)、Miniled、MicroLed、Micro-oLed、量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏691,N为大于1的正整数。The display screen 691 is used to display images, videos, etc. Display screen 691 includes a display panel. The display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode). (AMOLED), flexible light-emitting diodes (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 691, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别、人脸识别、语音识别、文本理解等。NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can continuously learn by itself. The NPU can realize intelligent cognitive applications of the electronic device 100, such as image recognition, face recognition, speech recognition, text understanding, etc.
外部存储器接口620可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口620与处理器610通信,实现数据存储功能。例如将音乐、视频等文件保存在外部存储卡中。The external memory interface 620 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 . The external memory card communicates with the processor 610 through the external memory interface 620 to implement the data storage function. For example, save music, video and other files on an external memory card.
内部存储器621可以用于存储计算机可执行程序代码,该可执行程序代码包括指令。处理器610通过运行存储在内部存储器621的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器621可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器621可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。Internal memory 621 may be used to store computer executable program code, which includes instructions. The processor 610 executes instructions stored in the internal memory 621 to execute various functional applications and data processing of the electronic device 100 . The internal memory 621 may include a program storage area and a data storage area. Among them, the stored program area can store an operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.). The storage data area may store data created during use of the electronic device 100 (such as audio data, phone book, etc.). In addition, the internal memory 621 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
电子设备100可以通过音频模块670以及应用处理器等实现音频功能。例如音乐播放、录音等。The electronic device 100 can implement audio functions through the audio module 670 and an application processor. For example, music playback, recording, etc.
音频模块670用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块670还可以用于对音频信号编码和解码。在一些实施例中,音频模块670可以设置于处理器610中,或将音频模块670的部分功能模块设置于处理器610中。The audio module 670 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Audio module 670 may also be used to encode and decode audio signals. In some embodiments, the audio module 670 may be disposed in the processor 610, or some functional modules of the audio module 670 may be disposed in the processor 610.
压力传感器680A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器680A可以设置于显示屏691。压力传感器680A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器680A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏691,电子设备100根据压力传感器680A检测该触摸操作强度。电子设备100也可以根据压力传感器680A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 680A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 680A may be disposed on the display screen 691. There are many types of pressure sensors 680A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor may include at least two parallel plates of conductive material. When a force is applied to pressure sensor 680A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation is performed on the display screen 691, the electronic device 100 detects the strength of the touch operation according to the pressure sensor 680A. The electronic device 100 may also calculate the touched position based on the detection signal of the pressure sensor 680A. In some embodiments, touch operations acting on the same touch location but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.
触摸传感器680B,也称“触控面板”。触摸传感器680B可以设置于显示屏691,由触摸传感器680B与显示屏691组成触摸屏,也称“触控屏”。触摸传感器680B用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏691提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器680B也可以设置于电子设备100的表面,与显示屏691所处的位置不同。Touch sensor 680B, also known as "touch panel". The touch sensor 680B can be disposed on the display screen 691. The touch sensor 680B and the display screen 691 form a touch screen, which is also called a "touch screen". Touch sensor 680B is used to detect touch operations on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation may be provided through the display screen 691. In other embodiments, the touch sensor 680B may also be disposed on the surface of the electronic device 100 in a position different from that of the display screen 691 .
需要指出的是,图6中示出的结构并不构成对该电子设备的限定,除图6所示部件之外,该电子设备还可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。It should be pointed out that the structure shown in Figure 6 does not constitute a limitation of the electronic device. In addition to the components shown in Figure 6, the electronic device may also include more or less components than those shown in the figure, or a combination of them. Certain parts, or different arrangements of parts.
电子设备的软件系统可以采用分层架构、事件驱动架构、微核架构、微服务架构或云架构。在一些实施例中,本申请实施例的软件结构可以是基于Android系统的结构或基于Window系统的结构。本申请实施例以分层架构的Window系统为例,示例性说明电子设备的软件结构。示例性的,图7为本申请实施例提供的一种电子设备的软件结构示意图。Software systems of electronic devices can adopt layered architecture, event-driven architecture, microkernel architecture, microservice architecture or cloud architecture. In some embodiments, the software structure of the embodiment of the present application may be a structure based on the Android system or a structure based on the Window system. The embodiment of this application takes the Window system with a layered architecture as an example to illustrate the software structure of the electronic device. Exemplarily, FIG. 7 is a schematic diagram of the software structure of an electronic device provided by an embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,Window系统可以划分为应用层、中间层、系统层及硬件驱动层。The layered architecture divides the software into several layers, and each layer has clear roles and division of labor. The layers communicate through software interfaces. In some embodiments, the Window system can be divided into an application layer, an intermediate layer, a system layer and a hardware driver layer.
其中,应用层也即是应用程序层。本申请实施例中,应用层用于接收并记录鼠标操作事件,进而,基于鼠标操作事件对本次鼠标操作事件作出响应。Among them, the application layer is also the application layer. In the embodiment of the present application, the application layer is used to receive and record mouse operation events, and then respond to this mouse operation event based on the mouse operation events.
如图7所示,应用程序层可以包括一系列应用程序包。例如,应用程序包可以包括电脑管家应用、wps应用、word应用、txt应用、excel应用、ppt应用、取词应用、音乐应用、视频应用、社交应用等应用程序。As shown in Figure 7, the application layer can include a series of application packages. For example, the application package may include computer housekeeping applications, wps applications, word applications, txt applications, excel applications, ppt applications, word picking applications, music applications, video applications, social networking applications and other applications.
在一些实施例中,电子设备以窗口的形式来显示上述应用程序的相关内容,以便用户在窗口内执行相关操作或查看相关内容等。In some embodiments, the electronic device displays relevant content of the above application program in the form of a window, so that the user can perform relevant operations or view relevant content in the window.
如图7所示,中间层可以包括事件监控器,该事件监控器用于监控电子设备的系统中所有类型的鼠标操作事件。在一些实施例中,该事件监控器可以为全局hook函数。As shown in FIG. 7 , the middle layer may include an event monitor, which is used to monitor all types of mouse operation events in the system of the electronic device. In some embodiments, the event monitor may be a global hook function.
示例性的,该鼠标操作事件可以包括鼠标按下事件和鼠标释放事件,如鼠标按下事件可以是鼠标左键按下事件、鼠标右键按下事件、鼠标滚轮按下事件等。进一步地,鼠标按下事件还可以包括鼠标按下移动事件,如鼠标左键按下移动事件、鼠标右键按下移动事件、鼠标滚轮按下移动事件等。鼠标释放事件可以是鼠标左键释放事件、鼠标右键释放事件、鼠标滚轮释放事件等。For example, the mouse operation event may include a mouse press event and a mouse release event. For example, the mouse press event may be a left mouse button press event, a right mouse button press event, a mouse wheel press event, etc. Further, the mouse press event may also include a mouse press move event, such as a left mouse button press move event, a right mouse button press move event, a mouse wheel press move event, etc. The mouse release event can be a left mouse button release event, a right mouse button release event, a mouse wheel release event, etc.
本申请实施例中,中间层用于判断鼠标操作事件是否属于预设鼠标事件,进而,在鼠标操作事件属于预设鼠标事件的情况下,向应用层的第一窗口对应的进程发送鼠标操作事件。例如,判断鼠标按下事件是否属于预设鼠标事件,进而,在鼠标按下事件属于预设鼠标事件的情况下,向应用层的第一窗口对应的进程发送鼠标按下事件,以及,判断鼠标释放事件是否属于预设鼠标事件,进而,在鼠标释放事件属于预设鼠标事件的情况下,获取光标的位置检测结果,若光标的位置检测结果指示该光标显示在该第一窗口的第一对象上,向应用层的第一窗口对应的进程发送鼠标释放事件。In the embodiment of the present application, the middle layer is used to determine whether the mouse operation event belongs to the preset mouse event. Furthermore, if the mouse operation event belongs to the preset mouse event, the mouse operation event is sent to the process corresponding to the first window of the application layer. . For example, determine whether the mouse press event is a preset mouse event, and then, if the mouse press event is a preset mouse event, send the mouse press event to the process corresponding to the first window of the application layer, and determine whether the mouse press event is a preset mouse event. Whether the release event belongs to the preset mouse event, and further, if the mouse release event belongs to the preset mouse event, obtain the cursor position detection result, if the cursor position detection result indicates that the cursor is displayed on the first object of the first window on the application layer, sending a mouse release event to the process corresponding to the first window of the application layer.
系统层负责基层数据采集、日常业务处理以及管理监测等。如图7所示,系统层可以包括Window系统。本申请实施例中,系统层用于检测鼠标操作事件,并向中间层的事件监控器发送鼠标操作事件。The system layer is responsible for grassroots data collection, daily business processing, management monitoring, etc. As shown in Figure 7, the system layer may include the Window system. In the embodiment of the present application, the system layer is used to detect mouse operation events and send mouse operation events to the event monitor of the middle layer.
在一些实施例中,鼠标操作事件可以包括鼠标按键标志位(用于指示用户对鼠标设备进行了按下、抬起、移动或滚轮滚动中的何种操作)、坐标信息(在用户移动了鼠标设备时,用于指示鼠标设备移动的X坐标和Y坐标)、滚轮信息(在用户操作了鼠标设备的滚轮时,用于指示滚轮滚动的X轴距离和Y轴距离)、键位信息(用于指示用户对鼠标设备的左键、中键或右键中的哪个键进行了操作)。In some embodiments, the mouse operation event may include a mouse button flag (used to indicate what kind of operation the user has performed on the mouse device, such as pressing, lifting, moving, or scrolling), coordinate information (when the user moves the mouse When the user operates the mouse device, it is used to indicate the to indicate which of the left, middle, or right buttons of the mouse device the user operated on).
如图7所示,硬件驱动层是硬件和软件之间的层。在一些实施例中,硬件驱动层至少包含鼠标驱动、键盘驱动、显示驱动、摄像头驱动、音频驱动、传感器驱动等。本申请实施例中,硬件驱动层用于连接输入设备与电子设备。As shown in Figure 7, the hardware driver layer is the layer between hardware and software. In some embodiments, the hardware driver layer includes at least a mouse driver, a keyboard driver, a display driver, a camera driver, an audio driver, a sensor driver, etc. In the embodiment of this application, the hardware driver layer is used to connect the input device and the electronic device.
本申请实施例中,电子设备通过上述应用层、中间层、系统层及硬件驱动层之间的相互配合,能够完成基于输入设备来触发窗口响应的功能。In the embodiment of the present application, the electronic device can complete the function of triggering a window response based on the input device through the cooperation among the above-mentioned application layer, middle layer, system layer and hardware driver layer.
图8为本申请实施例提供的一种响应处理方法的流程示意图。参见图8,以电子设备作为执行主体,该方法包括以下S801-S807:Figure 8 is a schematic flowchart of a response processing method provided by an embodiment of the present application. Referring to Figure 8, with the electronic device as the execution subject, the method includes the following S801-S807:
S801、电子设备显示第一窗口,在该第一窗口的第一对象上显示光标。S801. The electronic device displays a first window, and displays a cursor on the first object of the first window.
本申请实施例中,第一窗口用于指代电子设备当前所显示的窗口中用户待触发的窗口。In the embodiment of the present application, the first window is used to refer to the window to be triggered by the user among the windows currently displayed by the electronic device.
在一些实施例中,第一窗口可以是控件窗口、文本窗口、图片窗口、会话窗口、邮件窗口等。例如,控件窗口可以是开启控件、查看控件、全屏控件等功能控件所在窗口。文本窗口可以是word应用的窗口、wps应用的窗口、excel应用的窗口、ppt应用的窗口或txt应用的窗口等。本申请实施例后续以控件窗口和文本窗口为例,对方案进行说明。In some embodiments, the first window may be a control window, a text window, a picture window, a conversation window, a mail window, etc. For example, the control window can be the window where functional controls such as opening controls, viewing controls, and full-screen controls are located. The text window can be a word application window, a wps application window, an excel application window, a ppt application window or a txt application window, etc. The following embodiments of this application will take the control window and the text window as examples to explain the solution.
第一对象是指第一窗口所包括的待操作对象。以第一窗口为控件窗口为例,该第一对象也即是控件窗口所包括的功能控件。以第一窗口为文本窗口为例,该第一对象也即是文本窗口所包括的文本内容。The first object refers to the object to be operated included in the first window. Taking the first window as a control window as an example, the first object is also a function control included in the control window. Taking the first window as a text window as an example, the first object is the text content included in the text window.
示例性的,如图8中S801所示,以第一窗口为取词应用中包括截屏取词控件的窗口为例,该第一对象也即是截屏取词控件,此时,光标显示在截屏取词控件上。Exemplarily, as shown in S801 in Figure 8 , taking the first window as a window that includes a screenshot word capture control in a word capture application, the first object is also a screen capture word capture control. At this time, the cursor is displayed on the screenshot On the word fetch control.
S802、电子设备接收来自该电子设备的输入设备的鼠标按下事件。S802. The electronic device receives a mouse press event from the input device of the electronic device.
其中,鼠标按下事件也即是输入设备的down事件。应理解地,鼠标按下事件也即是基于鼠标按下操作的事件。Among them, the mouse press event is also the down event of the input device. It should be understood that the mouse press event is also an event based on the mouse press operation.
在一些实施例中,鼠标按下事件可以是鼠标左键按下事件、鼠标右键按下事件或鼠标滚轮按下事件等等。进一步地,鼠标按下事件还可以是鼠标按下移动事件,也即是按下鼠标键(如左键、右键或滚轮)之后进行移动的事件。例如,按下鼠标键之后左移或右移的操作,或按下鼠标键之后上移或下移的操作等。In some embodiments, the mouse press event may be a left mouse button press event, a right mouse button press event, a mouse wheel press event, or the like. Further, the mouse press event may also be a mouse press move event, that is, an event in which the mouse moves after pressing a mouse button (such as the left button, right button, or scroll wheel). For example, the operation of moving left or right after pressing the mouse button, or the operation of moving up or down after pressing the mouse button, etc.
鼠标按下事件可以包括鼠标按键标志位(按下)、键位信息(如左键)以及鼠标按下时对应显示屏中的第一位置。第一位置也即是鼠标按下时对应显示屏中的位置坐标。The mouse press event may include a mouse button flag (pressed), key position information (such as the left button), and the corresponding first position in the display screen when the mouse is pressed. The first position is the corresponding position coordinate in the display screen when the mouse is pressed.
其中,鼠标按键标志位可采用名称、编号、身份标识号码(identity document,ID)来表示。键位信息也可采用名称、编号、身份标识号码来表示。第一位置可采用二维坐标(如X坐标、Y坐标)来表示。Among them, the mouse button flag can be represented by a name, a number, and an identity document (ID). Key information can also be represented by name, number, and identification number. The first position can be represented by two-dimensional coordinates (such as X coordinate, Y coordinate).
在一些实施例中,电子设备包括系统层。若用户对输入设备实施了鼠标按下操作,电子设备通过系统层,能够检测到该输入设备的鼠标按下操作,并接收来自该输入设备的鼠标按下事件。In some embodiments, the electronic device includes a system layer. If the user performs a mouse press operation on the input device, the electronic device can detect the mouse press operation of the input device through the system layer and receive a mouse press event from the input device.
在一些实施例中,电子设备还包括中间层,该中间层包括事件监控器,该事件监控器用于监控电子设备的输入设备的鼠标按下事件和鼠标释放事件。进一步地,在一些实施例中,系统层接收来自该输入设备的鼠标按下事件之后,还将该鼠标按下事件发送至事件监控器,以供事件监控器执行后续的响应处理过程。In some embodiments, the electronic device further includes an intermediate layer that includes an event monitor for monitoring mouse down events and mouse release events of an input device of the electronic device. Further, in some embodiments, after receiving a mouse press event from the input device, the system layer also sends the mouse press event to the event monitor for the event monitor to perform subsequent response processing.
S803、电子设备中的事件监控器将该鼠标按下事件发送至该第一窗口对应的进程。S803. The event monitor in the electronic device sends the mouse press event to the process corresponding to the first window.
在事件监控器将该鼠标按下事件发送至该第一窗口对应的进程之后,该第一窗口对应的进程接收并记录该鼠标按下事件。After the event monitor sends the mouse press event to the process corresponding to the first window, the process corresponding to the first window receives and records the mouse press event.
如此,提供了一种为第一窗口获取本次鼠标操作事件的方式。其中,在接收到来自该电子设备的输入设备的鼠标按下事件时,需向该第一窗口对应的进程发送该鼠标按下事件,以便后续该第一窗口对应的进程基于所接收的该鼠标按下事件进行处理,以便后续在第一窗口内对本次鼠标操作事件顺利作出响应,提升了响应处理的可靠性。In this way, a way to obtain this mouse operation event for the first window is provided. Wherein, when receiving a mouse press event from the input device of the electronic device, the mouse press event needs to be sent to the process corresponding to the first window, so that the subsequent process corresponding to the first window can based on the received mouse press event. The press event is processed so that subsequent mouse operation events can be smoothly responded to in the first window, which improves the reliability of response processing.
在一些实施例中,在向该第一窗口发送该鼠标按下事件之前,事件监控器还基于预设鼠标事件,判断该鼠标按下事件是否属于预设鼠标事件。进而,在该鼠标按下事件属于预设鼠标事件的情况下,事件监控器将该鼠标按下事件发送至该第一窗口对应的进程。In some embodiments, before sending the mouse press event to the first window, the event monitor further determines whether the mouse press event belongs to the preset mouse event based on the preset mouse event. Furthermore, when the mouse down event belongs to a preset mouse event, the event monitor sends the mouse down event to the process corresponding to the first window.
其中,预设鼠标事件可以是预先设定的第一窗口支持的鼠标操作事件。例如,鼠标左键按下事件、鼠标左键释放事件、鼠标滚轮按下事件、鼠标滚轮释放事件、鼠标左键按下移动事件及鼠标滚轮按下移动事件等。或者,在该鼠标按下事件的实施例中,预设鼠标事件也可以是预先设定的第一窗口支持的鼠标按下事件。例如,鼠标左键按下事件、鼠标滚轮按下事件、鼠标左键按下移动事件及鼠标滚轮按下移动事件等。The preset mouse event may be a preset mouse operation event supported by the first window. For example, left mouse button press event, left mouse button release event, mouse wheel press event, mouse wheel release event, left mouse button press move event, mouse wheel press move event, etc. Alternatively, in the embodiment of the mouse press event, the preset mouse event may also be a preset mouse press event supported by the first window. For example, left mouse button press event, mouse wheel press event, left mouse button press move event, mouse wheel press move event, etc.
如此,提供了一种基于预设鼠标事件来触发发送本次鼠标操作事件的方式。在接收到来自该电子设备的输入设备的鼠标按下事件时,通过判断该鼠标按下事件是否属于预设鼠标事件,确保在该鼠标按下事件属于预设鼠标事件的情况下向该第一窗口对应的进程发送该鼠标按下事件,以便后续在第一窗口内对本次鼠标操作事件顺利作出响应,提升了响应处理的可靠性。In this way, a way to trigger the sending of this mouse operation event based on a preset mouse event is provided. When receiving a mouse press event from the input device of the electronic device, by determining whether the mouse press event belongs to a preset mouse event, it is ensured that if the mouse press event belongs to a preset mouse event, the first mouse press event is received. The process corresponding to the window sends the mouse press event so that the mouse operation event can be successfully responded to in the first window, thereby improving the reliability of response processing.
本申请实施例中,通过设置事件监控器,能够监控系统中所有类型的鼠标操作事件,进而,针对属于预设鼠标事件的鼠标操作事件,执行后续发送该鼠标操作事件的过程,确保本次鼠标操作事件顺利进行。In the embodiment of the present application, by setting up an event monitor, all types of mouse operation events in the system can be monitored, and then, for mouse operation events belonging to preset mouse events, the subsequent process of sending the mouse operation events is performed to ensure that this mouse operation event The operational event went smoothly.
S804、电子设备显示第二窗口,且焦点被该第二窗口占用,电子设备接收来自该电子设备的输入设备的鼠标释放事件。S804. The electronic device displays the second window, and the focus is occupied by the second window. The electronic device receives a mouse release event from the input device of the electronic device.
本申请实施例中,第二窗口用于指代新显示的任一窗口。在一些实施例中,第二窗口可以是告警窗口(即包括告警信息的窗口)、提示窗口(即包括提示信息的窗口)、会话窗口(即包括会话信息的窗口)等。需要说明的是,第一窗口和第二窗口可以是属于同一窗口应用,也可以是属于不同窗口应用。In the embodiment of this application, the second window is used to refer to any newly displayed window. In some embodiments, the second window may be an alarm window (that is, a window that includes alarm information), a prompt window (that is, a window that includes prompt information), a session window (that is, a window that includes session information), etc. It should be noted that the first window and the second window may belong to the same window application or may belong to different window applications.
在一些实施例中,电子设备显示第二窗口之后,第二窗口对应的进程自动占用该焦点。In some embodiments, after the electronic device displays the second window, the process corresponding to the second window automatically occupies the focus.
鼠标释放事件也即是输入设备的up事件。应理解地,鼠标释放事件也即是基于鼠标释放操作的事件。在一些实施例中,鼠标释放事件可以是鼠标左键释放事件、鼠标右键释放事件或鼠标滚轮释放事件等等。The mouse release event is also the up event of the input device. It should be understood that the mouse release event is also an event based on the mouse release operation. In some embodiments, the mouse release event may be a left mouse button release event, a right mouse button release event, a mouse wheel release event, or the like.
鼠标释放事件可以包括鼠标按键标志位(抬起)、键位信息(如左键)以及鼠标释放时对应显示屏的第二位置。第二位置也即是鼠标释放时对应显示屏中的位置坐标。其中,第二位置可采用二维坐标来表示。The mouse release event may include a mouse button flag (lift), key position information (such as left button), and a second position corresponding to the display screen when the mouse is released. The second position is the corresponding position coordinate in the display screen when the mouse is released. The second position can be represented by two-dimensional coordinates.
在一些实施例中,电子设备包括系统层。若用户对输入设备实施了鼠标释放操作,电子设备通过系统层,能够检测到该输入设备的鼠标释放操作,并接收来自该输入设备的鼠标释放事件。In some embodiments, the electronic device includes a system layer. If the user performs a mouse release operation on the input device, the electronic device can detect the mouse release operation of the input device through the system layer and receive a mouse release event from the input device.
进一步地,在一些实施例中,系统层接收来自该输入设备的鼠标释放事件之后,还将该鼠标释放事件发送至事件监控器,以供事件监控器执行后续的响应处理过程。Further, in some embodiments, after receiving the mouse release event from the input device, the system layer also sends the mouse release event to the event monitor for the event monitor to perform subsequent response processing.
S805、电子设备中的事件监控器获取该光标的位置检测结果,该位置检测结果用于指示该光标是否显示在该第一对象上。S805. The event monitor in the electronic device obtains the position detection result of the cursor, and the position detection result is used to indicate whether the cursor is displayed on the first object.
其中,该光标是否显示在该第一对象上是指该光标是否显示在该第一对象的预设区域内。例如,预设区域可以是以第一对象的中心点预设距离内的区域,或者,预设区域可以是第一对象所在的矩形框区域。应理解地,该光标显示在该第一对象的附近区域,则表示该光标显示在该第一对象上。Wherein, whether the cursor is displayed on the first object refers to whether the cursor is displayed in a preset area of the first object. For example, the preset area may be an area within a preset distance from the center point of the first object, or the preset area may be a rectangular frame area where the first object is located. It should be understood that if the cursor is displayed in the vicinity of the first object, it means that the cursor is displayed on the first object.
在一些实施例中,事件监控器从预设函数处获取该光标的位置检测结果。其中,预设函数用于对光标的位置进行检测,以判断该光标是否显示在该第一对象上。In some embodiments, the event monitor obtains the position detection result of the cursor from a preset function. The preset function is used to detect the position of the cursor to determine whether the cursor is displayed on the first object.
在一些实施例中,通过预设函数获取该光标的位置检测结果的过程可以是:获取光标位置与该第一对象的矩形框位置。进而,基于该光标位置与该矩形框位置,确定该光标的位置检测结果。In some embodiments, the process of obtaining the cursor position detection result through a preset function may be: obtaining the cursor position and the rectangular frame position of the first object. Furthermore, based on the cursor position and the rectangular frame position, the position detection result of the cursor is determined.
示例性的,预设函数可以包括Get Cursor Pos()函数,该Get Cursor Pos()函数用于获取该光标位置。预设函数还可以包括Get Window Rect()函数,该Get Window Rect()函数用于获取该第一对象的矩形框位置。预设函数还可以包括Pt In Rect(pt,rect)函数,该Pt In Rect(pt,rect)函数用于比较该光标位置与该矩形框位置,以判断该光标是否显示在该第一对象上。进而,可通过Pt In Rect(pt,rect)函数,判断该光标是否位于该矩形框位置内,从而得到该光标的位置检测结果。For example, the preset function may include the Get Cursor Pos() function, which is used to obtain the cursor position. The preset function may also include a Get Window Rect() function, which is used to obtain the rectangular frame position of the first object. The preset function may also include a Pt In Rect (pt, rect) function. The Pt In Rect (pt, rect) function is used to compare the cursor position with the rectangular frame position to determine whether the cursor is displayed on the first object. . Furthermore, the Pt In Rect (pt, rect) function can be used to determine whether the cursor is located within the rectangular frame position, thereby obtaining the position detection result of the cursor.
需要说明的是,在一些实施例中,通过Pt In Rect(pt,rect)函数,还能够主动向事件监控器返回该光标的位置检测结果,以便事件监控器执行后续向该第一窗口对应的进程发送该鼠标释放事件的过程。It should be noted that in some embodiments, through the Pt In Rect (pt, rect) function, the cursor position detection result can also be actively returned to the event monitor, so that the event monitor can perform subsequent processing corresponding to the first window. The process that sends this mouse release event.
在上述实施例中,提供了一种获取光标的位置检测结果的方式。其中,通过比较该光标位置与该第一对象的矩形框位置之间的关系,能够快速且准确的确定出该光标是否显示在第一对象上,从而得到该光标的位置检测结果。In the above embodiment, a method of obtaining the position detection result of the cursor is provided. By comparing the relationship between the cursor position and the rectangular frame position of the first object, it can be quickly and accurately determined whether the cursor is displayed on the first object, thereby obtaining the position detection result of the cursor.
S806、在该光标显示在该第一对象上的情况下,该事件监控器将该鼠标释放事件发送至该第一窗口对应的进程。S806. When the cursor is displayed on the first object, the event monitor sends the mouse release event to the process corresponding to the first window.
在事件监控器将该鼠标释放事件发送至该第一窗口对应的进程之后,该第一窗口对应的进程接收并记录该鼠标释放事件。After the event monitor sends the mouse release event to the process corresponding to the first window, the process corresponding to the first window receives and records the mouse release event.
如此,提供了一种为第一窗口获取本次鼠标操作事件的事件信息的方式。在新显示第二窗口的情况下,在接收到来自该电子设备的输入设备的鼠标释放事件时,需向该第一窗口对应的进程发送该鼠标释放事件,以便后续该第一窗口对应的进程基于所接收的该鼠标释放事件进行处理,以便后续在第一窗口内对本次鼠标操作事件顺利作出响应,提升了响应处理的可靠性。In this way, a method for obtaining event information of this mouse operation event for the first window is provided. When the second window is newly displayed, when receiving a mouse release event from the input device of the electronic device, the mouse release event needs to be sent to the process corresponding to the first window so that the process corresponding to the first window can be followed. Processing is performed based on the received mouse release event, so that subsequent mouse operation events can be successfully responded to in the first window, thereby improving the reliability of response processing.
在一些实施例中,在向该第一窗口发送该鼠标释放事件之前,事件监控器还基于预设鼠标事件,判断该鼠标释放事件是否属于预设鼠标事件。进而,在该鼠标释放事件属于预设鼠标事件的情况下,事件监控器将该鼠标释放事件发送至该第一窗口对应的进程。In some embodiments, before sending the mouse release event to the first window, the event monitor further determines whether the mouse release event belongs to the preset mouse event based on the preset mouse event. Furthermore, if the mouse release event belongs to a preset mouse event, the event monitor sends the mouse release event to the process corresponding to the first window.
其中,在该鼠标释放事件的实施例中,预设鼠标事件也可以是预先设定的第一窗口支持的鼠标释放事件。例如,鼠标左键释放操作、鼠标滚轮释放操作等。In the embodiment of the mouse release event, the preset mouse event may also be a preset mouse release event supported by the first window. For example, the left mouse button release operation, the mouse wheel release operation, etc.
如此,提供了一种基于预设鼠标事件来触发发送本次鼠标操作事件的方式。在新显示第二窗口的情况下,在接收到来自该电子设备的输入设备的鼠标释放事件时,通过判断该鼠标释放事件是否属于预设鼠标事件,确保在该鼠标释放事件属于预设鼠标事件的情况下向该第一窗口对应的进程发送该鼠标释放事件,以便后续在第一窗口内对本次鼠标操作事件顺利作出响应,提升了响应处理的可靠性。In this way, a way to trigger the sending of this mouse operation event based on a preset mouse event is provided. When the second window is newly displayed, when a mouse release event from the input device of the electronic device is received, it is determined whether the mouse release event belongs to the preset mouse event to ensure that the mouse release event belongs to the preset mouse event. In this case, the mouse release event is sent to the process corresponding to the first window, so that the subsequent mouse operation event in the first window can be successfully responded to, thereby improving the reliability of response processing.
在上述S804至S806所示实施例中,在S804中电子设备显示第二窗口时,第二窗口对应的进程自动占用该焦点,也即是焦点从该第一窗口切换至该第二窗口。进而,在S806中将该鼠标释放事件发送至该第一窗口对应的进程之后,该第一窗口对应的进程将该焦点从该第二窗口切换至该第一窗口。如此,在新显示第二窗口的情况下,通过继续向该第一窗口对应的进程发送该鼠标释放事件,能够将焦点重新切换回第一窗口,从而能够解决因新显示的窗口抢夺焦点而导致当前窗口不响应的问题,提升了响应处理的可靠性。In the above embodiment shown in S804 to S806, when the electronic device displays the second window in S804, the process corresponding to the second window automatically occupies the focus, that is, the focus switches from the first window to the second window. Furthermore, after sending the mouse release event to the process corresponding to the first window in S806, the process corresponding to the first window switches the focus from the second window to the first window. In this way, when the second window is newly displayed, by continuing to send the mouse release event to the process corresponding to the first window, the focus can be switched back to the first window, thereby solving the problem caused by the newly displayed window grabbing focus. The problem of the current window not responding has improved the reliability of response processing.
此外,在一些实施例中,电子设备在向该第一窗口对应的进程发送该鼠标释放事件时,也可向新显示的第二窗口对应的进程发送该鼠标释放事件。需要说明的是,第一窗口的响应优先级高于新显示的第二窗口的响应优先级。例如,可先向该第一窗口对应的进程发送该鼠标释放事件,再向新显示的第二窗口对应的进程发送该鼠标释放事件。又如,可控制该第一窗口先响应本次鼠标操作事件,新显示的第二窗口后响应本次鼠标操作事件。又如,可控制该第一窗口响应本次鼠标操作事件,新显示的第二窗口不响应本次鼠标操作事件。应理解地,一般情况下新显示的第二窗口不响应。In addition, in some embodiments, when the electronic device sends the mouse release event to the process corresponding to the first window, it can also send the mouse release event to the process corresponding to the newly displayed second window. It should be noted that the response priority of the first window is higher than the response priority of the newly displayed second window. For example, the mouse release event may be sent to the process corresponding to the first window first, and then the mouse release event may be sent to the process corresponding to the newly displayed second window. For another example, the first window can be controlled to respond to this mouse operation event first, and the newly displayed second window can be controlled to respond to this mouse operation event later. For another example, the first window can be controlled to respond to this mouse operation event, and the newly displayed second window cannot respond to this mouse operation event. It should be understood that the newly displayed second window will generally not respond.
S807、电子设备基于该鼠标按下事件和该鼠标释放事件,对该第一对象的操作进行响应。S807. The electronic device responds to the operation of the first object based on the mouse press event and the mouse release event.
在一些实施例中,第一窗口对应的进程接收该鼠标按下事件和该鼠标释放事件之后,基于该鼠标按下事件与该鼠标释放事件,在该第一窗口内,对该第一对象的操作进行响应。In some embodiments, after the process corresponding to the first window receives the mouse press event and the mouse release event, based on the mouse press event and the mouse release event, in the first window, the first object is operation in response.
在一些实施例中,以该鼠标按下事件对应的第一位置与该鼠标释放事件对应的第二位置为例,电子设备判断该第一位置与该第二位置是否均位于该第一窗口内。进而,在该第一位置与该第二位置均位于该第一窗口内的情况下,电子设备在该第一窗口内,对该第一对象的操作进行响应。In some embodiments, taking the first position corresponding to the mouse press event and the second position corresponding to the mouse release event as an example, the electronic device determines whether the first position and the second position are both located within the first window. . Furthermore, when the first position and the second position are both located within the first window, the electronic device responds to the operation of the first object within the first window.
在该实施例中,通过判断本次鼠标操作事件中该鼠标按下事件对应的第一位置与鼠标释放事件对应的第二位置是否均位于该第一窗口内,来判断该鼠标按下事件与该鼠标释放事件是否属于同一次鼠标操作事件,以确保针对同一次鼠标操作事件作出响应,避免出现异常响应的问题,提升了响应处理的可靠性。In this embodiment, by determining whether the first position corresponding to the mouse press event and the second position corresponding to the mouse release event in this mouse operation event are both located within the first window, the relationship between the mouse press event and the mouse release event is determined. Whether the mouse release event belongs to the same mouse operation event to ensure that the response is to the same mouse operation event, avoid abnormal response problems, and improve the reliability of response processing.
在一些实施例中,以该第一窗口为包括目标控件的窗口为例,相应地,上述S807可替换为:在该第一位置与该第二位置均位于该第一窗口内的情况下,该电子设备在该第一窗口内,将该目标控件的显示状态由第一状态切换为第二状态。In some embodiments, taking the first window as a window including a target control as an example, accordingly, the above-mentioned S807 can be replaced with: when the first position and the second position are both located within the first window, The electronic device switches the display state of the target control from the first state to the second state in the first window.
示例性的,在取词应用的场景下,该目标控件可以是复制全部控件、翻译全部控件、朗读全部控件、收藏全部控件、截屏取词控件等。当然,除上述所示的示例控件以外,还可以设定其他控件。本申请实施例对目标控件的设定不作限定。For example, in the word extraction application scenario, the target control can be copying all controls, translating all controls, reading all controls, collecting all controls, taking screenshots of word extraction controls, etc. Of course, other controls can be set in addition to the example controls shown above. The embodiment of the present application does not limit the setting of the target control.
第一状态用于指示该目标控件未被触发。第二状态用于指示该目标控件已被触发。例如,第一状态可以是灰色状态,第二控件可以是蓝色(或其他颜色)状态。又如,第一状态可以是静止状态,第二控件可以是抖动状态。又如,第一状态可以是常规状态,第二控件可以是高亮状态。当然,除上述所示的示例状态以外,还可以设定其他状态。本申请实施例对显示状态的设定不作限定。The first state is used to indicate that the target control has not been triggered. The second state is used to indicate that the target control has been triggered. For example, the first state can be a gray state and the second control can be a blue (or other color) state. For another example, the first state may be a static state, and the second control may be a shaking state. For another example, the first state may be a normal state, and the second control may be a highlighted state. Of course, in addition to the example states shown above, other states can also be set. The embodiment of the present application does not limit the setting of the display state.
示例性的,在取词应用的场景下,以该第一窗口为包括截屏取词控件的窗口为例,该鼠标按下事件也即是基于鼠标按下操作的事件,相应地,上述S807可替换为:基于该鼠标按下事件与该鼠标释放事件,将该截屏取词控件的显示状态从灰色状态切换至蓝色状态。Illustratively, in the scenario of a word extraction application, taking the first window as a window including a screenshot word extraction control, the mouse press event is also an event based on the mouse press operation. Accordingly, the above-mentioned S807 can Replace with: based on the mouse press event and the mouse release event, switch the display state of the screenshot word capture control from the gray state to the blue state.
在上述实施例中,提供了一种以控件窗口为例的响应处理方案,能够在新显示第二窗口的情况下,使需要处理本次鼠标操作事件的控件窗口继续作出响应,也即是将该目标控件的显示状态由第一状态切换为第二状态,提升了响应处理的可靠性。In the above embodiment, a response processing solution using a control window as an example is provided, which can enable the control window that needs to process this mouse operation event to continue to respond when the second window is newly displayed, that is, the control window will continue to respond. The display state of the target control is switched from the first state to the second state, which improves the reliability of response processing.
在另一些实施例中,以该第一窗口为包括文本内容的文本窗口为例,该鼠标按下事件也即是基于鼠标按下并进行移动操作的事件,相应地,上述S807可替换为:在该第一位置与该第二位置均位于该第一窗口内的情况下,该电子设备在该第一窗口内显示第三窗口。其中,该第三窗口包括与该文本内容相关的至少一个功能控件。In other embodiments, taking the first window as a text window including text content as an example, the mouse press event is an event based on mouse press and movement operation. Accordingly, the above S807 can be replaced with: When both the first position and the second position are located within the first window, the electronic device displays a third window within the first window. Wherein, the third window includes at least one functional control related to the text content.
示例性的,在取词应用的场景下,文本窗口可以是文本取词场景中所显示的文本窗口,或,图片取词场景中新显示的包括可选文本的图片窗口。For example, in the word extraction application scenario, the text window may be a text window displayed in the text word extraction scenario, or a picture window including optional text newly displayed in the picture word extraction scenario.
又示例性的,在取词应用的场景下,第三窗口可以是文本取词的功能窗口。该第三窗口包括的至少一个功能控件可以包括如复制控件、翻译控件、搜索控件、跳转控件、朗读控件、收藏控件等。As another example, in a word extraction application scenario, the third window may be a functional window for text word extraction. At least one functional control included in the third window may include a copy control, a translation control, a search control, a jump control, a reading control, a collection control, etc.
在该实施例中,提供了一种以文本窗口为例的响应处理方案,能够在新显示第二窗口的情况下,使需要处理本次鼠标操作事件的文本窗口继续作出响应,也即是显示包括至少一个功能控件的第三窗口,提升了响应处理的可靠性。In this embodiment, a response processing solution is provided, taking a text window as an example, which can enable the text window that needs to process this mouse operation event to continue to respond when the second window is newly displayed, that is, display The third window including at least one functional control improves the reliability of response processing.
示例性的,以基于鼠标设备的down事件和up事件为例,在当前第一窗口内发生down事件之后,若被其他新显示的第二窗口抢夺了焦点,在发生up事件时,事件监控器仍然会将up事件发送至当前第一窗口对应的进程。进而,当前第一窗口对应的进程通过判断down事件和up事件的位置是否均处于当前第一窗口内,若是则在当前第一窗口内作出响应。For example, taking the down event and up event based on the mouse device as an example, after the down event occurs in the current first window, if the focus is snatched by other newly displayed second windows, when the up event occurs, the event monitor The up event will still be sent to the process corresponding to the current first window. Furthermore, the process corresponding to the current first window determines whether the positions of the down event and the up event are both within the current first window, and if so, responds within the current first window.
下面在取词应用开启的情况下,以第一对象为截屏取词控件为例,第一窗口为包括截屏取词控件的窗口为例,对包括截屏取词控件的窗口的响应处理过程进行示例性说明。Below, when the word capture application is open, taking the first object as a screenshot word capture control as an example, and the first window as a window including a screenshot word capture control as an example, the response processing process of the window including a screenshot word capture control will be illustrated. sexual description.
在一个示例中,以输入设备为鼠标设备为例,在电子设备接收到鼠标设备在包括截屏取词控件的窗口内的鼠标按下事件之后,将该鼠标按下事件发送至包括截屏取词控件的窗口。此时,鼠标设备的焦点在包括截屏取词控件的窗口。在电子设备显示第二窗口,且焦点被该第二窗口占用的情况下,电子设备接收到鼠标设备在包括截屏取词控件的窗口内的鼠标释放事件之后,判断该鼠标设备的光标是否显示在截屏取词控件上。若该鼠标设备的光标显示在该截屏取词控件上,将该鼠标释放事件发送至包括截屏取词控件的窗口。此时,鼠标设备的焦点从第二窗口切换回包括截屏取词控件的窗口。进而,包括截屏取词控件的窗口基于接收到的该鼠标按下事件与该鼠标释放事件,将该截屏取词控件从灰色状态切换至蓝色状态。In one example, taking the input device as a mouse device, after the electronic device receives a mouse press event of the mouse device in a window that includes a screen capture word capture control, the electronic device sends the mouse press event to a window that includes a screen capture word capture control. window. At this time, the focus of the mouse device is on the window containing the screenshot capture control. When the electronic device displays the second window and the focus is occupied by the second window, the electronic device determines whether the cursor of the mouse device is displayed in the window after receiving the mouse release event of the mouse device in the window that includes the screenshot word capture control. On the screenshot word capture control. If the cursor of the mouse device is displayed on the screenshot word capture control, the mouse release event is sent to the window including the screenshot word capture control. At this time, the focus of the mouse device is switched from the second window back to the window including the screenshot word capture control. Furthermore, the window including the screen capture word capture control switches the screen capture word capture control from a gray state to a blue state based on the received mouse press event and the mouse release event.
下面在取词应用开启的情况下,以第一对象为文本为例,以第一窗口为文本窗口为例,对文本窗口的响应处理过程进行示例性说明。In the following, when the word acquisition application is opened, taking the first object as text as an example and the first window as a text window as an example, the response processing process of the text window will be exemplified.
在另一个示例中,以输入设备为鼠标设备为例,在电子设备接收到鼠标设备在文本窗口内的鼠标按下事件之后,将该鼠标按下事件发送至该文本窗口。此时,鼠标设备的焦点在文本窗口。在电子设备显示第二窗口,且焦点被该第二窗口占用的情况下,判断该鼠标设备的光标是否显示在文本上。若该鼠标设备的光标显示在文本上,将该鼠标释放事件发送至该文本窗口。此时,鼠标设备的焦点从第二窗口切换回该文本窗口。进而,该文本窗口基于接收到的该鼠标按下事件与该鼠标释放事件,显示文本取词的功能窗口。In another example, assuming that the input device is a mouse device, after the electronic device receives a mouse press event of the mouse device within the text window, the electronic device sends the mouse press event to the text window. At this time, the focus of the mouse device is on the text window. When the electronic device displays the second window and the focus is occupied by the second window, it is determined whether the cursor of the mouse device is displayed on the text. If the mouse device's cursor is displayed on the text, send the mouse release event to the text window. At this time, the focus of the mouse device is switched back to the text window from the second window. Furthermore, the text window displays a function window for text word extraction based on the received mouse press event and mouse release event.
本申请实施例提供的技术方案,在该第一窗口的第一对象上显示光标且接收来自该电子设备的输入设备的鼠标按下事件之后,如若新显示第二窗口且焦点被该第二窗口占用,在接收来自该电子设备的输入设备的鼠标释放事件之后,可通过判断光标是否显示在该第一对象上,来确定是否在该第一窗口内对该第一对象的操作进行响应。进而,在该光标显示在该第一对象上的情况下,基于该鼠标按下事件和该鼠标释放事件,对该第一对象的操作进行响应,以便后续在该第一窗口内对本次鼠标操作事件顺利作出响应。如此,通过设置上述光标位置的判断条件,能够确定当前第一窗口是否需要处理本次鼠标操作事件。进而,在新显示第二窗口的情况下,使需要处理本次鼠标操作事件的当前第一窗口继续作出响应,能够解决因新显示的窗口抢夺焦点而导致当前窗口不响应的问题,提升了响应处理的可靠性。The technical solution provided by the embodiment of the present application is that after the cursor is displayed on the first object of the first window and the mouse press event from the input device of the electronic device is received, if the second window is newly displayed and the focus is on the second window, After receiving the mouse release event from the input device of the electronic device, it can be determined whether to respond to the operation of the first object in the first window by determining whether the cursor is displayed on the first object. Furthermore, when the cursor is displayed on the first object, based on the mouse press event and the mouse release event, respond to the operation of the first object, so as to subsequently respond to the current mouse operation in the first window. Smooth response to operational events. In this way, by setting the judgment condition of the cursor position, it can be determined whether the current first window needs to process this mouse operation event. Furthermore, when the second window is newly displayed, the current first window that needs to process the mouse operation event continues to respond, which can solve the problem of the current window not responding due to the newly displayed window grabbing focus, and improve the response. Processing reliability.
在图7所示的软件结构示意图的基础上,示例性的,图9为本申请实施例提供的一种响应处理方法的架构示意图。参见图9,以系统层、中间层、应用层的分层架构为例,通过在中间层设置事件监控器(hook函数),能够监控系统中的鼠标操作事件,如该电子设备的输入设备的鼠标按下事件和鼠标释放事件。进而,通过判断第一窗口是否需要处理该鼠标操作事件,如判断该鼠标设备的光标是否显示在该第一窗口的第一对象上。若第一窗口需要处理该鼠标操作事件,则触发第一窗口处理鼠标响应。若第一窗口不需要处理该鼠标操作事件,则触发鼠标操作事件自动流转。Based on the schematic software structure diagram shown in Figure 7, as an example, Figure 9 is an architectural schematic diagram of a response processing method provided by an embodiment of the present application. Referring to Figure 9, taking the hierarchical architecture of the system layer, middle layer, and application layer as an example, by setting an event monitor (hook function) in the middle layer, the mouse operation events in the system, such as the input device of the electronic device, can be monitored. Mouse press event and mouse release event. Furthermore, by determining whether the first window needs to process the mouse operation event, for example, determining whether the cursor of the mouse device is displayed on the first object of the first window. If the first window needs to process the mouse operation event, the first window is triggered to process the mouse response. If the first window does not need to process the mouse operation event, the automatic flow of the mouse operation event is triggered.
其中,通过系统层的Window系统,能够检测到基于该鼠标设备在该第一窗口内的鼠标操作事件。在检测到基于该鼠标设备在该第一窗口内的鼠标操作事件之后,可通过hook函数将该鼠标操作事件发送至中间层的事件监控器。进而,参见图9所示的点划线流程,中间层的事件监控器判断该鼠标设备的光标是否显示在该第一窗口的第一对象上,若该鼠标设备的光标显示在该第一窗口的第一对象上,表示第一窗口需要处理该鼠标操作事件,则向第一窗口发送该鼠标操作事件,以触发第一窗口处理鼠标响应。参见图9所示的虚线流程,若该鼠标设备的光标未显示在该第一窗口的第一对象上,则表示第一窗口不需要处理该鼠标操作事件,则向系统层返回该鼠标操作事件,以触发系统层向应用层发送该鼠标操作事件,从而使鼠标操作事件自动流转至第二窗口。如此,能够在弹出新窗口但第一窗口需要处理该鼠标操作事件的情况下,确保第一窗口针对鼠标操作事件作出响应。Among them, through the Window system at the system layer, the mouse operation event based on the mouse device in the first window can be detected. After detecting a mouse operation event based on the mouse device in the first window, the mouse operation event can be sent to the event monitor of the middle layer through a hook function. Furthermore, referring to the dotted line process shown in Figure 9, the event monitor of the middle layer determines whether the cursor of the mouse device is displayed on the first object of the first window. If the cursor of the mouse device is displayed on the first window on the first object, indicating that the first window needs to process the mouse operation event, then the mouse operation event is sent to the first window to trigger the first window to process the mouse response. Referring to the dotted line process shown in Figure 9, if the cursor of the mouse device is not displayed on the first object of the first window, it means that the first window does not need to process the mouse operation event, and the mouse operation event is returned to the system layer. , to trigger the system layer to send the mouse operation event to the application layer, so that the mouse operation event is automatically transferred to the second window. In this way, when a new window pops up but the first window needs to process the mouse operation event, it can be ensured that the first window responds to the mouse operation event.
图10为本申请实施例提供的一种响应处理方法的架构交互图。参见图10,以输入设备为鼠标设备为例,以系统层、中间层、应用层之间的交互流程为例,该方法包括以下S1001-S1015:Figure 10 is an architectural interaction diagram of a response processing method provided by an embodiment of the present application. Referring to Figure 10, taking the input device as a mouse device as an example, and taking the interaction process between the system layer, the middle layer, and the application layer as an example, the method includes the following S1001-S1015:
S1001、应用层显示第一窗口,在该第一窗口的第一对象上显示光标。S1001. The application layer displays the first window, and displays the cursor on the first object of the first window.
S1002、用户基于鼠标设备在第一窗口内实施鼠标按下操作。S1002. The user performs a mouse pressing operation in the first window based on the mouse device.
S1003、系统层检测到基于鼠标设备在第一窗口内的鼠标按下操作之后,接收来自鼠标设备的鼠标按下事件。S1003. After detecting a mouse press operation in the first window based on the mouse device, the system layer receives a mouse press event from the mouse device.
S1004、系统层将鼠标按下事件发送至中间层的事件监控器。S1004. The system layer sends the mouse press event to the event monitor of the middle layer.
S1005、事件监控器接收该鼠标按下事件,判断该鼠标按下事件是否属于预设鼠标事件。S1005. The event monitor receives the mouse press event and determines whether the mouse press event is a preset mouse event.
S1006、在该鼠标按下事件属于预设鼠标事件的情况下,事件监控器向应用层的第一窗口对应的进程发送该鼠标按下事件。S1006. When the mouse press event is a preset mouse event, the event monitor sends the mouse press event to the process corresponding to the first window of the application layer.
S1007、第一窗口对应的进程接收并记录该鼠标按下事件。S1007. The process corresponding to the first window receives and records the mouse press event.
S1008、应用层显示第二窗口,且焦点被该第二窗口占用。S1008. The application layer displays the second window, and the focus is occupied by the second window.
S1009、用户基于鼠标设备在第一窗口内实施鼠标释放操作。S1009. The user performs a mouse release operation in the first window based on the mouse device.
S1010、系统层检测到基于鼠标设备在第一窗口内的鼠标释放操作之后,接收来自鼠标设备的鼠标释放事件。S1010. After detecting a mouse release operation based on the mouse device in the first window, the system layer receives a mouse release event from the mouse device.
S1011、系统层将鼠标释放事件发送至事件监控器。S1011. The system layer sends the mouse release event to the event monitor.
S1012、事件监控器接收该鼠标释放事件,判断该鼠标释放事件是否属于预设鼠标事件。S1012. The event monitor receives the mouse release event and determines whether the mouse release event is a preset mouse event.
S1013、在该鼠标释放事件属于预设鼠标事件的情况下,事件监控器获取光标的位置检测结果。S1013. When the mouse release event is a preset mouse event, the event monitor obtains the cursor position detection result.
S1014、在光标的位置检测结果指示该光标显示在该第一对象上的情况下,事件监控器向该第一窗口对应的进程发送该鼠标释放事件。S1014. When the cursor position detection result indicates that the cursor is displayed on the first object, the event monitor sends the mouse release event to the process corresponding to the first window.
S1015、第一窗口对应的进程接收该鼠标释放事件,基于该鼠标按下事件与该鼠标释放事件,在该第一窗口内,对该第一对象的操作进行响应。S1015. The process corresponding to the first window receives the mouse release event, and responds to the operation of the first object in the first window based on the mouse press event and the mouse release event.
相比较相关技术的方案,在窗口焦点发生变化的情况下,使得原本发送至第一窗口的鼠标释放事件发送至了新显示的第二窗口,导致第一窗口无法获取到鼠标设备的鼠标释放事件,从而引发第一窗口不响应的问题。而本申请提供的技术方案,则能够解决因新显示的第二窗口抢夺焦点而导致当前第一窗口不响应的问题。Compared with the solution of the related technology, when the window focus changes, the mouse release event originally sent to the first window is sent to the newly displayed second window, resulting in the first window being unable to obtain the mouse release event of the mouse device. , thus causing the problem of the first window not responding. The technical solution provided by this application can solve the problem of the current first window not responding due to the newly displayed second window grabbing focus.
图11为本申请实施例提供的一种响应处理装置的框架示意图。参见图11,该响应处理装置包括显示模块1101、接收模块1102和响应模块1103。其中,Figure 11 is a schematic framework diagram of a response processing device provided by an embodiment of the present application. Referring to Figure 11, the response processing device includes a display module 1101, a receiving module 1102 and a response module 1103. in,
显示模块1101,用于显示第一窗口,在该第一窗口的第一对象上显示光标;The display module 1101 is used to display the first window and display the cursor on the first object of the first window;
接收模块1102,用于接收来自该电子设备的输入设备的鼠标按下事件;A receiving module 1102, configured to receive a mouse press event from an input device of the electronic device;
显示模块1101,还用于显示第二窗口,且焦点被该第二窗口占用,该电子设备接收来自该电子设备的输入设备的鼠标释放事件;The display module 1101 is also used to display a second window, and the focus is occupied by the second window, and the electronic device receives a mouse release event from the input device of the electronic device;
响应模块1103,用于在该光标显示在该第一对象上的情况下,该电子设备基于该鼠标按下事件和该鼠标释放事件,对该第一对象的操作进行响应。The response module 1103 is configured to respond to the operation of the first object based on the mouse press event and the mouse release event when the cursor is displayed on the first object.
本申请实施例提供的技术方案,在该第一窗口的第一对象上显示光标且接收来自该电子设备的输入设备的鼠标按下事件之后,如若新显示第二窗口且焦点被该第二窗口占用,在接收来自该电子设备的输入设备的鼠标释放事件之后,可通过判断光标是否显示在该第一对象上,来确定是否在该第一窗口内对该第一对象的操作进行响应。进而,在该光标显示在该第一对象上的情况下,基于该鼠标按下事件和该鼠标释放事件,对该第一对象的操作进行响应,以便后续在该第一窗口内对本次鼠标操作事件顺利作出响应。如此,通过设置上述光标位置的判断条件,能够确定当前第一窗口是否需要处理本次鼠标操作事件。进而,在新显示第二窗口的情况下,使需要处理本次鼠标操作事件的当前第一窗口继续作出响应,能够解决因新显示的窗口抢夺焦点而导致当前窗口不响应的问题,提升了响应处理的可靠性。The technical solution provided by the embodiment of the present application is that after the cursor is displayed on the first object of the first window and the mouse press event from the input device of the electronic device is received, if the second window is newly displayed and the focus is on the second window, After receiving the mouse release event from the input device of the electronic device, it can be determined whether to respond to the operation of the first object in the first window by determining whether the cursor is displayed on the first object. Furthermore, when the cursor is displayed on the first object, based on the mouse press event and the mouse release event, respond to the operation of the first object, so as to subsequently respond to the current mouse operation in the first window. Smooth response to operational events. In this way, by setting the judgment condition of the cursor position, it can be determined whether the current first window needs to process this mouse operation event. Furthermore, when the second window is newly displayed, the current first window that needs to process the mouse operation event continues to respond, which can solve the problem of the current window not responding due to the newly displayed window grabbing focus, and improve the response. Processing reliability.
在一些实施例中,该电子设备包括事件监控器,该事件监控器用于监控该电子设备的输入设备的鼠标按下事件和鼠标释放事件;In some embodiments, the electronic device includes an event monitor configured to monitor mouse press events and mouse release events of an input device of the electronic device;
该装置还包括发送模块,用于:The device also includes a sending module for:
该事件监控器将该鼠标按下事件和该鼠标释放事件发送至该第一窗口对应的进程。The event monitor sends the mouse press event and the mouse release event to the process corresponding to the first window.
在一些实施例中,该发送模块,具体用于:In some embodiments, the sending module is specifically used to:
在该鼠标按下事件和该鼠标释放事件属于预设鼠标事件的情况下,该事件监控器将该鼠标按下事件和该鼠标释放事件发送至该第一窗口对应的进程。When the mouse press event and the mouse release event are preset mouse events, the event monitor sends the mouse press event and the mouse release event to the process corresponding to the first window.
在一些实施例中,该装置还包括切换模块,用于:In some embodiments, the device further includes a switching module for:
将该焦点从该第二窗口切换至该第一窗口。Switch the focus from the second window to the first window.
在一些实施例中,该装置还包括获取模块,用于:In some embodiments, the device further includes an acquisition module for:
该事件监控器获取该光标的位置检测结果,该位置检测结果用于指示该光标是否显示在该第一对象上。The event monitor obtains a position detection result of the cursor, and the position detection result is used to indicate whether the cursor is displayed on the first object.
在一些实施例中,该鼠标按下事件包括鼠标按下时对应显示屏中的第一位置,该鼠标释放事件包括鼠标释放时对应显示屏中的第二位置;In some embodiments, the mouse press event includes a first position in the display screen corresponding to the mouse press, and the mouse release event includes a second position in the display screen corresponding to the mouse release;
该响应模块1103,具体用于:The response module 1103 is specifically used for:
在该第一位置与该第二位置均位于该第一窗口内的情况下,该电子设备在该第一窗口内,对该第一对象的操作进行响应。When both the first position and the second position are located within the first window, the electronic device responds to the operation of the first object within the first window.
在一些实施例中,该第一窗口为包括目标控件的窗口;In some embodiments, the first window is a window that includes the target control;
该响应模块1103,具体用于:The response module 1103 is specifically used for:
在该第一位置与该第二位置均位于该第一窗口内的情况下,该电子设备在该第一窗口内,将该目标控件的显示状态由第一状态切换为第二状态。When both the first position and the second position are located in the first window, the electronic device switches the display state of the target control from the first state to the second state in the first window.
在一些实施例中,该第一窗口为包括文本内容的窗口;In some embodiments, the first window is a window that includes text content;
该响应模块1103,具体用于:The response module 1103 is specifically used for:
在该第一位置与该第二位置均位于该第一窗口内的情况下,该电子设备在该第一窗口内显示第三窗口,该第三窗口包括与该文本内容相关的至少一个功能控件。When both the first position and the second position are located within the first window, the electronic device displays a third window within the first window, the third window including at least one functional control related to the text content .
可以理解的是,本申请实施例中的电子设备(如终端)为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。It can be understood that, in order to implement the above functions, the electronic device (such as a terminal) in the embodiment of the present application includes a corresponding hardware structure and/or software module to perform each function. Persons skilled in the art should easily realize that, in conjunction with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the embodiments of the present application.
本申请实施例还提供了一种电子设备,包括:显示屏、存储器和处理器。显示屏用于提供显示功能。处理器与存储器连接,存储器用于存储程序代码,处理器执行存储器存储的程序代码,从而实现本申请实施例提供的响应处理方法。An embodiment of the present application also provides an electronic device, including: a display screen, a memory, and a processor. The display screen is used to provide display functions. The processor is connected to the memory, and the memory is used to store program codes. The processor executes the program codes stored in the memory, thereby implementing the response processing method provided by the embodiment of the present application.
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质上存储有程序代码,当该程序代码在电子设备上运行时,使得该电子设备执行上述方法实施例中电子设备执行的各个功能或者步骤。Embodiments of the present application also provide a computer-readable storage medium. Program code is stored on the computer-readable storage medium. When the program code is run on an electronic device, it causes the electronic device to execute the electronic device in the above method embodiment. Each function or step performed.
本申请实施例还提供了一种计算机程序产品,包括程序代码,当该程序代码在电子设备上运行时,使得电子设备执行上述方法实施例中电子设备执行的各个功能或者步骤。Embodiments of the present application also provide a computer program product, including program code. When the program code is run on an electronic device, the electronic device causes the electronic device to perform various functions or steps performed by the electronic device in the above method embodiments.
其中,本申请实施例提供的电子设备、计算机可读存储介质或者计算机程序产品均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Among them, the electronic devices, computer-readable storage media or computer program products provided by the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the corresponding methods provided above. The beneficial effects of this method will not be repeated here.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置(如电子设备)的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置(如电子设备)和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Through the above description of the embodiments, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be allocated as needed. It is completed by different functional modules, that is, the internal structure of the device (such as electronic equipment) is divided into different functional modules to complete all or part of the functions described above. For the specific working processes of the systems, devices (such as electronic equipment) and units described above, reference can be made to the corresponding processes in the foregoing method embodiments, which will not be described again here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置(如电子设备)和方法,可以通过其它的方式实现。例如,以上所描述的装置(如电子设备)实施例仅仅是示意性的,例如,该模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices (such as electronic devices) and methods can be implemented in other ways. For example, the device (such as electronic equipment) embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple divisions. Units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
该作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The unit described as a separate component may or may not be physically separated, and the component shown as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or software functional units.
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例该方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method in various embodiments of the present application. The aforementioned storage media include: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk and other media that can store program codes.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以该权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application. should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310947660.XA CN117707395B (en) | 2023-07-29 | 2023-07-29 | Response processing method, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310947660.XA CN117707395B (en) | 2023-07-29 | 2023-07-29 | Response processing method, electronic device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117707395A true CN117707395A (en) | 2024-03-15 |
CN117707395B CN117707395B (en) | 2024-11-15 |
Family
ID=90143033
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310947660.XA Active CN117707395B (en) | 2023-07-29 | 2023-07-29 | Response processing method, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117707395B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1160887A (en) * | 1996-03-29 | 1997-10-01 | 国际商业机器公司 | Method, memory and device for delaying transfer of focus to newly opened window |
CN1560747A (en) * | 2004-02-24 | 2005-01-05 | 皓 于 | Method for enhancement of function of mouse roller |
CN109145273A (en) * | 2018-07-27 | 2019-01-04 | 广州视源电子科技股份有限公司 | Comment following display method, device, equipment and storage medium |
-
2023
- 2023-07-29 CN CN202310947660.XA patent/CN117707395B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1160887A (en) * | 1996-03-29 | 1997-10-01 | 国际商业机器公司 | Method, memory and device for delaying transfer of focus to newly opened window |
CN1560747A (en) * | 2004-02-24 | 2005-01-05 | 皓 于 | Method for enhancement of function of mouse roller |
CN109145273A (en) * | 2018-07-27 | 2019-01-04 | 广州视源电子科技股份有限公司 | Comment following display method, device, equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
然后去远足: "c#怎么做到弹出一个窗口,但焦点依然在原窗口上而不会到弹出窗口上来", pages 1, Retrieved from the Internet <URL:https://zhidao.baidu.com/question/688007159565399804.html> * |
Also Published As
Publication number | Publication date |
---|---|
CN117707395B (en) | 2024-11-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110737386A (en) | screen capturing method and related equipment | |
WO2021249281A1 (en) | Interaction method for electronic device, and electronic device | |
KR102536148B1 (en) | Method and apparatus for operation of an electronic device | |
WO2021190524A1 (en) | Screenshot processing method, graphic user interface and terminal | |
US20220357818A1 (en) | Operation method and electronic device | |
KR20180083764A (en) | Electronic device and method for providing user interface according to usage environment of electronic device | |
US11893302B2 (en) | Content transmission method and terminal device | |
WO2021057699A1 (en) | Method for controlling electronic device with flexible screen, and electronic device | |
WO2021000943A1 (en) | Method and apparatus for managing fingerprint switch | |
US20240103717A1 (en) | Multi-Interface Display Method and Electronic Device | |
CN113885973B (en) | Translation result display method and device and electronic equipment | |
CN116991274B (en) | A method for handling exceptions in upward sliding effects and electronic equipment | |
CN117130701B (en) | Icon display method of application program and electronic equipment | |
CN117707395A (en) | Response processing method, electronic device and storage medium | |
CN116028148A (en) | Interface processing method and device and electronic equipment | |
CN114690985A (en) | Display method and electronic equipment | |
CN111475363A (en) | Card death recognition method and electronic equipment | |
CN117008772B (en) | Display method of application window and electronic equipment | |
EP4116809B1 (en) | Display method and electronic device | |
EP4116810B1 (en) | Display method and electronic device | |
CN117472220B (en) | Operation identification method and device | |
CN117082419B (en) | Speaker control method, system, device, equipment and storage medium | |
WO2022143083A1 (en) | Application search method and device, and medium | |
EP4492240A1 (en) | Task continuation method, electronic device, program product, and medium | |
WO2021151341A1 (en) | Distorted-fingerprint-based touch-control method and electronic device |
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 | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |