Movatterモバイル変換


[0]ホーム

URL:


CN116893770A - Screenshot method, device, electronic device and readable storage medium - Google Patents

Screenshot method, device, electronic device and readable storage medium
Download PDF

Info

Publication number
CN116893770A
CN116893770ACN202310895304.8ACN202310895304ACN116893770ACN 116893770 ACN116893770 ACN 116893770ACN 202310895304 ACN202310895304 ACN 202310895304ACN 116893770 ACN116893770 ACN 116893770A
Authority
CN
China
Prior art keywords
interface
screenshot
interface element
image
input
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.)
Pending
Application number
CN202310895304.8A
Other languages
Chinese (zh)
Inventor
邓清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co LtdfiledCriticalVivo Mobile Communication Co Ltd
Priority to CN202310895304.8ApriorityCriticalpatent/CN116893770A/en
Publication of CN116893770ApublicationCriticalpatent/CN116893770A/en
Priority to PCT/CN2024/106133prioritypatent/WO2025016426A1/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本申请公开了一种截图方法、装置、电子设备及可读存储介质,属于电子技术领域。其中,该方法包括:显示第一界面,该第一界面中包括N个界面元素,N为正整数;接收用户的第一输入;识别N个界面元素的元素类型;在N个界面元素中至少一个界面元素的元素类型为第一预设类型的情况下,响应于第一输入,对于至少一个界面元素进行截图。

This application discloses a screenshot method, device, electronic equipment and readable storage medium, which belongs to the field of electronic technology. Wherein, the method includes: displaying a first interface, which includes N interface elements, and N is a positive integer; receiving the user's first input; identifying element types of the N interface elements; and at least one of the N interface elements. When the element type of an interface element is the first preset type, in response to the first input, a screenshot is taken of at least one interface element.

Description

Translated fromChinese
截图方法、装置、电子设备及可读存储介质Screenshot method, device, electronic device and readable storage medium

技术领域Technical field

本申请属于电子技术领域,具体涉及一种截图方法、装置、电子设备及可读存储介质。This application belongs to the field of electronic technology, and specifically relates to a screenshot method, device, electronic equipment and readable storage medium.

背景技术Background technique

通常,在电子设备同时显示多个界面元素的情况下,若用户想要截取某些界面元素的截屏图像,则用户可以对电子设备进行截屏输入,例如对电子设备的电源键和音量键的输入,以使得电子设备可以对于电子设备显示的画面进行截图,以得到该画面的截屏图像,然后用户可以对该画面的截屏图像中的用户需求的界面元素依次进行输入,以使得电子设备可以依次从该画面的截屏图像中截取每个界面元素的截屏图像,从而用户可以得到用户需求的界面元素的截屏图像。Usually, when an electronic device displays multiple interface elements at the same time, if the user wants to take screenshots of certain interface elements, the user can perform screenshot input on the electronic device, such as input on the power key and volume key of the electronic device. , so that the electronic device can take a screenshot of the screen displayed by the electronic device to obtain a screenshot image of the screen, and then the user can sequentially input the interface elements required by the user in the screenshot image of the screen, so that the electronic device can sequentially The screenshot image of each interface element is captured from the screenshot image of the screen, so that the user can obtain the screenshot image of the interface element required by the user.

但是,由于用户需要进行多次输入,才可以触发电子设备依次从显示的画面的截屏图像中截取用户需求的界面元素的截屏图像,因此,在触发电子设备截取用户需求的界面元素的截屏图像的过程中,用户的操作比较繁琐且耗时,如此,导致电子设备截取用户需求的截屏图像的效率较低。However, since the user needs to make multiple inputs before triggering the electronic device to sequentially capture the screenshot images of the interface elements required by the user from the screenshot images of the displayed screen, therefore, before triggering the electronic device to capture the screenshot images of the interface elements required by the user, During the process, the user's operations are cumbersome and time-consuming, which results in low efficiency of the electronic device in intercepting the screenshot image required by the user.

发明内容Contents of the invention

本申请实施例的目的是提供一种截图方法、装置、电子设备及可读存储介质,能够解决电子设备的截屏效果较差的问题。The purpose of the embodiments of the present application is to provide a screenshot method, device, electronic device and readable storage medium, which can solve the problem of poor screenshot effect of electronic devices.

第一方面,本申请实施例提供了一种截图方法,该方法包括:显示第一界面,该第一界面中包括N个界面元素,N为正整数;接收用户的第一输入;识别N个界面元素的元素类型;在N个界面元素中至少一个界面元素的元素类型为第一预设类型的情况下,响应于第一输入,对于至少一个界面元素进行截图。In a first aspect, embodiments of the present application provide a screenshot method, which method includes: displaying a first interface, the first interface including N interface elements, N being a positive integer; receiving the user's first input; identifying N The element type of the interface element; when the element type of at least one interface element among the N interface elements is the first preset type, in response to the first input, take a screenshot of at least one interface element.

第二方面,本申请实施例提供了一种截屏装置,该截屏装置包括:显示模块、接收模块以及处理模块。其中,显示模块,用于显示第一界面,该第一界面中包括N个界面元素,N为正整数。接收模块,用于接收用户的第一输入。处理模块,用于识别N个界面元素的元素类型;并在N个界面元素中至少一个界面元素的元素类型为第一预设类型的情况下,响应于接收模块接收的第一输入,对于至少一个界面元素进行截图。In a second aspect, embodiments of the present application provide a screen capture device, which includes: a display module, a receiving module, and a processing module. The display module is used to display a first interface, which includes N interface elements, and N is a positive integer. The receiving module is used to receive the user's first input. a processing module, configured to identify the element types of the N interface elements; and in the case where the element type of at least one interface element among the N interface elements is a first preset type, in response to the first input received by the receiving module, for at least Take a screenshot of an interface element.

第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, embodiments of the present application provide an electronic device. The electronic device includes a processor and a memory. The memory stores programs or instructions that can be run on the processor. The programs or instructions are processed by the processor. When the processor is executed, the steps of the method described in the first aspect are implemented.

第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, embodiments of the present application provide a readable storage medium. Programs or instructions are stored on the readable storage medium. When the programs or instructions are executed by a processor, the steps of the method described in the first aspect are implemented. .

第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法的步骤。In a fifth aspect, embodiments of the present application provide a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the first aspect. steps of the method.

第六方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面所述的方法的步骤。In a sixth aspect, embodiments of the present application provide a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the steps of the method described in the first aspect.

在本申请实施例中,电子设备可以显示包括N个界面元素的第一界面,并根据用户的第一输入,识别该N个界面元素的元素类型,从而电子设备可以在该N个界面元素中至少一个界面元素的元素类型为第一预设类型的情况下,对于该至少一个界面元素进行截图;其中,N为正整数。由于在显示第一界面的N个界面元素的情况下,电子设备可以根据用户的一次输入,识别该N个界面元素的元素类型,并在该N个界面元素中至少一个界面元素的元素类型为用户常需求的第一预设类型的情况下,直接对于用户常需求的至少一个界面元素进行截图,以得到用户需求的界面元素的截屏图像,而无需用户进行多次输入,因此,可以简化在触发电子设备截取用户需求的界面元素的截屏图像的过程中用户的操作、且减少耗时,如此,可以提高电子设备截取用户需求的截屏图像的效率。In this embodiment of the present application, the electronic device can display a first interface including N interface elements, and identify the element types of the N interface elements according to the user's first input, so that the electronic device can display the N interface elements among the N interface elements. When the element type of at least one interface element is the first preset type, a screenshot is taken of the at least one interface element; where N is a positive integer. When N interface elements of the first interface are displayed, the electronic device can identify the element types of the N interface elements according to one input of the user, and the element type of at least one interface element among the N interface elements is In the case of the first preset type that is frequently requested by users, screenshots of at least one interface element that are frequently requested by users are directly taken to obtain screenshots of the interface elements that users require without requiring the user to input multiple times. Therefore, the process can be simplified. The user's operation is triggered in the process of triggering the electronic device to intercept the screenshot image of the interface element required by the user, and time is reduced. In this way, the efficiency of the electronic device in intercepting the screenshot image required by the user can be improved.

附图说明Description of the drawings

图1是本申请的一些实施例提供的截图方法的流程示意图之一;Figure 1 is one of the flow diagrams of a screenshot method provided by some embodiments of the present application;

图2是本申请的一些实施例提供的第一界面的界面示意图之一;Figure 2 is one of the interface schematic diagrams of the first interface provided by some embodiments of the present application;

图3是本申请的一些实施例提供的第一界面的界面示意图之二;Figure 3 is the second interface schematic diagram of the first interface provided by some embodiments of the present application;

图4是本申请的一些实施例提供的截图方法的流程示意图之二;Figure 4 is a second schematic flowchart of a screenshot method provided by some embodiments of the present application;

图5是本申请的一些实施例提供的界面元素的尺寸和在第一界面中的第一坐标的示意图;Figure 5 is a schematic diagram of the sizes of interface elements and first coordinates in the first interface provided by some embodiments of the present application;

图6A是本申请的一些实施例提供的第二界面的界面示意图之一;Figure 6A is one of the interface schematic diagrams of the second interface provided by some embodiments of the present application;

图6B是本申请的一些实施例提供的第二界面的界面示意图之二;Figure 6B is the second interface schematic diagram of the second interface provided by some embodiments of the present application;

图7是本申请的一些实施例提供的截图方法的流程示意图之三;Figure 7 is a third schematic flowchart of a screenshot method provided by some embodiments of the present application;

图8A是本申请的一些实施例提供的第一界面的界面示意图之三;Figure 8A is the third interface schematic diagram of the first interface provided by some embodiments of the present application;

图8B是本申请的一些实施例提供的第一界面的界面示意图之四;Figure 8B is the fourth interface schematic diagram of the first interface provided by some embodiments of the present application;

图9是本申请的一些实施例提供的截图方法的流程示意图之四;Figure 9 is the fourth schematic flowchart of the screenshot method provided by some embodiments of the present application;

图10是本申请的一些实施例提供的第一界面的界面示意图之五;Figure 10 is the fifth interface schematic diagram of the first interface provided by some embodiments of the present application;

图11是本申请的一些实施例提供的截图装置的结构示意图之一;Figure 11 is one of the structural schematic diagrams of a screenshot device provided by some embodiments of the present application;

图12是本申请的一些实施例提供的截图装置的结构示意图之二;Figure 12 is the second structural schematic diagram of a screenshot device provided by some embodiments of the present application;

图13是本申请的一些实施例提供的电子设备的硬件结构示意图之一;Figure 13 is one of the schematic diagrams of the hardware structure of the electronic device provided by some embodiments of the present application;

图14是本申请的一些实施例提供的电子设备的硬件结构示意图之二。Figure 14 is the second schematic diagram of the hardware structure of an electronic device provided by some embodiments of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art fall within the scope of protection of this application.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一界面元素可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the figures so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in orders other than those illustrated or described herein, and that "first," "second," etc. are distinguished Objects are usually of one type, and the number of objects is not limited. For example, the first interface element can be one or multiple. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the related objects are in an "or" relationship.

本申请的说明书和权利要求书中的术语“至少一个(项)”、“至少之一”等指其包含对象中的任意一个、任意两个或两个以上的组合。例如,a、b、c中的至少一个(项),可以表示:“a”、“b”、“c”、“a和b”、“a和c”、“b和c”以及“a、b和c”,其中a,b,c可以是单个,也可以是多个。同理,“至少两个(项)”是指两个或两个以上,其表达的含义与“至少一个(项)”类似。The terms "at least one (item)", "at least one", etc. in the description and claims of this application refer to any one, any two or a combination of more than two of the included objects. For example, at least one (item) of a, b, c can represent: "a", "b", "c", "a and b", "a and c", "b and c" and "a , b and c", where a, b, c can be single or multiple. Similarly, "at least two (items)" refers to two or more than two, and its meaning is similar to "at least one (item)".

下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的截图方法、装置、电子设备及可读存储介质进行详细地说明。The screenshot method, device, electronic device and readable storage medium provided by the embodiments of the present application will be described in detail through specific embodiments and application scenarios with reference to the accompanying drawings.

本申请实施例提供的截图方法可以应用于对电子设备的界面进行截图的场景。The screenshot method provided by the embodiment of the present application can be applied to the scenario of taking screenshots of the interface of the electronic device.

假设电子设备显示应用程序A的界面,该应用程序A的界面中包括图像元素1、图像元素2、文字元素以及控件元素,若用户想要截取该图像元素1和图像元素2的内容,则用户可以对电子设备的电源键和音量键进行按压输入,以使得电子设备可以直接对当前显示的画面执行截屏操作,以得到包括该图像元素1、图像元素2、文字元素以及控件元素的截屏图像,从而用户可以对该截屏图像中的用户需求的图像元素1和图像元素2依次进行输入,以使得电子设备可以依次从该截屏图像中截取图像元素1和图像元素2的截屏图像,从而用户可以得到用户需求的图像元素1和图像元素2的截屏图像。但是,由于用户需要进行多次输入,才可以触发电子设备依次从包括图像元素1、图像元素2、文字元素以及控件元素的截屏图像中,截取图像元素1和图像元素2的截屏图像,因此,在触发电子设备截取用户需求的界面元素的截屏图像的过程中,用户的操作比较繁琐且耗时。Assume that the electronic device displays the interface of application A. The interface of application A includes image element 1, image element 2, text element and control element. If the user wants to intercept the contents of image element 1 and image element 2, the user The power key and volume key of the electronic device can be pressed and inputted, so that the electronic device can directly perform a screenshot operation on the currently displayed screen to obtain a screenshot image including the image element 1, image element 2, text element and control element, Therefore, the user can sequentially input the image element 1 and image element 2 required by the user in the screenshot image, so that the electronic device can sequentially intercept the screenshot images of image element 1 and image element 2 from the screenshot image, so that the user can obtain Screenshot images of Image Element 1 and Image Element 2 required by the user. However, since the user needs to make multiple inputs before triggering the electronic device to sequentially capture screenshots of image element 1 and image element 2 from the screenshots including image element 1, image element 2, text element, and control element, therefore, In the process of triggering the electronic device to capture the screenshot image of the interface element required by the user, the user's operation is relatively cumbersome and time-consuming.

然而,在本申请实施例中,电子设备在显示应用程序A的界面的情况下,电子设备可以根据用户对电子设备的一次输入,识别该应用程序A的界面中各个界面元素的元素类型,并在该各个界面元素中至少一个界面元素的元素类型为图像类型的情况下,对于该图像元素1和图像元素2进行截图。可以理解,电子设备可以根据用户对电子设备的一次输入,直接从应用程序A的界面中各个界面元素中,截取用户常需求的图像类型的图像元素1和图像元素2,以得到用户需求的图像元素1和图像元素2的截屏图像,而无需用户进行多次输入,因此,可以简化在触发电子设备截取用户需求的界面元素的截屏图像的过程中用户的操作、且减少耗时。However, in the embodiment of the present application, when the electronic device displays the interface of application program A, the electronic device can identify the element type of each interface element in the interface of application program A according to a user's input to the electronic device, and When the element type of at least one of the interface elements is an image type, screenshots are taken of the image element 1 and the image element 2 . It can be understood that the electronic device can directly intercept the image element 1 and image element 2 of the image type often required by the user from each interface element in the interface of application A according to a user's input to the electronic device to obtain the image required by the user. The screenshot images of element 1 and image element 2 do not require the user to make multiple inputs. Therefore, the user's operation in the process of triggering the electronic device to capture the screenshot image of the interface element required by the user can be simplified and time-consuming can be reduced.

本申请实施例提供的截图方法,执行主体可以为截屏装置,或者电子设备,或者电子设备中的功能模块或实体。本申请实施例中以电子设备执行截图方法为例,说明本申请实施例提供的截图方法的。For the screenshot method provided by the embodiments of the present application, the execution subject may be a screenshot device, an electronic device, or a functional module or entity in the electronic device. In the embodiment of the present application, an electronic device is used as an example to illustrate the screenshot method provided by the embodiment of the present application.

图1示出了本申请实施例提供的一种截图方法的流程示意图。如图1所示,本申请实施例提供的一种截图方法可以包括下述的步骤101至步骤104。Figure 1 shows a schematic flowchart of a screenshot method provided by an embodiment of the present application. As shown in Figure 1, a screenshot method provided by an embodiment of the present application may include the following steps 101 to 104.

步骤101、电子设备显示第一界面。Step 101: The electronic device displays the first interface.

本申请实施例中,上述第一界面中包括N个界面元素,N为正整数。In this embodiment of the present application, the above-mentioned first interface includes N interface elements, and N is a positive integer.

在本申请的一些实施例中,上述第一界面可以为以下任一项:第一应用程序的界面。In some embodiments of the present application, the above-mentioned first interface may be any of the following: an interface of the first application program.

可选地,上述第一应用程序可以为以下任一项:聊天类应用程序、拍照类应用程序、记事类应用程序、视频类应用程序等。Optionally, the above-mentioned first application may be any one of the following: a chat application, a photo-taking application, a note-taking application, a video application, etc.

在本申请的一些实施例中,上述N个界面元素可以包括以下至少一项:图像元素、窗口元素、文字元素、控件元素等。该N个界面元素可以为第一界面中的全部界面元素或部分界面元素。In some embodiments of the present application, the above N interface elements may include at least one of the following: image elements, window elements, text elements, control elements, etc. The N interface elements may be all interface elements or part of the interface elements in the first interface.

可选地,上述图像元素可以为第一界面中的页面上的图像,或第一界面的背景图像。Optionally, the above image element may be an image on a page in the first interface, or a background image of the first interface.

可选地,上述窗口元素可以为第二应用程序的窗口,该窗口中包括该第二应用程序的运行界面,其中,该第二应用程序可以与第一应用程序相同或不同。Optionally, the above-mentioned window element may be a window of a second application program, and the window includes a running interface of the second application program, where the second application program may be the same as or different from the first application program.

在一种可能的实现方式中,在第二应用程序与第一应用程序相同的情况下,上述窗口元素具体可以为第一应用程序的分屏窗口。In a possible implementation manner, when the second application program is the same as the first application program, the above-mentioned window element may specifically be a split-screen window of the first application program.

步骤102、电子设备接收用户的第一输入。Step 102: The electronic device receives the user's first input.

在本申请的一些实施例中,在电子设备显示“设置”应用界面的情况下,电子设备可以根据用户对“设置”应用界面中的“智能识别截图区域”控件的点击输入,开启“智能识别截图区域”功能,从而在用户触发电子设备在第一界面中显示N个界面元素的情况下,用户可以对电子设备进行第一输入。In some embodiments of the present application, when the electronic device displays the "Settings" application interface, the electronic device can turn on the "Smart Recognition Screenshot Area" control based on the user's click input on the "Settings" application interface. "Screenshot area" function, so that when the user triggers the electronic device to display N interface elements in the first interface, the user can make the first input to the electronic device.

可选地,在N个界面元素包括图像元素、文字元素以及控件元素中的至少一个的情况下,用户可以直接触发电子设备显示第一界面,以触发电子设备在该第一界面中显示N个图像元素。Optionally, in the case where the N interface elements include at least one of image elements, text elements, and control elements, the user can directly trigger the electronic device to display the first interface to trigger the electronic device to display N elements in the first interface. Image elements.

举例说明,以电子设备为手机为例进行说明。如图2所示,用户可以触发电子设备显示第一界面,例如应用程序1的界面10,该界面10中包括N个界面元素,例如图像元素11、图像元素12、文字元素13以及控件元素14,从而用户可以对电子设备进行第一输入。As an example, the electronic device is a mobile phone. As shown in Figure 2, the user can trigger the electronic device to display a first interface, such as the interface 10 of the application program 1. The interface 10 includes N interface elements, such as image elements 11, image elements 12, text elements 13, and control elements 14. , so that the user can perform the first input to the electronic device.

可选地,在N个界面元素为N个窗口元素的情况下,用户可以先触发电子设备显示第一界面,然后再触发电子设备开启N个第二应用程序,以使得电子设备可以在第一界面上悬浮显示N个窗口元素,以在该第一界面中显示N个窗口元素。Optionally, when the N interface elements are N window elements, the user can first trigger the electronic device to display the first interface, and then trigger the electronic device to open N second applications, so that the electronic device can display the first interface N window elements are displayed suspended on the interface to display N window elements in the first interface.

举例说明,用户可以先触发电子设备显示第一界面,例如应用程序2的界面,然后再触发电子设备开启应用程序3,如图3所示,从而电子设备可以在应用程序2的界面(例如界面15)上显示应用程序3的窗口元素16,进而用户可以对电子设备进行第一输入。For example, the user can first trigger the electronic device to display the first interface, such as the interface of application program 2, and then trigger the electronic device to open application program 3, as shown in Figure 3, so that the electronic device can display the first interface of application program 2 (such as the interface of application program 2). 15) The window element 16 of the application program 3 is displayed, so that the user can perform first input on the electronic device.

本申请实施例中,上述第一输入用于触发电子设备对第一界面进行截图。In this embodiment of the present application, the above-mentioned first input is used to trigger the electronic device to take a screenshot of the first interface.

在本申请的一些实施例中,上述第一输入可以为:用户对电子设备的显示屏的输入,或者,用户对电子设备的物理按键的输入。In some embodiments of the present application, the above-mentioned first input may be: the user's input to the display screen of the electronic device, or the user's input to the physical keys of the electronic device.

可选地,上述第一输入可以包括但不限于:用户在显示屏中的触控输入,或用户输入的语音指令,或用户通过手指或者手写笔等触控装置输入的特定手势,或其他可行性输入,具体的可以根据实际使用需求确定,本申请实施例在此不作限定。其中,上述特定手势可以为单击手势、滑动手势、拖动手势、压力识别手势、长按手势、面积变化手势、双按手势、双击手势中的任意一种;本申请实施例中的点击输入可以为单击输入、双击输入或任意次数的点击输入等,还可以为长按输入或短按输入。例如,上述第一输入可以为:用户对电子设备的“电源”按键和“音量”按键的按压输入。Optionally, the above-mentioned first input may include but is not limited to: the user's touch input on the display screen, or the voice command input by the user, or the specific gesture input by the user through a touch device such as a finger or a stylus, or other feasible Specific input can be determined according to actual usage requirements, and the embodiments of the present application are not limited here. Wherein, the above-mentioned specific gesture may be any one of a click gesture, a sliding gesture, a drag gesture, a pressure recognition gesture, a long press gesture, an area change gesture, a double press gesture, and a double click gesture; the click input in the embodiment of the present application It can be single-click input, double-click input or any number of click inputs, etc. It can also be long-press input or short-press input. For example, the above-mentioned first input may be: the user presses the "power" button and the "volume" button of the electronic device.

步骤103、电子设备识别N个界面元素的元素类型。Step 103: The electronic device identifies the element types of N interface elements.

在本申请的一些实施例中,电子设备可以先获取N个界面元素一一对应的N个可查询属性,并从每个可查询属性中获取对应的界面元素的元素类型。In some embodiments of the present application, the electronic device may first obtain N queryable attributes corresponding to N interface elements one-to-one, and obtain the element type of the corresponding interface element from each queryable attribute.

可选地,上述可查询属性可以包括以下至少一项:类名(ClassName)、身份标识码(Identity,ID)。Optionally, the above queryable attributes may include at least one of the following: class name (ClassName), identity code (Identity, ID).

示例性地,在可查询属性为ID的情况下,针对N个可查询属性中的每个可查询属性,电子设备可以采用至少一个第一对应关系,确定与一个ID对应的一个元素类型,并将该一个元素类型确定为该一个ID对应的界面元素的元素类型,以识别N个界面元素的元素类型。For example, when the queryable attribute is an ID, for each of the N queryable attributes, the electronic device can use at least one first correspondence relationship to determine an element type corresponding to an ID, and The one element type is determined as the element type of the interface element corresponding to the one ID, so as to identify the element types of N interface elements.

步骤104、在N个界面元素中至少一个界面元素的元素类型为第一预设类型的情况下,电子设备响应于第一输入,对于至少一个界面元素进行截图。Step 104: When the element type of at least one interface element among the N interface elements is the first preset type, the electronic device responds to the first input and takes a screenshot of the at least one interface element.

在本申请的一些实施例中,上述第一预设类型可以包括以下至少一项:图像元素类型、窗口元素类型。In some embodiments of the present application, the above-mentioned first preset type may include at least one of the following: image element type, window element type.

本申请实施例中,由于用户在截取界面元素的内容时,常需求截取图像元素类型的界面元素和窗口元素类型的界面元素,因此,电子设备可以在N个界面元素中至少一个界面元素的元素类型为第一预设类型的情况下,才响应于第一输入,对用户常需求的该至少一个界面元素进行截图。In the embodiment of the present application, when users intercept the content of interface elements, they often need to intercept interface elements of the image element type and interface elements of the window element type. Therefore, the electronic device can intercept elements of at least one interface element among the N interface elements. Only when the type is the first preset type, the at least one interface element frequently required by the user is screenshotted in response to the first input.

在本申请的一些实施例中,电子设备可以依次对至少一个界面元素中每个界面元素进行截图;或者,电子设备可以先对第一界面进行截图,再从截图得到的截屏图像中截取至少一个界面元素的截屏图像。In some embodiments of the present application, the electronic device can take screenshots of each interface element in at least one interface element in turn; or, the electronic device can first take a screenshot of the first interface, and then take a screenshot of at least one of the screenshot images obtained from the screenshot. Screenshot of interface elements.

下面将以电子设备依次对至少一个界面元素中每个界面元素进行截图为例,举例说明电子设备进行截图的具体方案。The following will take the electronic device taking screenshots of each interface element in at least one interface element as an example to illustrate a specific solution for the electronic device to take screenshots.

在本申请的一些实施例中,结合图1,如图4所示,在上述步骤103之后,且在上述步骤104之前,本申请实施例提供的截图方法还可以包括下述的步骤201,且上述步骤104具体可以通过下述的步骤104a实现。In some embodiments of the present application, as shown in Figure 4 in conjunction with Figure 1, after the above step 103 and before the above step 104, the screenshot method provided by the embodiment of the present application may also include the following step 201, and The above step 104 can be specifically implemented through the following step 104a.

步骤201、在N个界面元素中至少一个界面元素的元素类型为第一预设类型的情况下,电子设备获取至少一个界面元素的尺寸和在第一界面中的第一坐标。Step 201: When the element type of at least one interface element among the N interface elements is the first preset type, the electronic device obtains the size of at least one interface element and the first coordinate in the first interface.

在本申请的一些实施例中,针对至少一个界面元素中的每个界面元素,一个界面元素在第一界面中的第一坐标具体可以为:该一个界面元素的一个顶点在第一坐标系中的坐标。其中,该第一坐标系为:以电子设备的显示屏的第一边缘线为x轴,第二边缘线为y轴建立的直角坐标系。该第一边缘线和该第二边缘线为相邻的边缘线。In some embodiments of the present application, for each interface element in at least one interface element, the first coordinate of an interface element in the first interface may specifically be: a vertex of the interface element in the first coordinate system coordinate of. Wherein, the first coordinate system is a rectangular coordinate system established with the first edge line of the display screen of the electronic device as the x-axis and the second edge line as the y-axis. The first edge line and the second edge line are adjacent edge lines.

在本申请的一些实施例中,针对至少一个界面元素中的每个界面元素,一个界面元素的尺寸可以包括以下至少一项:该一个界面元素的第三边缘线的长度参数、该一个界面元素的第四边缘线的长度参数。该第三边缘线和该第四边缘线为相邻的边缘线。In some embodiments of the present application, for each interface element in at least one interface element, the size of one interface element may include at least one of the following: a length parameter of the third edge line of the one interface element, the one interface element The length parameter of the fourth edge line. The third edge line and the fourth edge line are adjacent edge lines.

在本申请的一些实施例中,电子设备可以从至少一个界面元素中的每个界面元素对应的属性值中,获取每个界面元素的尺寸和在第一界面中的第一坐标。In some embodiments of the present application, the electronic device can obtain the size of each interface element and the first coordinate in the first interface from the attribute value corresponding to each interface element in at least one interface element.

需要说明的是,上述“界面元素对应的属性值”可以理解为:在前端写入该界面元素时,该界面元素被赋予的属性值。It should be noted that the above "attribute value corresponding to the interface element" can be understood as: the attribute value assigned to the interface element when the front-end writes the interface element.

举例说明,图5示出了本申请实施例的电子设备获取的界面元素的尺寸和在第一界面中的第一坐标的示意图。如图5所示,假设至少一个界面元素包括为图像元素,则电子设备可以从该图像元素对应的属性值中,确定该图像元素的左上顶点17的坐标值(x1,y1)、该图像元素的第三边缘线18的长度参数,例如宽度w,以及该图像元素的第四边缘线19的长度参数,例如宽度h,该第三边缘线18和该第四边缘线19为相邻的边缘线。For example, FIG. 5 shows a schematic diagram of the size of the interface element and the first coordinate in the first interface obtained by the electronic device according to the embodiment of the present application. As shown in Figure 5, assuming that at least one interface element is included as an image element, the electronic device can determine the coordinate values (x1 , y1 ), the upper left vertex 17 of the image element from the attribute values corresponding to the image element. The length parameter of the third edge line 18 of the image element, such as the width w, and the length parameter of the fourth edge line 19 of the image element, such as the width h, the third edge line 18 and the fourth edge line 19 are adjacent edge line.

步骤104a、电子设备响应于第一输入,根据尺寸和第一坐标,对于至少一个界面元素进行截图。Step 104a: In response to the first input, the electronic device takes a screenshot of at least one interface element according to the size and the first coordinate.

在本申请的一些实施例中,电子设备可以根据每个界面元素的尺寸和第一坐标,分别确定每个界面元素所处的界面区域,从而电子设备可以分别对每个界面区域进行截图。In some embodiments of the present application, the electronic device can determine the interface area where each interface element is located based on the size and first coordinate of each interface element, so that the electronic device can take screenshots of each interface area respectively.

需要说明的是,针对电子设备进行截图的说明,可以参考相关技术中的具体描述,本申请实施例在此不予赘述。It should be noted that, for instructions on taking screenshots of electronic devices, reference may be made to specific descriptions in related technologies, and the embodiments of the present application will not be described in detail here.

如此可知,由于电子设备可以直接获取至少一个界面元素的尺寸和在第一界面中的第一坐标,并根据该至少一个界面元素的尺寸和在第一界面中的第一坐标,对该至少一个界面元素进行截图,而无需用户触发电子设备确定至少一个界面元素的尺寸和在第一界面中的第一坐标,因此,可以减少电子和设备的运算量,如此,可以减少电子设备的功耗。It can be seen from this that the electronic device can directly obtain the size of at least one interface element and the first coordinate in the first interface, and calculate the size of the at least one interface element based on the size of the at least one interface element and the first coordinate in the first interface. Taking screenshots of interface elements does not require the user to trigger the electronic device to determine the size of at least one interface element and the first coordinate in the first interface. Therefore, the computational load of the electronics and the device can be reduced, and thus the power consumption of the electronic device can be reduced.

在本申请的一些实施例中,在电子设备对于至少一个界面元素进行截图之后,电子设备可以将第一界面更新为第二界面,该第二界面中包括至少一个截图,每个截图是电子设备对于一个界面元素进行截图得到的,从而用户可以对该至少一个截图中的至少部分截图进行第三输入,以使得电子设备可以对该至少部分截图执行第三输入对应的目标操作。In some embodiments of the present application, after the electronic device takes a screenshot of at least one interface element, the electronic device can update the first interface to a second interface. The second interface includes at least one screenshot, and each screenshot is a screenshot of the electronic device. Obtained by taking a screenshot of an interface element, so that the user can perform a third input on at least part of the at least one screenshot, so that the electronic device can perform a target operation corresponding to the third input on the at least part of the screenshot.

可选地,上述第三输入可以包括第一子输入和第二子输入,该第一子输入为用户对至少部分截图的选择输入,该第一子输入用于触发电子设备采用第一标记方式标记该至少部分截图,该第二子输入为用户对第二界面中的至少一个控件中的目标控件的选择输入,每个控件分别对应一个操作,目标控件对应目标操作,该第二子输入用于触发电子设备对该至少部分截图执行目标操作。Optionally, the above-mentioned third input may include a first sub-input and a second sub-input. The first sub-input is the user's selection input for at least part of the screenshot. The first sub-input is used to trigger the electronic device to adopt the first marking method. Mark the at least part of the screenshot, the second sub-input is the user's selection input of the target control in at least one control in the second interface, each control corresponds to an operation, the target control corresponds to the target operation, and the second sub-input is Triggering the electronic device to perform a target operation on at least part of the screenshot.

在一种可能的实现方式中,上述第一标记方式可以包括以下任一项:高亮标记方式、虚线框标记方式、显示提示图像标记方式、彩色标记方式、灰度标记方式、以预设透明度标记方式、闪烁标记方式等。In a possible implementation, the above-mentioned first marking method may include any of the following: highlight marking method, dashed box marking method, display prompt image marking method, color marking method, grayscale marking method, preset transparency Marking method, flashing marking method, etc.

在一种可能的实现方式中,上述目标操作为以下任一项:保存操作、分享操作、删除操作。In a possible implementation manner, the above target operation is any of the following: save operation, share operation, delete operation.

示例性地,在目标操作为保存操作的情况下,电子设备可以将该至少部分截图存储至预设存储空间中。For example, when the target operation is a save operation, the electronic device can store at least part of the screenshot in a preset storage space.

示例性地,在目标操作为分享操作的情况下,电子设备可以向第一联系人的电子设备发送该至少部分截图,该第一联系人可以为第一联系人可以是用户选择的联系人,或用户预设的联系人。For example, when the target operation is a sharing operation, the electronic device may send the at least part of the screenshot to the electronic device of the first contact, and the first contact may be a contact selected by the user, Or user-preset contacts.

示例性地,在目标操作为删除操作的情况下,电子设备可以从电子设备的缓存中删除该至少部分截图。For example, when the target operation is a delete operation, the electronic device may delete the at least part of the screenshot from the cache of the electronic device.

举例说明,以第一预设类型为图像类型为例,结合图2,如图6A所示,在用户对电子设备进行第一输入之后,在该图像元素11、图像元素12、文字元素13以及控件元素14中至少一个界面元素(即图像元素11和图像元素12)的元素类型为图像类型的情况下,电子设备可以对于图像元素11和图像元素12进行截图,并将界面10更新为第二界面20,该第二界面20中包括截屏图像21和截屏图像22,该截屏图像21是电子设备对于图像元素11进行截图得到的,该截屏图像22是电子设备对于图像元素12进行截图得到的,从而用户可以对截屏图像21进行第一子输入;如图6B所示,在用户对截屏图像21进行第一子输入之后,电子设备可以采用显示提示图像标记方式标记截屏图像21,例如显示提示图像23,该提示图像23用于提示电子设备已选中截屏图像21,从而用户可以进行第二子输入,例如对存储控件24的点击输入,以使得电子设备可以将该截屏图像21存储至预设存储空间中。For example, taking the first preset type as an image type, combined with FIG. 2 , as shown in FIG. 6A , after the user performs the first input to the electronic device, the image element 11 , the image element 12 , the text element 13 and When the element type of at least one interface element (ie, image element 11 and image element 12) in the control element 14 is an image type, the electronic device can take a screenshot of the image element 11 and the image element 12, and update the interface 10 to the second Interface 20. The second interface 20 includes a screenshot image 21 and a screenshot image 22. The screenshot image 21 is obtained by taking a screenshot of the image element 11 by the electronic device. The screenshot image 22 is obtained by taking a screenshot of the image element 12 by the electronic device. Therefore, the user can perform the first sub-input on the screenshot image 21; as shown in FIG. 6B, after the user performs the first sub-input on the screenshot image 21, the electronic device can mark the screenshot image 21 by displaying a prompt image marking method, for example, displaying a prompt image. 23. The prompt image 23 is used to prompt the electronic device that the screenshot image 21 has been selected, so that the user can perform a second sub-input, such as a click input on the storage control 24, so that the electronic device can store the screenshot image 21 in a preset storage. in space.

本申请实施例提供一种截图方法,电子设备可以显示包括N个界面元素的第一界面,并根据用户的第一输入,识别该N个界面元素的元素类型,从而电子设备可以在该N个界面元素中至少一个界面元素的元素类型为第一预设类型的情况下,对于该至少一个界面元素进行截图;其中,N为正整数。由于在显示第一界面的N个界面元素的情况下,电子设备可以根据用户的一次输入,识别该N个界面元素的元素类型,并在该N个界面元素中至少一个界面元素的元素类型为用户常需求的第一预设类型的情况下,直接对于用户常需求的至少一个界面元素进行截图,以得到用户需求的界面元素的截屏图像,而无需用户进行多次输入,因此,可以简化在触发电子设备截取用户需求的界面元素的截屏图像的过程中用户的操作、且减少耗时,如此,可以提高电子设备截取用户需求的截屏图像的效率。Embodiments of the present application provide a screenshot method. The electronic device can display a first interface including N interface elements, and identify the element types of the N interface elements according to the user's first input, so that the electronic device can display the N interface elements. When the element type of at least one of the interface elements is the first preset type, a screenshot is taken of the at least one interface element; where N is a positive integer. When N interface elements of the first interface are displayed, the electronic device can identify the element types of the N interface elements according to one input of the user, and the element type of at least one interface element among the N interface elements is In the case of the first preset type that is frequently requested by users, screenshots of at least one interface element that are frequently requested by users are directly taken to obtain screenshots of the interface elements that users require without requiring the user to input multiple times. Therefore, the process can be simplified. The user's operation is triggered in the process of triggering the electronic device to intercept the screenshot image of the interface element required by the user, and time is reduced. In this way, the efficiency of the electronic device in intercepting the screenshot image required by the user can be improved.

本申请实施例中,由于可能会出现上述至少一个界面元素至少部分重叠的情况,此时若电子设备直接对于该至少一个界面元素进行截图,则可能会出现电子设备无法截取该至少一个界面元素中的某些界面元素的全部内容的情况,因此,电子设备可以更新至少一个界面元素的透明度,以依次显示至少一个界面元素的所有内容,并在每次显示一个界面元素的所有内容的情况下,对于每次显示的界面元素进行截图,以避免电子设备无法截取该至少一个界面元素中的某些界面元素的全部内容的情况。In the embodiment of the present application, since the above-mentioned at least one interface element may at least partially overlap, if the electronic device directly takes a screenshot of the at least one interface element, the electronic device may not be able to take a screenshot of the at least one interface element. The entire content of certain interface elements, therefore, the electronic device can update the transparency of at least one interface element to display all the content of at least one interface element sequentially, and in the case of displaying all the content of one interface element each time, Take a screenshot of each displayed interface element to avoid the situation where the electronic device cannot capture the entire contents of some of the at least one interface element.

需要说明的是,上述“至少部分重叠”可以理解为:部分重叠或全部重叠。It should be noted that the above "at least partial overlap" can be understood as: partial overlap or complete overlap.

本申请实施例中,电子设备可以对至少一个界面元素中的界面元素的透明度进行至少一次更新,每次更新的界面元素不同,以依次显示至少一个界面元素的所有内容。In the embodiment of the present application, the electronic device can update the transparency of the interface element in at least one interface element at least once, and the interface element updated each time is different, so as to display all the contents of the at least one interface element in sequence.

在本申请的一些实施例中,针对至少一次更新中的每次更新,电子设备可以更新至少一个界面元素中除一个界面元素外的界面元素的透明度,以对至少一个界面元素中的界面元素的透明度进行一次更新,以显示该一个界面元素的所有内容;或者,电子设备可以更新一个界面元素的透明度,并更新另一个界面元素的透明度,以对至少一个界面元素中的界面元素的透明度进行一次更新,以显示该一个界面元素的所有内容。In some embodiments of the present application, for each update in at least one update, the electronic device may update the transparency of the interface elements except one of the at least one interface element to adjust the transparency of the interface element of the at least one interface element. The transparency is updated once to display all the content of that one interface element; alternatively, the electronic device can update the transparency of one interface element and update the transparency of another interface element to display the transparency of the interface element in at least one interface element once. Updated to display all contents of that one interface element.

可选地,针对至少一次更新中的每次更新,电子设备可以调高至少一个界面元素中除一个界面元素外的其他界面元素的透明度,以使得该一个界面元素的透明度为至少一个界面元素中的最低透明度,以对至少一个界面元素中的界面元素的透明度进行一次更新。可以理解,由于该一个界面元素的透明度为至少一个界面元素中的最低透明度,因此,电子设备可以显示该一个界面元素的所有内容。Optionally, for each update in the at least one update, the electronic device can increase the transparency of the interface elements except one of the at least one interface element, so that the transparency of the one interface element is equal to that of the at least one interface element. The minimum transparency to update the transparency of the interface element in at least one interface element. It can be understood that since the transparency of the one interface element is the lowest transparency among at least one interface element, the electronic device can display all contents of the one interface element.

可以理解,由于可能会出现至少一个界面元素中的部分界面元素至少部分重叠的情况,因此,电子设备可以直接调高其他界面元素的透明度,以使得电子设备可以显示该一个界面元素的所有内容,从而电子设备可以截取包括该一个界面元素的所有内容的截屏图像。It can be understood that since some interface elements in at least one interface element may at least partially overlap, the electronic device can directly increase the transparency of other interface elements so that the electronic device can display all the content of the one interface element. Therefore, the electronic device can capture a screenshot of all content including the one interface element.

可选地,针对至少一次更新中的每次更新,电子设备可以调低一个界面元素的透明度,并调高另一个界面元素的透明度,以使得该一个界面元素的透明度为至少一个界面元素中的最低透明度,以对至少一个界面元素中的界面元素的透明度进行一次更新。由于该一个界面元素的透明度为至少一个界面元素中的最低透明度,因此,电子设备可以显示该一个界面元素的所有内容。Optionally, for each update in at least one update, the electronic device can lower the transparency of one interface element and raise the transparency of another interface element, so that the transparency of the one interface element is equal to that of the at least one interface element. Minimum transparency to update the transparency of UI elements in at least one UI element once. Since the transparency of the one interface element is the lowest transparency among at least one interface element, the electronic device can display all contents of the one interface element.

可以理解,由于可能会出现电子设备已经调高该一个界面元素的透明度、且调低该另一个界面元素的透明度的情况,因此,电子设备可以调低该一个界面元素的透明度,并调高该另一个界面元素的透明度,以使得电子设备可以显示该一个界面元素的所有内容,从而电子设备可以截取包括该一个界面元素的所有内容的截屏图像。It can be understood that since the electronic device may have increased the transparency of one interface element and decreased the transparency of another interface element, the electronic device may decrease the transparency of the one interface element and increase the transparency of the other interface element. The transparency of another interface element allows the electronic device to display all the content of the one interface element, so that the electronic device can capture a screenshot including all the content of the one interface element.

下面将以上述部分界面元素为两个为例,举例说明电子设备更新界面元素的透明度的具体方案。The following will take two of the above-mentioned interface elements as an example to illustrate a specific solution for updating the transparency of interface elements in an electronic device.

在本申请的一些实施例中,上述至少一个界面元素中包括:至少部分重叠的第一界面元素和第二界面元素。可选地,结合图1,如图7所示,上述步骤104具体可以通过下述的步骤104b和步骤104c。In some embodiments of the present application, the above-mentioned at least one interface element includes: a first interface element and a second interface element that at least partially overlap. Optionally, with reference to Figure 1, as shown in Figure 7, the above step 104 may specifically include the following steps 104b and 104c.

步骤104b、在N个界面元素中至少一个界面元素的元素类型为第一预设类型的情况下,电子设备响应于第一输入,更新第二界面元素的透明度,以显示第一界面元素的全部内容,并对于第一界面元素进行截图。Step 104b. When the element type of at least one interface element among the N interface elements is the first preset type, the electronic device responds to the first input and updates the transparency of the second interface element to display all of the first interface element. content, and take a screenshot of the first interface element.

在本申请的一些实施例中,上述第一预设类型可以为图像类型,上述第一界面元素和第二界面元素的元素类型可以为图像类型。In some embodiments of the present application, the first preset type may be an image type, and the element types of the first interface element and the second interface element may be an image type.

在本申请的一些实施例中,上述第一界面元素可以为:第一界面元素和第二界面元素中,按照目标顺序进行排序后的排序为第一的界面元素;上述第二界面元素可以为:第一界面元素和第二界面元素中,按照目标顺序进行排序后的排序为第二的界面元素。In some embodiments of the present application, the above-mentioned first interface element may be: among the first interface elements and the second interface elements, the interface element ranked first after being sorted according to the target order; the above-mentioned second interface element may be : Among the first interface element and the second interface element, the interface element ranked second after sorting according to the target order.

可选地,上述目标顺序可以为以下任一项:显示时间从早到晚、显示时间从晚到早、沿第一方向上的显示位置的顺序、沿第二方向上的显示位置的顺序;其中,该第一方向和第二方向垂直。Optionally, the above target order may be any of the following: display time from early morning to late, display time from late to early, order of display positions along the first direction, order of display positions along the second direction; Wherein, the first direction and the second direction are perpendicular.

在一种可能的实现方式中,上述第一方向可以为以下任一项:从显示屏的左端至右端的方向、从显示屏的右端至左端的方向。In a possible implementation, the above-mentioned first direction may be any of the following: a direction from the left end to the right end of the display screen, or a direction from the right end to the left end of the display screen.

需要说明的是,上述“显示屏的左端”可以理解为:在用户使用电子设备时,在用户观察显示屏的视角下的左端。上述“显示屏的右端”可以理解为:在用户使用电子设备时,在用户观察显示屏的视角下的右端。It should be noted that the above-mentioned "left end of the display screen" can be understood as: the left end from the perspective of the user observing the display screen when the user uses the electronic device. The above "right end of the display screen" can be understood as: the right end from the perspective of the user observing the display screen when the user uses the electronic device.

在一种可能的实现方式中,上述第一方向可以为以下任一项:从显示屏的上端至下端的方向、从显示屏的下端至上端的方向。In a possible implementation, the first direction may be any of the following: a direction from the upper end to the lower end of the display screen, or a direction from the lower end to the upper end of the display screen.

需要说明的是,上述“显示屏的上端”可以理解为:在用户使用电子设备时,在用户观察显示屏的视角下的上端。上述“显示屏的下端”可以理解为:在用户使用电子设备时,在用户观察显示屏的视角下的下端。It should be noted that the above-mentioned "upper end of the display screen" can be understood as: the upper end from the perspective of the user observing the display screen when the user uses the electronic device. The above "lower end of the display screen" can be understood as: the lower end from the perspective of the user observing the display screen when using the electronic device.

在本申请的一些实施例中,电子设备可以将第二界面元素的透明度更新为第一透明度,以显示第一界面元素的全部内容。In some embodiments of the present application, the electronic device can update the transparency of the second interface element to the first transparency to display the entire content of the first interface element.

本申请实施例中,上述第一透明度大于第二界面元素的初始透明度(例如下述实施例中的第二透明度)。In the embodiment of the present application, the above-mentioned first transparency is greater than the initial transparency of the second interface element (for example, the second transparency in the following embodiment).

需要说明的是,上述“初始透明度”可以理解为:在更新第二界面元素的透明度之前,该第二界面元素的透明度。It should be noted that the above “initial transparency” can be understood as: the transparency of the second interface element before the transparency of the second interface element is updated.

在本申请的一些实施例中,上述第一透明度可以为大于或等于50%、且小于或等于100%的范围内的任一个透明度。例如,第一透明度可以为100%。In some embodiments of the present application, the first transparency may be any transparency within a range of greater than or equal to 50% and less than or equal to 100%. For example, the first transparency can be 100%.

步骤104c、电子设备更新第一界面元素和第二界面元素的透明度,以显示第二界面元素的全部内容,并对于第二界面元素进行截图。Step 104c: The electronic device updates the transparency of the first interface element and the second interface element to display the entire content of the second interface element, and takes a screenshot of the second interface element.

在本申请的一些实施例中,在电子设备对于第一界面元素进行截图之后,电子设备可以将第一界面元素的透明度更新为第一透明度,并将第二界面元素的透明度更新为第二透明度。In some embodiments of the present application, after the electronic device takes a screenshot of the first interface element, the electronic device can update the transparency of the first interface element to the first transparency, and update the transparency of the second interface element to the second transparency. .

在本申请的一些实施例中,上述第二透明度可以为大于或等于0%、且小于50%的范围内的任一个透明度。例如,第二透明度可以为0%。In some embodiments of the present application, the second transparency may be any transparency within a range of greater than or equal to 0% and less than 50%. For example, the second transparency can be 0%.

在本申请的一些实施例中,电子设备可以将第一界面元素的透明度从第二透明度更新为第一透明度,并将第二界面元素的透明度从第一透明度更新为第二透明度。In some embodiments of the present application, the electronic device may update the transparency of the first interface element from the second transparency to the first transparency, and update the transparency of the second interface element from the first transparency to the second transparency.

在本申请的一些实施例中,在电子设备对于第一界面元素和第二界面元素进行截图之后,电子设备还可以将第一界面元素和第二界面元素的透明度更新为该第一界面元素和第二界面元素的初始透明度(例如第二透明度),从而电子设备可以继续在第一界面中查看该第一界面元素和第二界面元素。In some embodiments of the present application, after the electronic device takes screenshots of the first interface element and the second interface element, the electronic device can also update the transparency of the first interface element and the second interface element to the first interface element and the second interface element. Initial transparency (eg, second transparency) of the second interface element so that the electronic device can continue to view the first interface element and the second interface element in the first interface.

举例说明,结合图2,图像元素11、图像元素12、文字元素13以及控件元素14中包括至少部分重叠的图像元素11和图像元素12,则在用户进行第一输入之后,如图8A所示,电子设备可以将图像元素12的透明度更新为100%,以显示图像元素11的全部内容,并对于图像元素11进行截图;在对于图像元素11进行截图之后,如图8B所示,电子设备可以将图像元素11的透明度更新为100%,并将图像元素12的透明度更新为0%,以显示图像元素12的全部内容,并对于图像元素12进行截图。For example, with reference to Figure 2, image element 11, image element 12, text element 13 and control element 14 include at least partially overlapping image element 11 and image element 12, then after the user performs the first input, as shown in Figure 8A , the electronic device can update the transparency of the image element 12 to 100% to display the entire content of the image element 11 and take a screenshot of the image element 11; after taking a screenshot of the image element 11, as shown in Figure 8B, the electronic device can Update the transparency of image element 11 to 100%, and update the transparency of image element 12 to 0% to display the entire content of image element 12, and take a screenshot of image element 12.

如此可知,由于在第一界面元素和第二界面元素至少部分重叠的情况下,在电子设备对于第一界面元素和第二界面元素中的每个界面元素进行截图之前,电子设备可以更新第一界面元素或第二界面元素的透明度,以避免第一界面元素覆盖第二界面元素的内容,或避免第二界面元素覆盖第一界面元素的内容,因此,可以避免出现进行截图得到的截屏图像中的第一界面元素或第二界面元素的内容不完整的情况,如此,可以提高电子设备的截图效果。It can be seen that, since the first interface element and the second interface element at least partially overlap, before the electronic device takes a screenshot of each of the first interface element and the second interface element, the electronic device can update the first interface element. The transparency of the interface element or the second interface element is to prevent the first interface element from covering the content of the second interface element, or to prevent the second interface element from covering the content of the first interface element. Therefore, it is possible to avoid appearing in the screenshot image obtained by taking a screenshot. The content of the first interface element or the second interface element is incomplete. In this way, the screenshot effect of the electronic device can be improved.

在本申请的一些实施例中,上述至少一个界面元素中包括:悬浮界面元素。可选地,结合图1,如图9所示,上述步骤104具体可以通过下述的步骤104d。In some embodiments of the present application, the above-mentioned at least one interface element includes: a suspended interface element. Optionally, with reference to Figure 1, as shown in Figure 9, the above-mentioned step 104 may specifically include the following step 104d.

步骤104d、在N个界面元素中至少一个界面元素的元素类型为第一预设类型的情况下,电子设备响应于第一输入,更新悬浮界面元素的透明度,以显示第一界面的全部背景内容,并对于第一界面进行截图。Step 104d. When the element type of at least one interface element among the N interface elements is the first preset type, the electronic device responds to the first input and updates the transparency of the suspended interface element to display all background content of the first interface. , and take a screenshot of the first interface.

在本申请的一些实施例中,上述第一预设类型可以为图像类型和窗口类型。In some embodiments of the present application, the above-mentioned first preset type may be an image type and a window type.

在本申请的一些实施例中,电子设备可以将悬浮界面元素的透明度更新为上述第一透明度,以显示第一界面的全部背景内容。In some embodiments of the present application, the electronic device can update the transparency of the suspended interface element to the above-mentioned first transparency to display all background content of the first interface.

举例说明,结合图3,上述至少一个界面元素包括界面15的背景内容和窗口元素16,该窗口元素16和界面15的背景内容至少部分重叠,则在用户进行第一输入之后,如图10所示,电子设备可以将窗口原16的透明度更新为100%,以显示界面15的全部背景内容,并对于第一界面进行截图。For example, with reference to Figure 3, the above-mentioned at least one interface element includes the background content of the interface 15 and the window element 16. The window element 16 and the background content of the interface 15 at least partially overlap, then after the user performs the first input, as shown in Figure 10 It is shown that the electronic device can update the original transparency of the window 16 to 100% to display all the background content of the interface 15 and take a screenshot of the first interface.

在本申请的一些实施例中,在电子设备对于第一界面进行截图之后,电子设备还可以将悬浮界面元素的透明度更新为该悬浮界面元素的初始透明度(例如第二透明度),从而电子设备可以继续在第一界面中查看该悬浮界面元素。In some embodiments of the present application, after the electronic device takes a screenshot of the first interface, the electronic device can also update the transparency of the floating interface element to the initial transparency (for example, the second transparency) of the floating interface element, so that the electronic device can Continue to view the floating interface element in the first interface.

在本申请的一些实施例中,在电子设备对于第一界面进行截图之后,电子设备还可以更新第一界面和悬浮界面元素的透明度,以显示该悬浮界面元素的全部内容,并对于该悬浮界面元素进行截图。In some embodiments of the present application, after the electronic device takes a screenshot of the first interface, the electronic device can also update the transparency of the first interface and the floating interface element to display the entire content of the floating interface element, and for the floating interface element to take a screenshot.

需要说明的是,针对电子设备更新第一界面和悬浮界面元素的透明度的说明,可以参考上述实施例中电子设备更新第一界面元素和第二界面元素的具体描述,本申请实施例在此不再赘述。It should be noted that for the description of the electronic device updating the transparency of the first interface element and the floating interface element, reference may be made to the specific description of the electronic device updating the first interface element and the second interface element in the above embodiments. The embodiments of the present application will not be used here. Again.

如此可知,由于在悬浮界面元素覆盖第一界面的背景内容的情况下,在电子设备对于第一界面的背景内容进行截图之前,电子设备可以更新该悬浮界面元素的透明度,以避免该悬浮界面元素覆盖第一界面的背景内容的情况,因此,可以避免出现进行截图得到的截屏图像中该第一界面的背景内容不完整的情况,如此,可以提高电子设备的截图效果。It can be seen that, when the floating interface element covers the background content of the first interface, before the electronic device takes a screenshot of the background content of the first interface, the electronic device can update the transparency of the floating interface element to avoid the floating interface element Covering the background content of the first interface, therefore, can avoid the situation where the background content of the first interface is incomplete in the screenshot image obtained by taking a screenshot. In this way, the screenshot effect of the electronic device can be improved.

本申请实施例中,在电子设备对于至少一个界面元素进行截图之后,可能会出现用户想要从悬浮窗口元素的截屏图像中截取部分图像区域的情况,此时电子设备可以先显示该悬浮窗口元素的截屏图像,并根据用户的输入,从该悬浮窗口元素的截屏图像中截取用户想要的图像区域,以下将举例说明。In the embodiment of the present application, after the electronic device takes a screenshot of at least one interface element, there may be a situation where the user wants to capture part of the image area from the screenshot of the floating window element. In this case, the electronic device can first display the floating window element. The screenshot image is taken, and based on the user's input, the image area desired by the user is captured from the screenshot image of the floating window element. An example will be given below.

在本申请的一些实施例中,上述至少一个界面元素中包括悬浮窗口元素。可选地,在上述步骤104之后,本申请实施例提供的截图方法还可以包括301至步骤303。In some embodiments of the present application, the above-mentioned at least one interface element includes a floating window element. Optionally, after the above step 104, the screenshot method provided by the embodiment of the present application may also include steps 301 to 303.

步骤301、电子设备显示目标截屏图像。Step 301: The electronic device displays the target screenshot image.

本申请实施例中,上述目标截屏图像是对于悬浮窗口元素进行截图得到的,该目标截屏图像中包括M个第一图像区域,每个第一图像区域分别为:悬浮窗口元素中的一个目标窗口元素对应在目标截屏图像中的图像区域,M为正整数。In the embodiment of the present application, the above target screenshot image is obtained by taking a screenshot of the floating window element. The target screenshot image includes M first image areas, and each first image area is: a target window in the floating window element. The element corresponds to the image area in the target screenshot image, and M is a positive integer.

在本申请的一些实施例中,电子设备可以将第一界面更新为第二界面,该第二界面中包括至少一个截屏图像,每个截屏图像分别为电子设备对于至少一个界面元素中的一个界面元素进行截图得到的,该至少一个截屏图像中包括目标截屏图像。In some embodiments of the present application, the electronic device can update the first interface to a second interface. The second interface includes at least one screenshot image, and each screenshot image is an interface of the electronic device for at least one interface element. The at least one screenshot image includes the target screenshot image.

在本申请的一些实施例中,在上述步骤301之前,本申请实施例提供的截图方法还可以包括下述的步骤401至步骤403。In some embodiments of the present application, before the above step 301, the screenshot method provided by the embodiment of the present application may also include the following steps 401 to 403.

步骤401、电子设备识别悬浮窗口元素中的L个第一窗口元素的元素类型。Step 401: The electronic device identifies the element types of the L first window elements among the floating window elements.

本申请实施例中,L为正整数。In the embodiment of the present application, L is a positive integer.

在本申请的一些实施例中,电子设备可以先获取L个第一窗口元素一一对应的L个可查询属性,并从每个可查询属性中获取对应的第一窗口元素的元素类型。In some embodiments of the present application, the electronic device may first obtain L queryable attributes corresponding to the L first window elements, and obtain the element type of the corresponding first window element from each queryable attribute.

需要说明的是,针对电子设备从每个可查询属性中获取对应的第一窗口元素的元素类型的说明,可以参考上述实施例中电子设备从每个可查询属性中获取对应的界面元素的元素类型的具体描述,本申请实施例在此不再赘述。It should be noted that for the description of the element type of the corresponding first window element obtained by the electronic device from each queryable attribute, reference may be made to the above embodiment in which the electronic device obtains the element of the corresponding interface element from each queryable attribute. The specific description of the type will not be described again in the embodiment of this application.

步骤402、电子设备获取L个第一窗口元素中元素类型为第二预设类型的M个目标窗口元素在悬浮窗口元素中的M个第二坐标。Step 402: The electronic device obtains M second coordinates in the floating window elements of the M target window elements whose element type is the second preset type among the L first window elements.

在本申请的一些实施例中,上述第二预设类型可以包括以下至少一项:图像元素类型、窗口元素类型。其中,该第二预设类型可以与第一预设类型相同。In some embodiments of the present application, the above-mentioned second preset type may include at least one of the following: image element type, window element type. The second preset type may be the same as the first preset type.

本申请实施例中,上述M个第二坐标中的每个第二坐标分别对应一个目标窗口元素。In this embodiment of the present application, each of the M second coordinates corresponds to a target window element.

在本申请的一些实施例中,针对M个目标窗口元素中的每个目标窗口元素,一个目标窗口元素在悬浮窗口元素中的第二坐标具体可以为:该一个目标窗口元素的各个顶点在第二坐标系中的坐标。其中,该第二坐标系为:以该悬浮窗口元素的第五边缘线为x轴,第六边缘线为y轴建立的直角坐标系。该第五边缘线和第六边缘线为相邻的边缘线。In some embodiments of the present application, for each of the M target window elements, the second coordinate of a target window element in the suspended window element may be: each vertex of the target window element is at the Coordinates in the second coordinate system. Wherein, the second coordinate system is a rectangular coordinate system established with the fifth edge line of the floating window element as the x-axis and the sixth edge line as the y-axis. The fifth edge line and the sixth edge line are adjacent edge lines.

在本申请的一些实施例中,电子设备可以从每个目标窗口元素对应的属性值中,获取每个目标窗口元素在悬浮窗口元素中的第二坐标,以获取M个第二坐标。In some embodiments of the present application, the electronic device can obtain the second coordinates of each target window element in the suspended window element from the attribute value corresponding to each target window element, to obtain M second coordinates.

步骤403、电子设备根据M个第二坐标,在目标截屏图像上确定M个第一图像区域。Step 403: The electronic device determines M first image areas on the target screenshot image according to the M second coordinates.

本申请实施例中,上述M个第一图像区域中的每个第一图像区域分别对应一个第二坐标。In this embodiment of the present application, each of the M first image areas corresponds to a second coordinate.

在本申请的一些实施例中,针对M个第二坐标中的每个第二坐标,电子设备可以将目标截屏图像上的一个第二坐标所对应的图像区域确定为一个第一图像区域,以此类推,以确定M个第一图像区域。In some embodiments of the present application, for each of the M second coordinates, the electronic device may determine the image area corresponding to a second coordinate on the target screenshot image as a first image area, so as to By analogy, M first image areas are determined.

需要说明的是,上述“一个第二坐标所对应的图像区域”可以理解为:该一个第二坐标中的各个顶点在第二坐标系中的坐标所围成的图像区域。It should be noted that the above "image area corresponding to a second coordinate" can be understood as: an image area surrounded by coordinates of each vertex in the second coordinate system in the second coordinate system.

在本申请的一些实施例中,在电子设备确定M个第一图像区域之后,电子设备可以采用第二标记方式,标记该M个第一图像区域。In some embodiments of the present application, after the electronic device determines the M first image areas, the electronic device may use a second marking method to mark the M first image areas.

可选地,上述第二标记方式可以包括以下任一项:高亮标记方式、显示提示图像标记方式、虚线框标记方式、彩色标记方式、灰度标记方式、以预设透明度标记方式以及闪烁标记方式等。Optionally, the above-mentioned second marking method may include any of the following: highlight marking method, display prompt image marking method, dashed box marking method, color marking method, grayscale marking method, marking method with preset transparency, and flashing mark method etc.

可以理解,电子设备可以标记该M个第一图像区域,以使得用户可以获知该M个第一图像区域在目标截屏图像上所处的位置。It can be understood that the electronic device can mark the M first image areas so that the user can know the positions of the M first image areas on the target screenshot image.

本申请实施例中,由于用户在截取悬浮窗口元素的内容时,常需求截取该悬浮窗口元素中的第二预设类型的窗口元素,因此,电子设备可以直接识别该悬浮窗口元素中的全部窗口元素(即L个第一窗口元素)的元素类型,并获取该全部窗口元素中用户常需求截取的M个目标窗口元素在悬浮窗口元素中的第二坐标,从而电子设备可以直接确定在目标截屏图像上该M个目标窗口元素所处的图像区域(即M个第一图像区域),进而用户可以直接对该M个第一图像区域中的图像区域(例如目标图像区域)进行输入,以使得电子设备可以截取该目标图像区域。In the embodiment of the present application, since users often need to intercept the second preset type of window element in the floating window element when intercepting the content of the floating window element, the electronic device can directly identify all windows in the floating window element. element type (i.e., L first window elements), and obtain the second coordinates of the M target window elements in the floating window element that users often need to capture among all window elements, so that the electronic device can directly determine the target screenshot The image area on the image where the M target window elements are located (i.e., the M first image areas), and the user can directly input the image area (such as the target image area) among the M first image areas, so that The electronic device can capture the target image area.

如此可知,由于电子设备可以直接获取悬浮窗口元素中用户常需求截取的M个目标窗口元素在悬浮窗口元素中的第二坐标,并直接在目标截屏图像上确定每个目标窗口元素在目标截屏图像上的第一图像区域,从而用户可以直接对某个图像区域进行输入,以使得电子设备可以截取该某个图像区域,而无需用户进行多次操作,因此,可以简化用户截取截屏图像中的图像区域的过程中用户的操作,且减少耗时。It can be seen that because the electronic device can directly obtain the second coordinates of the M target window elements in the floating window element that users often need to capture in the floating window element, and directly determine the position of each target window element in the target screenshot image on the target screenshot image The first image area on the screen, so that the user can directly input a certain image area, so that the electronic device can capture the certain image area without the user having to perform multiple operations. Therefore, it can simplify the user to capture the image in the screenshot image. The user's operations are carried out in the region and the time is reduced.

并且地,由于电子设备可以根据M个目标窗口元素在悬浮窗口元素中的第二坐标,直接确定目标截屏图像上该M个目标窗口元素所处的第一图像区域,而无需电子设备对目标截屏图像进行图像识别,因此,可以减少电子设备的运算量。Moreover, because the electronic device can directly determine the first image area where the M target window elements are located on the target screenshot image according to the second coordinates of the M target window elements in the floating window element, there is no need for the electronic device to take a screenshot of the target. Image recognition is performed on the image, thus reducing the computational load of the electronic device.

步骤302、电子设备接收用户对M个第一图像区域中的目标图像区域的第二输入。Step 302: The electronic device receives the user's second input to the target image area among the M first image areas.

在本申请的一些实施例中,上述第二输入可以为用户对目标图像区域的输入。In some embodiments of the present application, the above-mentioned second input may be a user's input to the target image area.

可选地,上述第二输入可以包括但不限于:用户在显示屏中的触控输入,或用户输入的语音指令,或用户通过手指或者手写笔等触控装置输入的特定手势,或其他可行性输入,具体的可以根据实际使用需求确定,本申请实施例在此不作限定。其中,上述特定手势可以为单击手势、滑动手势、拖动手势、压力识别手势、长按手势、面积变化手势、双按手势、双击手势中的任意一种;本申请实施例中的点击输入可以为单击输入、双击输入或任意次数的点击输入等,还可以为长按输入或短按输入。Optionally, the above-mentioned second input may include but is not limited to: the user's touch input on the display screen, or the voice command input by the user, or the specific gesture input by the user through a touch device such as a finger or a stylus, or other feasible Specific input can be determined according to actual usage requirements, and the embodiments of the present application are not limited here. Wherein, the above-mentioned specific gesture may be any one of a click gesture, a sliding gesture, a drag gesture, a pressure recognition gesture, a long press gesture, an area change gesture, a double press gesture, and a double click gesture; the click input in the embodiment of the present application It can be single-click input, double-click input or any number of click inputs, etc. It can also be long-press input or short-press input.

例如,上述第二输入可以为:用户对目标图像区域的触控输入。For example, the above-mentioned second input may be: the user's touch input to the target image area.

步骤303、电子设备响应于第二输入,从目标截屏图像中截取目标图像区域。Step 303: In response to the second input, the electronic device captures the target image area from the target screenshot image.

在本申请的一些实施例中,电子设备可以分别根据目标图像区域对应的第二坐标,对目标截屏图像进行剪裁处理,以截取目标图像区域。In some embodiments of the present application, the electronic device may perform cropping processing on the target screenshot image according to the second coordinates corresponding to the target image area to capture the target image area.

需要说明的是,针对电子设备对目标截屏图像进行剪裁处理的说明,可以参考相关技术中的具体描述,本申请实施例在此不予赘述。It should be noted that, for instructions on cropping the target screenshot image by the electronic device, reference may be made to the specific descriptions in the related art, and the embodiments of the present application will not be repeated here.

如此可知,由于在电子设备显示悬浮窗口元素对应的目标截屏图像的情况下,电子设备可以根据用户对该目标截屏图像的M个第一图像区域中的目标图像区域的一次输入,直接从该目标截屏图像中截取该目标图像区域,而无需用户进行多次输入,因此,可以简化在用户截取截屏图像中的图像区域的过程中用户的操作,且减少耗时。It can be seen that, when the electronic device displays the target screenshot image corresponding to the floating window element, the electronic device can directly obtain the target screenshot image from the target image area according to one input from the user of the M first image areas of the target screenshot image. The target image area is captured in the screenshot image without requiring multiple inputs by the user. Therefore, the user's operation in the process of capturing the image area in the screenshot image can be simplified and time-consuming can be reduced.

本申请实施例提供的截图方法,执行主体可以为截图装置。本申请实施例中以截图装置执行截图方法为例,说明本申请实施例提供的截图装置的。For the screenshot method provided by the embodiment of the present application, the execution subject may be a screenshot device. In the embodiment of the present application, a screenshot device performing a screenshot method is used as an example to illustrate the screenshot device provided by the embodiment of the present application.

图11示出了本申请实施例中涉及的截图装置的一种可能的结构示意图。如图11所示,本申请实施例提供的截图装置50可以包括:显示模块51、接收模块52以及处理模块53。Figure 11 shows a possible structural diagram of the screenshot device involved in the embodiment of the present application. As shown in FIG. 11 , the screenshot device 50 provided by the embodiment of the present application may include: a display module 51 , a receiving module 52 and a processing module 53 .

其中,显示模块51,用于显示第一界面,该第一界面中包括N个界面元素,N为正整数。接收模块52,用于接收用户的第一输入。处理模块53,用于识别N个界面元素的元素类型;并在该N个界面元素中至少一个界面元素的元素类型为第一预设类型的情况下,响应于接收模块52接收的第一输入,对于至少一个界面元素进行截图。The display module 51 is used to display a first interface, which includes N interface elements, where N is a positive integer. The receiving module 52 is used to receive the user's first input. The processing module 53 is configured to identify the element types of the N interface elements; and when the element type of at least one interface element among the N interface elements is a first preset type, respond to the first input received by the receiving module 52 , take a screenshot of at least one interface element.

本申请实施例提供一种截图装置,由于在显示第一界面的N个界面元素的情况下,截图装置可以根据用户的一次输入,识别该N个界面元素的元素类型,并在该N个界面元素中至少一个界面元素的元素类型为用户常需求的第一预设类型的情况下,直接对于用户常需求的至少一个界面元素进行截图,以得到用户需求的界面元素的截屏图像,而无需用户进行多次输入,因此,可以简化在触发截图装置截取用户需求的界面元素的截屏图像的过程中用户的操作、且减少耗时,如此,可以提高截图装置截取用户需求的截屏图像的效率。Embodiments of the present application provide a screenshot device. When N interface elements of the first interface are displayed, the screenshot device can identify the element types of the N interface elements based on an input from the user, and display the N interface elements on the N interface elements. When the element type of at least one interface element among the elements is the first preset type often required by the user, directly take a screenshot of at least one interface element frequently required by the user to obtain a screenshot image of the interface element required by the user without requiring the user. By performing multiple inputs, the user's operation in the process of triggering the screenshot device to capture the screenshot image of the interface element required by the user can be simplified and time-consuming can be reduced. In this way, the efficiency of the screenshot device in capturing the screenshot image required by the user can be improved.

在一种可能的实现方式中,结合图11,如图12所示,本申请实施例提供的截图装置50还可以包括:获取模块54。其中,获取模块54,还用于在处理模块53识别N个界面元素的元素类型之后,在N个界面元素中至少一个界面元素的元素类型为第一预设类型的情况下,获取至少一个界面元素的尺寸和在第一界面中的第一坐标。上述处理模块53,具体用于响应于第一输入,根据尺寸和第一坐标,对于至少一个界面元素进行截图。In a possible implementation manner, as shown in FIG. 12 in conjunction with FIG. 11 , the screenshot device 50 provided by the embodiment of the present application may also include: an acquisition module 54 . Among them, the acquisition module 54 is also configured to acquire at least one interface after the processing module 53 identifies the element types of the N interface elements and when the element type of at least one interface element among the N interface elements is the first preset type. The element's dimensions and first coordinate in the first interface. The above-mentioned processing module 53 is specifically configured to take a screenshot of at least one interface element according to the size and the first coordinate in response to the first input.

在一种可能的实现方式中,上述至少一个界面元素中包括:至少部分重叠的第一界面元素和第二界面元素。上述显示模块51,还用于响应于第一输入,更新第二界面元素的透明度,以显示第一界面元素的全部内容。上述处理模块53,具体用于对于显示模块51显示的第一界面元素进行截图。上述显示模块51,还用于更新第一界面元素和第二界面元素的透明度,以显示第二界面元素的全部内容。上述处理模块53,具体用于对于显示模块51显示的第二界面元素进行截图。In a possible implementation, the at least one interface element includes: a first interface element and a second interface element that at least partially overlap. The above-mentioned display module 51 is also used to update the transparency of the second interface element in response to the first input to display the entire content of the first interface element. The above-mentioned processing module 53 is specifically used to take a screenshot of the first interface element displayed by the display module 51 . The above-mentioned display module 51 is also used to update the transparency of the first interface element and the second interface element to display the entire content of the second interface element. The above-mentioned processing module 53 is specifically used to take a screenshot of the second interface element displayed by the display module 51 .

在一种可能的实现方式中,上述至少一个界面元素中包括:悬浮界面元素。上述显示模块51,还用于响应于第一输入,更新悬浮界面元素的透明度,以显示第一界面的全部背景内容。上述处理模块53,具体用于对于显示模块51显示的第一界面进行截图。In a possible implementation manner, the above at least one interface element includes: a suspended interface element. The above-mentioned display module 51 is also used to update the transparency of the suspended interface element in response to the first input to display all background content of the first interface. The above-mentioned processing module 53 is specifically used to take a screenshot of the first interface displayed by the display module 51 .

在一种可能的实现方式中,上述至少一个界面元素中包括悬浮窗口元素。上述显示模块51,还用于在处理模块53响应于第一输入,对于至少一个界面元素进行截图之后,显示目标截屏图像,该目标截屏图像是对于悬浮窗口元素进行截图得到的,该目标截屏图像中包括M个第一图像区域,每个第一图像区域分别为:悬浮窗口元素中的一个目标窗口元素对应在目标截屏图像中的图像区域,M为正整数。上述接收模块52,还用于接收用户对M个第一图像区域中的目标图像区域的第二输入。上述处理模块53,还用于响应于接收模块52接收的第二输入,从目标截屏图像中截取目标图像区域。In a possible implementation manner, the above-mentioned at least one interface element includes a floating window element. The above-mentioned display module 51 is also configured to display a target screenshot image after the processing module 53 takes a screenshot of at least one interface element in response to the first input. The target screenshot image is obtained by taking a screenshot of the floating window element. The target screenshot image includes M first image areas, each first image area is respectively: a target window element in the floating window element corresponds to the image area in the target screenshot image, M is a positive integer. The above-mentioned receiving module 52 is also used to receive the user's second input to the target image area among the M first image areas. The above-mentioned processing module 53 is also configured to capture the target image area from the target screenshot image in response to the second input received by the receiving module 52 .

在一种可能的实现方式中,上述处理模块53,还用于在显示模块51显示目标截屏图像之前,识别悬浮窗口元素中的L个第一窗口元素的元素类型;L为正整数。结合图11,如图12所示,本申请实施例提供的截图装置50还可以包括:获取模块54。其中,获取模块54,用于获取处理模块53识别的L个第一窗口元素中元素类型为第二预设类型的M个目标窗口元素在悬浮窗口元素中的M个第二坐标;每个第二坐标分别对应一个目标窗口元素。上述处理模块53,还用于根据获取模块54获取的M个第二坐标,在目标截屏图像上确定M个第一图像区域;每个第一图像区域分别对应一个第二坐标。In a possible implementation, the above-mentioned processing module 53 is also used to identify the element types of the L first window elements in the floating window elements before the display module 51 displays the target screenshot image; L is a positive integer. With reference to FIG. 11 , as shown in FIG. 12 , the screenshot device 50 provided by the embodiment of the present application may also include: an acquisition module 54 . Among them, the acquisition module 54 is used to acquire the M second coordinates in the floating window element of the M target window elements whose element type is the second preset type among the L first window elements identified by the processing module 53; each The two coordinates respectively correspond to a target window element. The above-mentioned processing module 53 is also used to determine M first image areas on the target screenshot image according to the M second coordinates acquired by the acquisition module 54; each first image area corresponds to one second coordinate respectively.

本申请实施例中的截图装置可以是电子设备,也可以是电子设备中的部件,例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(mobile internetdevice,MID)、增强现实(augmentedreality,AR)/虚拟现实(virtualreality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(ultra-mobilepersonalcomputer,UMPC)、上网本或者个人数字助理(personaldigitalassistant,PDA)等,还可以为服务器、网络附属存储器(networkattachedstorage,NAS)、个人计算机(personalcomputer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The screenshot device in the embodiment of the present application may be an electronic device or a component of the electronic device, such as an integrated circuit or chip. The electronic device may be a terminal or other devices other than the terminal. For example, the electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a mobile Internet device (MID), an augmented reality (AR)/virtual reality (VR) device, Robots, wearable devices, ultra-mobile personal computers (UMPC), netbooks or personal digital assistants (Personal Digital Assistant, PDA), etc., can also be servers, network attached storage (NAS), personal computers (PC) ), television (TV), teller machine or self-service machine, etc., the embodiments of this application are not specifically limited.

本申请实施例中的截图装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为iOS操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The screenshot device in the embodiment of the present application may be a device with an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of this application.

本申请实施例提供的截图装置能够实现图1至图10的方法实施例实现的各个过程,为避免重复,这里不再赘述。The screenshot device provided by the embodiment of the present application can implement various processes implemented by the method embodiments of Figures 1 to 10. To avoid repetition, they will not be described again here.

在本申请的一些实施例中,如图13所示,本申请实施例还提供一种电子设备60,包括处理器61和存储器62,存储器62上存储有可在所述处理器61上运行的程序或指令,该程序或指令被处理器61执行时实现上述截图方法实施例的各个过程步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。In some embodiments of the present application, as shown in Figure 13, the embodiment of the present application also provides an electronic device 60, including a processor 61 and a memory 62. The memory 62 stores programs that can run on the processor 61. The program or instruction, when executed by the processor 61, implements each process step of the above screenshot method embodiment and can achieve the same technical effect. To avoid duplication, it will not be described again here.

需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

图14为实现本申请实施例的一种电子设备的硬件结构示意图。Figure 14 is a schematic diagram of the hardware structure of an electronic device that implements an embodiment of the present application.

该电子设备100包括但不限于:射频单元101、网络模块102、音频输出单元103、输入单元104、传感器105、显示单元106、用户输入单元107、接口单元108、存储器109、以及处理器110等部件。The electronic device 100 includes but is not limited to: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, etc. part.

本领域技术人员可以理解,电子设备100还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器110逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图14中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 100 may also include a power supply (such as a battery) that supplies power to various components. The power supply may be logically connected to the processor 110 through a power management system, thereby managing charging, discharging, and function through the power management system. Consumption management and other functions. The structure of the electronic device shown in Figure 14 does not constitute a limitation of the electronic device. The electronic device may include more or less components than shown in the figure, or combine certain components, or arrange different components, which will not be described again here. .

其中,显示单元106,用于显示第一界面,该第一界面中包括N个界面元素,N为正整数。The display unit 106 is used to display a first interface, which includes N interface elements, where N is a positive integer.

用户输入单元107,用于接收用户的第一输入。The user input unit 107 is used to receive the user's first input.

处理器110,用于识别N个界面元素的元素类型;在N个界面元素中至少一个界面元素的元素类型为第一预设类型的情况下,响应于第一输入,对于至少一个界面元素进行截图。The processor 110 is configured to identify the element types of the N interface elements; when the element type of at least one interface element among the N interface elements is a first preset type, in response to the first input, perform a screenshot.

本申请实施例提供一种电子设备,由于在显示第一界面的N个界面元素的情况下,电子设备可以根据用户的一次输入,识别该N个界面元素的元素类型,并在该N个界面元素中至少一个界面元素的元素类型为用户常需求的第一预设类型的情况下,直接对于用户常需求的至少一个界面元素进行截图,以得到用户需求的界面元素的截屏图像,而无需用户进行多次输入,因此,可以简化在触发电子设备截取用户需求的界面元素的截屏图像的过程中用户的操作、且减少耗时,如此,可以提高电子设备截取用户需求的截屏图像的效率。Embodiments of the present application provide an electronic device. When N interface elements of a first interface are displayed, the electronic device can identify the element types of the N interface elements based on an input from the user, and display the N interface elements on the N interface elements. When the element type of at least one interface element among the elements is the first preset type often required by the user, directly take a screenshot of at least one interface element frequently required by the user to obtain a screenshot image of the interface element required by the user without requiring the user. By performing multiple inputs, the user's operation in the process of triggering the electronic device to intercept the screenshot image of the interface element required by the user can be simplified and time-consuming can be reduced. In this way, the efficiency of the electronic device in intercepting the screenshot image required by the user can be improved.

在本申请的一些实施例中,处理器110,还用于在N个界面元素中至少一个界面元素的元素类型为第一预设类型的情况下,获取至少一个界面元素的尺寸和在第一界面中的第一坐标。In some embodiments of the present application, the processor 110 is also configured to obtain the size of at least one interface element and the first The first coordinate in the interface.

处理器110,具体用于响应于第一输入,根据尺寸和第一坐标,对于至少一个界面元素进行截图。The processor 110 is specifically configured to take a screenshot of at least one interface element according to the size and the first coordinate in response to the first input.

在本申请的一些实施例中,上述至少一个界面元素中包括:至少部分重叠的第一界面元素和第二界面元素。In some embodiments of the present application, the above-mentioned at least one interface element includes: a first interface element and a second interface element that at least partially overlap.

处理器110,具体用于响应于第一输入,更新第二界面元素的透明度,以显示第一界面元素的全部内容,并对于第一界面元素进行截图;并更新第一界面元素和第二界面元素的透明度,以显示第二界面元素的全部内容,并对于第二界面元素进行截图。The processor 110 is specifically configured to respond to the first input, update the transparency of the second interface element to display the entire content of the first interface element, and take a screenshot of the first interface element; and update the first interface element and the second interface The transparency of the element to display the entire content of the second interface element and take a screenshot of the second interface element.

在本申请的一些实施例中,上述至少一个界面元素中包括:悬浮界面元素。In some embodiments of the present application, the above-mentioned at least one interface element includes: a suspended interface element.

处理器110,具体用于响应于第一输入,更新悬浮界面元素的透明度,以显示第一界面的全部背景内容,并对于第一界面进行截图。The processor 110 is specifically configured to respond to the first input, update the transparency of the suspended interface element to display all background content of the first interface, and take a screenshot of the first interface.

在本申请的一些实施例中,上述至少一个界面元素中包括悬浮窗口元素。In some embodiments of the present application, the above-mentioned at least one interface element includes a floating window element.

显示单元106,还用于显示目标截屏图像,该目标截屏图像是对于悬浮窗口元素进行截图得到的,该目标截屏图像中包括M个第一图像区域,每个第一图像区域分别为:悬浮窗口元素中的一个目标窗口元素对应在目标截屏图像中的图像区域,M为正整数。The display unit 106 is also used to display a target screenshot image. The target screenshot image is obtained by taking a screenshot of the floating window element. The target screenshot image includes M first image areas, and each first image area is: floating window. A target window element in the element corresponds to the image area in the target screenshot image, and M is a positive integer.

用户输入单元107,还用于接收用户对M个第一图像区域中的目标图像区域的第二输入。The user input unit 107 is also configured to receive a second input from the user to the target image area among the M first image areas.

处理器110,还用于响应于第二输入,从目标截屏图像中截取目标图像区域。The processor 110 is also configured to capture the target image area from the target screenshot image in response to the second input.

在本申请的一些实施例中,处理器110,还用于识别悬浮窗口元素中的L个第一窗口元素的元素类型;L为正整数;并获取L个第一窗口元素中元素类型为第二预设类型的M个目标窗口元素在悬浮窗口元素中的M个第二坐标;每个第二坐标分别对应一个目标窗口元素;以及,根据M个第二坐标,在目标截屏图像上确定M个第一图像区域;每个第一图像区域分别对应一个第二坐标。In some embodiments of the present application, the processor 110 is also used to identify the element type of the L first window elements among the floating window elements; L is a positive integer; and obtain the element type of the L first window elements. M second coordinates of M target window elements of two preset types in the floating window element; each second coordinate corresponds to a target window element; and, based on the M second coordinates, determine M on the target screenshot image first image areas; each first image area corresponds to a second coordinate.

应理解的是,本申请实施例中,输入单元104可以包括图形处理器(graphicsprocessing unit,GPU)1041和麦克风1042,图形处理器1041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元106可包括显示面板1061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板1061。用户输入单元107包括触控面板1071以及其他输入设备1072中的至少一种。触控面板1071,也称为触摸屏。触控面板1071可包括触摸检测装置和触摸控制器两个部分。其他输入设备1072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。It should be understood that in the embodiment of the present application, the input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The graphics processor 1041 is responsible for the image capture device (such as Process the image data of still pictures or videos obtained by the camera). The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 107 includes a touch panel 1071 and at least one of other input devices 1072 . Touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be described again here.

存储器109可用于存储软件程序以及各种数据。存储器109可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器109可以包括易失性存储器或非易失性存储器,或者,存储器109可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-onlymemory,ROM)、可编程只读存储器(programmableROM,PROM)、可擦除可编程只读存储器(erasablePROM,EPROM)、电可擦除可编程只读存储器(electricallyEPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(randomaccessmemory,RAM),静态随机存取存储器(staticRAM,SRAM)、动态随机存取存储器(dynamicRAM,DRAM)、同步动态随机存取存储器(synchronousDRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(doubledatarate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(enhancedSDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlinkDRAM,SLDRAM)和直接内存总线随机存取存储器(directrambusRAM,DRRAM)。本申请实施例中的存储器109包括但不限于这些和任意其它适合类型的存储器。Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, Image playback function, etc.) etc. Additionally, memory 109 may include volatile memory or nonvolatile memory, or memory 109 may include both volatile and nonvolatile memory. Among them, the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmableROM, PROM), erasable programmable read-only memory (erasablePROM, EPROM), electrically erasable read-only memory (EPROM), Programming read-only memory (electrically EPROM, EEPROM) or flash memory. Volatile memory can be random access memory (RAM), static random access memory (staticRAM, SRAM), dynamic random access memory (dynamicRAM, DRAM), synchronous dynamic random access memory (synchronousDRAM, SDRAM), Double data rate synchronous dynamic random access memory (doubledatarate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (enhancedSDRAM, ESDRAM), synchronous link dynamic random access memory (synchlinkDRAM, SLDRAM) and direct memory bus random access Memory (directrambusRAM, DRRAM). Memory 109 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.

处理器110可包括一个或多个处理单元;可选的,处理器110集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器110中。The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor, where the application processor mainly handles operations related to the operating system, user interface, application programs, etc., Modem processors mainly process wireless communication signals, such as baseband processors. It can be understood that the above modem processor may not be integrated into the processor 110 .

本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述截图方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application also provide a readable storage medium. Programs or instructions are stored on the readable storage medium. When the program or instructions are executed by a processor, each process of the above screenshot method embodiment is implemented, and the same process can be achieved. To avoid repetition, the technical effects will not be repeated here.

其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes computer readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disk or optical disk, etc.

本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述截图方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each of the above screenshot method embodiments. The process can achieve the same technical effect. To avoid repetition, it will not be described again here.

应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chips mentioned in the embodiments of this application may also be called system-on-chip, system-on-a-chip, system-on-a-chip or system-on-chip, etc.

本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如上述截图方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application provide a computer program product. The program product is stored in a storage medium. The program product is executed by at least one processor to implement each process of the above screenshot method embodiment, and can achieve the same technical effect. To avoid repetition, they will not be repeated here.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article or apparatus that includes that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, but may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions may be performed, for example, the methods described may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a computer software product that is essentially or contributes to the existing technology. The computer software product is stored in a storage medium (such as ROM/RAM, disk , optical disk), including several instructions to cause a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.

上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Inspired by this application, many forms can be made without departing from the purpose of this application and the scope protected by the claims, all of which fall within the protection of this application.

Claims (14)

Translated fromChinese
1.一种截图方法,其特征在于,所述方法包括:1. A screenshot method, characterized in that the method includes:显示第一界面,所述第一界面中包括N个界面元素,N为正整数;Display a first interface, which includes N interface elements, where N is a positive integer;接收用户的第一输入;Receive the user's first input;识别所述N个界面元素的元素类型;Identify the element types of the N interface elements;在所述N个界面元素中至少一个界面元素的元素类型为第一预设类型的情况下,响应于所述第一输入,对于所述至少一个界面元素进行截图。When the element type of at least one interface element among the N interface elements is the first preset type, in response to the first input, a screenshot is taken of the at least one interface element.2.根据权利要求1所述的方法,其特征在于,在所述识别所述N个界面元素的元素类型之后,所述方法还包括:2. The method according to claim 1, characterized in that, after identifying the element types of the N interface elements, the method further includes:在所述N个界面元素中所述至少一个界面元素的元素类型为所述第一预设类型的情况下,获取所述至少一个界面元素的尺寸和在所述第一界面中的第一坐标;When the element type of the at least one interface element among the N interface elements is the first preset type, obtain the size of the at least one interface element and the first coordinate in the first interface ;所述响应于所述第一输入,对于所述至少一个界面元素进行截图,包括:Taking a screenshot of the at least one interface element in response to the first input includes:响应于所述第一输入,根据所述尺寸和所述第一坐标,对于所述至少一个界面元素进行截图。In response to the first input, a screenshot is taken of the at least one interface element according to the size and the first coordinate.3.根据权利要求1所述的方法,其特征在于,所述至少一个界面元素中包括:至少部分重叠的第一界面元素和第二界面元素;3. The method of claim 1, wherein the at least one interface element includes: an at least partially overlapping first interface element and a second interface element;所述响应于所述第一输入,对于所述至少一个界面元素进行截图,包括:Taking a screenshot of the at least one interface element in response to the first input includes:响应于所述第一输入,更新所述第二界面元素的透明度,以显示所述第一界面元素的全部内容,并对于所述第一界面元素进行截图;In response to the first input, update the transparency of the second interface element to display the entire content of the first interface element, and take a screenshot of the first interface element;更新所述第一界面元素和所述第二界面元素的透明度,以显示所述第二界面元素的全部内容,并对于所述第二界面元素进行截图。Update the transparency of the first interface element and the second interface element to display the entire content of the second interface element, and take a screenshot of the second interface element.4.根据权利要求1所述的方法,其特征在于,所述至少一个界面元素中包括:悬浮界面元素;4. The method according to claim 1, characterized in that the at least one interface element includes: a suspended interface element;所述响应于所述第一输入,对于所述至少一个界面元素进行截图,包括:Taking a screenshot of the at least one interface element in response to the first input includes:响应于所述第一输入,更新所述悬浮界面元素的透明度,以显示所述第一界面的全部背景内容,并对于所述第一界面进行截图。In response to the first input, the transparency of the suspended interface element is updated to display all background content of the first interface, and a screenshot of the first interface is taken.5.根据权利要求1所述的方法,其特征在于,所述至少一个界面元素中包括悬浮窗口元素;5. The method according to claim 1, characterized in that the at least one interface element includes a floating window element;在所述响应于所述第一输入,对于所述至少一个界面元素进行截图之后,所述方法还包括:After taking a screenshot of the at least one interface element in response to the first input, the method further includes:显示目标截屏图像,所述目标截屏图像是对于所述悬浮窗口元素进行截图得到的,所述目标截屏图像中包括M个第一图像区域,每个第一图像区域分别为:所述悬浮窗口元素中的一个目标窗口元素对应在所述目标截屏图像中的图像区域,M为正整数;Display a target screenshot image. The target screenshot image is obtained by taking a screenshot of the floating window element. The target screenshot image includes M first image areas, and each first image area is: the floating window element. A target window element in corresponds to the image area in the target screenshot image, and M is a positive integer;接收用户对所述M个第一图像区域中的目标图像区域的第二输入;Receive a second input from the user to the target image area among the M first image areas;响应于所述第二输入,从所述目标截屏图像中截取所述目标图像区域。In response to the second input, the target image area is captured from the target screenshot image.6.根据权利要求5所述的方法,其特征在于,在所述显示目标截屏图像之前,所述方法还包括:6. The method according to claim 5, characterized in that, before displaying the target screenshot image, the method further includes:识别所述悬浮窗口元素中的L个第一窗口元素的元素类型;L为正整数;Identify the element types of the L first window elements in the floating window elements; L is a positive integer;获取所述L个第一窗口元素中元素类型为第二预设类型的M个目标窗口元素在所述悬浮窗口元素中的M个第二坐标;每个第二坐标分别对应一个目标窗口元素;Obtain M second coordinates in the floating window element of the M target window elements whose element type is the second preset type among the L first window elements; each second coordinate corresponds to a target window element respectively;根据所述M个第二坐标,在所述目标截屏图像上确定所述M个第一图像区域;每个第一图像区域分别对应一个第二坐标。According to the M second coordinates, the M first image areas are determined on the target screenshot image; each first image area corresponds to one second coordinate.7.一种截图装置,其特征在于,所述截图装置包括:显示模块、接收模块以及处理模块;7. A screenshot device, characterized in that the screenshot device includes: a display module, a receiving module and a processing module;所述显示模块,用于显示第一界面,所述第一界面中包括N个界面元素,N为正整数;The display module is used to display a first interface, the first interface includes N interface elements, N is a positive integer;所述接收模块,用于接收用户的第一输入;The receiving module is used to receive the user's first input;所述处理模块,用于识别所述N个界面元素的元素类型;并在所述N个界面元素中至少一个界面元素的元素类型为第一预设类型的情况下,响应于所述接收模块接收的所述第一输入,对于所述至少一个界面元素进行截图。The processing module is configured to identify the element types of the N interface elements; and when the element type of at least one interface element among the N interface elements is a first preset type, respond to the receiving module After receiving the first input, screenshot the at least one interface element.8.根据权利要求7所述的截图装置,其特征在于,所述截图装置还包括:获取模块;8. The screenshot device according to claim 7, wherein the screenshot device further comprises: an acquisition module;所述获取模块,还用于在所述处理模块识别所述N个界面元素的元素类型之后,在所述N个界面元素中所述至少一个界面元素的元素类型为所述第一预设类型的情况下,获取所述至少一个界面元素的尺寸和在所述第一界面中的第一坐标;The acquisition module is also configured to determine, after the processing module identifies the element types of the N interface elements, that the element type of at least one interface element among the N interface elements is the first preset type. In the case of , obtain the size of the at least one interface element and the first coordinate in the first interface;所述处理模块,具体用于响应于所述第一输入,根据所述尺寸和所述第一坐标,对于所述至少一个界面元素进行截图。The processing module is specifically configured to take a screenshot of the at least one interface element according to the size and the first coordinate in response to the first input.9.根据权利要求7所述的截图装置,其特征在于,所述至少一个界面元素中包括:至少部分重叠的第一界面元素和第二界面元素;9. The screenshot device according to claim 7, wherein the at least one interface element includes: a first interface element and a second interface element that at least partially overlap;所述显示模块,还用于响应于所述第一输入,更新所述第二界面元素的透明度,以显示所述第一界面元素的全部内容;The display module is also configured to update the transparency of the second interface element in response to the first input to display the entire content of the first interface element;所述处理模块,具体用于对于所述显示模块显示的所述第一界面元素进行截图;The processing module is specifically configured to take a screenshot of the first interface element displayed by the display module;所述显示模块,还用于更新所述第一界面元素和所述第二界面元素的透明度,以显示所述第二界面元素的全部内容;The display module is also used to update the transparency of the first interface element and the second interface element to display the entire content of the second interface element;所述处理模块,具体用于对于所述显示模块显示的所述第二界面元素进行截图。The processing module is specifically configured to take a screenshot of the second interface element displayed by the display module.10.根据权利要求7所述的截图装置,其特征在于,所述至少一个界面元素中包括:悬浮界面元素;10. The screenshot device according to claim 7, wherein the at least one interface element includes: a floating interface element;所述显示模块,还用于响应于所述第一输入,更新所述悬浮界面元素的透明度,以显示所述第一界面的全部背景内容;The display module is also configured to update the transparency of the suspended interface element in response to the first input to display all background content of the first interface;所述处理模块,具体用于对于所述显示模块显示的所述第一界面进行截图。The processing module is specifically configured to take a screenshot of the first interface displayed by the display module.11.根据权利要求7所述的截图装置,其特征在于,所述至少一个界面元素中包括悬浮窗口元素;11. The screenshot device according to claim 7, wherein the at least one interface element includes a floating window element;所述显示模块,还用于在所述处理模块响应于所述第一输入,对于所述至少一个界面元素进行截图之后,显示目标截屏图像,所述目标截屏图像是对于所述悬浮窗口元素进行截图得到的,所述目标截屏图像中包括M个第一图像区域,每个第一图像区域分别为:所述悬浮窗口元素中的一个目标窗口元素对应在所述目标截屏图像中的图像区域,M为正整数;The display module is also configured to display a target screenshot image of the floating window element after the processing module screenshots the at least one interface element in response to the first input. Obtained from screenshots, the target screenshot image includes M first image areas, and each first image area is: one target window element in the floating window element corresponds to the image area in the target screenshot image, M is a positive integer;所述接收模块,还用于接收用户对所述M个第一图像区域中的目标图像区域的第二输入;The receiving module is also configured to receive the user's second input to the target image area among the M first image areas;所述处理模块,还用于响应于所述接收模块接收的所述第二输入,从所述目标截屏图像中截取所述目标图像区域。The processing module is further configured to capture the target image area from the target screenshot image in response to the second input received by the receiving module.12.根据权利要求11所述的截图装置,其特征在于,12. The screenshot device according to claim 11, characterized in that:所述处理模块,还用于在所述显示模块显示所述目标截屏图像之前,识别所述悬浮窗口元素中的L个第一窗口元素的元素类型;L为正整数;The processing module is also configured to identify the element types of the L first window elements in the floating window elements before the display module displays the target screenshot image; L is a positive integer;所述截图装置还包括:获取模块;The screenshot device also includes: an acquisition module;所述获取模块,用于获取所述处理模块识别的所述L个第一窗口元素中元素类型为第二预设类型的M个目标窗口元素在所述悬浮窗口元素中的M个第二坐标;每个第二坐标分别对应一个目标窗口元素;The acquisition module is used to acquire M second coordinates in the floating window element of the M target window elements whose element type is the second preset type among the L first window elements identified by the processing module. ;Each second coordinate corresponds to a target window element;所述处理模块,还用于根据所述获取模块获取的所述M个第二坐标,在所述目标截屏图像上确定所述M个第一图像区域;每个第一图像区域分别对应一个第二坐标。The processing module is further configured to determine the M first image areas on the target screenshot image according to the M second coordinates acquired by the acquisition module; each first image area corresponds to a first image area. Two coordinates.13.一种电子设备,其特征在于,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至6中任一项所述的截图方法的步骤。13. An electronic device, characterized in that it includes a processor and a memory, the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the claims are implemented Steps of the screenshot method described in any one of 1 to 6.14.一种可读存储介质,其特征在于,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至6中任一项所述的截图方法的步骤。14. A readable storage medium, characterized in that a program or instructions are stored on the readable storage medium, and when the program or instructions are executed by a processor, the screenshot of any one of claims 1 to 6 is realized. Method steps.
CN202310895304.8A2023-07-202023-07-20 Screenshot method, device, electronic device and readable storage mediumPendingCN116893770A (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN202310895304.8ACN116893770A (en)2023-07-202023-07-20 Screenshot method, device, electronic device and readable storage medium
PCT/CN2024/106133WO2025016426A1 (en)2023-07-202024-07-18Screenshot method and apparatus, electronic device, and readable storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202310895304.8ACN116893770A (en)2023-07-202023-07-20 Screenshot method, device, electronic device and readable storage medium

Publications (1)

Publication NumberPublication Date
CN116893770Atrue CN116893770A (en)2023-10-17

Family

ID=88313343

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202310895304.8APendingCN116893770A (en)2023-07-202023-07-20 Screenshot method, device, electronic device and readable storage medium

Country Status (2)

CountryLink
CN (1)CN116893770A (en)
WO (1)WO2025016426A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2025016426A1 (en)*2023-07-202025-01-23维沃移动通信有限公司Screenshot method and apparatus, electronic device, and readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111641750B (en)*2020-05-192022-05-24Oppo广东移动通信有限公司Screen capture method, terminal and non-volatile computer readable storage medium
CN111638844A (en)*2020-05-222020-09-08维沃移动通信有限公司Screen capturing method and device and electronic equipment
CN115920390A (en)*2022-08-112023-04-07网易(杭州)网络有限公司Scene picture display control method and device and electronic equipment
CN115599484A (en)*2022-10-262023-01-13北京鸿合爱学教育科技有限公司(Cn) Screen capture method, screen capture device, screen capture device and computer storage medium
CN116893770A (en)*2023-07-202023-10-17维沃移动通信有限公司 Screenshot method, device, electronic device and readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2025016426A1 (en)*2023-07-202025-01-23维沃移动通信有限公司Screenshot method and apparatus, electronic device, and readable storage medium

Also Published As

Publication numberPublication date
WO2025016426A1 (en)2025-01-23

Similar Documents

PublicationPublication DateTitle
CN114327726A (en) Display control method, device, electronic device and storage medium
CN112765500A (en)Information searching method and device
WO2025016426A1 (en)Screenshot method and apparatus, electronic device, and readable storage medium
CN114089885A (en) Application icon management method, device, electronic device and readable storage medium
CN116756099A (en) Display method and device
CN117270719A (en)Interface display method, device, electronic equipment and readable storage medium
CN117311885A (en)Picture viewing method and device
WO2024046203A1 (en)Content display method and apparatus
WO2023231871A1 (en)Display control method and apparatus, and electronic device and readable storage medium
CN117170792A (en) Control display method and device, electronic equipment and readable storage medium
CN117111811A (en)Screenshot method and device, electronic equipment and readable storage medium
CN117055775A (en)Application program searching method, device, equipment and storage medium
WO2023160453A1 (en)Display control method and apparatus, electronic device and storage medium
WO2023093661A1 (en)Interface control method and apparatus, and electronic device and storage medium
CN116027950A (en) Screen capture method and screen capture device
CN114442881A (en)Information display method and device, electronic equipment and readable storage medium
CN114594897A (en) One-hand control method, control device, electronic device and storage medium of touch screen
CN114327730B (en) Image display method and electronic device
CN117170565A (en)Screen capturing method and device
CN117149038A (en) Image display method and image display device
CN117369934A (en)Interface display method, device, equipment and storage medium
CN119025006A (en) Search method, device, electronic device and readable storage medium
CN117707401A (en) Control methods, devices and electronic equipment
CN117555458A (en) Icon moving method, device, electronic device and readable storage medium
CN117555639A (en) Desktop assembly processing method, device and electronic equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp