Screenshot method and apparatus, electronic device, and readable storage medium

By identifying and responding to user input in electronic devices and directly taking screenshots of interface elements, it solves the problems of cumbersome user operations and low screenshot efficiency, and achieves a quick and easy screenshot process.

WO2025016426A1PCT designated stage expired Publication Date: 2025-01-23VIVO MOBILE COMM CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/106133
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-20
Filing Date
2024-07-18
Publication Date
2025-01-23

AI Technical Summary

Technical Problem

In electronic devices, users need multiple inputs to trigger screenshots of specific interface elements, resulting in cumbersome, time-consuming and low screenshot efficiency.

Method used

By displaying the first interface containing the N interface element, receiving the input of the user, identifying the type of interface element, and when at least one element type is the preset type, respond to the user input directly for screenshots.

Benefits of technology

The user operation is simplified, the number of inputs is reduced, and the screenshot efficiency is improved. Users can quickly obtain the required interface element screenshot image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024106133_23012025_PF_FP_ABST
    Figure CN2024106133_23012025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of electronics, and discloses a screenshot method and apparatus, an electronic device, and a readable storage medium. The method comprises: displaying a first interface, the first interface comprising N interface elements, and N being a positive integer; receiving a first input of a user; identifying 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, in response to the first input, carrying out screenshot on the at least one interface element.
Need to check novelty before this filing date? Find Prior Art

Description

Screenshot method, device, electronic device and readable storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese application No. 202310895304.8, filed on July 20, 2023, entitled “Screenshot method, device, electronic device and readable storage medium,” the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present application belongs to the field of electronic technology, and specifically relates to a screenshot method, device, electronic device and readable storage medium. Background Art

[0004] Typically, when an electronic device displays multiple interface elements at the same time, if a user wants to capture screenshots of certain interface elements, the user can input screenshots to the electronic device, such as inputting the power button and volume button of the electronic device, so that the electronic device can capture a screenshot of the screen displayed by the electronic device to obtain a screenshot of the screen. The user can then input the interface elements required by the user in the screenshot of the screen in sequence, so that the electronic device can capture a screenshot of each interface element in the screenshot of the screen in sequence, so that the user can obtain the screenshot of the interface element required by the user.

[0005] However, since the user needs to make multiple inputs to trigger the electronic device to sequentially capture screenshots of the interface elements required by the user from the screenshots of the displayed screen, the user's operation is cumbersome and time-consuming in the process of triggering the electronic device to capture screenshots of the interface elements required by the user. As a result, the efficiency of the electronic device in capturing the screenshots required by the user is low.

[0006] Summary of the Invention

[0007] 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.

[0008] In a first aspect, an embodiment of the present application provides a screenshot method, which includes: displaying a first interface, wherein the first interface includes N interface elements, where N is a positive integer; receiving a first input from a user; identifying 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, taking a screenshot of the at least one interface element in response to the first input.

[0009] In a second aspect, an embodiment of the present application provides a screenshot device, which includes: a display module, a receiving module, and a processing module. Among them, the display module is used to display a first interface, which includes N interface elements, where N is a positive integer. The receiving module is used to receive a first input from a user. The processing module is used to identify the element type 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, in response to the first input received by the receiving module, a screenshot of at least one interface element is taken.

[0010] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory, wherein 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 steps of the method described in the first aspect are implemented.

[0011] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0012] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the steps of the method described in the first aspect.

[0013] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the method described in the first aspect.

[0014] In an embodiment of the present application, an electronic device can display a first interface including N interface elements, and identify the element types of the N interface elements based on a first input from a user, so that the electronic device can take a screenshot of at least one interface element when the element type of at least one interface element among the N interface elements is a first preset type; wherein N is a positive integer. Since, when displaying N interface elements of the first interface, the electronic device can identify the element types of the N interface elements based on a single input from the user, and directly take a screenshot of at least one interface element required by the user when the element type of at least one interface element among the N interface elements is the first preset type required by the user, to obtain a screenshot image of the interface element required by the user, without requiring the user to input multiple times, the user's operation in the process of triggering the electronic device to take a screenshot image of the interface element required by the user can be simplified, and time consumption can be reduced, thereby improving the efficiency of the electronic device in taking screenshot images required by the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] FIG1 is a flowchart of a screenshot method according to some embodiments of the present application;

[0016] FIG2 is one of the interface schematic diagrams of the first interface provided by some embodiments of the present application;

[0017] FIG3 is a second schematic diagram of the first interface provided by some embodiments of the present application;

[0018] FIG4 is a second flow chart of a screenshot method provided in some embodiments of the present application;

[0019] FIG5 is a schematic diagram of the size of an interface element and a first coordinate in a first interface provided by some embodiments of the present application;

[0020] FIG6A is one of the schematic diagrams of the second interface provided by some embodiments of the present application;

[0021] FIG6B is a second schematic diagram of the second interface provided by some embodiments of the present application;

[0022] FIG7 is a third flowchart of a screenshot method provided in some embodiments of the present application;

[0023] FIG8A is a third schematic diagram of the first interface provided by some embodiments of the present application;

[0024] FIG8B is a fourth schematic diagram of the first interface provided by some embodiments of the present application;

[0025] FIG9 is a fourth flowchart of a screenshot method provided in some embodiments of the present application;

[0026] FIG10 is a fifth schematic diagram of the first interface provided by some embodiments of the present application;

[0027] FIG11 is a schematic diagram of a structure of a screenshot device provided in some embodiments of the present application;

[0028] FIG12 is a second structural diagram of a screenshot device provided in some embodiments of the present application;

[0029] FIG13 is a schematic diagram of a hardware structure of an electronic device provided in some embodiments of the present application;

[0030] FIG14 is a second schematic diagram of the hardware structure of the electronic device provided in some embodiments of the present application. DETAILED DESCRIPTION

[0031] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.

[0032] The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first interface element can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0033] The terms "at least one" and "at least one of" in the specification and claims of this application refer to any one, any two, or a combination of more than two of the objects included. For example, at least one of a, b, and c can be represented by: "a", "b", "c", "a and b", "a and c", "b and c", and "a, b, and c", where a, b, and c can be single or multiple. Similarly, "at least two" means two or more, and its meaning is similar to "at least one".

[0034] The screenshot method, device, electronic device, and readable storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0035] The screenshot method provided in the embodiment of the present application can be applied to the scenario of taking screenshots of the interface of an electronic device.

[0036] Assume that an electronic device displays an interface of application A, which includes image element 1, image element 2, text element, and control element. If a user wants to capture the content of image element 1 and image element 2, the user can press the power button and volume button of the electronic device to cause the electronic device to directly perform a screenshot operation on the currently displayed screen to obtain a screenshot image including image element 1, image element 2, text element, and control element. The user can then 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 capture the screenshot images of image element 1 and image element 2 from the screenshot image, thereby obtaining the screenshot images of image element 1 and image element 2 required by the user. However, since the user needs to make multiple inputs to trigger the electronic device to sequentially capture the screenshot images of image element 1 and image element 2 from the screenshot image including image element 1, image element 2, text element, and control element, the user's operation is relatively cumbersome and time-consuming in the process of triggering the electronic device to capture the screenshot images of the interface elements required by the user.

[0037] However, in the embodiment of the present application, when the electronic device displays the interface of application A, the electronic device can identify the element type of each interface element in the interface of application A based on a single input of the user to the electronic device, and when the element type of at least one interface element among the various interface elements is an image type, take screenshots of image element 1 and image element 2. It can be understood that the electronic device can directly capture image element 1 and image element 2 of the image type required by the user from each interface element in the interface of application A based on a single input of the user to the electronic device, so as to obtain screenshot images of image element 1 and image element 2 required by the user, without the need for the user to input multiple times. 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 consumption can be reduced.

[0038] The screenshot method provided in the embodiment of the present application can be executed by a screenshot device, an electronic device, or a functional module or entity in an electronic device. The screenshot method provided in the embodiment of the present application is described by taking an electronic device executing the screenshot method as an example.

[0039] Figure 1 shows a schematic flow chart 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 .

[0040] Step 101: The electronic device displays a first interface.

[0041] In the embodiment of the present application, the first interface includes N interface elements, where N is a positive integer.

[0042] In some embodiments of the present application, the first interface may be an interface of a first application.

[0043] Optionally, the first application may be any one of the following: a chat application, a photo taking application, a note taking application, a video application, etc.

[0044] In some embodiments of the present application, the 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 or part of the interface elements in the first interface.

[0045] Optionally, the above-mentioned image element can be an image on a page in the first interface, or a background image of the first interface.

[0046] Optionally, the above-mentioned window element may be a window of a second application, which includes a running interface of the second application, wherein the second application may be the same as or different from the first application.

[0047] In a possible implementation, when the second application is the same as the first application, the window element may specifically be a split-screen window of the first application.

[0048] Step 102: The electronic device receives a first input from a user.

[0049] In some embodiments of the present application, when the electronic device displays the "Settings" application interface, the electronic device can enable the "Smart Identification of Screenshot Area" function based on the user's click input on the "Smart Identification of Screenshot Area" control in the "Settings" application interface, so that when the user triggers the electronic device to display N interface elements in the first interface, the user can make a first input to the electronic device.

[0050] Optionally, when the N interface elements include at least one of an image element, a text element, and a control element, the user can directly trigger the electronic device to display the first interface to trigger the electronic device to display N image elements in the first interface.

[0051] For example, a mobile phone is used as an example. As shown in FIG2 , a user may trigger the electronic device to display a first interface, such as interface 10 of application 1. Interface 10 includes N interface elements, such as image element 11, image element 12, text element 13, and control element 14, so that the user can perform a first input on the electronic device.

[0052] 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 N window elements in suspension on the first interface to display N window elements in the first interface.

[0053] For example, the user can first trigger the electronic device to display a first interface, such as the interface of application 2, and then trigger the electronic device to open application 3, as shown in Figure 3, so that the electronic device can display the window element 16 of application 3 on the interface of application 2 (such as interface 15), and then the user can make a first input to the electronic device.

[0054] In an embodiment of the present application, the first input is used to trigger the electronic device to take a screenshot of the first interface.

[0055] In some embodiments of the present application, the first input may be: input by a user on a display screen of the electronic device, or input by a user on a physical button of the electronic device.

[0056] Optionally, the above-mentioned first input may include but is not limited to: the user's touch input on the display screen, or the user's voice command input, or the user's specific gesture input through a touch device such as a finger or a stylus, or other feasible input, which can be determined according to actual use requirements, and the embodiment of the present application is not limited here. Among them, the above-mentioned specific gesture can be any one of a single-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 can be a single-click input, a double-click input, or any number of click inputs, etc., and can also be a long press input or a short press input. For example, the above-mentioned first input can be: the user's press input on the "power" button and the "volume" button of the electronic device.

[0057] Step 103: The electronic device identifies the element types of N interface elements.

[0058] In some embodiments of the present application, the electronic device may first obtain N queryable attributes corresponding to N interface elements one by one, and obtain the element type of the corresponding interface element from each queryable attribute.

[0059] Optionally, the queryable attribute may include at least one of the following: a class name (Class Name), an identity code (Identity, ID).

[0060] Exemplarily, in the case where the queryable attribute is an ID, for each of the N queryable attributes, the electronic device can adopt at least one first correspondence to determine an element type corresponding to an ID, and determine the element type as the element type of the interface element corresponding to the ID to identify the element types of the N interface elements.

[0061] Step 104: When the element type of at least one interface element among the N interface elements is a first preset type, the electronic device takes a screenshot of the at least one interface element in response to the first input.

[0062] In some embodiments of the present application, the first preset type may include at least one of the following: an image element type, a window element type.

[0063] In an embodiment of the present application, since the user needs to capture interface elements of the image element type and interface elements of the window element type when capturing the content of the interface element, the electronic device can respond to the first input and capture the at least one interface element required by the user only when the element type of at least one interface element among N interface elements is the first preset type.

[0064] In some embodiments of the present application, the electronic device may take a screenshot of each interface element of at least one interface element in turn; or, the electronic device may first take a screenshot of the first interface, and then take a screenshot image of at least one interface element from the screenshot image obtained by the screenshot.

[0065] The following will take an example in which an electronic device takes a screenshot of each interface element in at least one interface element in sequence to illustrate a specific solution for taking a screenshot of the electronic device.

[0066] In some embodiments of the present application, in combination with Figure 1, as shown in Figure 4, after the above step 103 and before the above step 104, the screenshot method provided in the embodiment of the present application may further include the following step 201, and the above step 104 may be specifically implemented through the following step 104a.

[0067] Step 201: When the element type of at least one interface element among N interface elements is a first preset type, the electronic device obtains the size and first coordinates of the at least one interface element in the first interface.

[0068] In some embodiments of the present application, for each of the at least one interface element, the first coordinate of the interface element in the first interface may specifically be the coordinates of a vertex of the interface element in a first coordinate system. The first coordinate system is a rectangular coordinate system established with a first edge line of the display screen of the electronic device as the x-axis and a second edge line as the y-axis. The first edge line and the second edge line are adjacent edge lines.

[0069] In some embodiments of the present application, for each of at least one interface element, the size of the interface element may include at least one of the following: a length parameter of a third edge line of the interface element and a length parameter of a fourth edge line of the interface element. The third edge line and the fourth edge line are adjacent edge lines.

[0070] In some embodiments of the present application, the electronic device may 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.

[0071] It should be noted that the above-mentioned “attribute value corresponding to the interface element” can be understood as: the attribute value assigned to the interface element when the interface element is written in the front end.

[0072] For example, Figure 5 shows a schematic diagram of the size of an interface element and the first coordinates in a first interface obtained by an electronic device according to an embodiment of the present application. As shown in Figure 5, assuming that at least one interface element includes an image element, the electronic device can determine the coordinate value (x1, y1) of the upper left vertex 17 of 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, from the attribute values ​​corresponding to the image element. The third edge line 18 and the fourth edge line 19 are adjacent edge lines.

[0073] Step 104a: The electronic device takes a screenshot of at least one interface element in response to the first input according to the size and the first coordinates.

[0074] 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 a screenshot of each interface area respectively.

[0075] It should be noted that for instructions on taking screenshots of electronic devices, reference can be made to the specific descriptions in the relevant technologies, and the embodiments of the present application will not be elaborated here.

[0076] It can be seen that since the electronic device can directly obtain the size of at least one interface element and the first coordinate in the first interface, and take a screenshot 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, without the user triggering the electronic device to determine the size of the at least one interface element and the first coordinate in the first interface, the amount of computing power of the electronic device can be reduced, thus reducing the power consumption of the electronic device.

[0077] In some embodiments of the present application, after an electronic device takes a screenshot of at least one interface element, the electronic device may update the first interface to a second interface, where the second interface includes at least one screenshot, each screenshot being obtained by the electronic device taking a screenshot of an interface element, so that a user can make 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.

[0078] Optionally, the above-mentioned third input may include a first sub-input and a second sub-input, the first sub-input being the user's selection input for at least a portion of the screenshot, the first sub-input being used to trigger the electronic device to mark the at least portion of the screenshot using a first marking method, the second sub-input being the user's selection input for a target control in at least one control in the second interface, each control corresponding to an operation, the target control corresponding to the target operation, and the second sub-input being used to trigger the electronic device to perform the target operation on the at least portion of the screenshot.

[0079] In one possible implementation, the first marking method may include any one of the following: a highlight marking method, a dotted box marking method, a display prompt image marking method, a color marking method, a grayscale marking method, a preset transparency marking method, a flashing marking method, etc.

[0080] In a possible implementation, the target operation is any one of the following: a save operation, a share operation, or a delete operation.

[0081] Exemplarily, when the target operation is a save operation, the electronic device may store at least part of the screenshot in a preset storage space.

[0082] Exemplarily, when the target operation is a sharing operation, the electronic device may send at least a portion of the screenshot to an electronic device of a first contact, where the first contact may be a contact selected by the user or a contact preset by the user.

[0083] Exemplarily, when the target operation is a deletion operation, the electronic device may delete at least part of the screenshot from the cache of the electronic device.

[0084] For example, taking the first preset type as an image type as an example, in combination with FIG2, as shown in FIG6A, after the user performs a first input on the electronic device, in the case where the element type of at least one interface element (i.e., image element 11 and image element 12) among the image element 11, image element 12, text element 13, and control element 14 is an image type, the electronic device can take screenshots of the image element 11 and the image element 12, and update the interface 10 to the second interface 20, wherein the second interface 20 includes a screenshot image 21 and a screenshot image 22, wherein the screenshot image 21 is the electronic device's screenshot of the image element 11. 1, the screenshot image 22 is obtained by the electronic device taking a screenshot of the image element 12, so that the user can perform a first sub-input on the screenshot image 21; as shown in FIG6B , 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 mark, 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 the preset storage space.

[0085] An embodiment of the present application provides a screenshot method, in which an electronic device can display a first interface including N interface elements and, based on a first input from a user, identify the element types of the N interface elements. Thus, if the element type of at least one of the N interface elements is a first preset type, the electronic device can take a screenshot of the at least one interface element; wherein N is a positive integer. Since, when displaying N interface elements of the first interface, the electronic device can, based on a single input from the user, identify the element types of the N interface elements and, if the element type of at least one of the N interface elements is the first preset type required by the user, directly take a screenshot of the at least one interface element required by the user, thereby obtaining a screenshot image of the interface element required by the user, without requiring the user to input multiple times, the user's operation in triggering the electronic device to take a screenshot image of the interface element required by the user can be simplified, and time consumption can be reduced. Thus, the efficiency of the electronic device in taking screenshot images required by the user can be improved.

[0086] In an embodiment of the present application, since at least one of the above-mentioned interface elements may at least partially overlap, if the electronic device directly takes a screenshot of the at least one interface element, it may be that the electronic device cannot capture the entire content of some of the at least one interface element. Therefore, the electronic device can update the transparency of at least one interface element to display all the contents of the at least one interface element in sequence, and take a screenshot of the interface element displayed each time while displaying all the contents of an interface element each time, so as to avoid the situation where the electronic device cannot capture the entire content of some of the at least one interface element.

[0087] It should be noted that the above “at least partially overlap” can be understood as: partially overlap or completely overlap.

[0088] In an embodiment of the present application, the electronic device can update the transparency of at least one interface element at least once, with the interface element updated differently each time, so as to display all contents of the at least one interface element in sequence.

[0089] In some embodiments of the present application, for each update of at least one update, the electronic device may update the transparency of the interface elements except one interface element in at least one interface element, so as to update the transparency of the interface elements in at least one interface element once to display all the contents of the one interface element; or, the electronic device may update the transparency of one interface element and update the transparency of another interface element, so as to update the transparency of the interface elements in at least one interface element once to display all the contents of the one interface element.

[0090] Optionally, for each update in the at least one update, the electronic device may increase the transparency of the at least one interface element except for one interface element, so that the transparency of the one interface element is the lowest transparency among the at least one interface element, thereby updating the transparency of the at least one interface element. It will be understood that because the transparency of the one interface element is the lowest transparency among the at least one interface element, the electronic device can display all the contents of the one interface element.

[0091] 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 contents of the one interface element, and thus the electronic device can capture a screenshot image including all the contents of the one interface element.

[0092] Optionally, for each update in the at least one update, the electronic device may lower the transparency of one interface element and increase the transparency of another interface element so that the transparency of the one interface element is the lowest transparency among the at least one interface elements, thereby updating the transparency of the at least one interface element. Because the transparency of the one interface element is the lowest transparency among the at least one interface element, the electronic device can display all the contents of the one interface element.

[0093] It can be understood that since the electronic device may have increased the transparency of one interface element and lowered the transparency of another interface element, the electronic device can lower the transparency of one interface element and increase the transparency of another interface element so that the electronic device can display all the contents of the one interface element, and the electronic device can capture a screenshot image including all the contents of the one interface element.

[0094] The following will take two of the above-mentioned interface elements as examples to illustrate a specific solution for updating the transparency of interface elements in an electronic device.

[0095] In some embodiments of the present application, the at least one interface element includes: a first interface element and a second interface element that at least partially overlap. Optionally, in conjunction with FIG1 , as shown in FIG7 , step 104 can be specifically performed through the following steps 104b and 104c.

[0096] 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 updates the transparency of the second interface element in response to the first input to display the entire content of the first interface element and takes a screenshot of the first interface element.

[0097] 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 image types.

[0098] In some embodiments of the present application, the above-mentioned first interface element may be: the interface element that is sorted as the first among the first interface element and the second interface element after being sorted in the target order; the above-mentioned second interface element may be: the interface element that is sorted as the second among the first interface element and the second interface element after being sorted in the target order.

[0099] Optionally, the above-mentioned target order can be any one of the following: display time from early 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.

[0100] In a possible implementation, the first direction may be any one 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.

[0101] It should be noted that the above-mentioned "left end of the display screen" can be understood as: the left end of the display screen when the user is using the electronic device. The above-mentioned "right end of the display screen" can be understood as: the right end of the display screen when the user is using the electronic device.

[0102] In a possible implementation, the first direction may be any one 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.

[0103] It should be noted that the above-mentioned "upper end of the display screen" can be understood as: the upper end of the display screen from the user's perspective when the user is using the electronic device. The above-mentioned "lower end of the display screen" can be understood as: the lower end of the display screen from the user's perspective when the user is using the electronic device.

[0104] In some embodiments of the present application, the electronic device may update the transparency of the second interface element to the first transparency to display the entire content of the first interface element.

[0105] In the embodiment of the present application, the first transparency is greater than the initial transparency of the second interface element (eg, the second transparency in the following embodiment).

[0106] It should be noted that the above-mentioned “initial transparency” can be understood as: the transparency of the second interface element before the transparency of the second interface element is updated.

[0107] 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 may be 100%.

[0108] 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.

[0109] In some embodiments of the present application, after the electronic device takes a screenshot of the first interface element, the electronic device may 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.

[0110] 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 may be 0%.

[0111] 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.

[0112] 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 initial transparency of the first interface element and the second interface element (for example, the second transparency), so that the electronic device can continue to view the first interface element and the second interface element in the first interface.

[0113] For example, in combination with Figure 2, image element 11, image element 12, text element 13 and control element 14 include at least partially overlapping image elements 11 and image elements 12. After the user makes a first input, as shown in Figure 8A, the electronic device can update the transparency of image element 12 to 100% to display the entire content of image element 11 and take a screenshot of image element 11; after taking a screenshot of 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.

[0114] 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 transparency of the first interface element or the second interface element to avoid the first interface element covering the content of the second interface element, or avoid the second interface element covering the content of the first interface element. Therefore, the situation where the content of the first interface element or the second interface element in the screenshot image obtained by taking the screenshot is incomplete can be avoided. In this way, the screenshot effect of the electronic device can be improved.

[0115] In some embodiments of the present application, the at least one interface element includes a floating interface element. Optionally, in conjunction with FIG1 , as shown in FIG9 , step 104 can be specifically performed through the following step 104d.

[0116] 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 updates the transparency of the floating interface element in response to the first input to display the entire background content of the first interface and takes a screenshot of the first interface.

[0117] In some embodiments of the present application, the first preset type may be an image type and a window type.

[0118] In some embodiments of the present application, the electronic device may update the transparency of the floating interface element to the above-mentioned first transparency to display the entire background content of the first interface.

[0119] For example, in combination with Figure 3, the above-mentioned at least one interface element includes the background content of interface 15 and window element 16, and the window element 16 and the background content of interface 15 at least partially overlap. Then, after the user makes a first input, as shown in Figure 10, the electronic device can update the transparency of window element 16 to 100% to display the entire background content of interface 15 and take a screenshot of the first interface.

[0120] 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 of the floating interface element (for example, the second transparency), so that the electronic device can continue to view the floating interface element in the first interface.

[0121] In some embodiments of the present application, after the electronic device takes a screenshot of the first interface, the electronic device may also update the transparency of the first interface and the floating interface element to display the entire content of the floating interface element and take a screenshot of the floating interface element.

[0122] It should be noted that for the description of the electronic device updating the transparency of the first interface and the floating interface elements, please refer to the specific description of the electronic device updating the first interface elements and the second interface elements in the above embodiment, and the embodiments of this application will not be repeated here.

[0123] It can be seen that, since 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, it can avoid the situation where the background content of the first interface is incomplete in the screenshot image obtained by taking the screenshot, thereby improving the screenshot effect of the electronic device.

[0124] In an embodiment of the present application, after the electronic device takes a screenshot of at least one interface element, the user may want to capture a partial image area from the screenshot image of the floating window element. At this time, the electronic device can first display the screenshot image of the floating window element, and based on the user's input, capture the image area that the user wants from the screenshot image of the floating window element. An example will be given below.

[0125] In some embodiments of the present application, the at least one interface element includes a floating window element. Optionally, after the above step 104 , the screenshot method provided in the embodiment of the present application may further include steps 301 to 303 .

[0126] Step 301: The electronic device displays a target screenshot image.

[0127] In an embodiment of the present application, the above-mentioned target screenshot image is obtained by taking a screenshot of a floating window element, and the target screenshot image includes M first image areas, each of which is: an image area in the target screenshot image corresponding to a target window element in the floating window element, and M is a positive integer.

[0128] In some embodiments of the present application, the electronic device can update the first interface to a second interface, which includes at least one screenshot image, each screenshot image is obtained by the electronic device taking a screenshot of one interface element of at least one interface element, and the at least one screenshot image includes a target screenshot image.

[0129] In some embodiments of the present application, before the above step 301, the screenshot method provided by the embodiment of the present application may further include the following steps 401 to 403.

[0130] Step 401: The electronic device identifies the element types of L first window elements in the floating window elements.

[0131] In the embodiments of the present application, L is a positive integer.

[0132] In some embodiments of the present application, the electronic device may first obtain L queryable attributes corresponding one-to-one to the L first window elements, and obtain the element type of the corresponding first window element from each queryable attribute.

[0133] It should be noted that, for the description of how the electronic device obtains the element type of the corresponding first window element from each queryable attribute, please refer to the specific description of how the electronic device obtains the element type of the corresponding interface element from each queryable attribute in the above embodiment, and the embodiments of this application will not be repeated here.

[0134] Step 402: The electronic device obtains M second coordinates of M target window elements of the second preset type among the L first window elements in the floating window element.

[0135] In some embodiments of the present application, the second preset type may include at least one of the following: an image element type, a window element type, and the second preset type may be the same as the first preset type.

[0136] In the embodiment of the present application, each of the M second coordinates corresponds to a target window element.

[0137] In some embodiments of the present application, for each of the M target window elements, the second coordinates of the target window element in the floating window element may specifically be the coordinates of each vertex of the target window element in the second coordinate system. 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 and sixth edge lines are adjacent edge lines.

[0138] In some embodiments of the present application, the electronic device may obtain the second coordinate of each target window element in the floating window element from the attribute value corresponding to each target window element to obtain M second coordinates.

[0139] Step 403: The electronic device determines M first image areas on the target screenshot image according to the M second coordinates.

[0140] In the embodiment of the present application, each of the M first image areas corresponds to a second coordinate.

[0141] 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, and so on to determine M first image areas.

[0142] It should be noted that the above “image area corresponding to a second coordinate” can be understood as: an image area enclosed by the coordinates of each vertex in the second coordinate in the second coordinate system.

[0143] In some embodiments of the present application, after the electronic device determines the M first image regions, the electronic device may mark the M first image regions using a second marking method.

[0144] Optionally, the second marking method may include any one of the following: a highlight marking method, a display prompt image marking method, a dotted box marking method, a color marking method, a grayscale marking method, a preset transparency marking method, and a flashing marking method.

[0145] 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.

[0146] In an embodiment of the present application, since the user needs to intercept the window element of the second preset type in the floating window element when intercepting the content of the floating window element, the electronic device can directly identify the element types of all window elements in the floating window element (i.e., L first window elements) and obtain the second coordinates of the M target window elements that the user needs to intercept among all the window elements in the floating window element, so that the electronic device can directly determine the image area (i.e., M first image areas) where the M target window elements are located on the target screenshot image, and then the user can directly input the image area (e.g., the target image area) in the M first image areas so that the electronic device can intercept the target image area.

[0147] It can be seen that since the electronic device can directly obtain the second coordinates of the M target window elements in the floating window element that the user needs to capture, and directly determine the first image area of ​​each target window element on the target screenshot image, 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, the user's operation in the process of capturing the image area in the screenshot image can be simplified and time consumption can be reduced.

[0148] Furthermore, since the electronic device can directly determine the first image area where the M target window elements are located on the target screenshot image based on the second coordinates of the M target window elements in the floating window element, without the need for the electronic device to perform image recognition on the target screenshot image, the amount of computation of the electronic device can be reduced.

[0149] Step 302: The electronic device receives a second input from a user regarding a target image region among the M first image regions.

[0150] In some embodiments of the present application, the second input may be a user input to the target image area.

[0151] Optionally, the second input may include, but is not limited to, a touch input by the user on the display screen, a voice command input by the user, a specific gesture input by the user through a touch device such as a finger or a stylus, or other feasible input, which may be determined based on actual usage requirements and is not limited in this embodiment of the present application. The specific gesture may be any one of a single-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 may be a single-click input, a double-click input, or any number of click inputs, and may also be a long-press input or a short-press input.

[0152] For example, the second input may be a touch input of the user on the target image area.

[0153] Step 303: The electronic device captures a target image area from the target screenshot image in response to the second input.

[0154] 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.

[0155] It should be noted that, for the description of cropping the target screenshot image by the electronic device, reference may be made to the specific description in the relevant technology, which will not be elaborated in detail in the embodiments of the present application.

[0156] 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 capture the target image area from the target screenshot image based on the user's one input of the target image area among the M first image areas of the target screenshot image, without the user having to input multiple times. Therefore, the user's operation in the process of capturing the image area in the screenshot image can be simplified and the time consumption can be reduced.

[0157] The screenshot method provided in the embodiment of the present application can be executed by a screenshot device. In the embodiment of the present application, the screenshot device provided in the embodiment of the present application is described by taking the screenshot method executed by the screenshot device as an example.

[0158] FIG11 shows a possible structural diagram of a screenshot device involved in an embodiment of the present application. As shown in FIG11 , the screenshot device 50 provided in an embodiment of the present application may include: a display module 51 , a receiving module 52 , and a processing module 53 .

[0159] The display module 51 is configured to display a first interface including N interface elements, where N is a positive integer. The receiving module 52 is configured to receive a first input from a user. The processing module 53 is configured to identify the element type of the N interface elements and, if at least one of the N interface elements has an element type of a first preset type, take a screenshot of the at least one interface element in response to the first input received by the receiving module 52.

[0160] An embodiment of the present application provides a screenshot device. When N interface elements of a first interface are displayed, the screenshot device can identify the element types of the N interface elements based on a single input from the user, and when the element type of at least one of the N interface elements is the first preset type required by the user, the screenshot device directly takes a screenshot of at least one interface element required by the user to obtain a screenshot image of the interface element required by the user without the need for the user to input multiple times. Therefore, the user's operation in triggering the screenshot device to capture the screenshot image of the interface element required by the user can be simplified and the time consumption can be reduced. In this way, the efficiency of the screenshot device in capturing the screenshot image required by the user can be improved.

[0161] In one possible implementation, in combination with FIG11 , as shown in FIG12 , the screenshot device 50 provided in the embodiment of the present application may further include: an acquisition module 54. The acquisition module 54 is further configured to, after the processing module 53 identifies the element types of the N interface elements, acquire the size and first coordinates of at least one interface element in the first interface when the element type of at least one interface element among the N interface elements is a first preset type. The processing module 53 is specifically configured to, in response to the first input, take a screenshot of the at least one interface element based on the size and the first coordinates.

[0162] In one possible implementation, the at least one interface element includes: a first interface element and a second interface element that at least partially overlap. The display module 51 is further 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 53 is specifically configured to take a screenshot of the first interface element displayed by the display module 51. The display module 51 is further configured 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 53 is specifically configured to take a screenshot of the second interface element displayed by the display module 51.

[0163] In one possible implementation, the at least one interface element includes a floating interface element. The display module 51 is further configured to, in response to the first input, update the transparency of the floating interface element to display the entire background content of the first interface. The processing module 53 is specifically configured to take a screenshot of the first interface displayed by the display module 51.

[0164] In one possible implementation, the at least one interface element includes a floating window element. The display module 51 is further configured to display a target screenshot image after the processing module 53 takes a screenshot of the at least one interface element in response to a 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 of which is an image area in the target screenshot image corresponding to a target window element in the floating window element, and M is a positive integer. The receiving module 52 is further configured to receive a second input from the user regarding a target image area among the M first image areas. The processing module 53 is further configured to capture a target image area from the target screenshot image in response to the second input received by the receiving module 52.

[0165] In a possible implementation, the processing module 53 is further configured to identify the element types of the L first window elements in the floating window element before the display module 51 displays the target screenshot image; L is a positive integer. In combination with FIG11 , as shown in FIG12 , the screenshot device 50 provided in the embodiment of the present application may further include: an acquisition module 54. The acquisition module 54 is configured to acquire the M second coordinates of the M target window elements whose element types are the second preset type among the L first window elements identified by the processing module 53 in the floating window element; each second coordinate corresponds to a target window element. The processing module 53 is further configured to determine M first image areas on the target screenshot image based on the M second coordinates acquired by the acquisition module 54; each first image area corresponds to a second coordinate.

[0166] The screenshot device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or a device other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc., and can also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0167] The screenshot device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0168] The screenshot device provided in the embodiment of the present application can implement each process implemented in the above-mentioned screenshot method embodiment. To avoid repetition, it will not be described here.

[0169] In some embodiments of the present application, as shown in Figure 13, the embodiment of the present application further provides an electronic device 60, including a processor 61 and a memory 62, and the memory 62 stores a program or instruction that can be run on the processor 61. When the program or instruction is executed by the processor 61, the various process steps of the above-mentioned screenshot method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0170] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0171] FIG14 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.

[0172] The electronic device 100 includes but is not limited to components such as a radio frequency unit 101 , a network module 102 , an audio output unit 103 , an input unit 104 , a sensor 105 , a display unit 106 , a user input unit 107 , an interface unit 108 , a memory 109 , and a processor 110 .

[0173] Those skilled in the art will appreciate that the electronic device 100 may further include a power source (such as a battery) for powering various components. The power source may be logically connected to the processor 110 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The electronic device structure shown in FIG14 does not limit the electronic device. The electronic device may include more or fewer components than shown, or may combine certain components, or have different component arrangements, which will not be described in detail here.

[0174] The display unit 106 is used to display a first interface, which includes N interface elements, where N is a positive integer.

[0175] The user input unit 107 is configured to receive a first input from a user.

[0176] The processor 110 is configured to identify element types of N interface elements; and when the element type of at least one interface element among the N interface elements is a first preset type, take a screenshot of the at least one interface element in response to a first input.

[0177] An embodiment of the present application provides an electronic device. When displaying N interface elements of a first interface, the electronic device can identify the element types of the N interface elements based on a single input from the user, and when the element type of at least one of the N interface elements is the first preset type required by the user, the electronic device can directly take a screenshot of at least one interface element required by the user to obtain a screenshot image of the interface element required by the user without the need for the user to input multiple times. Therefore, the user's operation in triggering the electronic device to take a screenshot image of the interface element required by the user can be simplified and the time consumption can be reduced. In this way, the efficiency of the electronic device in taking a screenshot image required by the user can be improved.

[0178] In some embodiments of the present application, the processor 110 is further used to obtain the size and first coordinates of at least one interface element in the first interface when the element type of at least one interface element among the N interface elements is a first preset type.

[0179] The processor 110 is specifically configured to take a screenshot of at least one interface element in response to the first input according to the size and the first coordinates.

[0180] In some embodiments of the present application, the at least one interface element includes: a first interface element and a second interface element that at least partially overlap.

[0181] Processor 110 is specifically 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 and take a screenshot of the first interface element; and 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.

[0182] In some embodiments of the present application, the at least one interface element includes: a floating interface element.

[0183] The processor 110 is specifically configured to update the transparency of the floating interface element in response to the first input to display the entire background content of the first interface and take a screenshot of the first interface.

[0184] In some embodiments of the present application, the at least one interface element includes a floating window element.

[0185] The display unit 106 is also used to display a target screenshot image, which is obtained by taking a screenshot of a floating window element. The target screenshot image includes M first image areas, and each first image area is: an image area in the target screenshot image corresponding to a target window element in the floating window element, and M is a positive integer.

[0186] The user input unit 107 is further configured to receive a second input from the user regarding a target image region among the M first image regions.

[0187] The processor 110 is further configured to capture a target image area from the target screenshot image in response to a second input.

[0188] In some embodiments of the present application, the processor 110 is further used to identify the element type of L first window elements in the floating window element; L is a positive integer; and obtain M second coordinates of M target window elements whose element type is a second preset type in the L first window elements in the floating window element; each second coordinate corresponds to a target window element; and, based on the M second coordinates, determine M first image areas on the target screenshot image; each first image area corresponds to a second coordinate.

[0189] It should be understood that in an embodiment of the present application, the input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes a touch panel 1071 and at least one of other input devices 1072. The 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, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0190] The memory 109 can be used to store software programs and 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, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 109 may include a volatile memory or a non-volatile memory, or the memory 109 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0191] Processor 110 may include one or more processing units. Optionally, processor 110 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 110.

[0192] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned screenshot method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0193] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0194] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned screenshot method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0195] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0196] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned screenshot method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0197] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted 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, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0198] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0199] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

Claims

1. A screenshot method, the method comprising: Display a first interface, wherein the first interface includes N interface elements, where N is a positive integer; receiving a first input from a user; Identifying 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, a screenshot of the at least one interface element is taken in response to the first input.

2. The method according to claim 1, after identifying the element types of the N interface elements, the method further comprises: When the element type of at least one interface element among the N interface elements is the first preset type, acquiring a size of the at least one interface element and a first coordinate in the first interface; In response to the first input, taking a screenshot of the at least one interface element 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 coordinates.

3. The method according to claim 1, wherein: The at least one interface element includes: a first interface element and a second interface element that at least partially overlap; In response to the first input, taking a screenshot of the at least one interface element includes: In response to the first input, updating the transparency of the second interface element to display all contents of the first interface element, and taking a screenshot of the first interface element; The transparency of the first interface element and the second interface element is updated to display the entire content of the second interface element, and a screenshot of the second interface element is taken.

4. The method according to claim 1, wherein: The at least one interface element includes: a suspended interface element; In response to the first input, taking a screenshot of the at least one interface element includes: In response to the first input, the transparency of the floating interface element is updated to display the entire background content of the first interface, and a screenshot of the first interface is taken.

5. The method according to claim 1, wherein the at least one interface element comprises 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: Display a target screenshot image, where the target screenshot image is obtained by taking a screenshot of the floating window element, and the target screenshot image includes M first image areas, each of which is an image area in the target screenshot image corresponding to a target window element in the floating window element, and M is a positive integer; receiving a second input from a user regarding a 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. The method according to claim 5, before displaying the target screenshot image, the method further comprises: Identify element types of L first window elements in the floating window elements; L is a positive integer; Obtaining M second coordinates of M target window elements whose element type is a second preset type among the L first window elements in the floating window element; each second coordinate corresponds to a target window element; The M first image regions are determined on the target screenshot image according to the M second coordinates; each first image region corresponds to a second coordinate.

7. A screenshot device, comprising: Display module, receiving module and processing module; The display module is used to display a first interface, wherein the first interface includes N interface elements, where N is a positive integer; The receiving module is used to receive a first input from a user; The processing module is used 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, in response to the first input received by the receiving module, a screenshot of the at least one interface element is taken.

8. The screenshot device according to claim 7, further comprising: Get module; The acquisition module is further configured to acquire, after the processing module identifies the element types of the N interface elements, a size of the at least one interface element and a first coordinate in the first interface when the element type of the at least one interface element among the N interface elements is the first preset type; The processing module is specifically configured to take a screenshot of the at least one interface element in response to the first input according to the size and the first coordinates.

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 further configured to update the transparency of the second interface element in response to the first input, so as to display all contents 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 further 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 used to take a screenshot of the second interface element displayed by the display module.

10. The screenshot device according to claim 7, wherein: The at least one interface element includes: a suspended interface element; The display module is further configured to update the transparency of the floating interface element in response to the first input, so as to display all background content of the first interface; The processing module is specifically used to take a screenshot of the first interface displayed by the display module.

11. The screenshot device according to claim 7, wherein: The at least one interface element includes a floating window element; The display module is further configured to display a target screenshot image after the processing module takes a screenshot of the at least one interface element in response to the first input, wherein the target screenshot image is obtained by taking a screenshot of the floating window element, and the target screenshot image includes M first image areas, each of which is an image area in the target screenshot image corresponding to a target window element in the floating window element, and M is a positive integer; The receiving module is further used to receive a second input from a user regarding a target image area in 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. The screenshot device according to claim 11, wherein: The processing module is further configured to identify element types of 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 further includes: an acquisition module; The acquisition module is used to acquire M second coordinates of M target window elements whose element type is a second preset type among the L first window elements identified by the processing module in the floating window element; each second coordinate corresponds to a target window element; The processing module is further used 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 second coordinate.

13. An electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the screenshot method according to any one of claims 1 to 6 are implemented.

14. A readable storage medium storing a program or instruction, wherein the program or instruction, when executed by a processor, implements the steps of the screenshot method according to any one of claims 1 to 6.

15. A chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the screenshot method according to any one of claims 1 to 6.

16. A computer program product, wherein the computer program product is stored in a storage medium and is executed by at least one processor to implement the steps of the screenshot method according to any one of claims 1 to 6.

17. A screenshot device, used for executing the screenshot method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Screen capture method and device and electronic equipment

    CN111638844A

  • Screen capture method, screen capture device, screen capture equipment and computer storage medium

    CN115599484A

  • Scene picture display control method and device and electronic equipment

    CN115920390A

  • Screenshot method and device, electronic equipment and readable storage medium

    CN116893770A

  • Screenshot method, terminal, and non-transitory computer-readable storage medium

    US20230084269A1