Screenshot capturing method and electronic device
By obtaining user operation information in real time and adjusting the screenshot frequency dynamically, the problems of poor flexibility and waste of power consumption caused by fixed screenshot frequency in the prior art are solved, and the user experience and equipment efficiency are improved.
Patent Information
- Application Number
- PCT/CN2024/113403
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-05
- Filing Date
- 2024-08-20
- Publication Date
- 2025-03-06
AI Technical Summary
The prior art uses fixed screenshot frequency and poor flexibility to affect user experience and cause successful waste when obtaining real-time content drawn by users on the display screen of electronic devices.
By obtaining operation information in real time when the user performs an operation, dynamically adjusting the screenshot frequency, and flexibly adjusting the screenshot frequency according to factors such as the pressure sensitivity change of the operation, the operation speed and the position of the screen point.
It realizes flexible adjustment of screenshot frequency, adapts to different operating scenarios, improves user experience, and saves power consumption of electronic devices.
Smart Images

Figure CN2024113403_06032025_PF_FP_ABST
Abstract
Description
Screenshot method and electronic device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on August 29, 2023, with application number 202311115013.9 and application name “A Screenshot Method and Electronic Device”, the entire contents of which are incorporated by reference into this application; this application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on September 5, 2023, with application number 202311146486.5 and application name “A Screenshot Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the technical field of electronic devices, and in particular to a screenshot method and electronic device. Background Art
[0004] With the development of software and hardware technologies of electronic equipment, many types of electronic equipment currently support users to operate on touch screens and display dynamic content corresponding to the operations in real time.
[0005] To enhance the user experience on electronic devices, several optimization measures can be designed within the electronic devices. These optimization measures generally require capturing real-time content drawn by the user on the electronic device's display. Therefore, designing a solution for capturing real-time user-drawn content is a challenge in this field.
[0006] Summary of the Invention
[0007] The present application provides a screenshot method and an electronic device for taking screenshots of content displayed on a display screen of an electronic device to improve user experience.
[0008] In a first aspect, an embodiment of the present application provides a screenshot method, which is applied to an electronic device. The following describes the method using an electronic device as an example, and the method includes:
[0009] During the process of a user performing a first operation on a first user interface, the electronic device displays dynamically changing content in the first user interface and obtains first operation information of the first operation; the electronic device determines a first frequency based on the first operation information; and the electronic device takes a screenshot of the first user interface based on the first frequency.
[0010] Through this method, the electronic device can adjust the screenshot frequency in real time according to the real-time operation information of the user's operation, so that the screenshot frequency of the electronic device can be flexibly adjusted to meet the screenshot needs of various situations, ultimately saving the power consumption of the electronic device and ensuring the user experience.
[0011] In one possible design, the electronic device stores a correspondence between the operation information and the screenshot frequency value. The electronic device can determine the first frequency corresponding to the first operation information based on the first operation information and the correspondence.
[0012] In one possible design, before obtaining the first operation information of the first operation, the electronic device may also take a screenshot of the first user interface according to the second frequency; based on this, when determining the first frequency, the electronic device may determine the first frequency according to the first operation information and the second frequency.
[0013] With this design, the electronic device can adjust the original screenshot frequency (second frequency) according to the first operation information to obtain a new screenshot frequency (first frequency).
[0014] In one possible design, the first operation information is used to indicate pressure-sensing data of at least one first screen point in the first operation; the electronic device may determine the first frequency according to the first operation information and the second frequency through the following steps:
[0015] When a pressure-sensitivity change between the pressure-sensitivity data of the first target screen point and the pressure-sensitivity data of the second target screen point is greater than or equal to a first pressure-sensitivity threshold, determining that the first frequency is greater than the second frequency; or
[0016] When the pressure sensitivity change is less than a second pressure sensitivity threshold, it is determined that the first frequency is less than the second frequency; the second pressure sensitivity threshold is less than or equal to the first pressure sensitivity threshold; or
[0017] In a case where the second pressure sensitivity threshold is less than the first pressure sensitivity threshold, when the pressure sensitivity change is less than the first pressure sensitivity threshold and greater than or equal to the second pressure sensitivity threshold, determining that the first frequency is equal to the second frequency;
[0018] The first target screen reporting point is the latest screen reporting point among the at least one first screen reporting point, and the second target screen reporting point is the screen reporting point before the first target screen reporting point among the at least one first screen reporting point.
[0019] Through this design, the electronic device can increase the screenshot frequency when the pressure change of the first operation is large, thereby increasing the number of times the electronic device executes subsequent optimization measures or the number of screenshot images processed, or reducing the delay in executing the subsequent optimization measures to improve the sensitivity of the optimization measures, and ultimately improving the user's experience of using the optimization measures. When the pressure change of the first operation is not large, the screenshot frequency is reduced, thereby reducing the number of times the electronic device executes subsequent optimization measures or the number of screenshot images processed, or increasing the delay in executing subsequent optimization measures, and ultimately saving the power consumption of the electronic device. In addition, the electronic device may not adjust the screenshot frequency when the change in the first operation is within the range of the first pressure threshold and the second pressure threshold, so as to ensure that the effect of the electronic device executing subsequent optimization measures is the same as before. In short, this design can improve the flexibility of electronic device screenshots, ensure user experience and avoid waste of power consumption of electronic devices.
[0020] In one possible design, the first operation information is used to indicate a position of at least one first screen reporting point in the first operation; the electronic device may determine the first frequency according to the first operation information and the second frequency through the following steps:
[0021] When at least one of the first conditions is met, it is determined that the first frequency is greater than the second frequency; the first condition includes: the distance between the position of the third target screen reporting point and the set area in the first user interface is less than or equal to a first distance threshold; the user is identified to perform a second operation on the first user interface based on the position of the at least one first screen reporting point; the first operation speed of the first operation determined based on the position of the at least one first screen reporting point is greater than or equal to a first speed threshold; wherein, the third target screen reporting point is the latest screen reporting point among the at least one first screen reporting point; the second operation is different from the first operation.
[0022] Through this design, the electronic device can increase the screenshot frequency when the first operation is close to the set area of the first user interface, when it recognizes that the user is performing a second operation during the execution of the first operation, or when the operation speed of the first operation is fast. This can increase the number of times the electronic device executes subsequent optimization measures or the number of screenshot images processed, or reduce the delay in executing the subsequent optimization measures to increase the sensitivity of the optimization measures, and ultimately improve the user experience of the optimization measures.
[0023] In one possible design, the electronic device may determine the first frequency according to the first operation information and the second frequency through the following steps:
[0024] When at least one of the second conditions is met, it is determined that the first frequency is less than the second frequency; the second condition includes: the distance between the position of the third target screen reporting point and the set area is greater than the second distance threshold; the second distance threshold is greater than or equal to the first distance threshold; the second operation is not recognized based on the position information of the at least one first screen reporting point; the first operation speed is less than the second speed threshold; the second speed threshold is less than or equal to the first speed threshold.
[0025] Through this design, the electronic device can reduce the screenshot frequency when the first operation does not approach the set area of the first user interface, when the electronic device does not recognize the second operation during the first operation, or when the operation speed of the first operation is slow, thereby reducing the number of times the electronic device executes subsequent optimization measures or the number of screenshot images processed, or increasing the delay in executing subsequent optimization measures, and ultimately saving power consumption of the electronic device.
[0026] In one possible design, the electronic device may determine the first frequency according to the first operation information and the second frequency through the following steps:
[0027] When at least one of the third conditions is met, it is determined that the first frequency is equal to the second frequency; the third condition includes: when the second distance threshold is greater than the first distance threshold, the distance between the position of the third target screen reporting point and the set area is greater than the first distance threshold and less than or equal to the second distance threshold; the second operation is not recognized according to the position information of the at least one first screen reporting point; when the second speed threshold is less than the first speed threshold, the first operation speed is greater than or equal to the second speed threshold and less than the first speed threshold.
[0028] With this design, the electronic device can also not adjust the screenshot frequency when the distance between the first operation and the set area in the first user interface is within the range of the first distance threshold and the second distance threshold, and when the electronic device does not recognize the second operation during the first operation, or when the operation speed of the first operation is within the range of the first speed threshold and the second speed threshold, to ensure that the effect of the subsequent optimization measures executed by the electronic device is the same as before. This approach can further improve the flexibility of electronic device screenshots, ensure the user experience of the electronic device, and avoid wasteful power consumption of the electronic device.
[0029] In one possible design, after the electronic device takes a screenshot of the first user interface according to the second frequency, the electronic device may also obtain second operation information of the first operation; the second operation information is used to indicate the position of at least one second screen reporting point in the first operation; when the distance between the position of the fourth target screen reporting point and the set area is equal to 0 (including the position of the fourth target screen reporting point being within the set area or on the boundary of the set area), stop taking a screenshot of the first user interface; or when the second operation speed of the first operation determined according to the position of the at least one second screen reporting point is less than or equal to a third speed threshold, stop taking a screenshot of the first user interface; wherein the third speed threshold is less than the second speed threshold; the first operation speed in the second condition is less than the second speed threshold, including: the first operation speed is greater than the third speed threshold and less than the second speed threshold; wherein the fourth target screen reporting point is the latest screen reporting point among the at least one second screen reporting point.
[0030] Through this design, the electronic device can stop taking screenshots of the first user interface when the first operation enters the set area or the first operation is a refined operation (no need to perform subsequent optimization measures), thereby causing the electronic device to stop performing subsequent optimization measures, thereby further saving the power consumption of the electronic device and avoiding waste of power consumption.
[0031] In a possible design, when the first frequency is different from the second frequency, a change between the first frequency and the second frequency is a set value.
[0032] With this design, the electronic device can adjust the screenshot frequency according to the set adjustment step (set value).
[0033] In one possible design, the electronic device takes a screenshot of the first user interface according to the second frequency at the start time of the first operation; wherein the second frequency is a default frequency.
[0034] With this design, the electronic device can take a screenshot using a default frequency at the start time of the first operation.
[0035] In one possible design, the first operation is a drawing operation; based on this, during the process of the user performing the first operation on the first user interface, the electronic device can display the actual drawing trajectory corresponding to the first operation in the first user interface; during the process of the electronic device taking a screenshot of the first user interface according to the first frequency, at least one first screenshot image is obtained, and third operation information of the first operation is obtained; image recognition is performed on the drawing trajectory in the at least one first screenshot image to determine the first brush mode parameters; based on the first brush mode parameters and the third operation information, a predicted drawing trajectory is determined; and the predicted drawing trajectory is displayed in the first user interface.
[0036] With this design, the electronic device can take screenshots of the first user interface in a drawing scene by adjusting the screenshot frequency in real time, thereby achieving global local drawing.
[0037] In a possible design, the first brush mode parameter includes at least one of the following: brush type, line color, line width, and line texture.
[0038] In one possible design, the drawing operation is a touch operation of the user on the first user interface on the display screen using a finger or a touch-assistive tool, wherein the touch-assistive tool includes any one of the following: a stylus, a touch pen, a touch ball, and a mouse.
[0039] In a second aspect, an embodiment of the present application provides an electronic device comprising a unit for executing each step of the method provided in the first aspect. For example, the electronic device may include a display unit and a processing unit, wherein the display unit is configured to display a user interface and the processing unit is configured to implement the method provided in the first aspect.
[0040] In a third aspect, an embodiment of the present application provides an electronic device comprising a display screen, at least one processor and a memory; the at least one processor is coupled to the memory, and the at least one processor is used to read the computer program stored in the memory to execute the method provided in the first aspect.
[0041] In a fourth aspect, an embodiment of the present application provides a chip, which is used to read a computer program stored in a memory and execute the method provided in the first aspect above. Optionally, the chip may include a processor, which is coupled to the memory and is used to read the computer program stored in the memory to implement the method provided in the above embodiment. Optionally, the chip may also include components such as a memory, a communication interface, and a power supply module. The memory is used to store computer programs, the communication interface is used to receive and send data; and the power supply unit is used to power the processor.
[0042] In a fifth aspect, embodiments of the present application further provide a chip system, comprising a processor configured to support a computer device in implementing the method provided in any of the above aspects. In one possible design, the chip system further comprises a memory configured to store the necessary programs and data for the computer device. The chip system may be composed of a chip alone, or may include a chip and other discrete components.
[0043] In a sixth aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program. When the computer program runs on an electronic device, the computer executes the method provided in the first aspect above.
[0044] In a seventh aspect, an embodiment of the present application provides a computer program product, which includes a computer program; when the computer program is run on a computer, the computer is caused to execute the method provided in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] FIG1 is a schematic diagram of global local rendering provided by an embodiment of the present application;
[0046] FIG2 is a structural diagram of an electronic device provided in an embodiment of the present application;
[0047] FIG3 is a schematic diagram of a software structure of an electronic device provided in an embodiment of the present application;
[0048] FIG4 is a flowchart of a screenshot method provided in an embodiment of the present application;
[0049] FIG5A is a schematic diagram of a rule for adjusting the screenshot frequency provided by an embodiment of the present application;
[0050] FIG5B is a schematic diagram of a rule for adjusting the screenshot frequency provided by an embodiment of the present application;
[0051] FIG6A is a schematic diagram of a rule for adjusting the screenshot frequency provided by an embodiment of the present application;
[0052] FIG6B is a schematic diagram of a rule for adjusting the screenshot frequency provided by an embodiment of the present application;
[0053] FIG7A is a schematic diagram of a rule for adjusting the screenshot frequency provided by an embodiment of the present application;
[0054] FIG7B is a schematic diagram of a rule for adjusting the screenshot frequency provided by an embodiment of the present application;
[0055] FIG7C is a schematic diagram of a rule for adjusting the screenshot frequency provided by an embodiment of the present application;
[0056] FIG8 is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0057] FIG9 is a software architecture diagram of an electronic device provided in an embodiment of the present application;
[0058] FIG10 is a software architecture diagram of another electronic device provided in an embodiment of the present application;
[0059] FIG11 is a schematic diagram of a screenshot example provided in an embodiment of the present application;
[0060] FIG12 is a schematic diagram of another screenshot example provided in an embodiment of the present application;
[0061] FIG13 is a schematic diagram of another screenshot example provided in an embodiment of the present application;
[0062] FIG14 is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0063] This application provides a screenshot method and electronic device for taking screenshots of content drawn by a user on the display screen of an electronic device to improve the user experience. The method and electronic device are based on the same technical concept. Since the method and electronic device solve similar problems, the implementation of the electronic device and the method can refer to each other, and any repetitions will not be repeated.
[0064] Some of the terms used in this application are explained below to facilitate understanding by those skilled in the art.
[0065] 1) Electronic devices are devices or apparatuses that have data connectivity, data calculation, and data processing functions. Generally, electronic devices have display screens.
[0066] For example, the electronic device in this application may be a tablet computer, a personal computer (PC), a laptop computer, a computer, a netbook, a car computer, a smart phone, a smart wearable device (such as a smart watch, a smart bracelet, smart glasses, etc.), etc. Of course, the electronic device may also be various portable devices, car terminal devices, personal digital assistants (PDAs), smart home devices (such as smart TVs, etc.), and other smart devices. This application does not limit the specific form of the electronic device.
[0067] The electronic device can realize its functions through the operating system it carries and provide services to the user. For example, the electronic device can be equipped with, but not limited to, Or other operating systems.
[0068] 2) Applications are installed in electronic devices and can provide services to users after running. Applications can also be called application software or applications (APP). In the following description, application and application are equivalent and can be used interchangeably.
[0069] The application program may be developed by the manufacturer of the electronic device, or by the supplier of the operating system of the electronic device, or by a third-party application manufacturer, and this application does not limit this.
[0070] For example, the application programs may include: various drawing applications, call applications, camera applications, text messaging applications, chat applications, video applications, music applications, electronic map applications, social applications, etc.
[0071] 3) Screen reporting points are the touch points where the user performs touch operations on the display screen of the electronic device.
[0072] The screen reporting point is obtained by the sensor of the electronic device through continuous collection of operation data during the touch operation and through relevant processing of the electronic device. Based on this, each screen reporting point can have corresponding operation data, such as the pressure data of the screen reporting point, the position of the screen reporting point, the temperature of the screen reporting point, etc. Optionally, since the size of the user interface and the display screen may be the same or different, the position of the screen reporting point can be the position (coordinates) of the screen reporting point on the display screen, or it can be the position of the screen reporting point in the user interface currently displayed on the display screen (or the position relative to the application), and this application does not limit this.
[0073] It should be understood that in the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.
[0074] In the embodiments of the present application, descriptions such as "when...", "in the case of...", "if" and "if" all mean that the electronic device will perform corresponding processing under certain objective circumstances. It does not limit the time, nor does it require the electronic device to perform judgment actions when implemented, nor does it mean that there are other limitations.
[0075] It should be noted that in this application, "used for indication" can include being used for direct indication and being used for indirect indication. When describing that a certain information is used to indicate A, it can include that the information directly indicates A or indirectly indicates A, but it does not mean that the information must carry A. Taking the first information used to indicate the first content as an example, the first information can include the first content, and can also include a part of the first content or an identifier or index of the first content, etc., and can also include an algorithm or calculation parameters for determining the first content. This application does not limit the method of "indication".
[0076] In this application, "including / comprising A" may be equivalent to "including / comprising A information". A information is used to indicate A.
[0077] In addition, it should be understood that, in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0078] To enhance the user's touch experience on electronic devices, optimization measures can be designed within the electronic devices. These optimization measures generally require obtaining real-time content drawn by the user on the electronic device's display. For example, to improve the hand tracking of a user using a stylus on a tablet, it is necessary to obtain the real-time display content drawn by the user on the tablet's display and perform some processing. For another example, when a user opens a game application, the real-time position of the skill button displayed on the display can be obtained, allowing for quick analysis of the user's operation and improving the user experience.
[0079] Typically, capturing real-time content displayed on an electronic device's display screen involves taking a screenshot and then performing image recognition on the screenshot to identify elements within the screenshot and perform subsequent processing on those elements. Electronic devices typically take screenshots of the user interface on their displays at a fixed frequency, which is inflexible and can affect the user experience and waste power.
[0080] The following uses a global local drawing service that improves the hand-hand compatibility of electronic devices as an example to illustrate.
[0081] The global local drawing service is that the electronic device imitates and predicts the actual drawing trajectory drawn by the user on the electronic device display screen through the drawing operation, thereby obtaining a predicted drawing trajectory, and displays the predicted drawing trajectory on the electronic device display screen.
[0082] Referring to FIG1 , in order to implement a global local drawing service, an electronic device may create a transparent layer (which may be referred to as a global local drawing layer) above the layers corresponding to all applications, specifically for displaying the predicted drawing trajectory of the stylus. During the process of the user performing a drawing operation on the drawing interface displayed on the display screen (displayed on the application layer corresponding to the application with the drawing function), the electronic device may imitate and predict the user's actual drawing trajectory (including line distribution, brush mode, etc.) to obtain a predicted drawing trajectory. The user may take a screenshot of the drawing interface and perform image recognition on the screenshot image to obtain the brush mode parameters of the actual brush set by the user, and through learning and imitation, set the brush mode parameters of the global drawing brush corresponding to the global local drawing service to be consistent with the brush mode parameters of the actual brush, thereby improving the similarity between the predicted drawing trajectory and the actual drawing trajectory.
[0083] In the process of implementing a global local drawing service, if an electronic device takes screenshots of the drawing interface at a fixed frequency, the following problems may occur, ultimately affecting the user experience or causing waste of power consumption of the electronic device.
[0084] 1. Because the line width (thickness) of the actual drawing trajectory is strongly related to the pressure sensitivity of the drawing operation, if the pressure sensitivity of the drawing operation changes, if the screenshot frequency of the electronic device does not change accordingly, it is easy for the line width of the predicted drawing trajectory to be inconsistent with the actual drawing trajectory of the user on the drawing interface, and the predicted drawing trajectory cannot quickly adapt to the changing pressure sensitivity.
[0085] 2. If the user's drawing operation reaches certain non-drawing areas of the drawing interface, it is easy for the predicted drawing trajectory to exceed the drawing area.
[0086] 3. In some scenarios, taking screenshots at a fixed frequency may result in wasted power or mishandling.
[0087] For example, when the user's drawing operation is far away from the non-drawing area of the drawing interface (for example, the boundary of the drawing interface, menu bar, title bar and other functional areas), taking screenshots at a fixed screenshot frequency may cause power consumption waste.
[0088] For example, if the user doesn't perform other non-drawing operations like switching brushes during a drawing operation, using a fixed screenshot frequency will cause the electronic device to perform image recognition based on the screenshot image obtained from the current screenshot, which will also waste power. Furthermore, when the user performs non-drawing operations like switching brushes, using a fixed screenshot frequency can also lead to some processing errors, such as the predicted drawing trajectory not matching the actual drawing trajectory brush.
[0089] 4. When the user is drawing finely (i.e., drawing slowly), the actual drawing trajectory is drawn slowly, and chirality fully meets the requirements, so trajectory prediction is unnecessary. However, when the user draws quickly, the electronic device takes screenshots at a fixed frequency, which may cause the predicted drawing trajectory to fail to reach the user's latest drawing position, affecting the electronic device's chirality.
[0090] Based on this, the present application provides a screenshot method. The method includes: in the process of a user performing a first operation on a first user interface, the electronic device displays dynamically changing content in the first user interface and obtains first operation information of the first operation; then the electronic device determines a first frequency based on the first operation information; finally, the electronic device takes a screenshot of the first user interface based on the first frequency. In this way, the electronic device can adjust the screenshot frequency in real time according to the real-time operation information of the user's operation, so that the screenshot frequency of the electronic device can be flexibly adjusted to meet the screenshot needs of various situations, and ultimately save the power consumption of the electronic device and ensure the user experience.
[0091] The solution provided in the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0092] An embodiment of the present application provides an electronic device. The structure of the electronic device provided by the embodiment of the present application is introduced below with reference to FIG2 .
[0093] As shown in Figure 2, the electronic device 200 may include: a processor 210, an external memory interface 220, an internal memory 221, a USB interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a SIM card interface 295, etc.
[0094] The processor 210 may include one or more processing units, for example: the processor 210 may include a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices or integrated into one or more processors. Among them, the controller can be the nerve center and command center of the electronic device 200. The controller can generate an operation control signal based on the instruction opcode and the timing signal to complete the control of instruction fetching and execution.
[0095] The processor 210 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. This memory can store instructions or data that the processor 210 has just used or is reusing. If the processor 210 needs to use the instruction or data again, it can directly access it from the memory. By providing this memory, the number of times the processor 210 accesses data from the internal memory 221 can be reduced, reducing the processor 210's waiting time, thereby improving system efficiency.
[0096] The screenshot method provided in the embodiment of the present application can be controlled by the processor 210 or implemented by calling other components, such as controlling the display screen 294 to display the user interface and obtaining the operation information collected by the sensor module 280. The processor 210 can include different components. For example, when the processor 210 is integrated with a CPU and a GPU, the CPU and GPU can cooperate to execute the screenshot method provided in the embodiment of the present application. For example, part of the algorithm in the screenshot method is executed by the CPU, while another part of the algorithm related to the user interface display is executed by the GPU, so as to achieve faster processing efficiency.
[0097] Display screen 294 is used to display images, videos, etc. Display screen 294 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 200 may include one or N display screens 294, where N is a positive integer greater than 1. Display screen 294 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces (GUIs). For example, display screen 294 can display windows, photos, videos, web pages, or files. Furthermore, it will be appreciated that in some embodiments, the status bar may also include a Bluetooth icon, a Wi-Fi icon, an external device icon, etc. In some embodiments, when the processor 210 detects a touch operation by a user's finger (or stylus, pen, etc.), the processor 210 performs corresponding processing in response to the touch operation, such as displaying dynamically changing content in a user interface displayed on the display screen 294. In some embodiments, when the processor 210 detects a click operation on an application icon by an external input device (such as a mouse, keyboard, etc.) of the electronic device 200, the processor 210 performs corresponding control operations on the application in response to the click operation.
[0098] In the embodiment of the present application, the display screen 294 can be a single flexible display screen, or a spliced display screen composed of two or more rigid screens and a flexible screen located between two adjacent rigid screens. After the processor 210 executes the method provided in the embodiment of the present application, the processor 210 can control the display screen 294 to display the user interface of the application.
[0099] In some embodiments, part or all of the display area of display screen 294 can be used to display a user interface. For example, electronic device 200 can have multiple display modes, each with a corresponding display area. The shape or size of the display areas corresponding to different display modes can vary. It should be noted that the display areas corresponding to different display modes may overlap.
[0100] Of course, the electronic device 200 may also have only one display mode. In this case, the electronic device 200 may display the user interface through the entire area of the display screen 294 or through a partial area of the display screen 294.
[0101] The camera 293 is used to capture still images or videos. Optionally, the electronic device 200 may include 1 to N cameras 293. For example, the camera 293 may include a front camera or a rear camera, or one camera 293 may serve as both a front camera and a rear camera. Typically, the camera 293 may include a photosensitive element such as a lens group and an image sensor. The lens group includes a plurality of lenses (convex lenses or concave lenses) for collecting light signals reflected by the object to be photographed and transmitting the collected light signals to the image sensor. The image sensor generates an original image of the object to be photographed based on the light signal.
[0102] The internal memory 221 can be used to store computer executable program codes, which include instructions. The processor 210 executes various functional applications and data processing of the electronic device 200 by running the instructions stored in the internal memory 221. The internal memory 221 may include a program storage area and a data storage area. The program storage area may store an operating system, program codes of at least one application, etc. The operating system may include, but is not limited to, The data storage area can store data created during the use of the electronic device 200 .
[0103] The internal memory 221 may also store one or more computer programs for executing the methods provided in the embodiments of the present application. The one or more computer programs are stored in the internal memory 221 and configured to be executed by the one or more processors 210. The one or more computer programs include instructions, which can be used to execute the various steps in the following embodiments.
[0104] In addition, the internal memory 221 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0105] The sensor module 280 may include a fingerprint sensor, a touch sensor, a pressure sensor, a magnetic sensor, an ambient light sensor, an air pressure sensor, a bone conduction sensor, and the like.
[0106] A touch sensor, also known as a "touch panel," can be disposed on the display screen 294. The touch sensor is configured to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 294. In other embodiments, the touch sensor can also be disposed on the surface of the electronic device 200, at a location different from that of the display screen 294.
[0107] The wireless communication function of the electronic device 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor and the baseband processor.
[0108] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0109] The mobile communication module 250 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 200. The mobile communication module 250 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 250 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 250 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 250 can be set in the processor 210. In some embodiments, at least some of the functional modules of the mobile communication module 250 can be set in the same device as at least some of the modules of the processor 210.
[0110] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 270A, the receiver 270B, etc.) or displays an image or video through the display screen 294. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 210 and be set in the same device as the mobile communication module 250 or other functional modules.
[0111] The wireless communication module 260 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 200. The wireless communication module 260 can be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 210. The wireless communication module 260 can also receive the signal to be sent from the processor 210, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0112] In addition, the electronic device 200 can implement audio functions through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone jack 270D, and the application processor. For example, music playback, recording, etc. The electronic device 200 can receive input from the key 290 and generate key signal input related to the user settings and function control of the electronic device 200. The electronic device 200 can use the motor 291 to generate a vibration prompt. The indicator 292 in the electronic device 200 can be an indicator light, which can be used to indicate the charging status, power changes, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 295 in the electronic device 200 is used to connect the SIM card. The SIM card can be connected to and separated from the electronic device 200 by inserting it into the SIM card interface 295 or pulling it out from the SIM card interface 295.
[0113] It should be understood that, in actual applications, the electronic device 200 shown in FIG2 is merely an example and does not constitute a limitation of the electronic device. Furthermore, the electronic device 200 may have more or fewer components than shown in the figure, may combine two or more components, or may have a different component configuration. The various components shown in the figure may be implemented in hardware, including one or more signal processing and / or application-specific integrated circuits, software, or a combination of hardware and software.
[0114] The software system of the electronic device 200 provided in the embodiment of the present application can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the layered architecture as an example, and exemplifies the software structure of the electronic device as shown in FIG3 .
[0115] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. As shown in Figure 3, this software architecture can be divided into four layers: the application layer, the application framework (FWK), the Android runtime and system libraries, and the kernel layer. Electronic devices may also include a hardware layer.
[0116] The application layer is the top layer of the operating system, including native applications of the operating system and third-party applications such as camera, gallery, calendar, Bluetooth, music, video, information, etc.
[0117] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer may include some predefined functions. The application framework layer may include a window manager, an activity manager, an input composition manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and so on.
[0118] A window manager provides window management services (WMS). It can obtain the display size, determine whether a status bar is present, lock the screen, and take screenshots. It also provides multiple management functions to control parameters such as the transparency, position, and size of windows or interfaces on the display.
[0119] The activity manager provides activity management services (AMS) and is responsible for starting, switching, and scheduling components in the system, as well as managing and scheduling applications.
[0120] The Input Synthesis Manager is used to provide input synthesis services (InputFlinger) for collecting, processing, and distributing user operation information. For example, the Input Synthesis Manager can receive operation information reported by the sensor through the sensor driver, convert it into an input event, and distribute the input event to other modules for processing based on the event type of the input event. For example, when the user performs a drawing operation, the Input Synthesis Manager generates an input event after receiving the operation information of the drawing operation and distributes the input event to the window manager; the window manager then distributes it to the activity manager; the activity manager can respond to the input event and display the drawing track in the corresponding window.
[0121] In an embodiment of the present application, the application framework layer may further include a screenshot manager. The screenshot manager may be located in a module in the framework layer that provides certain services. Optionally, when a user performs a touch operation on the user interface of an electronic device, the screenshot manager may obtain the operation information corresponding to the touch operation in real time through the input synthesis manager, or obtain the operation information corresponding to the touch operation from the sensor driver; and determine the screenshot frequency based on the operation information and set rules. Afterwards, the screenshot manager may take a screenshot of the user interface currently displayed by the electronic device according to the screenshot frequency determined in real time, and obtain at least one screenshot image. The screenshot manager may also perform subsequent optimization processing based on the at least one screenshot image obtained by the screenshot to improve the user experience.
[0122] Content providers are used to store and retrieve data and make it accessible to applications. The data may include files (such as documents, videos, images, audio), text, and other information.
[0123] The view system includes visual controls, such as those for displaying text, images, and documents. The view system can be used to build applications. The interface within a display window can be composed of one or more controls. For example, a display interface showing a file icon might include controls for displaying text and images.
[0124] The notification manager enables applications to display notification information in the status bar, which can be used to convey informational messages and disappear automatically after a short stay without user interaction.
[0125] Optionally, in the Android system, the software structure of the electronic device also includes the Android runtime. The Android runtime consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and management of the Android system. The Android system's core library consists of two parts: one for the functional functions required by the Java language, and the other for the Android system's core library. The application layer and application framework layer run in the virtual machine. Taking Java as an example, the virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine is responsible for performing functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0126] The system library can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc. The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing. The 2D graphics engine is a drawing engine for 2D drawing.
[0127] The kernel layer provides the operating system's core system services, such as security, memory management, process management, network protocol stacks, and driver models. These services are all implemented within the kernel layer. The kernel layer also serves as an abstraction layer between the hardware and software stacks. This layer contains many drivers related to electronic devices, including: display drivers; keyboard drivers for input devices; Flash drivers for memory-based devices; sensor drivers; camera drivers; audio drivers; Bluetooth drivers; and Wi-Fi drivers.
[0128] In an embodiment of the present application, when a user performs a touch operation on the user interface, the sensor driver can obtain the user's operation information based on the user's touch operation detected by the sensor set on the display screen (such as a touch sensor and / or pressure sensor) and provide it to the input synthesis manager and the screenshot manager.
[0129] For example, in some embodiments of the present application, the touch operation received by the electronic device may include, but is not limited to, a click (such as a single click, double click, etc.) operation / long press operation / slide operation / drag operation / hover gesture operation on the display screen by a user using a finger or a touch-assisted tool such as a stylus, stylus, or touch ball. This embodiment of the present application does not specifically limit this.
[0130] The hardware layer can include various sensors, displays, cameras, etc.
[0131] It should be noted that Figure 3 is only an example of a software structure diagram of an electronic device, in which only the layers and software modules related to the present application are simply listed. In actual applications, the operating system of the electronic device may also include other layers, and each layer may also include other software modules for implementing one or more functions or services. In this regard, the embodiments of the present application do not make specific limitations. In addition, the embodiments of the present application do not limit the specific layers where each software module is located. For example, the screenshot manager may also be located in the system library or other layers.
[0132] The embodiment of the present application provides a screenshot method, which can be applied to the electronic device shown in Figure 2. The software structure of the electronic device can be seen in Figure 3. The method provided in the embodiment of the present application is described in detail below with reference to the flowchart shown in Figure 4.
[0133] S401: When a user performs a first operation on a first user interface, the electronic device displays dynamically changing content in the first user interface and obtains first operation information of the first operation.
[0134] In the embodiment of the present application, the first operation is a touch operation that can dynamically change the content displayed on the first user interface. In different application scenarios, the first operation is implemented in different ways.
[0135] For example, in a drawing scenario where the electronic device activates a drawing function, the first operation may be a drawing operation. The drawing operation may be a touch operation (e.g., a click operation, a slide operation, a drag operation, etc.) performed by the user on the first user interface on the display screen using a finger or a touch-assistive tool (e.g., a stylus, a touch pen, a touch ball, or a mouse). In this case, the first user interface is a drawing interface. While the user is performing the drawing operation, the electronic device will display the actual drawing trajectory corresponding to the drawing operation on the first user interface.
[0136] For another example, in a game scene where an electronic device launches a game application, the first operation may be a game operation. For a description of the game operation, reference may be made to the above-mentioned drawing operation. In this case, the first user interface is a game scene interface. While the user is performing the game operation, the electronic device displays content corresponding to the game operation (e.g., the game protagonist's moving position, switching game scenes, etc.) on the first user interface.
[0137] S402: The electronic device determines a first frequency according to the first operation information.
[0138] In this embodiment of the present application, the first operation information may include, but is not limited to, operation data indicating at least one first screen point in the first operation. The at least one first screen point is obtained during step S401, and the operation data of the at least one first screen point may include, but is not limited to, at least one of the following: pressure-sensing data of the at least one first screen point, the position of the at least one first screen point, etc.
[0139] Optionally, in the embodiment of the present application, the electronic device may perform S402 in the following two implementations, but is not limited to:
[0140] In a first embodiment, the electronic device stores a correspondence between operation information and screenshot frequency values, and can determine the first frequency corresponding to the first operation information based on the first operation information and the correspondence.
[0141] For example, the electronic device may determine the first frequency based on the pressure-sensing data of the first target screen point in the at least one first screen point report, and the corresponding relationship between the pressure-sensing data and the screenshot frequency value. The first target screen point report is the latest (i.e., most recently generated) screen point report in the at least one first screen point report.
[0142] For another example, the electronic device may determine the first frequency based on the average pressure value of the pressure data of the at least one first screen reporting point and the correspondence between the pressure data and the screenshot frequency value.
[0143] Second implementation: The electronic device can adjust the original screenshot frequency according to the first operation information to obtain a new screenshot frequency. The first frequency is the new screenshot frequency. The following description takes the original screenshot frequency as the second frequency as an example.
[0144] Optionally, the second frequency may be adjusted based on the previous screenshot frequency, or may be a set frequency (a default screenshot frequency of an application or electronic device, or a screenshot frequency set by a user, etc.). At the start time of the first operation, the electronic device may take screenshots of the first user interface at the default frequency. For example, when the electronic device takes screenshots of the first user interface at the start time of the first operation at the second frequency, the second frequency is the default frequency.
[0145] In this embodiment, before obtaining the first operation information, the electronic device may also use the second frequency to take a screenshot of the first user interface. Based on this, when executing S402, the electronic device may determine the first frequency according to the first operation information and the second frequency.
[0146] The following describes several implementations according to the specific content indicated by the first operation information and different adjustment rules.
[0147] Implementation method 1: The first operation information indicates pressure-sensing data of at least one first screen reporting point in the first operation.
[0148] In this first implementation, the first target screen reporting point is the most recent screen reporting point among the at least one first screen reporting point, and the second target screen reporting point is the screen reporting point before the first target screen reporting point among the at least one first screen reporting point. Optionally, the second target screen reporting point and the first target screen reporting point can be adjacent or non-adjacent screen reporting points, which is not limited in this application.
[0149] Mode 1-1: The first frequency is different from the second frequency, that is, the new screenshot frequency determined each time by the electronic device is different from the original screenshot frequency, and the electronic device increases or decreases the frequency based on the original screenshot frequency to obtain a new screenshot frequency.
[0150] In the present method 1-1, referring to FIG5A , the electronic device determines the first frequency by any of the following steps:
[0151] When a pressure-sensitivity change between the pressure-sensitivity data of the first target screen reporting point and the pressure-sensitivity data of the second target screen reporting point is greater than or equal to a first pressure-sensitivity threshold, determining that the first frequency is greater than the second frequency;
[0152] When the pressure sensitivity change is less than the first pressure sensitivity threshold, it is determined that the first frequency is less than the second frequency.
[0153] Through method 1-1, the electronic device can increase the screenshot frequency when the pressure change of the first operation is large, thereby increasing the number of times the electronic device executes subsequent optimization measures or the number of screenshot images processed, or reducing the delay in executing the subsequent optimization measures to increase the sensitivity of the optimization measures, and ultimately improving the user's experience of using the optimization measures. When the pressure change of the first operation is not large, the screenshot frequency is reduced, thereby reducing the number of times the electronic device executes subsequent optimization measures or the number of screenshot images processed, or increasing the delay in executing subsequent optimization measures, and ultimately saving the power consumption of the electronic device. In short, this method can improve the flexibility of electronic device screenshots, ensure user experience, and avoid waste of power consumption of electronic devices.
[0154] Method 1-2: The relationship between the first frequency and the second frequency is not limited. The first frequency and the second frequency can be different or the same. That is, the electronic device can increase or decrease the frequency based on the original screenshot frequency to obtain a new screenshot frequency, or it can keep the original screenshot frequency unchanged.
[0155] In the present method 1-2, referring to FIG. 5B , the electronic device may determine the first frequency by any of the following steps:
[0156] When a pressure sensitivity change between the pressure sensitivity data of the first target screen reporting point and the pressure sensitivity data of the second target screen reporting point is greater than or equal to a first pressure sensitivity threshold, determining that the first frequency is greater than the second frequency;
[0157] When the pressure sensitivity change is less than a second pressure sensitivity threshold, determining that the first frequency is less than the second frequency; wherein the second pressure sensitivity threshold is less than the first pressure sensitivity threshold;
[0158] When the pressure sensitivity change is less than the first pressure sensitivity threshold and greater than or equal to the second pressure sensitivity threshold, it is determined that the first frequency is equal to the second frequency.
[0159] Compared to the above-described method 1-1, with this method 1-2, the electronic device can also avoid adjusting the screenshot frequency when the change in the first operation is within the range of the first pressure threshold and the second pressure threshold, thereby ensuring that the subsequent optimization measures performed by the electronic device have the same effect as before. This method can further improve the flexibility of the electronic device's screenshots, ensure the user experience of the electronic device, and avoid wasted power consumption of the electronic device.
[0160] Implementation method 2: The first operation information is used to indicate the position of at least one first screen reporting point in the first operation.
[0161] In the second implementation mode, the third target screen reporting point is the latest screen reporting point among the at least one first screen reporting point.
[0162] It should be noted that when the first operation information indicates the location of at least one first screen reporting point in the first operation, the electronic device can determine multiple pieces of information based on the first operation information, such as: the distance between the first operation and a set area (a specific area) in the first user interface, whether other operations other than the first operation are performed (hereinafter referred to as the second operation), and the current operation speed of the first operation (i.e., referred to as the first operation speed). In this way, the electronic device can further determine the first frequency based on the above information.
[0163] Optionally, the setting area does not achieve the purpose of the user performing the first operation. For example, the setting area may be a boundary of the user interface, or include specific elements (menu bar, title bar, etc.).
[0164] Optionally, when the electronic device determines the distance between the position of the third target screen reporting point and the set area in the first user interface (i.e., the distance between the first operation and the set area in the first user interface) based on the first operation information, the electronic device can determine the first frequency through the following method 2-1 or method 2-2.
[0165] Mode 2-1: The first frequency is different from the second frequency, that is, the new screenshot frequency determined each time by the electronic device is different from the original screenshot frequency, and the electronic device increases or decreases the frequency based on the original screenshot frequency to obtain a new screenshot frequency.
[0166] In the present method 2-1, referring to FIG6A , the electronic device determines the first frequency by any of the following steps:
[0167] When the distance between the position of the third target screen reporting point and the set area in the first user interface is less than or equal to a first distance threshold, determining that the first frequency is greater than the second frequency;
[0168] When the distance between the position of the third target screen reporting point and the set area in the first user interface is greater than a first distance threshold, it is determined that the first frequency is less than the second frequency.
[0169] Through method 2-1, the electronic device can increase the screenshot frequency when the first operation is close to the set area of the first user interface, thereby increasing the number of times the electronic device executes subsequent optimization measures or the number of screenshot images processed, or reducing the delay in executing the subsequent optimization measures to improve the sensitivity of the optimization measures, and ultimately improving the user's experience of using the optimization measures. In the case that the first operation is not close to the set area of the first user interface, the screenshot frequency is reduced, thereby reducing the number of times the electronic device executes subsequent optimization measures or the number of screenshot images processed, or increasing the delay in executing subsequent optimization measures, and ultimately saving the power consumption of the electronic device. In short, this method can improve the flexibility of electronic device screenshots, ensure user experience, and avoid waste of power consumption of electronic devices.
[0170] Method 2-2: The relationship between the first frequency and the second frequency is not limited. The first frequency and the second frequency can be different or the same. That is, the electronic device can increase or decrease the frequency based on the original screenshot frequency to obtain a new screenshot frequency, or it can keep the original screenshot frequency unchanged.
[0171] In the present method 2-2, referring to FIG6B , the electronic device determines the first frequency by any of the following steps:
[0172] When the distance between the position of the third target screen reporting point and the set area in the first user interface is less than or equal to a first distance threshold, determining that the first frequency is greater than the second frequency;
[0173] When the distance between the position of the third target screen reporting point and the set area in the first user interface is greater than a second distance threshold, determining that the first frequency is less than the second frequency;
[0174] When the distance between the position of the third target screen reporting point and the set area in the first user interface is greater than the first distance threshold and less than or equal to the second distance threshold, it is determined that the first frequency is equal to the second frequency.
[0175] Compared to the above-described method 2-1, with this method 2-2, the electronic device can also not adjust the screenshot frequency when the distance between the first operation and the set area in the first user interface is within the first distance threshold and the second distance threshold, thereby ensuring that the electronic device performs subsequent optimization measures with the same effect as before. This method can further improve the flexibility of the electronic device's screenshots, ensure the user experience of the electronic device, and avoid wasted power consumption of the electronic device.
[0176] It should be noted that in the above-mentioned method 2-1 or 2-2, the various distance thresholds can be preset or determined based on the current operation speed of the first operation. For example, assuming that the screenshot frequency of the electronic device needs to be increased 0.1ms before the first operation reaches the set area, the first distance threshold is the product of the current operation speed of the first operation and 0.1ms.
[0177] Optionally, when the electronic device can identify whether the user performs the second operation on the first user interface based on the position of at least one first screen reporting point in the first operation information, the electronic device can determine the first frequency through the following method 2-3.
[0178] Exemplarily, the electronic device can identify whether the user performs the second operation by determining whether there is a screen reporting point located within the area that triggers the second operation among the positions of the at least one first screen reporting point; or identify whether the user performs the second operation by determining whether the position relationship of different screen reporting points when the second operation (such as right-click, single-click, combo click, etc.) is performed based on the position relationship of the at least one screen reporting point; or identify whether the user performs the second operation based on whether the position change between adjacent screen reporting points in the at least one screen reporting point exceeds a set threshold.
[0179] Method 2-3: The electronic device can determine the first frequency by any of the following steps:
[0180] When the electronic device recognizes that the user performs a second operation on the first user interface based on the position of the at least one first screen reporting point, determining that the first frequency is greater than the second frequency;
[0181] When the electronic device does not recognize that the user performs the second operation on the first user interface according to the position of the at least one first screen reporting point, it is determined that the first frequency is less than or equal to the second frequency.
[0182] In which, when the electronic device does not recognize the second operation, the electronic device can directly determine that the first frequency is equal to the second frequency, or determine that the first frequency is less than the second frequency; or the electronic device can further determine the value of the first frequency in combination with other conditions.
[0183] Optionally, the second operation may be some setting, control, management and other operations, which may cause changes in the content displayed in the first user interface. Therefore, when the electronic device recognizes that the user performs the second operation while performing the first operation, the screenshot frequency should be increased.
[0184] Through the method 2-3, the electronic device can increase the screenshot frequency when it recognizes that the user is performing the second operation during the execution of the first operation, thereby increasing the number of times the electronic device performs subsequent optimization measures or the number of screenshot images processed, or reducing the delay in executing the subsequent optimization measures to improve the sensitivity of the optimization measures, and ultimately improving the user's experience of using the optimization measures. In the case that the electronic device does not recognize the second operation during the first operation, the screenshot frequency is reduced, thereby reducing the number of times the electronic device performs subsequent optimization measures or the number of screenshot images processed, or increasing the delay in executing subsequent optimization measures, and ultimately saving the power consumption of the electronic device; or the electronic device maintains the screenshot frequency unchanged to ensure that the effect of the electronic device executing subsequent optimization measures is the same as before. In short, this method can improve the flexibility of electronic device screenshots, ensure user experience, and avoid waste of power consumption of electronic devices.
[0185] Optionally, when the electronic device determines the first operation speed (current operation speed) of the first operation based on the position of the at least one first screen reporting point, the electronic device may determine the first frequency through the following method 2-4 or method 2-5.
[0186] Exemplarily, the electronic device can determine the first operation speed based on the change amount / change rate between the position of the third target screen point and the position of the previous screen point, wherein the previous screen point is a screen point before the third target screen point in at least one first screen point (for example, the first generated screen point, or a screen point adjacent to the third target screen point).
[0187] Mode 2-4: The first frequency is different from the second frequency, that is, the new screenshot frequency determined each time by the electronic device is different from the original screenshot frequency, and the electronic device increases or decreases the frequency based on the original screenshot frequency to obtain a new screenshot frequency.
[0188] In the present method 2-4, referring to FIG. 7A , the electronic device determines the first frequency by any of the following steps:
[0189] When a first operation speed of the first operation is greater than or equal to a first speed threshold, determining that the first frequency is greater than the second frequency;
[0190] When a first operation speed of the first operation is less than a first speed threshold, it is determined that the first frequency is less than the second frequency.
[0191] When the user performs the first operation at a fast speed, it is easy to make an incorrect operation or incorrectly execute the optimization measure due to the large span of the operation position. Through the method 2-4, the electronic device can increase the screenshot frequency when the operation speed of the first operation is fast, thereby increasing the number of times the electronic device performs subsequent optimization measures or the number of screenshot images processed, or reducing the delay in executing the subsequent optimization measures to improve the sensitivity of the optimization measures, and ultimately improving the user's experience of using the optimization measures. When the operation speed of the first operation is slow, reduce the screenshot frequency, thereby reducing the number of times the electronic device performs subsequent optimization measures or the number of screenshot images processed, or increase the delay in executing subsequent optimization measures, and ultimately save the power consumption of the electronic device. In short, this method can improve the flexibility of electronic device screenshots, ensure user experience and avoid waste of power consumption of electronic devices.
[0192] In mode 2-5, the relationship between the first frequency and the second frequency is not limited. The first frequency and the second frequency can be different or the same, that is, the electronic device can increase or decrease the frequency based on the original screenshot frequency to obtain a new screenshot frequency; or it can keep the original screenshot frequency unchanged.
[0193] In the present method 2-5, referring to FIG. 7B , the electronic device determines the first frequency by any of the following steps:
[0194] When a first operation speed of the first operation is greater than or equal to a first speed threshold, determining that the first frequency is greater than the second frequency;
[0195] When the first operation speed of the first operation is less than the second speed threshold, it is determined that the first frequency is less than the second frequency.
[0196] When the first operation speed of the first operation is greater than or equal to the second speed threshold and less than the first speed threshold, it is determined that the first frequency is equal to the second frequency.
[0197] Compared to the above-described method 2-4, with this method 2-5, the electronic device can also not adjust the screenshot frequency when the operating speed of the first operation is within the range of the first speed threshold and the second speed threshold, thereby ensuring that the electronic device performs subsequent optimization measures with the same effect as before. This method can further improve the flexibility of the electronic device's screenshots, ensure the user experience of the electronic device, and avoid wasted power consumption of the electronic device.
[0198] Based on the above description of Methods 2-1 to 2-5 in Implementation Method 2, it can be seen that when the electronic device can determine at least one of the following based on the first operation information, the electronic device can determine the first frequency based on multiple conditions: the distance between the position of the third target screen report point and the set area in the first user interface, whether the user is identified to perform the second operation on the first user interface, and the first operation speed of the first operation. That is:
[0199] When at least one of the first conditions is met, the electronic device determines that the first frequency is greater than the second frequency, that is, increases the screenshot frequency. The first condition includes:
[0200] The distance between the position of the third target screen reporting point and the set area in the first user interface is less than or equal to the first distance threshold.
[0201] recognizing, based on the position of at least one first screen reporting point, that the user performs a second operation on the first user interface;
[0202] A first operation speed of the first operation is greater than or equal to a first speed threshold.
[0203] When at least one of the second conditions is met, the electronic device determines that the first frequency is less than the second frequency, that is, reduces the screenshot frequency. The second condition includes:
[0204] The distance between the position of the third target screen reporting point and the set area in the first user interface is greater than the second distance threshold; the second distance threshold is greater than or equal to the first distance threshold;
[0205] The user is not recognized to perform a second operation on the first user interface according to the position information of the at least one first screen reporting point;
[0206] A first operation speed of the first operation is less than a second speed threshold; and the second speed threshold is less than or equal to the first speed threshold.
[0207] When at least one of the third conditions is met, the electronic device determines that the first frequency is equal to the second frequency, that is, the screenshot frequency remains unchanged. The third condition includes:
[0208] When the second distance threshold is greater than the first distance threshold, the distance between the position of the third target screen reporting point and the set area is greater than the first distance threshold and less than or equal to the second distance threshold;
[0209] The user is not recognized to perform a second operation on the first user interface according to the position information of the at least one first screen reporting point;
[0210] In a case where the second speed threshold is smaller than the first speed threshold, the first operation speed of the first operation is greater than or equal to the second speed threshold and smaller than the first speed threshold.
[0211] In one embodiment, in addition to the electronic device obtaining a new screenshot frequency based on the original screenshot frequency, in some scenarios, the electronic device may also stop taking screenshots of the first user interface. For example, after the electronic device takes a screenshot of the first user interface according to the first frequency (S403), the electronic device may continue to obtain second operation information of the first operation. The second operation information is used to indicate the location of at least one second screen reporting point in the first operation. The at least one second screen reporting point is obtained by the electronic device during the screenshot process using the first frequency.
[0212] When the electronic device determines that at least one of the following fourth conditions is met, the electronic device may stop taking screenshots of the first user interface. The fourth condition includes:
[0213] The distance between the position of the fourth target screen reporting point and the set area of the first user interface is equal to 0; the fourth target screen reporting point is the latest screen reporting point among the at least one second screen reporting point;
[0214] The second operation speed of the first operation determined according to the position of at least one second screen reporting point is less than or equal to a third speed threshold; wherein the third speed threshold is less than the second speed threshold.
[0215] It should be noted that, when the electronic device stops taking screenshots of the first user interface when the second operation speed is less than the third speed threshold, the first operation speed in the above second condition is less than the second speed threshold, including: the first operation speed is greater than the third speed threshold and less than the second speed threshold, and the rule for adjusting the screenshot frequency based on the operation speed of the first operation is consistent with Figure 7C.
[0216] Through this implementation, the electronic device can stop taking screenshots of the first user interface when the first operation enters the set area or the first operation is a refined operation (no need to perform subsequent optimization measures), thereby causing the electronic device to stop performing subsequent optimization measures, thereby further saving the power consumption of the electronic device and avoiding waste of power consumption.
[0217] It should also be noted that the electronic device can adjust the screenshot frequency according to the set adjustment step (adjustment value), that is, when the first frequency is different from the second frequency (the first frequency is greater than or less than the first frequency), the change between the first frequency and the second frequency is the set value.
[0218] S403: The electronic device takes a screenshot of the first user interface according to the first frequency.
[0219] In an embodiment of the present application, the electronic device may obtain at least one screenshot image during the process of executing S403, and the electronic device may perform subsequent optimization measures based on these screenshot images to protect the user experience.
[0220] Taking an application scenario where an electronic device activates a drawing function as an example, the first operation is a drawing operation. During the electronic device's execution of S403, the electronic device may obtain at least one first screenshot image and may also obtain third operation information of the first operation. Thereafter, the electronic device may implement a global local drawing service based on the at least one first screenshot image and the third operation information through the following steps:
[0221] A1: The electronic device performs image recognition on a drawing trajectory in at least one first screenshot image to determine a first brush mode parameter.
[0222] Optionally, the first brush mode parameter includes at least one of the following: brush type, line color, line width, and line texture.
[0223] Exemplarily, brush types may include: pen, pencil, marker, watercolor pen, oil brush, etc.; line colors may include black, red, green, blue, purple, etc.; line textures may include no texture, water ripple, marble, wood grain, gravel, etc.
[0224] A2: The electronic device determines a predicted drawing trajectory according to the first brush mode parameter and the third operation information.
[0225] The third operation information is used to indicate the position of at least one third screen reporting point. In this way, the electronic device can predict the user's drawing trajectory based on the first brush mode parameter and the position of the at least one third screen reporting point, and determine the predicted drawing trajectory. The specific process can refer to the trajectory prediction algorithm in the global local drawing service, which will not be repeated here.
[0226] A3: The electronic device displays the predicted drawing trajectory in the first user interface.
[0227] 1 , the electronic device may display the actual drawing trajectory of the first operation in the application image and the predicted drawing trajectory in the global local drawing layer. The electronic device synthesizes and displays the two layers to form a first user interface.
[0228] An embodiment of the present application provides a screenshot method. The method includes: when a user performs a first operation on a first user interface, the electronic device displays dynamically changing content in the first user interface and obtains first operation information of the first operation; then the electronic device determines a first frequency based on the first operation information; and finally the electronic device takes a screenshot of the first user interface based on the first frequency. In this way, the electronic device can adjust the screenshot frequency in real time based on the real-time operation information of the user's operation, so that the screenshot frequency of the electronic device can be flexibly adjusted to meet the screenshot requirements of various situations, ultimately saving the power consumption of the electronic device and ensuring the user experience.
[0229] The screenshot method provided by the embodiment shown in FIG4 of the present application can be applied to various scenarios in which an electronic device takes a screenshot of a user interface when a user performs a touch operation. The following is an example of an application scenario in which an electronic device implements a global local drawing service. Referring to FIG8 , during the global local drawing process, the electronic device generates a plurality of screen reporting points based on the user's drawing operation, and the electronic device displays the actual drawing trajectory on the display screen based on the generated screen reporting points; in addition, during the drawing operation, the electronic device can determine the screenshot frequency in real time through the operation information of the drawing operation (such as the position of the screen reporting point, pressure sensitivity, etc.) to take a screenshot of the user interface displayed by the electronic device; after the electronic device takes a screenshot, some subsequent auxiliary measures or optimization measures to enhance the user experience are performed based on the obtained screenshot image. For example, as shown in FIG8 , the electronic device can predict and display the user's drawing trajectory (i.e., the predicted drawing trajectory).
[0230] Since the electronic device can adjust the screenshot frequency in real time according to the real-time operation information of the user's drawing operation, the screenshot frequency of the electronic device can be flexibly adjusted to meet the screenshot needs of various situations, which can ultimately save the power consumption of the electronic device and ensure the user experience.
[0231] For example, based on the embodiment shown in FIG4, in an application scenario where an electronic device implements a global local rendering service, the software structure of the electronic device may be as shown in FIG9. The electronic device includes a display module, a screenshot management module, an image data analysis service module, a trajectory prediction module, and the like.
[0232] After obtaining the operation information of the drawing operation, the sensor driver of the electronic device can report it to the display module, the screenshot management module, and the trajectory prediction module for subsequent processing.
[0233] The screenshot management module can determine the current screenshot frequency according to the operation information of the drawing operation, and then send a screenshot instruction to the display module to instruct the display module to take a screenshot of the user interface currently displayed on the display screen according to the screenshot frequency.
[0234] After the display module takes a screenshot of the user interface according to the screenshot instruction of the screenshot management module, it sends the screenshot image to the screenshot management module; the screenshot management module forwards it to the image data analysis service module; or the display module can directly send the screenshot image to the image data analysis service module.
[0235] The image data analysis service module performs image recognition analysis on the received screenshot image to determine the user's current brush mode parameters; and sends the determined brush mode parameters to the trajectory prediction module.
[0236] The trajectory prediction module performs trajectory prediction based on the brush mode parameters and the operation information of the current drawing operation to obtain a predicted drawing trajectory.
[0237] The display module can display the actual drawing trajectory corresponding to the drawing operation according to the operation information of the current drawing operation, and can also display the predicted drawing trajectory obtained by the trajectory prediction module.
[0238] For example, based on the embodiment shown in FIG4 and the software structure of the electronic device shown in FIG3, in an application scenario where the electronic device implements a global local rendering service, the software structure of the electronic device may also refer to FIG10. The application framework layer may provide services such as the window management service (WMS), the activity management service (AMS), the input composition service (InputFlinger), the global local rendering service, and the image plane engine (SurfaceFlinger).
[0239] After the electronic handwriting application is started, the electronic device starts the global local drawing service. The user can, but is not limited to, use a finger or other touch-assisted tool to draw the user interface displayed on the display screen. As shown in Figure 10, the sensor driver of the kernel layer can obtain the operation information of the drawing operation based on the sensor (such as a touch sensor and / or a pressure sensor) set on the display screen during the user's drawing operation on the user interface, and then report the operation information of the drawing operation to the input synthesis service of the application framework layer. Optionally, the sensor driver can also report the operation information of the drawing operation directly to the global local drawing service of the application framework layer.
[0240] The input composition service can convert the received drawing operation information into specific input events and notify the handwriting application of the input event through the activity management service. In addition, the input composition service can also provide the input event to the global local drawing service.
[0241] As shown in the figure, the global local drawing service can implement functions such as screen point acquisition, screen point prediction, screenshot management, brush recognition, and trajectory prediction. Optionally, the global local drawing service can obtain operation information of drawing operations based on input events provided by the input synthesis service, or directly obtain operation information of drawing operations from the sensor driver.
[0242] The screen point acquisition module in the global local drawing service can analyze and process the operation information of the drawing operation to obtain at least one screen point and the operation data of the at least one screen point (pressure data, position information, etc.).
[0243] The screenshot management module can determine the screenshot frequency based on the operation data of the at least one screen report point. The specific process can refer to the screenshot method provided in the above embodiment and will not be repeated here. The screenshot management module can then send a screenshot instruction to the screenshot module in SurfaceFlinger, instructing the screenshot module to use the currently determined screenshot frequency to take a screenshot of the user interface displayed on the electronic device.
[0244] After the screenshot module takes a screenshot of the user interface through the display driver and obtains at least one screenshot image, the screenshot module sends the at least one screenshot image to the brush recognition module in the global local drawing service.
[0245] The brush recognition module performs image recognition on the at least one received screenshot image to obtain a brush mode parameter of a brush currently used by the user.
[0246] The screen point prediction module in the global local drawing service can predict the position of the screen point that may be generated by the subsequent drawing operation based on the position of at least one screen point analyzed by the screen point acquisition module.
[0247] The trajectory prediction module in the global local drawing service predicts the drawing trajectory based on the brush mode parameters obtained by the brush recognition module and the screen point prediction module's predicted positions of subsequent drawing operations, generating a predicted drawing trajectory. The trajectory prediction module then transmits the predicted drawing trajectory to SurfaceFlinger, which draws the predicted drawing trajectory onto the global local drawing layer.
[0248] In addition, after receiving the input event from the input synthesis service, the handwriting application can analyze and process the input event to obtain the actual drawing trajectory corresponding to the drawing operation, and notify the actual drawing trajectory to SurfaceFlinger, which will draw the actual drawing trajectory to the application layer corresponding to the handwriting application.
[0249] SurfaceFlinger can synthesize the image display data of the global local drawing layer and the application layer to generate a user interface, and display the user interface on the display of the electronic device through the display driver.
[0250] Optionally, SurfaceFlinger can also manage brushes. For example, SurfaceFlinger can create, update, and delete brushes based on the brush configuration parameters of the handwriting application. SurfaceFlinger also has the ability to create and manage layers.
[0251] Based on the screenshot method provided in the embodiments of the present application, in the application scenario where the electronic device implements the drawing function (such as the global local drawing service), the present application also provides the following embodiments, so that the electronic device can adjust the screenshot frequency through a series of rules.
[0252] Each embodiment will be described in detail below with reference to the accompanying drawings.
[0253] Embodiment 1: Adjusting the screenshot frequency according to the pressure change of the drawing operation.
[0254] In this embodiment, the electronic device can determine the pressure change of the drawing operation based on the operation information of the drawing operation. When the pressure change exceeds a set threshold, it means that the pressure change of the user's drawing operation is large, and the electronic device can increase the screenshot frequency.
[0255] For example, assuming the pressure threshold is 100 and the current screenshot frequency is 200ms, when the user begins to draw, the electronic device's screenshot frequency is 200ms, and the pressure data of the drawing operation is 300. Then, when the pressure data of the drawing operation increases to 400 or decreases to 200 (i.e., the pressure change is greater than or equal to 100), the electronic device can increase the screenshot frequency to 100ms, which can quickly learn and simulate the user's actual drawing handwriting. Afterwards, when the pressure data of the drawing operation stabilizes at 200 or 400 (i.e., the pressure change is less than 100), the electronic device can reduce the screenshot frequency to 200ms.
[0256] Regarding the process of determining the pressure sensitivity change amount of the drawing operation according to the operation information of the drawing operation, reference may be made to the description of the first implementation in the embodiment shown in FIG4 , and will not be repeated here.
[0257] Because the screenshot frequency increases, the electronic device can subsequently analyze the screenshot data faster, thereby better implementing subsequent optimization measures. Therefore, this method can better apply the pressure sensitivity of drawing operations to the optimization measures of electronic devices. However, if the electronic device always uses a fixed screenshot frequency, when the pressure sensitivity of the drawing operation changes greatly, the optimization measures of the electronic device will be delayed significantly, resulting in the electronic device sensing the pressure sensitivity of the drawing operation more slowly.
[0258] Referring to Figure 11, in the process of an electronic device implementing a global local drawing service, when the pressure change of the user's drawing operation is less than the set pressure threshold, the electronic device may not adjust the screenshot frequency; when the pressure change of the drawing operation is greater than or equal to the set pressure threshold, the electronic device may increase the screenshot frequency, so that the electronic device can predict and simulate the drawing trajectory under the current pressure data more quickly.
[0259] Embodiment 2: Adjusting the screenshot frequency according to the distance between the drawing operation and the non-drawing area of the user interface (such as the menu bar and the user interface boundary, which may also be referred to as a specific area or specific element).
[0260] Referring to FIG12 , when a drawing operation is far from a non-drawing area (taking the menu bar as an example) (for example, the distance between the drawing operation and the non-drawing area is greater than a set distance threshold (for example, 1 cm)), the electronic device may not adjust the screenshot frequency; when a drawing operation is close to the non-drawing area (for example, the distance between the drawing operation and the non-drawing area is less than or equal to the set distance threshold), the electronic device may increase the screenshot frequency, so that the electronic device can stop predicting and simulating the drawing trajectory in time when the drawing operation reaches the non-drawing area, preventing the electronic device from displaying the predicted and simulated drawing trajectory in the non-drawing area, avoiding erroneous operations, and ensuring user experience.
[0261] Regarding the process of determining the distance between the drawing operation and the non-drawing area of the user interface based on the operation information of the drawing operation, reference may be made to the description of the second implementation in the embodiment shown in FIG. 4 , and no further details will be given here.
[0262] Exemplarily, the set distance threshold can be determined based on the current operation speed of the drawing operation. For example, assuming that the screenshot frequency of the electronic device needs to be increased 0.1ms before the drawing operation (the location of the latest screen report point) reaches the set area, the set distance threshold is the product of the current operation speed of the drawing operation and 0.1ms.
[0263] Embodiment 3: Adjusting the screenshot frequency according to whether a non-drawing operation (such as switching a brush mode, switching a drawing style, etc.) is performed during the drawing operation.
[0264] Referring to Figure 13, when the electronic device does not recognize that the user is performing a non-drawing operation based on the operation information of the drawing operation (for example, by determining whether the user clicks the menu bar, whether there is at least one screen reporting point in the operation information located within the area where the menu bar is located, the position change between adjacent screen reporting points exceeds a set threshold, etc.), the electronic device can reduce the screenshot frequency; otherwise, it will increase the screenshot frequency.
[0265] This embodiment is different from the scenarios of embodiments one and two. When the user does not perform non-drawing operations (such as clicking the menu bar, etc.) during the drawing operation, it means that the user has not switched the brush mode. Therefore, the electronic device reduces the screenshot frequency and can save power consumption of the electronic device.
[0266] Furthermore, the electronic device may reduce the screenshot frequency when it is not recognized that the user performs a non-drawing operation and the distance between the drawing operation and the non-drawing area of the user interface is greater than a set distance threshold.
[0267] Embodiment 4: adjusting the screenshot frequency according to the operation speed of the drawing operation (ie, the drawing speed).
[0268] When the operating speed of the drawing operation is greater than or equal to a first speed threshold, the electronic device increases the screenshot frequency; when the operating speed of the drawing operation is less than the first speed threshold and greater than a second speed threshold, the electronic device reduces the screenshot frequency; when the operating speed of the drawing operation is less than or equal to the second speed threshold, the electronic device stops taking screenshots.
[0269] For example, if the speed of the drawing operation is low (for example, less than 2 cm / s), it means that the user is doing some fine writing or painting. At this time, the electronic device does not need to perform predictive simulation operations for drawing notes. Therefore, stopping taking screenshots of the user interface can save power consumption of the electronic device and avoid adverse effects on the user's drawing experience.
[0270] Optionally, the screenshot solution provided by the embodiment of the present application can also be extended to non-drawing scenes, such as game scenes. Optionally, in game software, the screenshot solution provided by the embodiment of the present application can be used as an auxiliary plug-in for the game to provide game optimization services for users. Exemplary, for example, an electronic device can identify the position of a skill button through screenshot image analysis. When the electronic device determines that the user is approaching a skill button through the operation information of the user's game operation, the electronic device can increase the screenshot frequency so that the electronic device can quickly perform image analysis based on the screenshot image. In this way, when the electronic device presses the skill case, the electronic device can make a notification such as prompting the user to release the skill (for example, prompting the user whether releasing this killing skill can kill the enemy, or prompting the user whether releasing this displacement technology can traverse the current terrain, etc.), thereby improving the user's gaming experience.
[0271] It should also be noted that each step involved in the above embodiments can be performed by a corresponding device, or by a component such as a chip, processor, or chip system within the device, and the embodiments of the present application do not limit this. The above embodiments are only described as being performed by a corresponding device. In addition, the specific implementation methods or examples in the above embodiments do not limit the solutions provided in the embodiments of the present application.
[0272] Furthermore, the embodiments and examples of this application do not limit the conditions for adjusting the screenshot frequency; expansions or variations based on the conditions in the above embodiments or examples fall within the scope of protection of the embodiments of this application. For example, if the distance between the first operation and the set area in the first user interface is less than a first distance threshold, this can also be expanded to include the time it takes for the first operation to reach the set area in the first user interface being less than a set time threshold.
[0273] It should be noted that in each of the above embodiments, some steps may be selected for implementation, and the order of the steps in the diagrams may be adjusted for implementation, and this application does not limit this. It should be understood that executing some of the steps in the diagrams, adjusting the order of the steps, or combining them for specific implementation all fall within the scope of protection of this application.
[0274] It is understandable that in order to implement the functions in the above embodiments, the various devices involved in the above embodiments include hardware structures and / or software modules corresponding to the execution of each function. It should be readily apparent to those skilled in the art that, in combination with the units and method steps of the various examples described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.
[0275] It can be understood that the above-mentioned network architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Ordinary technicians in this field can know that with the evolution of network architecture and the emergence of new services, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.
[0276] It should be noted that the "steps" in the embodiments of this application are merely illustrative and serve as a method of expression for a better understanding of the embodiments. They do not constitute a substantial limitation on the execution of the solutions of this application. For example, the "steps" can also be understood as "features." Furthermore, the steps do not constitute any limitation on the execution order of the solutions of this application. Any changes to the order of steps, or any operations such as step merging or splitting that do not affect the implementation of the overall solution, resulting in new technical solutions, are also within the scope of this application.
[0277] Based on the same concept, an embodiment of the present application also provides an electronic device. As shown in Figure 14, the electronic device includes one or more processors 1401, a memory 1402, a transceiver 1403, and a display screen 1404. For example, the above-mentioned components can be connected via one or more communication buses. The one or more computer programs are stored in the above-mentioned memory 1402 and are configured to be executed by the processor 1401. The one or more computer programs include instructions, which can be used to enable the electronic device to perform the various steps of the methods in the above-mentioned embodiments.
[0278] For example, the processor 1401 may be the processor 210 shown in FIG2 . The memory 1402 may be the internal memory 221 shown in FIG2 and / or an external memory connected to the electronic device. The transceiver 1403 may be the mobile communication module 250 and / or the wireless communication module 260 shown in FIG2 . The display screen 1404 may be the display screen 294 shown in FIG2 , and this embodiment of the present application does not impose any limitation on this.
[0279] Based on the same concept, an embodiment of the present application further provides an electronic device, which includes a unit for executing each step of the method provided in the above embodiment. Optionally, the electronic device may include a display screen and a processing unit. Optionally, the electronic device may also include a communication unit. The display screen is used to display an interface; the communication unit is used to receive and send data; and the processing unit is used to execute the method provided in the above embodiment.
[0280] For the specific functions of the above modules, please refer to the above embodiments and will not be repeated here.
[0281] Based on the above embodiments, the embodiments of the present application further provide a computer program product, which includes a computer program; when the computer program is run on a computer, the computer executes the method provided in the above embodiments.
[0282] Based on the above embodiments, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer executes the method provided in the above embodiments.
[0283] Optionally, the above-mentioned computer may include, but is not limited to, electronic devices.
[0284] The storage medium may be any available medium that can be accessed by a computer. By way of example and not limitation, computer-readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer.
[0285] Based on the above embodiments, embodiments of the present application further provide a chip configured to read a computer program stored in a memory to implement the methods provided in the above embodiments. Optionally, the chip may include a processor and a memory, the processor being coupled to the memory to read the computer program stored in the memory to implement the methods provided in the above embodiments.
[0286] Based on the above embodiments, embodiments of the present application provide a chip system, which includes a processor for supporting a computer device to implement the functions involved in the electronic device in the above embodiments. In one possible design, the chip system also includes a memory for storing the necessary programs and data for the computer device. The chip system can be composed of a chip or can include a chip and other discrete devices.
[0287] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0288] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.
[0289] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0290] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0291] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A screenshot method, applied to an electronic device, characterized in that: include: During the process of the user performing a first operation on the first user interface, dynamically changing content is displayed in the first user interface, and first operation information of the first operation is acquired; Determining a first frequency according to the first operation information; Taking a screenshot of the first user interface according to a first frequency.
2. The method according to claim 1, characterized in that Before acquiring the first operation information of the first operation, the method further includes: taking a screenshot of the first user interface according to a second frequency; The determining the first frequency according to the first operation information includes: The first frequency is determined according to the first operation information and the second frequency.
3. The method according to claim 2, characterized in that The first operation information is used to indicate pressure sensing data of at least one first screen reporting point in the first operation; and determining the first frequency according to the first operation information and the second frequency includes: When the pressure-sensitivity change between the pressure-sensitivity data of the first target screen point and the pressure-sensitivity data of the second target screen point is greater than or equal to a first pressure-sensitivity threshold, determining that the first frequency is greater than the second frequency; or When the pressure change is less than a second pressure threshold, it is determined that the first frequency is less than the second frequency; and the second pressure threshold is less than or equal to the first pressure threshold; or In a case where the second pressure sensitivity threshold is less than the first pressure sensitivity threshold, when the pressure sensitivity change is less than the first pressure sensitivity threshold and greater than or equal to the second pressure sensitivity threshold, determining that the first frequency is equal to the second frequency; The first target screen reporting point is the latest screen reporting point among the at least one first screen reporting point, and the second target screen reporting point is the screen reporting point before the first target screen reporting point among the at least one first screen reporting point.
4. The method according to claim 2 or 3, characterized in that The first operation information is used to indicate the position of at least one first screen reporting point in the first operation; The determining the first frequency according to the first operation information and the second frequency includes: When at least one of the first conditions is met, it is determined that the first frequency is greater than the second frequency; the first condition includes: The distance between the position of the third target screen reporting point and the set area in the first user interface is less than or equal to the first distance threshold; recognizing, according to the position of the at least one first screen reporting point, that the user performs a second operation on the first user interface; A first operation speed of the first operation determined according to the position of the at least one first screen reporting point is greater than or equal to a first speed threshold; or When at least one of the second conditions is met, it is determined that the first frequency is less than the second frequency; the second condition includes: The distance between the position of the third target screen reporting point and the set area is greater than the second distance threshold; the second distance threshold is greater than or equal to the first distance threshold; The second operation is not recognized according to the position information of the at least one first screen reporting point; The first operating speed is less than a second speed threshold; the second speed threshold is less than or equal to the first speed threshold; or When at least one of the third conditions is met, it is determined that the first frequency is equal to the second frequency; the third condition includes: When the second distance threshold is greater than the first distance threshold, the distance between the position of the third target screen reporting point and the set area is greater than the first distance threshold and less than or equal to the second distance threshold; The second operation is not recognized according to the position information of the at least one first screen reporting point; When the second speed threshold is less than the first speed threshold, the first operation speed is greater than or equal to the second speed threshold and less than the first speed threshold; Among them, the third target screen point is the latest screen point among the at least one first screen point; and the second operation is different from the first operation.
5. The method according to claim 4, characterized in that After taking a screenshot of the first user interface according to the second frequency, the method further includes: Acquire second operation information of the first operation; the second operation information is used to indicate the position of at least one second screen reporting point in the first operation; When the distance between the position of the fourth target screen reporting point and the set area is equal to 0, the first user interface is stopped from being intercepted. Figure; or When the second operation speed of the first operation determined according to the position of the at least one second screen reporting point is less than or equal to a third speed threshold, stop taking a screenshot of the first user interface; wherein the third speed threshold is less than the second speed threshold; the first operation speed in the second condition is less than the second speed threshold, including: the first operation speed is greater than the third speed threshold and less than the second speed threshold; The fourth target screen point reporting is the latest screen point reporting among at least one second screen point reporting.
6. The method according to any one of claims 3 to 4, characterized in that: When the first frequency is different from the second frequency, the variation between the first frequency and the second frequency is a set value.
7. The method according to any one of claims 2 to 6, characterized in that: The taking a screenshot of the first user interface according to the second frequency includes: At the start time of the first operation, a screenshot of the first user interface is taken according to the second frequency; wherein the second frequency is a default frequency.
8. The method according to claim 1, characterized in that The determining the first frequency according to the first operation information includes: The first frequency is determined according to the first operation information and a correspondence between the operation information and the screenshot frequency value.
9. The method according to any one of claims 1 to 8, characterized in that The first operation is a drawing operation; During the process in which the user performs the first operation on the first user interface, displaying dynamically changing content in the first user interface includes: during the process in which the user performs the first operation on the first user interface, displaying an actual drawing track corresponding to the first operation in the first user interface; The method further comprises: In the process of taking a screenshot of the first user interface according to the first frequency, obtaining at least one first screenshot image, and acquiring third operation information of the first operation; Performing image recognition on the drawing trajectory in the at least one first screenshot image to determine a first brush mode parameter; Determining a predicted drawing trajectory according to the first brush mode parameter and the third operation information; The predicted drawing trajectory is displayed in the first user interface.
10. The method according to claim 9, characterized in that The first brush mode parameter includes at least one of the following: brush type, line color, line width, and line texture.
11. The method according to claim 9 or 10, characterized in that The drawing operation is a touch operation of the user on the first user interface on the display screen through a finger or a touch auxiliary tool, wherein the touch auxiliary tool includes any one of the following: a stylus, a touch pen, a touch ball, and a mouse.
12. An electronic device, characterized in that: The electronic device comprises: A display unit, used for displaying a user interface; A processing unit, used to support the electronic terminal device to implement the method as described in any one of claims 1-11.
13. An electronic device, characterized in that: The electronic device comprises: Display screen, used for interface display; a memory for storing computer program instructions; A processor is used to execute the computer program instructions to support the electronic terminal device to implement the method as described in any one of claims 1-11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processing circuit, the method according to any one of claims 1 to 11 is implemented.
15. A computer program product comprising instructions, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 11.
16. A chip system, characterized in that: The chip system includes a processing circuit and a storage medium, wherein the storage medium stores computer program instructions; when the computer program instructions are executed by the processing circuit, the method as described in any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Interface sharing method and interface sharing device
CN104216630A
Terminal equipment control method and device
CN105653155A
Method and device for operating user interface, electronic equipment and storage medium
CN110825289A
Picture sharing method and electronic equipment
CN114911400A
Advertisement monitoring method and device, electronic equipment and storage medium
CN116416001A