Screen capture method, graphic interface and electronic device

By identifying and processing dynamically changing content in the user interface and adjusting the timing of screenshots, the problem of incomplete splicing in scrolling screenshots is solved, and the integrity and continuity of long screenshots during scrolling screenshots are achieved.

CN115268741BActive Publication Date: 2024-09-24HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110482108.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-30
Publication Date
2024-09-24
Estimated Expiration
2041-04-30

AI Technical Summary

Technical Problem

The existing technology cannot effectively handle dynamically changing content during the scrolling screenshot process, resulting in the spliced ​​long screenshot being incomplete, accurate, and possibly confusing.

Method used

By identifying the dynamically changing content in the user interface, adjusting the screenshot timing, taking a screenshot when the dynamically changing content is fully displayed, and cropping the incomplete content in the previous screenshot to ensure that the spliced ​​long screenshot is complete and continuous.

Benefits of technology

It realizes the generation of complete, accurate and continuous long screenshots during the scrolling screenshot process, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000
    Figure 00000000_0000
Patent Text Reader

Abstract

The present application discloses a screenshot method, which can capture the content displayed on the current screen again when the screen displays the complete dynamically changing content after capturing the content displayed on the screen in the process of scrolling the page content displayed by the electronic device. Afterwards, the electronic device can cut out the area in the previous screenshot where the part of the dynamically changing content appears, and then splice it with the next screenshot, so as to obtain a long screenshot with complete content, continuity and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a screenshot method, a graphical interface, and an electronic device. Background Art

[0002] With the popularization and development of electronic devices, electronic devices have more and more functions. Among them, users can use the screenshot function of electronic devices to capture the content displayed on the screen of the electronic device. In addition, the existing screenshot function can also capture screenshot content that is not longer than the length of the screen, such as scrolling screenshot.

[0003] When the electronic device turns on the scrolling screenshot function, the content displayed on the screen will scroll upwards and update. During this process, the electronic device can take screenshots multiple times and stitch the multiple screenshots into one long screenshot. However, if there is dynamically changing content during the scrolling screenshot process, such as animated images, videos, etc., the electronic device cannot find the same part between the two screenshots, and thus cannot stitch the two screenshots together, or the stitching is messy.

[0004] Therefore, how to avoid the impact of dynamically changing content on scrolling screenshots is a problem that needs to be studied currently. Summary of the invention

[0005] The present application provides a screenshot method, a graphical interface and an electronic device. The screenshot method can identify dynamically changing content in a user interface, trigger the screenshot to obtain a screenshot when the dynamically changing content is displayed completely, and remove the dynamically changing content that was not displayed completely in the previous screenshot, so as to ensure that the long screenshot finally obtained is complete, accurate and continuous.

[0006] In a first aspect, an embodiment of the present application provides a screenshot method, the method comprising: an electronic device runs a first application and displays a first user interface; the electronic device receives a first operation; the electronic device responds to the first operation by scrolling and displaying a first page of content provided by the first application in the first user interface; in the process of scrolling and displaying the first page of content provided by the first application in the first user interface, the electronic device captures content displayed at different time points to obtain multiple images; wherein the multiple images include a first image and a second image, the first image includes a first content of a first area in the first page content, the second image includes a second content of the first area in the first page content, and the first content and the second content are different; the electronic device splices the multiple images into a long screenshot, the long screenshot does not include the first content, but includes the second content.

[0007] The screenshot method provided in the present application can be applied to scrolling screenshots when there is dynamically changing content in the user interface. Since there is dynamically changing content in the user interface, the same content displays different screen contents in the two images captured. When splicing the screenshots, the electronic device can use the screen content of the dynamically changing content in the latter image and crop the screen content of the dynamically changing content in the previous image, thereby ensuring that the screen will not be misplaced in the long screenshot finally spliced ​​together by the electronic device.

[0008] In combination with the first aspect, in one implementation, when the electronic device scrolls to display the first page content, the first area moves following the first page content.

[0009] In combination with the first aspect, in one implementation, the electronic device scrolls along a first direction in the first user interface to display a first page content provided by the first application, and the first direction is from the first end to the second end; the first area is: when the electronic device captures the first image, an area of ​​the first page content displayed by the electronic device close to the first end.

[0010] It can be seen that the electronic device can scroll the screenshot in any direction. For example, the electronic device can scroll the screenshot from bottom to top, or scroll the screenshot from top to bottom.

[0011] In combination with the first aspect, in one implementation, the first page content includes dynamic content, the first content includes a portion of a first screen in the dynamic content; and the second image includes a second screen in the dynamic content.

[0012] That is, the dynamically changing content may refer to dynamic content, the first image includes a portion of the dynamic content, and the second image includes the complete dynamic content. The method can adjust the timing of the next screenshot when the electronic device recognizes the dynamically changing content, ensuring that the second image captured by the electronic device includes the complete dynamic content.

[0013] In combination with the first aspect, in one implementation, after the electronic device captures the first image, third content appears in the first page content, the first image does not include the third content, the second image includes the third content, and the second content includes a portion of the third content.

[0014] That is, the dynamically changing content may refer to new content, the first image does not contain the new content, and the second image contains the complete new content. When the electronic device recognizes that new content appears in the first area, the method can adjust the timing of the next screenshot to ensure that the second image captured by the electronic device contains the complete new content.

[0015] In combination with the first aspect, in one implementation, the electronic device captures content displayed at different time points to obtain multiple images, specifically including: the electronic device captures content displayed by the electronic device at a first time point to obtain the first image; after the first time point, when the electronic device scrolls the first page content to a first distance, the content displayed by the electronic device is captured to obtain the second image; the second image contains the complete dynamic content or the complete third content; the first distance is calculated based on the height of the first area, the height of the complete dynamic content or the complete third content, and the height of the first page content displayed in the first user interface.

[0016] In combination with the first aspect, in one implementation, after obtaining the first image, the electronic device identifies whether there is dynamic content or third content in the first page content in the first area. When the dynamic content or third content is identified, the electronic device calculates the first distance based on the dynamic content or the third content.

[0017] In combination with the first aspect, in one implementation, the electronic device determines the first distance according to the following formula:

[0018] Y≤first distance≤LX

[0019] Wherein, L refers to the height of the first page content displayed in the first user interface, X refers to the height of the first area, and Y refers to the height of the complete dynamic content or the complete third content minus the height of the first area.

[0020] In combination with the first aspect, in one implementation, the first user interface includes: a scrollable area and a non-scrollable area, the non-scrollable area displays the second page content provided by the first application; the electronic device scrolls and displays the first page content provided by the first application in the first user interface, specifically including: the electronic device scrolls and displays the first page content provided by the first application in the scrollable area; the long screenshot does not include the content of the second area in the first image, when the electronic device scrolls and displays the first page content from bottom to top, the second area is: the area near the lower end of the second page content displayed by the electronic device when the electronic device captures the first image; when the electronic device scrolls and displays the first page content from top to bottom, the second area is: the area near the upper end of the second page content displayed by the electronic device when the electronic device captures the first image.

[0021] In combination with the first aspect, in one implementation, when the electronic device scrolls to display the first page content from bottom to top, if the second image is the last image among the multiple images, the long screenshot includes the content of a third area in the second image, and the third area is: the area near the lower end of the second page content displayed by the electronic device when the electronic device captures the second image; or, when the electronic device scrolls to display the first page content from top to bottom, if the first image is the first image among the multiple images, the long screenshot includes the content of a fourth area in the first image, and the fourth area is: the area near the lower end of the second page content displayed by the electronic device when the electronic device captures the first image.

[0022] In combination with the first aspect, in one implementation, the first user interface includes: a scrollable area and a non-scrollable area, the non-scrollable area displays a status bar; the electronic device scrolls and displays the first page content provided by the first application in the first user interface, specifically including: the electronic device scrolls and displays the first page content provided by the first application in the scrollable area; if the electronic device scrolls and displays the first page content from bottom to top, the long screenshot does not include the status bar in the second image; if the electronic device scrolls and displays the first page content from top to bottom, the long screenshot does not include the status bar in the first image.

[0023] In combination with the first aspect, in one implementation, when the electronic device scrolls from bottom to top to display the first page content, if the first image is the first image among the multiple images, then the long screenshot includes the status bar in the first image; when the electronic device scrolls from top to bottom to display the first page content, if the second image is the last image among the multiple images, then the long screenshot includes the status bar in the second image.

[0024] In combination with the first aspect, in one implementation, the electronic device captures content displayed at different time points to obtain multiple images, specifically including: when the electronic device receives the first operation, it captures the content displayed by the electronic device to obtain the first image of the multiple images; or, when the electronic device stops scrolling the first page content, it captures the content displayed by the electronic device to obtain the last image of the multiple images; or, in response to receiving the second operation, the electronic device captures the content displayed by the electronic device to obtain the last image of the multiple images.

[0025] In combination with the first aspect, in one implementation, the electronic device stitches the multiple screenshots into a long screenshot, specifically including: the electronic device captures the content outside the first area in the first image; the electronic device stitches the cropped first image and the second image, and the first area in the second image after stitching is located at the position of the cropped first image, which is the same as the position of the first area in the first image before stitching.

[0026] In combination with the first aspect, in one implementation, the first page content also includes a fifth area, the first image and the second image both include content of the fifth area, and the fifth area is adjacent to the first area; the electronic device splices the multiple screenshots into a long screenshot, specifically including: the electronic device captures content outside the sixth area in the first image, and the sixth area includes the first area and the fifth area; the electronic device splices the cropped first image and the second image, and after splicing, the sixth area in the second image is located at the position of the cropped first image, which is the same as the position of the sixth area in the first image before splicing; or, the electronic device captures content outside the fifth area in the second image, and the electronic device captures content outside the first area in the first image; the electronic device splices the cropped second image and the cropped first image, and after splicing, the fifth area in the cropped first image is located at the position of the cropped second image, which is the same as the position of the fifth area in the second image before splicing.

[0027] In a second aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors, a display screen, and one or more memories; wherein the display screen, the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, and the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method described in the first aspect or any one of the embodiments of the first aspect.

[0028] In a second aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on an electronic device, causes the electronic device to execute a method as described in the first aspect or any one of the implementations of the first aspect.

[0029] In a third aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the method described in the first aspect or any one of the implementation modes of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a schematic diagram of a process of scrolling screenshot;

[0031] Figure 2 A schematic diagram of a splicing process in a scrolling screenshot;

[0032] Figure 3 It is a schematic diagram of another stitching process in the scrolling screenshot;

[0033] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0034] Figure 5 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;

[0035] Figure 6A-6G A set of interface schematic diagrams provided for embodiments of the present application;

[0036] Figure 7 A schematic diagram of a stitching process in the screenshot method provided in an embodiment of the present application;

[0037] Figure 8 A schematic diagram of another stitching process in the screenshot method provided in an embodiment of the present application;

[0038] Figure 9A-9B Another set of interface schematic diagrams provided for embodiments of the present application;

[0039] Fig.10 , Fig.11 A flow chart of the method provided in the embodiment of the present application;

[0040] Fig.12 A schematic diagram of layer separation provided in an embodiment of the present application;

[0041] Fig.13 A schematic diagram of searching for dynamic content provided in an embodiment of the present application;

[0042] Fig.14 A schematic diagram showing the relationship between parameters provided in the embodiments of the present application;

[0043] Fig.15 , Fig.16 , Fig.17 Schematic diagram of three position changes of dynamic content in the scrollable area of ​​the first user interface provided in an embodiment of the present application;

[0044] Fig.18 A schematic diagram of a stitching process of an image obtained after cropping by an electronic device provided in an embodiment of the present application;

[0045] Fig.19 A flow chart of the method provided in the embodiment of the present application;

[0046] Fig. 20A schematic diagram of the positional relationship between the first page content and the first area provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0048] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0049] The term "user interface (UI)" in the following embodiments of the present application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device, and finally presented as content that can be recognized by the user. The commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.

[0050] In order to make the screen captured by the electronic device not exceed the length of the screen, a technical solution of scrolling screenshot is proposed.

[0051] Scrolling screenshots, also known as long screenshots, refer to the process in which an electronic device captures the content displayed on the screen multiple times during the scrolling of the page content displayed on the screen. Finally, the electronic device stitches the multiple screenshots into one long screenshot.

[0052] Figure 1A flowchart of a scrolling screenshot is shown as an example. After the electronic device turns on the scrolling screenshot function, the electronic device will first capture the content displayed on the current screen, and then scroll the page content. When the scrolling distance reaches a certain value, the electronic device will capture the content displayed on the current screen again. When the scrolling screenshot ends, the electronic device can obtain multiple screenshots. According to the order in which the screenshots are generated, the electronic device will determine the area with the same content in the previous and next screenshots, crop the area in one of the screenshots, and then splice it with the other screenshot. Finally, the electronic device uses multiple screenshots to splice a long screenshot.

[0053] Figure 2 Middle (A)- Figure 2 (C) shows an example of Figure 1 Schematic diagram of the stitching process of scrolling screenshots.

[0054] Figure 2 Middle (A), Figure 2 Middle (B) shows the first and second screenshots taken after the electronic device turns on the scrolling screenshot function. Figure 2 Middle (C) shows a long screenshot obtained by the electronic device based on the splicing of two screenshots. It can be seen that when there is an area 201 with completely identical content in the two screenshots, the electronic device can splice a normal long screenshot.

[0055] When the electronic device scrolls the page, the electronic device determines whether the screenshots can be spliced ​​according to the similarity of the splicing area of ​​the previous and next screenshots. Specifically, when the similarity of the splicing area of ​​the previous and next screenshots is less than a certain threshold, the electronic device determines that there is a change in the two screenshots, for example Figure 3 Middle (A) or Figure 3 In video 001 in (B), when the electronic device scrolls the page, the screen content of video 001 will change, resulting in the two screenshots generated before and after not having exactly the same area. The following three situations may occur:

[0056] 1. When the electronic device recognizes that there is no completely identical area in the two screenshots, the stitching stops. Therefore, the long screenshot obtained by the electronic device does not include the content in the subsequent screenshots.

[0057] Figure 3 Middle (A), Figure 3 Middle (B) shows the first and second screenshots taken after the electronic device turns on the scrolling screenshot function.

[0058] like Figure 3 Middle (A)- Figure 3 As shown in (B), due to the changing content in the scrolling screenshot, Figure 3 Middle (A) and Figure 3 There are no identical areas in (B), and electronic devices will not Figure 3 The screenshot shown in (B) is stitched together Figure 3 Therefore, the electronic device finally obtains a long screenshot of Figure 3 The image shown in (A).

[0059] This results in the user being unable to capture the content they want to capture, which reduces the user experience.

[0060] 2. When the electronic device recognizes that the two screenshots do not have completely identical areas, the latter screenshot is directly spliced ​​to the bottom of the previous screenshot.

[0061] refer to Figure 3 In (C), electronic devices can directly Figure 3 Middle (A) and Figure 3 The screenshots shown in (B) are spliced ​​together to obtain a long screenshot. The content of the long screenshot is garbled.

[0062] 3. When the electronic device recognizes that the two screenshots do not have completely identical areas, it crops the top portion of the latter screenshot and splices it to the bottom of the previous screenshot.

[0063] refer to Figure 3 In (D), electronic devices will Figure 3 The screenshot shown in (A) is similar to Figure 3 The images outside the area 301 in the screenshot shown in (B) are spliced ​​to obtain a long screenshot. The content of the long screenshot is disordered.

[0064] visible, Figure 1 In the scrolling screenshot method shown, when there is dynamically changing content during the scrolling screenshot process, the electronic device cannot generate a long screenshot with complete, continuous and accurate content.

[0065] The embodiment of the present application provides a screenshot method, which can be used in the process of scrolling the content of a page displayed by an electronic device. After capturing the content displayed on the screen, if it is recognized that there is partially changed content in a certain area of ​​the content, the content displayed on the current screen is captured again when the complete changed content is displayed on the screen. Afterwards, the electronic device can crop the content of the area in the previous screenshot and then splice it with the next screenshot. In this way, the long screenshot obtained by the electronic device does not contain the content of the area in the previous screenshot, but contains the content of the area in the next screenshot, thereby avoiding the situation where the changed content is spliced ​​in disorder when the electronic device splices the previous and next screenshots that both contain changed content.

[0066] The page content displayed by the electronic device in scrolling may refer to the page content displayed on the screen moving from the bottom of the screen to the top. After scrolling, the content near the top of the screen disappears, and the part near the bottom of the screen is updated, so as to achieve the effect of updating the page content on the screen. For example, Figure 3 Middle (A), Figure 3 Middle (B) shows the process of changes in the previous and next contents displayed in the user interface when the electronic device scrolls the displayed page content. Figure 3 In the user interface shown in (A), the content near the top of the screen is Figure 3 (B) disappears, Figure 3 In the user interface shown in (B), the page content near the bottom of the screen appears Figure 3 Content that does not exist in (A).

[0067] The electronic device captures the content displayed on the screen, which means that the electronic device obtains all the content displayed on the current screen and obtains the corresponding screenshot. The screenshot can be stored in the RAM of the electronic device. After the electronic device generates a long screenshot, the multiple screenshots obtained in the scrolling screenshot process can be deleted.

[0068] The page content refers to the content provided by the application currently running in the foreground of the electronic device. The page content is different from the content provided by the system application of the electronic device, such as the status bar and the navigation bar. The page content can include: scrollable content and non-scrollable content.

[0069] Non-scrollable content refers to content that is fixed on the screen and cannot change its display position in response to up and down sliding gestures input by the user, such as menu bars, back controls, title bars, etc.

[0070] Scrollable content refers to content that can change its display position in response to a user's up and down sliding gesture, such as information bars, pictures, videos, etc.

[0071] Changing content is scrollable content. Changing content can include the following two types:

[0072] 1. Dynamic content that changes dynamically may include, but is not limited to, one or more of the following: dynamically changing videos, pictures, icons, controls, text, or tables. There are many forms of dynamic content changes, such as changes in video images, changes in picture content, changes in color, changes in size, angle, position, etc.

[0073] 2. New content suddenly appears in a certain area of ​​the page content. For example, pop-up ads, icons that suddenly appear, prompt boxes, etc. The detailed explanation of the new content can refer to the relevant description of the subsequent UI implementation example, which will not be repeated here.

[0074] By implementing the screenshot method provided in the embodiment of the present application, the long screenshot spliced ​​by the electronic device contains complete dynamic content or new content, and the content in the long screenshot is complete, continuous and accurate, which can enhance the user experience.

[0075] Figure 4 A schematic structural diagram of an electronic device 100 is shown.

[0076] The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device and / or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific type of the electronic device.

[0077] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0078] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0079] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0080] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0081] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0082] In an embodiment of the present application, the processor 110 can, during the process of scrolling the displayed page content, after capturing the content displayed on the screen, if it is recognized that there is partially changed content in a certain area of ​​the content, then the content displayed on the current screen will be captured again when the complete changed content is displayed on the screen. In addition, the processor 110 can crop the area in the previous screenshot where the partially changed content appears in the above-mentioned area, and splice it with the next screenshot. Among them, the identification of the changed content, the timing of taking screenshots when the complete changed content is displayed, and the splicing process of the screenshots can refer to the detailed description of the subsequent method embodiments, which will not be repeated here.

[0083] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0084] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0085] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 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 150 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 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0086] In some embodiments, during the process of running an application on the electronic device 100, the electronic device 100 can load the data required for the page content of the application through the mobile communication module 150, so that when the electronic device 100 detects the user's up and down sliding operation, in response to the operation, the electronic device 100 can scroll and update the page content.

[0087] The wireless communication module 160 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 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0088] In some embodiments, during the process of running an application on the electronic device 100, the electronic device 100 can load the data required in the page content of the application through the wireless communication module 160, so that when the electronic device 100 detects the user's up and down sliding operation, in response to the operation, the electronic device 100 can scroll and update the page content.

[0089] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0090] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0091] The display screen 194 is used to display images, videos, etc. The display screen 194 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 or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0092] In some embodiments, the display screen 194 can be used to display the user interface involved in the process of running the application program of the electronic device 100. For details, please refer to the user interface provided in the subsequent embodiments. In the following embodiments of the present application, the display screen 194 can also be referred to as a screen.

[0093] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0094] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0095] In some embodiments, the internal memory 121 can be used to store screenshots obtained when the electronic device 100 captures the content displayed on the screen. It can also store long screenshots spliced ​​by the electronic device 100 or long screenshots edited by the user.

[0096] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory.

[0097] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0098] The pressure sensor 180A is used to sense pressure signals and can convert pressure signals into electrical signals. In some embodiments, the pressure sensor 180A can be set on the display screen 194. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation strength according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation strengths can correspond to different operation instructions. For example: when a touch operation with a touch operation strength less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation strength greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0099] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0100] The electronic device 100 may be equipped with iOS, Android, Microsoft or other operating systems. The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Android system of the layered architecture as an example to illustrate the software structure of the electronic device 100.

[0101] Figure 5 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.

[0102] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0103] The application layer can include a series of application packages.

[0104] like Figure 5 As shown, the application package may include scrolling screenshot application, camera, gallery, calendar, call, map, WLAN, Bluetooth, music, video, short message and other applications.

[0105] The scrolling screenshot application is an application suitable for electronic devices such as mobile phones and tablet computers. The application can capture the content displayed on the screen during the scrolling of the page content displayed on the electronic device 100. If it is recognized that there is a partial change in a certain area of ​​the content, the content displayed on the current screen will be captured again when the complete changed content is displayed on the screen. Afterwards, the electronic device 100 can cut out the area in the previous screenshot where the partially changed content appears, and splice it with the next screenshot.

[0106] Furthermore, the scrolling screenshot can call some general interface functions (eg, system screenshot interface) to capture the content displayed by the electronic device 100 and obtain a screenshot whose picture content is the same as the content displayed on the screen.

[0107] It is understandable that in other embodiments of the present application, the scrolling screenshot can also be replaced by other names, such as long screenshot, sliding screenshot, spliced ​​screenshot, etc., and the present application does not limit this.

[0108] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0109] like Figure 5 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0110] The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar or navigation bar, lock the screen, capture the content displayed on the screen, etc.

[0111] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0112] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0113] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0114] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0115] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0116] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0117] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0118] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0119] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0120] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0121] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0122] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0123] A 2D graphics engine is a drawing engine for 2D drawings.

[0124] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0125] Combine the following Figure 6A-6G A set of interface schematic diagrams implemented on the electronic device 100 are exemplarily introduced.

[0126] exist Figure 6A-6G In the user interface shown, the electronic device 100 is taken as an example to run a social application, such as a "Weibo" application.

[0127] Social applications are social media software suitable for electronic devices such as mobile phones and tablets. The software can realize functions such as instant sharing, communication and interaction of information in multimedia forms such as text, pictures, and videos. Specifically, the social application can be an application such as Weibo and WeChat.

[0128] When the electronic device 100 runs the application, the electronic device 100 can detect the user's up and down sliding interface operation. In response to the operation, the electronic device 100 moves and updates the content displayed on the application page. The content displayed on the page may include: video, text, pictures, icons and other elements.

[0129] Fig. 6A An exemplary user interface 210 for an application menu on the electronic device 100 is exemplarily shown.

[0130] like Fig. 6AAs shown, the user interface 210 may include: a status bar 211, a tray 215 with a common application list, a calendar indicator 212, a weather indicator 213, a navigation bar 216, and other application icons 214. Among them:

[0131] The status bar 211 may include one or more signal strength indicators of mobile communication signals, one or more signal strength indicators of wireless fidelity (WiFi) signals, a battery status indicator, and a time indicator. A calendar indicator 212 may be used to indicate the current time. A weather indicator 213 may be used to indicate the weather type.

[0132] A tray 215 with commonly used application icons may display: a dial icon 215A, a message icon 215B, a contact icon 215C, and a camera icon 215D.

[0133] The navigation bar 216 may include system navigation keys such as a return key 216C, a home screen key 216B, and a call task history key 216C.

[0134] Other application icons 214 may include a mail icon 214A, a gallery icon 214B, a music icon 214C, and a microblog icon 214D. Among them, the microblog icon 214D can be used to open the "microblog" application. Other application icons 214 may also include more application icons, which are not limited in the present embodiment of the application.

[0135] The user interface 210 may further include a page indicator 217. Other application icons may be distributed on multiple pages, and the page indicator 217 may be used to indicate which page the user is currently browsing. The user may slide the area of ​​other application icons left and right to browse application icons on other pages. When it is detected that the user clicks on these application icons, the electronic device 100 may display the user interface of the application.

[0136] In some embodiments, Fig. 6A The user interface 210 exemplarily shown may be a home screen.

[0137] refer to Fig. 6A , the electronic device 100 can detect a user operation on the microblog icon 214D (such as a click operation on the microblog icon 214D), and in response to the operation, start the "microblog" application corresponding to the icon 214D and display Figure 6B A user interface 310 is shown as an example.

[0138] like Figure 6BAs shown, the user interface 310 may be the default main interface of the "Weibo" application, which includes: a first menu bar 311, an information bar 312, and a second menu bar 313. Among them:

[0139] The first menu bar 311 can be used to open the camera function and switch to different information browsing pages, and the first menu bar 311 will not change position as the page content moves up and down.

[0140] The information bar 312 can be used to display microblog information posted by the user. The information bar 312 includes a video control 314. The video control 314 can display dynamically changing video content.

[0141] The second menu bar 313 includes a home page option 313A, a discovery option 313B, a message option 313C, and a local option 313D. The home page option 313A is used to display home page microblog information, the discovery option 313B is used to search for microblog information, the message option 313C is used to display messages received by the user, and the local option 313D is used to manage account information.

[0142] Furthermore, the electronic device 100 can detect a user operation (e.g., a touch operation of sliding up and down) on the user interface 310. In response to the operation, the electronic device 100 can scroll the page content displayed by the information bar 312 in the user interface 310, load and display more microblog information. Among them, the video control 314 will move along with the upward scrolling of the page, and the video in the video control 314 can be in a playing state. However, the status bar 211, the first menu bar 311, and the second menu bar 313 will not move along with the touch operation of the user sliding up and down on the user interface 310.

[0143] That is to say, the area where the information bar 312 is located is a scrollable area. The content in this area can change position following the user's up and down sliding gesture. The area composed of the status bar 211, the first menu bar 311, and the second menu bar 313 is a non-scrollable area. The content in this area will not change position following the user's up and down sliding gesture.

[0144] like Figure 6B As shown, when the electronic device 100 detects a scrolling screenshot operation performed by a user on the user interface 310, for example, the operation may be a user drawing an "S" on the screen with a knuckle, in response to the operation, the electronic device 100 displays the following Figure 6C User interface 310 is shown.

[0145] like Figure 6CAs shown, the electronic device 100 turns on the scrolling screenshot function, captures the content displayed on the current screen, obtains the first screenshot, and displays a first prompt box 321 at the top of the user interface 310. The first prompt box 321 is the content provided by the scrolling screenshot application when the electronic device 100 turns on the scrolling screenshot function. The content is used to prompt the user that the scrolling screenshot function has been turned on and the scrolling screenshot can be ended by clicking the screen.

[0146] In some embodiments, the electronic device 100 can also enable the scrolling screenshot function in other ways. For example, the electronic device 100 can detect the user's three-finger sliding operation on the screen. In response to the operation, the electronic device 100 displays a thumbnail icon of the scrolling screenshot. When the electronic device 100 detects the user's touch operation on the thumbnail icon of the scrolling screenshot, the electronic device 100 enables the scrolling screenshot function. Alternatively, the electronic device 100 may also have an icon for enabling the scrolling screenshot function. Alternatively, the electronic device 100 can enable the scrolling screenshot function in response to the user's click operation on a button.

[0147] In addition, the electronic device 100 is Figure 6C The user interface shown recognizes that there is a video control 314 that is only partially displayed in the page content, and calculates the distance that the page content needs to be scrolled before the next screenshot, so that the user interface can display the complete video control 314 when the next screenshot is taken.

[0148] In some embodiments, after the electronic device 100 turns on the scrolling screenshot function, there are two ways to scroll the page content:

[0149] 1. The electronic device 100 actively scrolls the page content. In this way, the page content displayed by the electronic device 100 can be automatically scrolled without user operation, providing the user with a convenient scrolling screenshot operation.

[0150] 2. The electronic device 100 receives the user's up and down sliding operation, and in response to the operation, the electronic device 100 scrolls the page content. In this way, the user can browse the page content in detail according to his or her needs during the scrolling screenshot process.

[0151] In the following embodiments of the present application, method 1 is used as the method for the electronic device 100 to scroll page content.

[0152] In some embodiments, after the scrolling screenshot function is turned on, the electronic device 100 can have any scrolling direction, such as upward, downward, etc. Among them, scrolling up means that the page content displayed on the screen moves from the bottom of the screen to the top. Similarly, scrolling down means that the page content displayed on the screen moves from the top of the screen to the bottom.

[0153] exist Figure 6A-6GIn the UI embodiment, the electronic device 100 scrolls the page content in an upward scrolling direction.

[0154] like Fig.6D As shown, after the electronic device 100 starts the scrolling screenshot function, it starts to scroll upward the page content displayed by the user interface 310. Figure 6C The video control 314 shown has changed its content. If the page scrolling distance reaches the distance calculated by the electronic device 100, the user interface 310 displays the complete video control 314. At this time, the electronic device 100 calls the system screenshot interface to capture the content displayed on the current screen and obtain a second screenshot.

[0155] like Fig. 6E As shown, during the process of scrolling the page content displayed by the user interface 310, the electronic device 100 can detect a user operation (e.g., a click operation) of the user to end the scrolling screenshot. In response to the operation, the electronic device 100 screenshots the content displayed on the current screen to obtain the last screenshot, and the electronic device 100 displays the following Fig. 6F User interface 310 is shown.

[0156] like Fig. 6F As shown, the electronic device 100 stops scrolling the page content and updates the first prompt box 321 to the second prompt box 331. The second prompt box 331 is used to prompt the user that the scrolling screenshot has ended, and then displays the following Figure 6G User interface 410 is shown.

[0157] In some embodiments, the electronic device 100 can end the scrolling screenshot according to the scrolling condition of the page. For example, when the page has been scrolled to the bottom, or when the current page is still in the state of loading data, the electronic device 100 can automatically end the scrolling screenshot.

[0158] In some embodiments, the electronic device 100 may end the scrolling screenshot according to the efficiency of the background operation or the configuration of resources. For example, the electronic device 100 may set a maximum value for the total scrolling distance of the page content or the number of screenshots according to the efficiency of the background operation or the configuration of resources. During the scrolling screenshot process, when the total scrolling distance of the page content or the number of screenshots reaches the maximum value, the electronic device 100 ends the scrolling screenshot.

[0159] like Figure 6G As shown, the user interface 410 is a screenshot display interface, which includes: a return control 411, a delete control 412, a save control 413, a long screenshot thumbnail 414, and an operation control 415.

[0160] The return control 411 is used to exit the user interface 410 and return to the user interface 310 before the scrolling screenshot. The delete control 412 is used to delete the long screenshot captured by this scrolling screenshot. The save control 413 is used to save the long screenshot captured by this scrolling screenshot. The long screenshot thumbnail 414 is used to preview the long screenshot captured by this scrolling screenshot. The operation control 415 includes: a sharing control 415A, a graffiti control 415B, and an eraser control 415C, wherein the sharing control 415A is used to share the long screenshot captured by this scrolling screenshot to other applications, the graffiti control 415B is used to add text, pictures or other content to the long screenshot captured by this scrolling screenshot, and the eraser control 415C is used to erase the text, pictures or other content added to the long screenshot captured by this scrolling screenshot.

[0161] In some embodiments, when the electronic device 100 finishes the scrolling screenshot, the screenshot display interface may not be displayed. The electronic device 100 may directly save the obtained long screenshot to the gallery. Alternatively, the electronic device 100 displays the screenshot thumbnail in the user interface 310 after the scrolling screenshot is finished. When the electronic device 100 detects a user operation (e.g., a click operation) of the user acting on the screenshot thumbnail, the electronic device 100 may display the screenshot display interface, enter the long screenshot editing interface, and further process the long screenshot obtained by the electronic device 100.

[0162] from FIG. 6B to FIG. 6E It can be seen that during the scrolling screenshot process, the video content displayed in the video control 314 changes, but Figure 6G A complete and accurate long screenshot is shown, and the content in the area where the video control 314 is located in the long screenshot is not disordered.

[0163] Figure 7 A schematic diagram of a splicing process in the screenshot method provided in an embodiment of the present application is exemplarily shown.

[0164] Figure 7 Middle (A)- Figure 7 (D) shows the corresponding Figure 6A-6G The relationship between the image displayed in the user interface and the image captured and spliced ​​inside the electronic device 100.

[0165] Figure 7 Middle (A) shows the first screenshot taken after the electronic device 100 turns on the scrolling screenshot function.

[0166] Figure 7 Middle (B) shows the second screenshot taken after the electronic device 100 detects the video.

[0167] Figure 7Middle (C) shows the last screenshot taken after the electronic device 100 detects that the user has finished scrolling the screenshots.

[0168] Figure 7 (D) shows the electronic device 100 according to Figure 7 Middle (A), Figure 7 Middle (B) and Figure 7 The long screenshot obtained by stitching the screenshots in (C) corresponds to Figure 6G The screenshot displayed by the medium-length screenshot thumbnail 414 .

[0169] The electronic device 100 will cut out Figure 7 The content of area 403 in the first screenshot shown in (A) is obtained, and the first screenshot and the second screenshot are spliced ​​according to area 402, and the second screenshot and the last screenshot are spliced ​​according to area 405. In addition, neither area 402 nor area 405 contains dynamic content, so that no matter whether the dynamic content captured by the screenshots changes, the process of splicing the screenshots by the electronic device 100 will not be affected.

[0170] In some embodiments, during the process of scrolling the page content of the electronic device 100, the content displayed in the video control 314 may change slower than the scrolling speed of the electronic device 100. Then, although the content in the video control 314 changes dynamically, the content displayed by the video control 314 is the same in the first screenshot and the second screenshot captured by the electronic device 100.

[0171] Figure 8 Another schematic diagram of the stitching process in the screenshot method provided in an embodiment of the present application is exemplarily shown.

[0172] Figure 8 Middle (A) shows the first screenshot taken after the electronic device 100 turns on the scrolling screenshot function. Figure 8 Middle (B) shows the second screenshot taken after the electronic device 100 detects a video, namely, video 002. Although video 002 is a changing content, the screen content of video 002 in two adjacent screenshots may not change during the page scrolling process.

[0173] Figure 8 Middle (C) shows the last screenshot taken after the electronic device 100 detects that the user has finished scrolling the screenshots.

[0174] Figure 8 (D) shows the electronic device 100 according to Figure 8 Middle (A), Figure 8 Middle (B) and Figure 8 The long screenshot obtained by stitching the screenshots in (C).

[0175] That is, the screenshot method provided in the embodiment of the present application can adjust the area of ​​the screenshot splicing so that the changed content does not appear in the area. In this way, regardless of whether the picture in the changed content changes, the process of scrolling screenshots will not be affected by the content, and the long screenshot spliced ​​by the electronic device 100 will not have a problem of picture confusion.

[0176] In some application scenarios, the changed content may refer to new content that suddenly appears in a certain area.

[0177] For example, Fig. 9A As shown, the electronic device 100 captures the content displayed on the current screen during the scrolling screenshot process. At this time, there is an area B in the page content displayed in the user interface 310. The area B is located at the bottom of the scrollable content, and the area B is an area in the page content. The area moves with the movement of the page content. The electronic device 100 continues to scroll the page content upwards, such as Fig. 9B As shown, the user interface 310 can be Fig. 9A As the page scrolls upward, a treasure chest icon 316 appears on the page, and part of the icon appears in area B. It can be seen that the icon is different from the content that gradually appears as the page scrolls upward. The icon is the content that appears in the area that existed in the page at the previous screenshot, and the icon can move upward together with the page scrolling upward.

[0178] In some embodiments, the electronic device 100 can identify the new content that suddenly appears during the scrolling screenshot process, and calculate the distance that the page needs to be scrolled when the electronic device 100 takes the next screenshot, so that the screenshot contains the complete new content when the next screenshot is taken. In addition, the electronic device 100 can calculate the position of the new content in the page and the area that needs to be cropped in the image captured last time, so that the area spliced ​​by the electronic device 100 can avoid the area where the new content appears. In this way, the long screenshot finally output by the electronic device 100 can contain the complete new content.

[0179] Combine the following Fig.10 The following is a flowchart of the method involved in the embodiment of the present application.

[0180] Stage 1: Enable scrolling screenshots

[0181] S101. The electronic device 100 runs a first application and displays a first user interface.

[0182] The first user interface includes page content and system content.

[0183] The system content refers to the content provided by the system application when the electronic device 100 runs the system application, such as the status bar, navigation bar, etc.

[0184] The page content refers to the content provided by the first application currently running in the foreground of the electronic device 100. When the electronic device 100 opens the first application, the electronic device 100 can load the page content provided by the first application through the network. In addition, only part of the page content is displayed in the first user interface. When the electronic device 100 receives the user's operation of sliding up and down on the screen, the other part of the page content can be displayed in the first user interface.

[0185] When the electronic device 100 runs the first application, the area where the first user interface is located can be divided into two parts: a scrollable area and a non-scrollable area.

[0186] The scrollable area refers to the area in the user interface where the content can be changed in response to user operations (e.g., sliding up and down gestures). For example, the area where the information bar, pictures, message lists, etc. are located. In contrast, the non-scrollable area refers to the area in the user interface where the content is fixed on the screen and cannot be changed in response to user operations (e.g., sliding up and down gestures). For example, the area where the menu bar, back control, title bar, etc. are located.

[0187] The page content provided by the first application can be divided into scrollable content and non-scrollable content. The scrollable content is the content displayed in the scrollable area of ​​the user interface, and the non-scrollable content is the content displayed in the non-scrollable area of ​​the user interface. In addition, only a part of the scrollable content can be displayed in the scrollable area.

[0188] In the embodiment of the present application, the scrollable content may refer to the first page content, and the non-scrollable content may refer to the second page content.

[0189] refer to Figure 6B The first application may refer to a "microblog" application, and the first user interface may refer to the user interface 310. The system content may refer to the status bar 211. The scrollable area may refer to the area where the information bar 312 is located, and the non-scrollable area refers to the area where the first menu bar 311 and the second menu bar 313 are located.

[0190] Understandably, Figure 6B This is just an example. The first user interface and page content may be implemented in other ways, and this application does not limit this.

[0191] S102: The electronic device 100 starts a scrolling screenshot function.

[0192] In some embodiments, the electronic device 100 may detect a user operation of enabling the scrolling screenshot function, and in response to the operation, the electronic device 100 enables the scrolling screenshot function. Figure 6B , the user operation may be an interface operation of the user drawing an "S" on the screen with a knuckle. Alternatively, the electronic device 100 detects a user operation of sliding down with three fingers on the screen, and in response to the operation, the electronic device 100 displays a thumbnail icon of the scrolling screenshot. When the electronic device 100 detects a touch operation of the user on the thumbnail icon of the scrolling screenshot, the electronic device 100 turns on the scrolling screenshot function. The embodiment of the present application does not limit the user operation.

[0193] In the embodiment of the present application, the user operation of enabling the scrolling screenshot function may refer to the first operation.

[0194] In other embodiments, an icon for enabling the scrolling screenshot function may exist in the user interface of the electronic device 100. The user interface may be the main interface of the electronic device 100, or may be a drop-down menu interface displayed in response to a user's touch operation on the screen. When the electronic device 100 detects a user operation (e.g., a click operation) on the icon, the electronic device 100 may enable the scrolling screenshot function in response to the operation.

[0195] In other embodiments, the electronic device 100 may respond to a click operation of a user on a key, and in response to the operation, the electronic device 100 activates the scrolling screenshot function. For example, the operation may be a click operation on both the volume key and the lock screen key.

[0196] It is understandable that the methods of enabling the scrolling screenshot function are not limited to the above three methods, and other methods of enabling the scrolling screenshot function may exist in other embodiments of the present application.

[0197] Stage 2: The electronic device scrolls the page content, takes multiple screenshots and obtains multiple images

[0198] S103: The electronic device 100 scrolls the content in the scrollable area of ​​the first user interface until the scrolling screenshot is finished.

[0199] In some embodiments, after the electronic device 100 turns on the scrolling screenshot function, there are two ways to scroll the page content:

[0200] 1. The electronic device 100 actively scrolls the page content.

[0201] That is to say, after the electronic device 100 turns on the scrolling screenshot function, the page content displayed by the electronic device 100 can automatically scroll. In this way, the page content displayed by the electronic device 100 can automatically scroll without the user's operation, providing the user with a convenient scrolling screenshot operation.

[0202] 2. The electronic device 100 receives a sliding operation from the user, and in response to the operation, the electronic device 100 scrolls the page content.

[0203] Specifically, when the electronic device 100 receives a swipe-up operation performed by the user on the first user interface, the electronic device 100 scrolls the page content upward in response to the operation; when the electronic device 100 receives a swipe-down operation performed by the user on the first user interface, the electronic device 100 scrolls the page content downward in response to the operation.

[0204] That is to say, after the scrolling screenshot function is turned on, the electronic device can scroll the page content according to the user's operation. In this way, the user can browse the page content in detail according to his own needs during the scrolling screenshot process.

[0205] It is understandable that in other embodiments of the present application, the electronic device 100 may have other ways of scrolling page content, and the present application does not limit this.

[0206] In some embodiments, after the electronic device 100 turns on the scrolling screenshot function, there may be any scrolling direction, for example, the direction may be upward, downward, etc. Among them, scrolling up means that the page content displayed on the screen moves from the bottom of the screen to the top. Similarly, scrolling down means that the page content displayed on the screen moves from the top of the screen to the bottom.

[0207] In some embodiments, the electronic device 100 can control the scrolling speed of the page content. For example, the electronic device 100 can scroll the page content at a constant speed, accelerate the scrolling of the page content, or determine the scrolling speed according to the scrolling distance between two screenshots. When the scrolling distance between the last screenshot and the previous screenshot is large, the scrolling speed can be increased, and when the scrolling distance between the last screenshot and the previous screenshot is small, the scrolling speed can be reduced.

[0208] S104. When scrolling the content of the scrollable area in the first user interface, the electronic device 100 captures the content displayed on the first user interface at different time points to obtain multiple images; the multiple images include a first image and a second image obtained at adjacent time points.

[0209] In some embodiments, after the content displayed by the first user interface captured by the electronic device 100 includes partial dynamic content, if during the subsequent scrolling process, the first user interface displays the complete dynamic content, the electronic device 100 again captures the content displayed by the current first user interface, wherein the image obtained by the electronic device the previous time is the first image and the image obtained the next time is the second image.

[0210] Specifically, when the electronic device 100 captures the content displayed by the first user interface at a certain time point, it can check whether the first area of ​​the page content currently displayed by the first user interface contains dynamic content. If so, the electronic device will display the complete dynamic content in the first user interface during the subsequent scrolling of the page content in the scrolling direction. When the first user interface displays the complete dynamic content, the electronic device can capture the content currently displayed by the first user interface again.

[0211] The rolling direction may be a direction from the first end to the second end. Specifically, when the rolling direction is from bottom to top, the first end is the lower end and the second end is the upper end, and when the rolling direction is from top to bottom, the first end is the upper end and the second end is the lower end.

[0212] The first area is a certain area in the page content, and the first area can change its position in the screen synchronously with the scrolling of the page content. The first area is specifically: when the electronic device captures the first image, the area in the page content displayed by the electronic device is located at the first end of the scrollable area.

[0213] Specifically, the electronic device 100 may determine the range of the first area according to the partial dynamic content in the first image. The width of the first area may be the width of the scrollable area, and the height of the first area may be the height of the partial dynamic content in the first image.

[0214] refer to Figure 6C , Fig.6D , the electronic device 100 can intercept Figure 6C After the content displayed in the first user interface is shown, the content displayed during the scrolling process Fig.6D The first area is Figure 6C The area where the partial video control 314 is located. In this case, the image captured by the electronic device 100 the previous time is the first image, and the image captured the next time is the second image.

[0215] In other embodiments, after the electronic device 100 captures the content displayed on the first user interface, if during the subsequent scrolling process, the first user interface suddenly displays or new content appears, the electronic device 100 again captures the content displayed on the current first user interface, wherein the image obtained by the electronic device 100 the previous time is the first image and the image obtained the next time is the second image.

[0216] Specifically, after the electronic device 100 captures the content displayed by the first user interface at a certain point in time, in the subsequent process of scrolling the page content in the scrolling direction, if some new content is displayed in the first area of ​​the page content displayed by the first user interface, the electronic device 100 will again capture the content displayed by the current first user interface when the first user interface displays the complete new content.

[0217] The electronic device 100 can determine the range of the first area when new content appears in the page content. When the electronic device 100 obtains the first image, one end of the first area is located in the page content, close to the boundary position of the first end of the scrollable area, and when the new content appears in the page content, the other end of the first area is located in the page content, close to the boundary position of the second end of the new content. The height of the first area can be determined based on the positions of the two ends of the first area. The width of the first area can be the width of the scrollable area.

[0218] refer to Fig. 9A , Fig. 9B , the electronic device 100 can intercept Fig. 9A After the content displayed in the first user interface is shown, the content displayed during the scrolling process Fig. 9B The first area is Fig. 9A or Fig. 9B The area B shown. In this case, the image captured by the electronic device 100 the previous time is the first image, and the image captured the next time is the second image.

[0219] It is understandable that the electronic device 100 can determine the position of the first area each time the image is displayed, and the position is close to the first end of the scrollable area. When the electronic device 100 recognizes that there is dynamic content or new content in the first area, it can determine the scope of the first area based on the dynamic content or new content.

[0220] In some embodiments, the height of the first area may also be a fixed value, for example, 50% of the height of the scrollable area, or the height may be a value determined by the electronic device 100 according to a preset threshold, for example, when the preset threshold is 60% of the height of the scrollable area, the height is 40% of the height of the scrollable area.

[0221] Combine the following Fig.11 The detailed process of step S104 is introduced.

[0222] S1041. When the electronic device 100 starts to scroll the content in the scrollable area of ​​the first user interface, the content displayed on the first user interface is captured for the first time to obtain a corresponding image.

[0223] The content captured by the electronic device 100 is the content provided by the first application program and the system application running in the foreground of the electronic device 100, and does not include the content provided by the scrolling screenshot application (for example, Figure 6C The first prompt box 321 in the figure).

[0224] In the following steps S1042-S1044, the electronic device 100 determines the next step to be executed (S1043 or S1044) through S1042, and then the electronic device 100 can return to execute S1042 after executing S1043; similarly, the electronic device 100 can return to execute S1042 after executing S1044. In this way, the electronic device 100 can repeat the operations of scrolling the page content and taking screenshots to obtain multiple images.

[0225] S1042: The electronic device 100 determines whether the first area includes some dynamic content or some new content.

[0226] The electronic device 100 may determine whether the first area contains some dynamic content or some new content in the following two situations:

[0227] 1. When the electronic device 100 captures the content displayed on the first user interface, it determines whether the first area contains some dynamic content.

[0228] When the electronic device 100 captures the content displayed on the first user interface, some dynamic content exists in the content. For example, the dynamic content may refer to Figure 6B Video controls 314 in.

[0229] That is, when the electronic device 100 captures the content displayed on the first user interface, the electronic device 100 can determine whether the first area includes some dynamic content.

[0230] 2. When scrolling the content in the scrollable area of ​​the first user interface, the electronic device 100 determines whether the first area contains some new content.

[0231] When the electronic device 100 intercepts the content displayed in the first user interface, the new content does not appear, but when the electronic device 100 scrolls the content in the scrollable area, the new content suddenly appears in the first user interface. For example, the new content may refer to Fig. 9A Treasure chest icon 316 in.

[0232] That is, after intercepting the content displayed on the first user interface, the electronic device 100 can determine whether some new content appears in the first area while continuing to scroll the content in the scrollable area.

[0233] If the electronic device 100 determines that the first area contains some dynamic content or some new content, it goes to step S1043; otherwise, it goes to step S1044.

[0234] S1043: When the scrollable area contains complete dynamic content or new content, the electronic device 100 again captures the content currently displayed in the first user interface to obtain a corresponding image.

[0235] In some embodiments, the electronic device 100 can determine the length of the content in the scrollable area that needs to be scrolled. That is, the electronic device 100 can determine the timing of the next screenshot based on the distance. After the electronic device 100 captured the content displayed in the first user interface last time, when the scrolling distance of the content in the scrollable area reaches the length, the electronic device 100 captures the content displayed in the current first user interface again, so that the dynamic content or new content is displayed completely in the corresponding image obtained by the electronic device 100.

[0236] Specifically, the electronic device 100 may determine the first distance according to some dynamic content or some new content in the first area, wherein the first distance refers to the distance that the content in the scrollable area scrolls in the scrolling direction from the last screenshot taken by the electronic device 100 to the last screenshot taken.

[0237] The electronic device 100 calculates the first distance according to the dynamic content or new content through the following steps:

[0238] Step 1: The electronic device 100 identifies layer information in the first user interface.

[0239] The layer information refers to the upper and lower position relationship of the UI elements contained in the first user interface in the user interface. The UI elements refer to the visual elements on the first user interface, including: icons, text, videos, controls, pictures, etc.

[0240] The electronic device 100 obtains the layer information in the first user interface to accurately locate the UI elements on the user interface and determine which layer different UI elements are located in.

[0241] In some embodiments, before the electronic device 100 identifies the layer information in the first user interface, it also includes obtaining the name of the first application running on the electronic device 100.

[0242] Step 2: The electronic device 100 determines the main layer according to the layer information.

[0243] In some embodiments, the electronic device 100 separates the UI elements on the first user interface into layers according to the layer information to find the main layer, where the main layer refers to the layer where the content provided by the first application currently running on the electronic device 100 is located.

[0244] like Fig.12 As shown, image 1 is the content displayed on the screen of electronic device 100. Electronic device 100 can separate image 1 into three layers according to the obtained layer information, wherein layer 1 is the layer where the content provided by the system application is located, and the layer includes the status bar, layer 2 is the main layer, and the layer where the content provided by the first application is located, and the layer includes the UI elements displayed when the electronic device 100 runs the "Weibo" application, and layer 3 is the layer where the content provided by the scrolling screenshot application is located, and the layer includes the prompt box of the scrolling screenshot.

[0245] Step 3: The electronic device 100 determines the height of the scrollable area.

[0246] The electronic device 100 may determine which UI elements in the first user interface are scrollable according to the information of the UI elements, and then determine the height of the scrollable area in the first user interface according to the scrollable UI elements.

[0247] The information of the UI element may include: name, position, size, type, etc. The electronic device 100 may determine the position of the UI element on the first user interface according to the position information of the UI element, the electronic device 100 may determine the size of the UI element according to the size information of the UI element, and the electronic device 100 may determine the type of the UI element according to the type information of the UI element, such as picture, video, icon, text, etc. That is, the electronic device 100 may determine whether the UI element is dynamic content according to the type information of the UI element, for example, when the type of the UI element is video, the UI element is dynamic content.

[0248] The electronic device 100 can determine whether the UI element is scrollable in the following two ways:

[0249] 1. The electronic device 100 can determine whether the name of the UI element contains a specific field, such as "webview", "scrollview", "listview", "recycleview", "contentview", etc.

[0250] 2. The electronic device 100 can establish and update a scrollable UI element list corresponding to different user interfaces. The scrollable UI element list records the UI elements that can be scrolled in the user interface. When the electronic device 100 obtains the information of the UI elements in the main layer, it can obtain the scrollable UI elements in the user interface by querying the list.

[0251] The electronic device 100 determines whether a UI element is scrollable in the following ways, including but not limited to the above two ways, which are not limited in this application.

[0252] For example, reference Figure 6B The scrollable area may refer to the area where the information bar 312 is located.

[0253] Step 4: The electronic device 100 determines the height of the portion of dynamic content or the portion of new content in the first area.

[0254] In some embodiments, the electronic device 100 can traverse all UI elements of the main layer, each UI element can correspond to a node, or a node can contain multiple UI elements, and the electronic device 100 can find the dynamic content or new content contained in the layer according to the information of the UI element contained in each node, so as to determine the height of the part of the dynamic content or the part of the new content located in the first area.

[0255] Fig.13 The schematic diagram of the electronic device 100 searching for dynamic content is exemplarily shown. The electronic device 100 can find the dynamic content in the first user interface through the node 3.

[0256] That is to say, the electronic device 100 can first roughly determine the position of the first area. When the electronic device 100 finds dynamic content or new content based on the layer information, if the first area contains a part of the dynamic content or new content, the electronic device determines the height of the first area based on the dynamic content or new content.

[0257] Step 5: The electronic device 100 determines a first distance.

[0258] The electronic device 100 may determine the first distance according to the following formula:

[0259] Y≤first distance≤LX

[0260] L refers to the height of the scrollable area, X refers to the height of the first area, and Y refers to the height of the complete dynamic content or the complete new content minus the first area.

[0261] by Figure 6C In the user interface shown, the content displayed in the scrollable area is taken as an example. Fig.14 A schematic diagram showing the relationship between the three parameters L, X, and Y and the dynamic content and scrollable area.

[0262] The value of the first distance can be one of the following three cases:

[0263] 1. When the first distance H1 is H1=Y, Fig.15 Middle (A), Fig.15 Middle (B) shows schematic diagrams of position changes of dynamic content in the scrollable area of ​​the first user interface corresponding to the previous screenshot and the next screenshot.

[0264] It can be seen that when the scrollable area scrolls by a distance equal to the height of the dynamic content minus part of the dynamic content, in the content displayed in the first user interface corresponding to the next screenshot, the complete dynamic content is located at the bottom of the scrollable area.

[0265] 2. When the value of the first distance H2 is Y<H2<LX, Fig.16 Middle (A), Fig.16 Middle (B) shows schematic diagrams of position changes of dynamic content in the scrollable area of ​​the first user interface corresponding to the previous screenshot and the next screenshot.

[0266] It can be seen that when the scrolling distance of the content in the scrollable area is greater than the height of the dynamic content minus part of the dynamic content, and less than the height of the scrollable area minus the height of part of the dynamic content, in the content displayed in the first user interface corresponding to the next screenshot, the complete dynamic content is located in the middle of the scrollable area.

[0267] 3. When the first distance H3 is H3=LX, Fig.17 Middle (A), Fig.17 Middle (B) shows schematic diagrams of position changes of dynamic content in the scrollable area of ​​the first user interface corresponding to the previous screenshot and the next screenshot.

[0268] It can be seen that when the scrolling distance of the content in the scrollable area is equal to the height of the scrollable area minus the height of part of the dynamic content, in the content displayed in the first user interface corresponding to the next screenshot, the complete dynamic content is located at the top of the scrollable area.

[0269] Similarly, the image captured by the electronic device 100 last time is Fig. 9A In the image displayed in the user interface shown, new content appears in the first area during scrolling. At this time, the value of the first distance is the same as the above three value conditions, and the position change of the new content in the scrollable area is the same under different value conditions. The difference is that the new content is not included or displayed in the image captured last time.

[0270] In some embodiments, if the electronic device 100 recognizes that new content suddenly appears and the new content is not located in the main layer, the electronic device 100 may not capture the content of the layer where the new content is located when taking a screenshot, wherein the electronic device 100 may determine the timing of taking another screenshot according to a preset threshold. In this way, even if new content suddenly appears during the scrolling screenshot process, the long screenshot finally output by the electronic device 100 does not contain the new content, and the long screenshot is complete, continuous and accurate.

[0271] In other embodiments, the electronic device 100 may determine whether the scrolling distance of the content in the scrollable area since the last screenshot is within the range of the above formula, thereby determining when the electronic device 100 takes a screenshot again.

[0272] Specifically, in the previous screenshot, if there is no dynamic content or no new content in the first area, the electronic device 100 can continue to scroll the content of the scrollable area according to the preset threshold, and when the electronic device 100 recognizes that some new content appears in the first area, it determines the range of the first distance. When the distance that the content of the scrollable area has been scrolled since the previous screenshot is within the range of the first distance, the electronic device 100 captures the content currently displayed in the first user interface again to obtain an image containing the complete new content. When the distance that the content of the scrollable area has been scrolled is not within the range of the above-mentioned first distance, the electronic device 100 continues to scroll the content of the scrollable area.

[0273] In other embodiments, the electronic device 100 may determine the length of time that the content in the scrollable area needs to scroll. That is, the electronic device 100 may determine the timing of the next screenshot based on the time. After the electronic device 100 previously captured the content displayed in the first user interface, when the scrolling time of the content in the scrollable area reaches the length of time, the electronic device 100 captures the content currently displayed in the first user interface again, so that the dynamic content or new content is fully displayed in the corresponding image obtained by the electronic device 100.

[0274] In other embodiments, the electronic device 100 may mark UI elements in the first user interface that have been determined to be dynamic content or new content. During the process of the electronic device 100 scrolling the content of the scrollable area, when the electronic device 100 recognizes that the UI element has been displayed completely, the electronic device 100 captures the content displayed in the current user interface.

[0275] In general, when the electronic device 100 recognizes that there is some dynamic content or some new content in the first area, the electronic device 100 will adjust the timing of the next screenshot and trigger the next screenshot when the dynamic content or new content is displayed completely.

[0276] S1044: When the scrolling distance of the content in the scrollable area reaches a preset threshold, the electronic device 100 again captures the content currently displayed in the first user interface to obtain a corresponding image.

[0277] The preset threshold may refer to the distance that the content in the scrollable area scrolls during the previous screenshot and the next screenshot determined initially by the electronic device 100. Alternatively, the preset threshold may refer to the distance that the content in the scrollable area scrolls during the previous two screenshots of the electronic device 100.

[0278] That is, when the electronic device 100 does not recognize that there is some dynamic content in the first area, the electronic device 100 can scroll the page content and take screenshots according to the initial scrolling distance, or the scrolling distance of the content in the scrollable area between the first two screenshots.

[0279] S1045. During the process of scrolling the content in the scrollable area, the electronic device 100 determines whether to end the scrolling screenshot.

[0280] Fig.11 The electronic device 100 can determine whether to end the scrolling screenshot process when executing S1043 or S1044. If the electronic device 100 determines to end the scrolling screenshot, step S1046 is executed; otherwise, step S1042 is executed.

[0281] It is understandable that the electronic device 100 can determine whether to end the scrolling screenshot when executing any one of steps S1041-S1044. This application does not limit this.

[0282] The electronic device 100 may determine whether to end the scrolling screenshot according to the following four methods:

[0283] 1. The electronic device 100 has scrolled to the bottom of the page

[0284] In some embodiments, the electronic device 100 can determine whether the page has been scrolled to the bottom based on the UI elements in the page. Specifically, when the electronic device 100 recognizes that there are no other UI elements below the bottom UI element in the page content currently displayed by the first user interface, the electronic device 100 can determine that the page has been scrolled to the bottom.

[0285] In other embodiments, the electronic device 100 may determine whether to scroll to the bottom of the page based on the similarity of the images. When the electronic device 100 has scrolled to the bottom of the current page, if the scrolling distance does not reach the first distance or the preset threshold, the page content displayed on the current screen may be referred to as a valid page. The electronic device 100 may continue to scroll the valid page upwards, and the bottom of the valid page is filled with a blank page. Until the scrolling distance reaches the first distance, the electronic device 100 may capture the content displayed on the current screen again to obtain the corresponding image. The electronic device 100 may compare the content of the valid page in the image with the image captured last time. When the similarity of the two images reaches a certain threshold, the electronic device 100 may determine that it has scrolled to the bottom of the current page.

[0286] 2. The electronic device 100 is still loading the page content

[0287] When the electronic device 100 scrolls the page upward, the page may be in a state of being updated while scrolling. When the electronic device 100 moves to the bottom of the loaded page, the electronic device 100 may wait for the page to load for a period of time. If the page is loaded within this time, the electronic device 100 may continue to scroll upward and update the page. If the page is not loaded within this time, the electronic device 100 determines to end the scrolling screenshot.

[0288] 3. The page scrolling length or the number of screenshots is close to the critical value

[0289] The electronic device 100 may determine whether to end the scrolling screenshot according to the efficiency of the background operation or the configuration of resources. For example, the electronic device 100 may set a maximum value for the total scrolling distance of the page or the number of screenshots, and when the total scrolling distance of the page or the number of screenshots is about to reach the maximum value, the electronic device 100 determines to end the scrolling screenshot.

[0290] 4. The electronic device 100 detects the user's operation of ending the scrolling screenshot

[0291] Specifically, the user operation may be a user operation performed by a user on the screen (eg Fig. 6E When the electronic device 100 detects the user's operation of ending the scrolling screenshot, in response to the operation, the electronic device 100 determines to end the scrolling screenshot function.

[0292] It can be seen that the electronic device 100 ends the scrolling screenshot, which may be the result of the electronic device 100's judgment based on its own situation, or may be the result of external input from the user. Then, when the electronic device 100 ends the scrolling screenshot, if the page scrolling distance does not reach the first distance calculated by the electronic device 100, the last image acquired by the electronic device 100 may contain part of the dynamic content or part of the new content. The processing of the part of the dynamic content or part of the new content of the last image by the electronic device 100 can be referred to the subsequent embodiments, which will not be repeated here.

[0293] S1046: The electronic device 100 ends the scrolling screenshot, captures the content currently displayed on the first user interface, and obtains the corresponding last image.

[0294] After the electronic device 100 finishes the scrolling screenshot, a plurality of images may be obtained. The contents of the plurality of images may be different from each other, or some images may have the same content among the plurality of images.

[0295] The first image and the second image obtained by the electronic device 100 at adjacent time points may be in the following situations:

[0296] 1. The first image obtained by the electronic device 100 may be the first image acquired by the electronic device 100. Alternatively, the first image may be an image captured by the electronic device 100 during the process of scrolling the content of the scrollable area.

[0297] 2. The second image obtained by the electronic device 100 may be an image captured by the electronic device 100 during the process of scrolling the content in the scrollable area. Alternatively, the second image may be the last image obtained by the electronic device 100.

[0298] For example, see Figure 6C The first user interface may refer to the user interface 310, and the first image may refer to the electronic device 100 display Figure 6C The user interface shown is a screenshot of Figure 7 The image shown in (A) is shown in Fig.6D The second image may refer to the electronic device 100 displaying Fig.6D The user interface shown is a screenshot of Figure 7 The first area may refer to an area where the video control 314 of a portion of the first user interface display is located.

[0299] For example, see Fig. 9A The first user interface may refer to the user interface 310, and the first image may refer to the electronic device 100 display Fig. 9A The user interface shown is a screenshot. Fig. 9B The second image may refer to the electronic device 100 displaying Fig. 9B The user interface shown is a captured image. The first area may refer to area B.

[0300] Phase 3: Stitching

[0301] S105 : The electronic device 100 stitches the multiple images into one long screenshot.

[0302] When the electronic device 100 stitches images, the electronic device 100 first crops a portion of the image, and then stitches the cropped image together using a head-to-tail stitching method.

[0303] For different images obtained by the electronic device 100, the electronic device 100 may crop different contents in different situations. Specifically, the following three situations may be included:

[0304] 1. For each image obtained by the electronic device 100, the content that the electronic device 100 needs to crop includes the content of the non-scrolling area. However, for the first image, the middle image and the last image obtained by the electronic device 100, the electronic device 100 needs to crop the content of different areas in the non-scrolling area.

[0305] The non-scrollable area can be divided into two parts: a top non-scrollable area and a bottom non-scrollable area.

[0306] For example, see Figure 6B The top non-scrollable area may refer to the area where the status bar 211 and the first menu bar 311 are located, and the bottom non-scrollable area may refer to the area where the second menu bar 313 is located. Figure 7 Middle (A)- Figure 7 In the image shown in (C), the top non-scrollable area corresponds to area 401 in the image, and the bottom non-scrollable area corresponds to area 404 in the image.

[0307] Since the content in the non-scrollable area will not change position as the page scrolls during the scrolling screenshot of the electronic device 100, the image obtained by each screenshot of the electronic device 100 includes the non-scrollable content in the page content (e.g., menu bar) and the content provided by the system application (e.g., status bar). However, in the long screenshot finally obtained by the electronic device 100, only the content in the top non-scrollable area in one image and the content in the bottom non-scrollable area in one image should be retained.

[0308] When the electronic device 100 scrolls and captures the screenshots from bottom to top, for the first image obtained by the electronic device 100, the electronic device 100 captures the content outside the non-scrollable area at the bottom of the image. For the middle image obtained by the electronic device 100, the electronic device 100 captures the content outside the non-scrollable area of ​​the image, and the non-scrollable area includes the bottom non-scrollable area and the top non-scrollable area. For the last image obtained by the electronic device 100, the electronic device 100 captures the content outside the non-scrollable area at the top of the image.

[0309] When the electronic device 100 scrolls and captures the screenshot from top to bottom, for the first image obtained by the electronic device 100, the electronic device 100 captures the content outside the non-scrollable area at the top of the image. For the middle image obtained by the electronic device 100, the electronic device 100 captures the content outside the non-scrollable area of ​​the image, and the non-scrollable area includes the bottom non-scrollable area and the top non-scrollable area. For the last image obtained by the electronic device 100, the electronic device 100 captures the content outside the non-scrollable area at the bottom of the image.

[0310] In a specific implementation, when the electronic device 100 obtains the height of the scrollable area in the first user interface, the position and height of the non-scrollable area can be obtained. The electronic device 100 can crop the content of each image obtained by the electronic device 100 according to the position and height of the non-scrollable area.

[0311] 2. For two adjacent images related to dynamic content or new content obtained by the electronic device 100, the content that the electronic device 100 needs to crop is the content of the first area in the previous image.

[0312] The two adjacent images related to dynamic content obtained by the electronic device 100 refer to two images obtained by the electronic device 100 at adjacent time points, the first image contains part of the dynamic content, and the second image contains the complete dynamic content. For these two images, the electronic device can intercept the content outside the area (i.e., the first area) where the part of the dynamic content is located in the first image.

[0313] For example, see Figure 7 In (A) and (B), the area where the dynamic content is located may refer to area 403.

[0314] In a specific implementation, when capturing the previous image containing some dynamic content, the electronic device 100 can identify the height of the dynamic content in the page content displayed in the user interface, and the height is the height of the area where the partial dynamic content is located, and the width of the area where the partial dynamic content is located can refer to the width of the scrollable area. The electronic device 100 can crop the partial dynamic content in the previous image according to the height and width to ensure that the long screenshot finally spliced ​​by the electronic device 100 does not contain some dynamic content in the image.

[0315] The two adjacent images related to the new content obtained by the electronic device 100 refer to two images obtained by the electronic device 100 at adjacent time points, both of which contain the first area in the page content, the area in the previous image does not contain the new content, the area in the next image contains a part of the new content, and the next image contains the complete new content. For these two images, the electronic device 100 can intercept the content outside the first area in the previous image.

[0316] For example, see Figure 9A-9B , the area where the dynamic content is located may refer to area B.

[0317] In a specific implementation, when the electronic device 100 scrolls the page content upward, the electronic device 100 can mark the bottom position of the first area when capturing the previous image, and the position is the position of the bottom edge of the scrollable area in the page content currently displayed by the electronic device 100. In the process of the electronic device 100 continuing to scroll, when new content appears in the page content, the electronic device 100 can determine the top position of the first area, and the position is the top position of the new content that appears in the page content, so that the electronic device 100 can obtain the height of the first area. Similarly, when the electronic device 100 scrolls the page content downward, the electronic device 100 can mark the top position of the first area when capturing the previous image, and the position is the position of the top edge of the scrollable area in the page content displayed by the electronic device 100 at the time of the current screenshot. In the process of the electronic device 100 continuing to scroll, when new content appears in the page content, the electronic device 100 can determine the top position of the first area, and the position is the bottom position of the new content that appears in the page content, so that the electronic device can obtain the height of the first area. In addition, the width of the first area is the width of the scrollable area. The electronic device 100 can crop the content in the previous image according to the height and width to ensure that there will be no splicing errors in the long screenshot finally spliced ​​by the electronic device 100.

[0318] 3. For two images obtained by the electronic device 100 at adjacent time points, the electronic device 100 needs to crop the content including the repeated area to avoid the repeated area in the long screenshot obtained by splicing the electronic device 100.

[0319] Specifically, with respect to repeated contents in two adjacent images obtained by the electronic device 100 , the electronic device 100 may only crop the repeated contents in one of the images, and retain the repeated contents in the other image.

[0320] For example, see Figure 7 , Figure 7 Middle (A) and Figure 7 The overlapping area of ​​the two images shown in (B) may refer to area 402. Figure 7 Middle (B) and Figure 7 The overlapping area of ​​the two images shown in (C) may refer to area 405 .

[0321] The repeated content is located in the scrollable area, and the electronic device 100 can determine the splicing position of the two images according to the repeated area to achieve the splicing of multiple images. For the two images generated before and after, the electronic device 100 can determine the repeated area according to the following two methods:

[0322] 1) The electronic device 100 compares the two images row by row and determines the overlapping area according to the similarity of the images;

[0323] Specifically, the electronic device 100 can compare the content in the scrollable area of ​​the image. The electronic device 100 can determine the area with similar content in the two images, and when the similarity exceeds a certain threshold, the electronic device 100 determines that the content in the area is a repeated area of ​​the two images.

[0324] In some embodiments, the electronic device 100 may set the size of the overlapping area to be not less than a certain value, and the electronic device 100 may further limit the size of the first distance according to the size of the repeated area. Specifically, when the electronic device 100 sets the ratio of the height of the repeated area to the height of the scrollable area to be not less than M, the area range of the first distance is Y≤first distance≤LXL*M.

[0325] 2) The electronic device 100 determines the repeated area based on the scrolling distance of the page content between the two screenshots.

[0326] Specifically, the electronic device 100 can determine the repeated area according to the ratio of the distance that the content in the scrollable area scrolls to the height of the scrollable area during the two previous screenshots. For example, if the direction of the electronic device 100 scrolling is upward, when the ratio of the distance that the content in the scrollable area scrolls to the height of the scrollable area is 50%, it means that during the two previous screenshots of the electronic device 100, half of the content in the page is moved upward and updated, then in the images captured before and after the scrolling, the lower half of the previous image and the upper half of the next image are the repeated areas of the two images.

[0327] The determination of the repeated region is not limited to the above method, and the present application does not impose any limitation on this.

[0328] It can be understood that, for the two images in situation 2, the repeated area may include the first area. When the electronic device 100 crops the repeated area, it may crop the content in the repeated area in the previous image, and retain the content in the repeated area in the next image. Specifically, when the electronic device 100 determines the repeated area based on the similarity of the images, if the similarity threshold set by the electronic device 100 is low, or the electronic device determines the repeated area based on the scrolling distance of the page, the first area may be located in the repeated area. For example, see Figure 7 Middle (A) and Figure 7 In the image shown in (B), the overlapping area of ​​the two images may refer to the area where the sum of area 402 and area 403 is located, and the first area is area 403.

[0329] In some embodiments, for the last image captured by the electronic device 100, if the last image contains a portion of dynamic content or new content that has appeared in the previous image, the electronic device 100 may first capture the content outside the area where the partial dynamic content or partial new content in the image is located, and then splice it with other images.

[0330] The height of the area where the dynamic content or the new content is located may be the height of the dynamic content or the new content, and the width may be the width of the scrollable area.

[0331] For example, see Figure 7 In (C), the area where the dynamic content or the new content is located may be area 406 .

[0332] Since the timing of capturing the last image by the electronic device 100 may be triggered by the user's operation of ending scrolling screenshots, or the page content may have been scrolled to the bottom, etc., the last image may still contain some dynamic content or some new content. Therefore, when the electronic device 100 determines the splicing area of ​​the two images according to the similarity of the two images, the last image may be spliced ​​incorrectly with the previous image.

[0333] See also Fig. 6E , the electronic device 100 detects that the user triggers the operation of ending the scrolling screenshot, see Fig. 6F , the electronic device 100 captures the last image and ends the scrolling screenshot. At this time, the last image captured by the electronic device 100 still contains some dynamic content.

[0334] Specifically, when the electronic device 100 scrolls from bottom to top, if the top of the last image contains some dynamic content or some new content, the electronic device 100 can intercept the content outside the area where the dynamic content or some new content is located. When the electronic device 100 scrolls from top to bottom, if the bottom of the last image contains some dynamic content or some new content, the electronic device 100 can intercept the content outside the area where the dynamic content or some new content is located.

[0335] With respect to the first image and the second image obtained by the electronic device 100 at adjacent time points in step S104.

[0336] Among them, the first image has the following situations:

[0337] 1. If the first image is the first image obtained after the electronic device 100 starts scrolling screenshot. When the electronic device 100 scrolls from bottom to top, the areas to be cropped in the first image include the bottom non-scrolling area, the first area, and the repeated area. When the electronic device 100 scrolls from top to bottom, the areas to be cropped in the first image include the top non-scrolling area, the first area, and the repeated area.

[0338] 2. If the first image is an intermediate image obtained during the intermediate scrolling process after the electronic device 100 turns on scrolling screenshot, and the image is neither the first image nor the last image, the area that needs to be cropped in the first image includes the non-scrolling area (including the top non-scrolling area and the bottom non-scrolling area) and the first area.

[0339] The second image has the following situations:

[0340] 1. If the second image is an intermediate image obtained during the intermediate scrolling process after the electronic device 100 turns on scrolling screenshot, and the image is neither the first image nor the last image, the area that needs to be cropped in the second image is the non-scrolling area (including the top non-scrolling area and the bottom non-scrolling area).

[0341] 2. If the second image is the last image obtained after the electronic device 100 starts the scrolling screenshot function, the area to be cropped in the second image includes the top non-scrollable area.

[0342] Then, the electronic device 100 splices all the cropped images together in the order in which the images are generated to obtain a final long screenshot. Finally, after the electronic device 100 completes the splicing, the obtained long screenshot is displayed on the user interface (e.g. Fig. 6F ) in the user interface shown.

[0343] The head-to-tail splicing refers to splicing two adjacent images in the order in which the electronic device 100 obtains the images according to the repeated area of ​​the two adjacent images determined by the electronic device 100, and after the splicing, the repeated areas of the two adjacent images overlap.

[0344] For example, Fig.18 The schematic diagram of the stitching process of the electronic device 100 stitching long screenshots according to the repeated areas of adjacent images is exemplarily shown. Fig.18 Middle (A), Fig.18 The overlapping area of ​​the two cropped images shown in (B) is area 402, and the electronic device can Fig.18 The image shown in (A) is Fig.18 The region 402 of the image shown in (B) overlaps together to achieve the splicing of the two images. Similarly, Fig.18 Middle (B), Fig.18 The overlapping area of ​​the two cropped images shown in (C) is area 405, and the electronic device can Fig.18 The image shown in (B) is Fig.18 The region 405 of the image shown in (C) overlaps together to achieve the splicing of the two images. In this way, the electronic device 100 can finally Fig.18 Middle (A)- Fig.18 The images shown in (C) are stitched together Fig.18 Long screenshot shown in (D).

[0345] In general, the screenshot method provided by the embodiment of the present application can identify some dynamic content or some new content in the user interface, cut out some dynamic content or some new content in the image, and adjust the timing of the next screenshot so that the next captured image can contain the complete dynamic content or new content. In this way, it can ensure that the screenshot process is not affected by dynamically changing content, and enable the electronic device to output a complete and accurate long screenshot, thereby improving the user experience.

[0346] The following describes a process of a scrolling screenshot method provided in an embodiment of the present application.

[0347] Fig.19 A flowchart of a screenshot method provided in an embodiment of the present application is shown.

[0348] S201. The electronic device 100 runs a first application and displays a first user interface.

[0349] For example, reference Figure 6B , the first application may refer to a “Weibo” application, and the first user interface may refer to user interface 310 .

[0350] The first user interface may include: a scrollable area and a non-scrollable area.

[0351] The scrollable area refers to the area in the user interface where the content can be changed in response to user operations (e.g., sliding up and down gestures). For example, the area where the information bar, pictures, message lists, etc. are located. In contrast, the non-scrollable area refers to the area in the user interface where the content is fixed on the screen and cannot be changed in response to user operations (e.g., sliding up and down gestures). For example, the area where the menu bar, back control, title bar, etc. are located.

[0352] refer to Figure 6B The scrollable area may refer to the area where the information bar 312 is located, and the non-scrollable area refers to the area where the first menu bar 311 and the second menu bar 313 are located.

[0353] S202: The electronic device 100 receives a first operation.

[0354] Specifically, the first operation is not limited to single click, double click, long press, voice command input, etc. For example, see Figure 6B , the user operation may be an interface operation in which the user draws an “S” on the screen with his knuckles.

[0355] S203: In response to the first operation, the electronic device 100 scrolls and displays the first page content provided by the first application in the first user interface.

[0356] Specifically, the first page content may refer to scrollable content in the page content provided by the first application.

[0357] The electronic device 100 scrolling and displaying the first page content provided by the first application in the first user interface specifically means that the electronic device 100 scrolls and displays the first page content provided by the first application in the scrollable area.

[0358] The page content provided by the first application may be a long page content, which includes two parts: scrollable content and non-scrollable content. The scrollable content will change the display position following the user's operation (e.g., up and down sliding gesture), and the non-scrollable content will not change the display position following the user's operation (e.g., up and down sliding gesture). The non-scrollable content is displayed in the non-scrollable area in the first user interface, and the scrollable content is displayed in the scrollable area in the first user interface.

[0359] For example, reference Figure 6B The content displayed in the information bar 312 is part of the content of the first page. In the process of scrolling the screen of the electronic device 100, refer to Fig.6D , another part of the first page content is scrolled and displayed in the information bar 312. Figure 7 In (D), the first page content can refer to Figure 7 In the image shown in (D), the content outside the area 401 and the area 404.

[0360] S204. During the process of scrolling the first page content provided by the first application in the first user interface, the electronic device 100 captures the content displayed at different time points to obtain multiple images; wherein the multiple images include a first image and a second image, the first image includes the first content of the first area in the first page content, the second image includes the second content of the first area in the first page content, and the first content and the second content are different.

[0361] The first content and the second content may be different in the following two cases:

[0362] 1. The first page contains dynamic content

[0363] Dynamic content refers to content that changes dynamically, such as videos, pictures, icons, controls, text, or tables. Dynamic content changes can take many forms, such as changes in video images, picture content, color, size, angle, position, etc.

[0364] Specifically, the first content and the second content are different in that the first content in the first image includes a portion of a first screen in the dynamic content, and the second image includes a second screen in the dynamic content.

[0365] For example, dynamic content may refer to Figure 6C The video control 314 shown in the figure, the first image may refer to the electronic device 100 when the scrolling screenshot is turned on, such as Figure 6C The image displayed in the user interface shown, the first content is Figure 6C In the user interface shown in FIG. 1 , the content of the partial video control 314 is displayed in area A. The second image may refer to the content of the partial video control 314 displayed in the user interface during the scrolling screenshot of the electronic device 100. Fig.6D The image shown, the second content is Fig.6D In the user interface shown, the content of the partial video control 314 is displayed in area A. The first area is area A in the page content. Figure 6C and Fig.6D It can be seen from area A that the content displayed by the video control 314 in area A has changed, that is, the content displayed by the video control 314 has changed from the first picture to the second picture.

[0366] 2. The first page contains new content

[0367] New content refers to content that suddenly appears in a certain area of ​​the first page content, such as pop-up ads, suddenly appearing icons, prompt boxes, etc.

[0368] In the embodiment of the present application, the new content may also refer to the third content.

[0369] Specifically, after the electronic device captures the first image, the third content appears in the first page content. The first content and the second content are different in that the first image does not include the third content, the second image includes the third image, and the second content includes a portion of the third content.

[0370] Exemplarily, the third content may refer to Fig. 9B The treasure chest control 316 shown in the figure, the first image may refer to the electronic device 100 when the scrolling screenshot is turned on, such as Fig. 9AThe image displayed in the user interface shown, the first content is Fig. 9A The second image may refer to the content displayed in the user interface of the electronic device 100 during the scrolling screenshot process. Fig. 9B The image shown, the second content is Fig. 9B In the user interface shown, the content of the partial treasure chest control 316 is displayed in area B. The first area is area B in the page content. Fig. 9A and Fig. 9B It can be seen from area B that due to the appearance of the treasure chest control 316, the content displayed in area A has changed.

[0371] Specifically, the first area is an area in the first page content; when the electronic device 100 scrolls and displays the first page content, the first area moves along with the movement of the first page content. Fig. 20 The schematic diagram of the positional relationship between the first page content and the first area is exemplarily shown. The first page content is a part of the long page content, and the first area is used to indicate the positional relationship between a part of the first page content and the first page content.

[0372] When the electronic device 100 takes a screenshot, the electronic device 100 can determine the position of the first area. When the electronic device 100 scrolls along a first direction to display the first page content provided by the first application, the first direction points from the first end to the second end. When the electronic device 100 captures the first image, the first area is close to the scrollable area, that is, an area close to the first end in the first page content displayed by the electronic device 100. For details, see Figure 6C The position of region A in the Fig. 9A Further, when dynamic content or new content appears in the first area, the electronic device 100 may determine the range of the first area.

[0373] In one possible implementation, the electronic device 100 captures content displayed by the electronic device 100 at a first point in time to obtain the first image, and after the first point in time, when the distance at which the electronic device 100 scrolls to display the first page content reaches a first distance, the content displayed by the electronic device is captured to obtain a second image, wherein the second image includes complete dynamic content or complete third content, and the first distance is based on the height of the first area, the height of the complete dynamic content or the complete third content, and the height of the first page content displayed in the first user interface.

[0374] Specifically, the electronic device 100 may determine the first distance according to the following formula:

[0375] Y≤first distance≤LX

[0376] Where L refers to the height of the first page content displayed in the first user interface (or the height of the scrollable area), X refers to the height of the first area, and Y refers to the height of the complete dynamic content or the complete third content minus the first area. For details about the relationship between the three parameters L, X, and Y and the dynamic content and the scrollable area, please refer to Fig.14 and related descriptions.

[0377] Optionally, when receiving the first operation, the electronic device 100 may capture the content displayed by the electronic device 100 to obtain the first image among the multiple images.

[0378] Optionally, when the electronic device 100 stops scrolling and displaying the first page content, it may capture the content displayed by the electronic device 100 to obtain the last image of the multiple images.

[0379] Optionally, when receiving the second operation, the electronic device 100 may capture the content displayed by the electronic device 100 to obtain the last image of the multiple images. Fig. 6E Click actions shown.

[0380] S205: The electronic device stitches the multiple images into a long screenshot, which does not include the first content but includes the second content.

[0381] For example, the long screenshot may refer to Figure 6G The long screenshot thumbnail 414 shows the image, or, see Figure 7 , the long screenshot may refer to Figure 7 In the image shown in (D), the first content may refer to Figure 7 The second content may refer to the content in the area 403 shown in (A). Figure 7 The content in area 403 is shown in (B).

[0382] When the electronic device 100 stitches images, the electronic device 100 first crops a portion of the screenshot, and then stitches the cropped image using a head-to-tail stitching method.

[0383] Since the content in the non-scrollable area does not change position as the page scrolls during the scrolling screenshot of the electronic device 100, the image obtained by each screenshot of the electronic device 100 includes the non-scrollable content in the page content (e.g., menu bar) and the content provided by the system application (e.g., status bar). In the long screenshot finally obtained by the electronic device 100, only the content in the top non-scrollable area in one image and the content in the bottom non-scrollable area in one image are retained.

[0384] With respect to the content in the bottom non-scrollable area, the electronic device 100 may have different cropping methods for the content in the area in different images under different circumstances.

[0385] In a possible implementation, the electronic device 100 may crop the content of the second area in the first image. When the electronic device 100 scrolls the first page content from bottom to top, the second area is: the area near the bottom of the second page content displayed by the electronic device 100 when the electronic device captures the first image; when the electronic device scrolls the first page content from top to bottom, the second area is: the area near the top of the second page content displayed by the electronic device when the electronic device 100 captures the first image.

[0386] Exemplarily, when the electronic device 100 scrolls and displays the first page content from bottom to top, Figure 7 (A) shows a first image captured by the electronic device 100 , and the second area may refer to area 404 .

[0387] In one possible implementation, when the electronic device 100 scrolls to display the first page content from bottom to top, if the second image is the last image of multiple images, the long screenshot includes the content of the third area in the second image, and the third area is: the area near the lower end of the second page content displayed by the electronic device when the electronic device captures the second image.

[0388] For example, see Figure 7 In (C), the last image captured by the electronic device 100 may refer to Figure 7 In the image shown in (C), the third area may refer to Figure 7 The area 404 shown in (C).

[0389] In a possible implementation, when the electronic device 100 scrolls and displays the first page content from top to bottom, if the first image is the first image of multiple images, the long screenshot includes the content of the fourth area in the first image, and the fourth area is: the area near the bottom of the second page content displayed by the electronic device when the electronic device captures the first image. For example, see Figure 7 In (A), the fourth region may refer to region 404 .

[0390] The content in the top non-scrollable area may include the top portion of the second page content provided by the first application and the status bar. In different situations, the electronic device 100 may have different cropping methods for the content in this area in different images.

[0391] In a possible implementation, if the electronic device 100 scrolls the first page content from bottom to top, the long screenshot does not include the status bar in the second image. If the electronic device 100 scrolls the first page content from top to bottom, the long screenshot does not include the status bar in the first image.

[0392] Exemplarily, the status bar may refer to Figure 6B Status bar 211 is shown.

[0393] In another possible implementation, if the electronic device 100 scrolls from bottom to top to display the first page content, if the first image is the first image of multiple images, the long screenshot includes the status bar in the first image. If the electronic device 100 scrolls from top to bottom to display the first page content, if the second image is the last image of multiple images, the long screenshot includes the status bar in the second image.

[0394] For two adjacent images, the electronic device 100 will crop the repeated content of one image and the other image, and splice the two adjacent images according to the repeated area where the repeated content is located.

[0395] The electronic device 100 can determine the overlapping area of ​​two adjacent images in the following two ways: 1) the electronic device 100 compares the pixels of the two images row by row and determines the overlapping area according to the similarity of the images; 2) the electronic device 100 determines the overlapping area according to the scrolling distance of the page content between the two screenshots. For details about the way in which the electronic device 100 determines the overlapping area, please refer to the above content and will not be repeated here.

[0396] In one possible implementation, if the first area is a repeated area of ​​the first image and the second image, the electronic device 100 intercepts the content outside the first area in the first image; the electronic device 100 splices the cropped first image and the second image, and the first area in the second image after splicing is located at the position of the cropped first image, which is the same as the position of the first area in the first image before splicing.

[0397] In another possible implementation manner, if the first region is a part of the repeated region of the first image and the second image, the first image and the second image also have completely identical contents in the fifth region.

[0398] For example, see Figure 7 , the first area may refer to area 403 , and the fifth area may refer to area 402 .

[0399] Specifically, the electronic device 100 captures content outside the sixth area in the first image, and the sixth area includes the first area and the fifth area; the electronic device 100 splices the cropped first image and the second image, and the sixth area in the second image after splicing is located at the position of the cropped first image, which is the same as the position of the sixth area in the first image before splicing.

[0400] That is, the electronic device 100 can intercept Figure 7 The image outside the area where the area 403 and the area 402 are located in the first image shown in (A) is then compared with the image shown in (B). Figure 7 The second image shown in (B) is stitched, and after the stitching, the area where the area 403 and the area 402 of the first image are located overlaps with the area where the area 403 and the area 402 of the second image are located.

[0401] Optionally, the electronic device 100 captures content outside the fifth area in the second image, and the electronic device captures content outside the first area in the first image; the electronic device 100 splices the cropped second image and the cropped first image, and after splicing, the fifth area in the cropped first image is located at the position of the cropped second image, which is the same as the position of the fifth area in the second image before splicing.

[0402] That is, the electronic device 100 can intercept Figure 7 The image outside the area 403 in the first image shown in (A) is cut out as shown in FIG. Figure 7 The image outside the area 402 in the second image shown in (B) is then cropped and the two cropped images are spliced ​​together. After splicing, the area 402 of the first image overlaps with the area 402 of the second image, and the area 403 of the first image overlaps with the area 403 of the second image. In this way, the electronic device 100 can obtain a long screenshot by splicing multiple images.

[0403] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.

[0404] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.

[0405] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0406] In short, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.

Claims

1. A screenshot method, characterized in that: The method comprises: The electronic device runs a first application and displays a first user interface; The electronic device receives a first operation; In response to the first operation, the electronic device scrolls and displays a first page of content provided by the first application in the first user interface; In the process of scrolling and displaying the first page content provided by the first application in the first user interface, the electronic device captures the content displayed at different time points to obtain multiple images; wherein the multiple images include a first image and a second image, the first image includes the first content of the first area in the first page content, the second image includes the second content of the first area in the first page content, the first image is an image captured at a first time point, and the second image is an image captured after the first time point; The first page content includes dynamic content, the first content includes a portion of a first screen in the dynamic content, the second image is an image captured by the electronic device when the complete dynamic content is displayed, and the second image includes a second screen in the dynamic content, or, after the first image is captured, third content appears in the first page content, the first image does not include the third content, the second image is an image captured by the electronic device when the complete third content is displayed, and the second content includes a portion of the third content; The electronic device stitches the multiple images into a long screenshot, which does not include the first content but includes the second content.

2. The method according to claim 1, characterized in that: When the electronic device scrolls to display the first page content, the first area moves along with the first page content.

3. The method according to claim 1, characterized in that The electronic device scrolls and displays the first page content provided by the first application in the first user interface along a first direction, where the first direction is from the first end to the second end; The first area is: an area close to the first end in the first page content displayed by the electronic device when the electronic device captures the first image.

4. The method according to claim 1, characterized in that: The second image is an image captured when the electronic device scrolls the first page content to a first distance after the first time point; The first distance is calculated according to the height of the first area, the height of the complete dynamic content or the complete third content, and the height of the first page content displayed in the first user interface.

5. The method according to claim 4, characterized in that The electronic device determines the first distance according to the following formula: Y≤first distance≤LX Wherein, L refers to the height of the first page content displayed in the first user interface, X refers to the height of the first area, and Y refers to the height of the complete dynamic content or the complete third content minus the first area.

6. The method according to claim 1, characterized in that The first user interface includes: a scrollable area and a non-scrollable area, and the non-scrollable area displays second page content provided by the first application; The electronic device scrolling and displaying the first page content provided by the first application in the first user interface specifically includes: the electronic device scrolling and displaying the first page content provided by the first application in the scrollable area; The long screenshot does not include the content of the second area in the first image, When the electronic device scrolls and displays the first page content from bottom to top, the second area is: an area near the bottom of the second page content displayed by the electronic device when the electronic device captures the first image; When the electronic device scrolls and displays the first page content from top to bottom, the second area is: an area close to the upper end of the second page content displayed by the electronic device when the electronic device captures the first image.

7. The method according to claim 6, characterized in that When the electronic device scrolls and displays the first page content from bottom to top, If the second image is the last image of the plurality of images, the long screenshot includes content of a third area in the second image, and the third area is: an area near the bottom of the second page content displayed by the electronic device when the electronic device captures the second image; or, When the electronic device scrolls and displays the first page content from top to bottom, If the first image is the first image among the multiple images, the long screenshot includes content of a fourth area in the first image, and the fourth area is: an area near the bottom end of the second page content displayed by the electronic device when the electronic device captures the first image.

8. The method according to claim 1, characterized in that The first user interface includes: a scrollable area and a non-scrollable area, and the non-scrollable area displays a status bar; The electronic device scrolling and displaying the first page content provided by the first application in the first user interface specifically includes: the electronic device scrolling and displaying the first page content provided by the first application in the scrollable area; If the electronic device scrolls and displays the first page content from bottom to top, the long screenshot does not include the status bar in the second image; If the electronic device scrolls and displays the first page content from top to bottom, the long screenshot does not include the status bar in the first image.

9. The method according to claim 8, characterized in that When the electronic device scrolls and displays the first page content from bottom to top, If the first image is the first image of the multiple images, the long screenshot includes the status bar in the first image; When the electronic device scrolls and displays the first page content from top to bottom, If the second image is the last image of the multiple images, the long screenshot includes the status bar in the second image.

10. The method according to claim 1, characterized in that The electronic device captures the content displayed at different time points to obtain multiple images, specifically including: When receiving the first operation, the electronic device captures the content displayed by the electronic device to obtain a first image among the multiple images; or, When the electronic device stops scrolling and displaying the first page content, intercepting the content displayed by the electronic device to obtain the last image of the multiple images; or, In response to the received second operation, the electronic device captures the content displayed by the electronic device to obtain the last image of the multiple images.

11. The method according to claim 1, characterized in that: The electronic device stitches the multiple images into a long screenshot, specifically comprising: The electronic device intercepts the content outside the first area of ​​the first image; The electronic device splices the cropped first image and the second image, and the first area in the second image after splicing is located at the same position as the cropped first image, which is the same as the position of the first area in the first image before splicing.

12. The method according to any one of claims 1 to 11, characterized in that: The first page content also includes a fifth area, the first image and the second image both include content of the fifth area, and the fifth area is adjacent to the first area; The electronic device stitches the multiple images into a long screenshot, specifically comprising: The electronic device intercepts content outside a sixth area of ​​the first image, where the sixth area includes the first area and the fifth area; The electronic device stitches the cropped first image and the second image, and the sixth area in the stitched second image is located at the same position as the cropped first image, and the sixth area in the first image is located at the same position as the first image before stitching; or, The electronic device intercepts the content outside the fifth area in the second image, and the electronic device intercepts the content outside the first area in the first image; The electronic device splices the cropped second image and the cropped first image, and after splicing, the fifth area in the cropped first image is located at the same position as the cropped second image, which is the same as the position of the fifth area in the second image before splicing.

13. An electronic device, characterized in that: include: One or more processors, a display screen, and one or more memories; wherein the display screen, the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method as described in any one of claims 1 to 12.

14. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 12.

15. A computer program product, characterized in that When the computer program product is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 12.