Screenshot capturing method and apparatus, and electronic device and computer-readable storage medium

By recording video data during the screenshot process to generate a live screenshot image, the problem of unsatisfactory screenshots in existing technologies is solved, and a combination of static and dynamic effects is achieved, thus improving the user experience.

WO2026098123A1PCT designated stage Publication Date: 2026-05-15SHENZHEN HEYTAP TECHNOLOGY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
SHENZHEN HEYTAP TECHNOLOGY CO LTD
Filing Date
2025-09-30
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing screenshot technologies cannot meet users' different screenshot needs, especially when capturing changes in interface content, it is difficult to capture static images that satisfy users, resulting in a reduced user experience.

Method used

By responding to screenshot operations, it not only captures the current image of the target interface but also records video data for a first duration, generating a live screenshot image that includes both static and dynamic effects. The video data is used to supplement the shortcomings of static images, improving flexibility.

Benefits of technology

It enables the acquisition of desired interface content through dynamic video data when users are not satisfied with static images, improving the screenshot experience, overcoming the difficulty of obtaining satisfactory screenshots due to screenshot latency, and enhancing user flexibility and satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025126039_15052026_PF_FP_ABST
    Figure CN2025126039_15052026_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present application relates to the technical field of human-machine interaction. Disclosed are a screenshot capturing method and apparatus, and an electronic device and a computer-readable storage medium. The method comprises: in response to a screenshot capturing operation, capturing a current target interface image of a target interface, and for the target interface, recording target video data for a first duration; and on the basis of the target interface image and the target video data, generating a live screenshot corresponding to the screenshot capturing operation. By means of implementing the embodiments of the present application, a live screenshot comprising a static effect and a dynamic effect can be captured, and thus the screenshot capturing experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Screenshot methods and devices, electronic devices, computer-readable storage media

[0001] This application claims priority to Chinese Patent Application No. 202411603944.8, filed on November 11, 2024, entitled “Screenshot Method and Apparatus, Electronic Device, Computer-Readable Storage Medium”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of human-computer interaction technology, specifically to a screenshot method and apparatus, electronic device, and computer-readable storage medium. Background Technology

[0003] The current application of screenshot technology on electronic devices allows users to capture images of the currently displayed interface at any time, making it convenient for users to save images of the interface they are interested in and improving the user experience.

[0004] Current screenshot technology cannot meet the different screenshot needs of users, and there are still areas that need further optimization. Summary of the Invention

[0005] This application discloses a screenshot method and apparatus, electronic device, and computer-readable storage medium, which can capture real-time screenshot images including static and dynamic effects, thereby improving the user's screenshot experience.

[0006] The first aspect of this application discloses a screenshot method, the method comprising:

[0007] In response to a screenshot operation, capture the current target interface image and record target video data for a first duration for the target interface.

[0008] Based on the target interface image and the target video data, a screenshot image corresponding to the screenshot operation is generated.

[0009] A second aspect of this application discloses a screenshot device, the device comprising:

[0010] The capture unit is used to capture the current target interface image of the target interface in response to the screenshot operation, and record target video data for a first duration for the target interface.

[0011] The generation unit is used to generate a screenshot image corresponding to the screenshot operation based on the target interface image and the target video data.

[0012] The third aspect of this application discloses an electronic device, including:

[0013] Memory containing executable program code;

[0014] A processor coupled to the memory;

[0015] The processor calls the executable program code stored in the memory to execute the screenshot method disclosed in the first aspect of the embodiments of this application.

[0016] A fourth aspect of this application discloses a computer-readable storage medium storing a computer program, wherein the computer program causes a computer to execute the screenshot method disclosed in the first aspect of this application.

[0017] The fifth aspect of this application discloses a computer program product that, when run on a computer, causes the computer to perform some or all of the steps of any method of the first aspect of this application.

[0018] The sixth aspect of this application discloses an application publishing platform for publishing computer program products, wherein when the computer program products are run on a computer, the computer performs some or all of the steps of any one of the methods of the first aspect of this application. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 is a schematic flowchart of an embodiment of this application;

[0021] Figure 2 is a flowchart illustrating a screenshot method disclosed in an embodiment of this application;

[0022] Figure 3 is a schematic diagram of a real-time operation interface disclosed in an embodiment of this application;

[0023] Figure 4 is a schematic diagram of a video recording process disclosed in an embodiment of this application;

[0024] Figure 5 is a schematic flowchart of a method for generating a live screenshot image according to an embodiment of this application;

[0025] Figure 6 is a flowchart illustrating another screenshot method disclosed in an embodiment of this application;

[0026] Figure 7 is a flowchart illustrating another screenshot method disclosed in an embodiment of this application;

[0027] Figure 8 is a schematic diagram of a screenshot device disclosed in an embodiment of this application;

[0028] Figure 9 is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. Detailed Implementation

[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0030] It should be noted that the terms "first," "second," "third," and "fourth," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order. The terms "comprising" and "having," and any variations thereof, in the embodiments of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.

[0031] This application discloses a screenshot method and apparatus, electronic device, and computer-readable storage medium, which can capture real-time screenshot images including static and dynamic effects, thereby improving the user's screenshot experience.

[0032] The technical solution of this application will be described in detail below with reference to specific embodiments.

[0033] To more clearly describe the method disclosed in the embodiments of this application, the application scenarios applicable to this method are first introduced. Optionally, this method can be applied to various electronic devices with screenshot and video recording functions, including but not limited to: portable electronic devices such as mobile phones and tablets; wearable devices such as smartwatches and smart bracelets; or desktop devices such as desktop computers and desktop TVs, etc., without limitation.

[0034] In related technologies, electronic devices can only capture static images in response to screenshot operations. A static image contains very limited content, and if the timing of the screenshot is not well controlled, the final captured image may not be satisfactory to the user, thereby reducing the user's screenshot experience.

[0035] To address this, this application discloses a screenshot method to overcome technical deficiencies in related technologies. Optionally, this method can be applied to the electronic devices described above.

[0036] Please refer to Figure 1, which is a flowchart illustrating an embodiment of this application. Optionally, in response to a screenshot operation, the electronic device can capture the current target interface image 120 of the target interface 110, and simultaneously record target video data 130 of a first duration for the target interface 110; then, based on the target interface image 120 and the target video data 130, a screenshot live image 140 that possesses both static and dynamic effects can be generated. Compared to related technologies that can only capture static interface images, the screenshot live image 140 provided in this embodiment also has dynamic effects, allowing users to obtain the desired interface content through dynamic video data if they are not satisfied with the captured static interface image, thereby improving the flexibility of the method and enhancing the user's screenshot experience.

[0037] Based on this, the screenshot method and apparatus, electronic device and computer-readable storage medium disclosed in the embodiments of this application will be described below.

[0038] Please refer to Figure 2, which is a flowchart illustrating a screenshot method disclosed in an embodiment of this application. Optionally, this method can be applied to the electronic device described above, or other execution entities. This embodiment uses an electronic device as an example for illustration and should not be construed as limiting the scope of this application. Optionally, the method may include:

[0039] 202. In response to the screenshot operation, capture the current target interface image and record target video data for the first duration on the target interface.

[0040] In this embodiment, the target interface can be the first interface currently displayed by the electronic device, or it can be the second interface displayed by other display devices that have a communication connection with the electronic device; there is no limitation on this.

[0041] For example, when a mobile phone displays an interface through its screen, the target interface can be the interface currently displayed on the phone's screen. When the mobile phone is projected through a screen mirroring device, the target interface can be the interface projected by the screen mirroring device, and there is no limitation on this.

[0042] In one embodiment, the target interface can be the business interface corresponding to the target service. Optionally, the target service may include game services, communication services, or video playback services, etc., and is not limited thereto.

[0043] In one alternative embodiment, the target interface can be a real-time operation interface; wherein, a real-time operation interface refers to an interface that allows users to operate on the interface in real time to change the content of the interface.

[0044] Optionally, the real-time operation interface may include one or more touch components; wherein, when one or more touch components are triggered, the interface content of the real-time operation interface is changed.

[0045] Optionally, the real-time user interface may include the game interface.

[0046] For example, please refer to Figure 3, which is a schematic diagram of a real-time operation interface disclosed in an embodiment of this application. Optionally, the game interface 310 may include a touch component 320, such as a component for controlling the movement of a game character, a component for controlling the release of skills by a game character, etc., which are not limited here. Then, when the touch component 320 is triggered, the game character will move accordingly or release skills, thereby changing the interface content of the game interface 310.

[0047] By implementing the above method, for real-time operation interfaces where the interface content changes frequently, when the electronic device detects a screenshot operation targeting the real-time operation interface, it can generate a screenshot image that has both static and dynamic effects. This provides more content about the real-time operation interface, making it easier for users to understand the changes in the interface content and improving the user experience.

[0048] In this embodiment, the screenshot operation may include touching the target interface, touching the screenshot button, or shaking the electronic device, etc., and is not limited thereto.

[0049] Optionally, in this embodiment of the application, the screenshot operation that triggers the capture of a live image may be different from the screenshot operation that triggers the capture of a static image.

[0050] For example, suppose that double-tapping the target interface with one finger captures a static image, while double-tapping the target interface with two fingers captures a live screenshot. Another example: shaking an electronic device N times captures a static image; while shaking the electronic device M times captures a live screenshot, where N and M are positive integers and are not the same.

[0051] By implementing the above method, electronic devices can be configured with different triggering methods for different screenshot needs, allowing users to flexibly trigger the corresponding screenshot method according to their own screenshot needs, thereby improving the flexibility of the method and thus improving the user's screenshot experience.

[0052] In one alternative embodiment, the electronic device may output guidance information to instruct the user on how to trigger a screenshot. Optionally, the guidance information may be output in at least one of the following ways: text, audio, and animation, without limitation.

[0053] Optionally, the guidance information may include a first sub-guidance information and a second sub-guidance information; wherein, the first sub-guidance information is used to guide the user to trigger a screenshot operation to capture a live image; the second sub-guidance information is used to guide the user to trigger a screenshot operation to capture a static image, and is not limited here.

[0054] By implementing the above method, electronic devices can output guidance information so that users can quickly understand how to trigger a screenshot operation, increasing the probability of users successfully triggering a screenshot and thus improving the user's screenshot experience.

[0055] In this embodiment, the target interface image captured can be a static image. Optionally, the electronic device can capture the target interface image through a system screenshot command and / or a screenshot application.

[0056] Optionally, screenshot applications may include MediaProjection, Snipaste, etc., and are not limited here. System screenshot commands may include ScreenCap, Android Debug Bridge (adb) commands, etc., and are not limited here.

[0057] In this embodiment, the electronic device can record target video data of a first duration via a video recording command and / or a video recording program, which is not limited herein. The first duration can be set by developers based on extensive development experience, or by users based on actual usage needs; typical values ​​may include 2-3 seconds, 3-5 seconds, etc., and are not limited herein.

[0058] Optionally, video recording commands can be implemented using the Android debugging bridge commands described above; video recording programs can include MediaProjection, OBS Studio, etc., and are not limited here.

[0059] In one alternative embodiment, the electronic device can create a virtual screen using a video recording program and map the target interface onto the virtual screen; then, it can create a data receiving container using the video recording program and receive interface data of the virtual screen for a first duration through the data receiving container.

[0060] Then, recording can be performed based on the interface data of the first duration to obtain the target video data of the first duration.

[0061] For example, please refer to Figure 4, which is a schematic diagram of a video recording process disclosed in an embodiment of this application. Optionally, the electronic device can create a virtual screen VirtualDisplay 420 through MediaProjectionManager 410 and map the target interface onto the virtual screen VirtualDisplay 420 in real time. At the same time, a surface 450 is created through MediaRecorder 430 or MediaCodec 440 to receive data sent by the virtual screen VirtualDisplay 420. This surface 450 is set in the virtual screen VirtualDisplay 420. Then, the data of the target interface will be transmitted to the surface 450 through the virtual screen VirtualDisplay 420. Finally, the surface 450 sends the data to MediaRecorder 430 or MediaCodec 440 for recording, thereby generating the target video data corresponding to the target interface.

[0062] 204. Generate a screenshot image corresponding to the screenshot operation based on the target interface image and target video data.

[0063] In this embodiment of the application, the electronic device can package the target interface image and the target video data into the same data packet to obtain the screenshot image corresponding to the screenshot operation.

[0064] Optionally, the packaging method may include compressed packaging or directory structure packaging, etc., which are not limited here.

[0065] In one alternative embodiment, the electronic device can insert target video data into the target interface image to obtain a screenshot image corresponding to the screenshot operation.

[0066] Optionally, the electronic device can perform a decoding operation on the target interface image to obtain the target image data corresponding to the target interface image. Then, the electronic device can insert target video data at the target position in the target image data and re-encode it to obtain the screenshot live image corresponding to the screenshot operation.

[0067] The target location may include the tail, head, or other locations of the target image data, without limitation.

[0068] Optionally, the electronic device can also insert the target video data into the target image data corresponding to the target interface image before the target interface image is generated, that is, during the encoding process of the electronic device. This eliminates the need to decode the target interface image first and then insert the target video data, thereby improving the efficiency of generating live screenshot images.

[0069] For example, please refer to Figure 5, which is a schematic flowchart of generating a live screenshot image according to an embodiment of this application. Optionally, the electronic device can package the target interface image 120 and the target video data 130, and insert the target video data 130 at the end of the target interface image 120 to obtain a live screenshot image 140. It should be noted that Figure 5 is only an optional implementation and should not be construed as limiting the embodiments of this application.

[0070] Furthermore, the electronic device can add insertion information of the target video data to the description file corresponding to the screenshot live image. The insertion information is used to describe the position of the target video data in the screenshot live image.

[0071] Optionally, the description file can be an XMP format file, which is a file that interprets and describes the image information of the screenshot. Optionally, the insertion information of the target video data may include the offset information of the target video data, and / or the data length of the target video data, etc., which are not limited here.

[0072] The offset information can be used to determine the starting position of the target video data in the screenshot live image. Then, based on the starting position and the data length of the target video data, the ending position of the target video data in the screenshot live image can be determined. Furthermore, the target video data can be obtained from the screenshot live image based on the starting position and the ending position.

[0073] By implementing the above method, electronic devices can package the target video data and the target interface image by inserting the target video data into the target interface image. This allows the target video data to be decoded and played at any time during the subsequent display of the static target interface image, thereby achieving the effect of playing dynamic images. This method is simple and efficient, reducing the difficulty and cost of implementation.

[0074] The screenshot live image in the embodiments of this application may include: LivePhoto.

[0075] Implementing the methods disclosed in the above embodiments, in response to a screenshot operation, the current target interface image can be captured, and target video data of a first duration can be recorded for the target interface. Then, based on the target interface image and target video data, a live screenshot image with both static and dynamic effects can be generated. Compared to related technologies that can only capture static interface images, the live screenshot image provided in this application also has dynamic effects. This allows users to obtain the desired interface content through dynamic video data if they are not satisfied with the captured static interface image, thereby improving the flexibility of the method and enhancing the user's screenshot experience.

[0076] Please refer to Figure 6, which is a flowchart illustrating another screenshot method disclosed in an embodiment of this application. Optionally, this method can be applied to the electronic device described above, or other execution entities. This embodiment uses an electronic device as an example for illustration and should not be construed as limiting the scope of this application. Optionally, the method may include:

[0077] 602. In response to a screenshot operation, capture the current image of the target interface.

[0078] 604. Collect multi-frame real-time display data of the target interface and obtain multi-frame historical display data. The multi-frame historical display data is the display data of the target interface cached before the screenshot operation is detected.

[0079] In this embodiment of the application, considering that from the time a user sees the interface content that satisfies them to the time the user successfully triggers the screenshot operation, there is a certain amount of time required for the user to perform the screenshot operation and for the electronic device to respond to the screenshot operation and take the screenshot, which may result in the subsequent capture of the target interface image being delayed relative to the interface image that satisfies the user, thus reducing the user's screenshot experience.

[0080] Alternatively, in response to a screenshot operation, the electronic device can collect multiple frames of real-time display data of the target interface; where the real-time display data is the display data currently displayed on the target interface.

[0081] Optionally, the electronic device can also acquire multiple frames of historical display data cached before the screenshot operation was detected. It's understandable that since this multi-frame historical display data is cached before the screenshot operation is detected, it will likely include the interface content seen by the user before the screenshot operation was triggered. Encoding these multiple frames of historical display data together into the target video data can address the technical drawback of the captured target interface image being delayed compared to the user-satisfied interface image.

[0082] Optionally, the amount of historical display data that can be cached in advance can be set by the developers based on extensive development experience, or by the users based on actual usage needs. For example, electronic devices can cache 60 frames or 120 frames (approximately 1 to 2 seconds) of historical display data in advance, without limitation.

[0083] By implementing the above method, the electronic device can generate a first-duration target video data based on multiple frames of real-time display data and multiple frames of historical display data. This target video data includes the display data of the target interface before the screenshot operation is detected. As a result, the user can view the interface content before the screenshot operation is triggered based on the target video data. This overcomes the defect that the user cannot obtain a satisfactory screenshot due to the delay in the screenshot operation triggered by the electronic device, and improves the user's screenshot experience.

[0084] In one alternative embodiment, the electronic device may store the display data of the target interface into the target cache space during the process of displaying the target interface;

[0085] One way for an electronic device to obtain multiple frames of historical display data is to obtain multiple frames of historical display data from the target cache space.

[0086] Optionally, the target cache space can be used to temporarily cache the display data of the target interface. The target cache space may include, but is not limited to, circular cache space, chained cache space, etc.

[0087] Optionally, the electronic device can continuously cache the display data of the target interface in the target cache space during the display process. It is understood that the storage capacity of the target cache space is usually not very large. Therefore, if the stored display data in the target cache space exceeds its storage capacity, the display data that entered the target cache space first can be deleted sequentially to store the new display data. This ensures that the target cache space always stores the latest display data, thus meeting the electronic device's need to readily access and detect historical display data of the target interface prior to the screenshot operation.

[0088] In another alternative implementation, considering that the target interface may not change its content, the target cache space may contain multiple frames of identical display data. In this regard, the electronic device can control the target cache space to deduplicate the identical and similar display data stored in it, so as to save target cache space and cache more meaningful historical display data. This results in the subsequent generated target video data including more display data of the target interface before the screenshot operation, thereby increasing the probability that the user can find the display data that satisfies them.

[0089] Optionally, the electronic device can acquire the current real-time display data of the target interface and sequentially store each frame of real-time display data into the target cache space;

[0090] If the target cache space reaches its storage limit when the latest real-time display data is stored in the target cache space, then the latest real-time display data will be overwritten by the display data that entered the target cache space first.

[0091] By implementing the above method, electronic devices can ensure that the target cache space always stores the latest display data by overwriting the oldest display data with the latest display data. This can meet the needs of electronic devices to obtain and detect the historical display data of the target interface before the screenshot operation at any time.

[0092] 606. Generate target video data for the first duration based on multi-frame real-time display data and multi-frame historical display data.

[0093] In this embodiment of the application, when the electronic device acquires multiple frames of real-time display data and multiple frames of historical display data, it can encode the multiple frames of real-time display data and multiple frames of historical display data to obtain target video data of a first duration.

[0094] Optionally, the electronic device can encode multiple frames of real-time display data and multiple frames of historical display data using a video encoding program. The video encoding program may include, but is not limited to, MediaProjection, Adobe Media Encoder, etc.

[0095] Optionally, before encoding the multi-frame real-time display data and the multi-frame historical display data, the electronic device can perform deduplication on the display data with repeated content in the multi-frame real-time display data and the multi-frame historical display data, and then encode the deduplicated display data to ensure that the generated target video data will not have any stuttering.

[0096] Optionally, if the length of the encoded video data exceeds the first duration, the electronic device can edit the video data to maintain the target video data of the first duration.

[0097] 608. Generate a screenshot image corresponding to the screenshot operation based on the target interface image and target video data.

[0098] In one implementation, after the electronic device detects a screenshot operation, if it detects the target receiving end, it can call the corresponding interactive program according to the type of the target receiving end; and if a screenshot image corresponding to the screenshot operation is generated, the screenshot image is sent to the target receiving end through the interactive program.

[0099] Optionally, the type of the target receiving end can include social networking, communication, and gaming applications, etc., without limitation. Among them, social networking applications can include microblogs, Twitter, etc.; communication applications can include WeChat, SMS, etc., without limitation.

[0100] In one optional embodiment, the electronic device is currently in a real-time operation interface. After the electronic device detects a screenshot operation, if it detects a target receiving end for voice input, it can call the corresponding interactive program according to the type of the target receiving end, and send the screenshot image to the target receiving end through the interactive program when a screenshot image corresponding to the screenshot operation is generated.

[0101] Optionally, the real-time operation interface may include the game interface, and the target receiving end may be a player in the game or a public chat channel, etc., without limitation.

[0102] In related technologies, users still need to manually share the screenshot with other users after triggering it, which is cumbersome and the sharing process is delayed. However, with the method described above, users can input the target receiving end into the electronic device after triggering the screenshot, allowing the device to automatically share the generated live screenshot image to the target receiving end, improving sharing efficiency and enhancing the user experience.

[0103] By implementing the methods disclosed in the above embodiments, in response to a screenshot operation, the current target interface image can be captured, and target video data of a first duration can be recorded for the target interface; then, based on the target interface image and the target video data, a screenshot live image that has both static and dynamic effects can be generated. Compared to related technologies that can only capture static interface images, the screenshot live images provided in this application also have dynamic effects. This allows users to obtain the desired interface content through dynamic video data if they are not satisfied with the captured static interface image, thereby improving the flexibility of the method and thus enhancing the user's screenshot experience. Furthermore, the first duration target video data generated based on multiple frames of real-time display data and multiple frames of historical display data includes the display data of the target interface before the screenshot operation was detected. This allows users to view the interface content before the screenshot operation was triggered based on the target video data, overcoming the defect that users cannot obtain a satisfactory screenshot due to the delay in the screenshot operation triggered by the electronic device, thus improving the user's screenshot experience. Additionally, by overwriting the oldest display data with the latest display data, the target cache space is always storing the latest display data, thereby meeting the need for electronic devices to obtain historical display data of the target interface before the screenshot operation was detected at any time.

[0104] Please refer to Figure 7, which is a flowchart illustrating another screenshot method disclosed in this application. Optionally, this method can be applied to the electronic devices described above, or other execution entities. This application uses an electronic device as an example for illustration and should not be construed as limiting the scope of this application. Optionally, the method may include:

[0105] 702. In response to the screenshot operation, capture the current target interface image and record target video data for the first duration on the target interface.

[0106] In one alternative embodiment, in response to a screenshot operation, the electronic device can acquire multiple frames of target display data, which may include: acquiring historical display data from a target cache space, and / or the current real-time display data of the target interface; the multiple frames of historical display data are the display data of the target interface cached before the screenshot operation is detected.

[0107] Furthermore, electronic devices can determine the degree of similarity between multiple frames of target display data;

[0108] If the similarity of multiple frames of target display data is less than the degree threshold, the electronic device can capture the current target interface image of the target interface and record target video data for a first duration for the target interface; and execute step 704.

[0109] If the similarity of multiple frames of target display data is greater than or equal to a certain threshold, the electronic device can capture the current target interface image without recording target video data for the first duration for the target interface, and determine the target interface image as the target screenshot corresponding to the screenshot operation.

[0110] The threshold value can be set by developers based on extensive development experience, or by users based on extensive usage experience. Typical values ​​may include 90%, 95%, etc., and are not limited here.

[0111] Optionally, the electronic device can extract image features from multiple frames of target display data, and determine the similarity of the multiple frames of target display data based on the image features of the multiple frames of historical display data. The image features may include at least one of texture features, color features, and contour features, without limitation herein.

[0112] Understandably, if the similarity of multiple frames of target display data is less than a threshold, it indicates that the content of the current target interface is changing. Therefore, it is necessary for electronic devices to record the target video data to document the changes in the content of the target interface.

[0113] If the similarity of multiple frames of target display data is greater than or equal to the similarity threshold, it means that the content of the current target interface has not changed much. In this case, the content of the target interface can be reflected by the captured static target interface image. It is no longer necessary to record the target video data for the first duration for the target interface, thereby reducing the computational load and functionality of electronic devices and improving the flexibility of the method.

[0114] 704. Generate a screenshot image corresponding to the screenshot operation based on the target interface image and target video data.

[0115] In one alternative embodiment, the electronic device may, in response to a screenshot operation, capture target audio data associated with target video data in the target interface.

[0116] Optionally, the target audio data may be background music played on the target interface, or ambient sound (e.g., user's voice) captured by the microphone of the electronic device during the acquisition of target video data, etc., without limitation.

[0117] Furthermore, the electronic device can generate a screenshot image corresponding to the screenshot operation based on the target interface image, target video data, and target audio data.

[0118] Optionally, during or after the acquisition of target video and target audio data, the electronic device may add acquisition timestamps to the target video and target audio data respectively.

[0119] Furthermore, the electronic device can match and align the target video data and target audio data based on the acquisition timestamp, so that the dynamic images corresponding to the target audio data and target video data are matched in the generated screenshot live image, thereby improving the display effect of the target video data.

[0120] By implementing the above method, electronic devices can collect target audio data associated with target video data and package them together into the screenshot live image, so that the screenshot live image displayed later has sound, thereby improving the user's experience of viewing the screenshot live image.

[0121] 706. In response to the first viewing operation of the screenshot live image, display the screenshot live image.

[0122] Optionally, in response to a first viewing operation of a screenshot of a live image, the electronic device may display the target interface image and play the target video data in different display areas.

[0123] In this embodiment of the application, the electronic device can display a static target interface image and play dynamic target video data in two different display areas on the same display screen.

[0124] For example, an electronic device displays a static target interface image and plays dynamic target video data side by side.

[0125] By implementing the above method, users can simultaneously view static target interface images and dynamic target video data, making it easier for them to compare the content of the two and thus improving the user experience of viewing live screenshot images.

[0126] In another alternative embodiment, in response to a first viewing operation for a screenshot of a live image, the electronic device may display a target interface image, and if a second viewing operation for target video data is detected, play the target video data.

[0127] Optionally, the first viewing operation and the second viewing operation can be the same or different, and this is not limited here.

[0128] By implementing the above method, the electronic device can first display a static target interface image for the user to view, thereby saving the power consumption of the electronic device; then, if the user is not satisfied with the current target interface image, the electronic device can be further triggered to play target video data, so that the user can find the display data that satisfies them from the dynamic images corresponding to the target video data, thus improving the user experience.

[0129] In another alternative implementation, in response to a first viewing operation of a screenshot live image, the electronic device may first play the target video data and, upon completion of playing the target video data, display the target interface image.

[0130] By implementing the above method, the electronic device can first play dynamic target video data, allowing the user to have a certain understanding of the entire recorded video, and finally stay on displaying a static target interface image, thus avoiding the electronic device continuously playing dynamic target video data and reducing the power consumption of the electronic device.

[0131] In one alternative embodiment, after playing the target video data, the electronic device may, in response to a third viewing operation on the target video data, decode the target video data to obtain multiple frames of video images and display the multiple frames of video images.

[0132] Considering that users may want to capture and save video images from the target video data while watching the dynamic images corresponding to the target video data, it is difficult for users to capture the video images they want from the dynamic images because the target video data is usually short and does not have the ability to adjust the playback progress.

[0133] In this embodiment of the application, the electronic device can respond to a third viewing operation on the target video data, decode the target video data to obtain multiple frames of video images, and display the multiple frames of video images corresponding to the target video data for the user's reference, thereby facilitating the user to select and save the target video image that satisfies them.

[0134] Considering that users typically trigger a third-party viewing action because they want to save the current video frame, the electronic device can optionally determine the first video frame currently playing in the target video data upon detecting the third-party viewing action. Furthermore, in the case of multiple displayed video frames, the first video frame can be identified, allowing users to quickly locate the video frame they want to save based on the identification, thereby improving the user experience.

[0135] Furthermore, in response to a save operation for a target video image among multiple video frames, the electronic device can store the target video image. It should be noted that the target video image can be a single frame or multiple frames; this is not limited here.

[0136] By implementing the above method, electronic devices can decode the displayed target video data to obtain multiple video images for the user to reference. This allows the user to select and save the desired target video image from the displayed multiple video images, thereby improving the user experience.

[0137] As an optional implementation, before displaying the screenshot, the electronic device can analyze the target image content of the screenshot using an image analysis model; then, based on the target image content, it can generate descriptive content corresponding to the screenshot, which describes the image content of the screenshot. Optionally, the electronic device can generate the descriptive content corresponding to the screenshot based on the target image content using a trained learning model.

[0138] For example, assuming the screenshot is of a goal in a football match, the description could be: "A star player in the picture scored a goal against a certain team, and the current score is 1-0," etc., without any limitation.

[0139] Furthermore, electronic devices can bind the introductory content with screenshots of live images.

[0140] When displaying a live screenshot image, the corresponding descriptive text for the screenshot image is also displayed.

[0141] By implementing the above method, electronic devices can learn models to generate corresponding descriptive content for screenshot images, thereby enabling users to quickly understand the content of the screenshot images based on the descriptive content and improving the user experience.

[0142] Implementing the methods disclosed in the above embodiments, in response to a screenshot operation, the current target interface image can be captured, and target video data of a first duration can be recorded for the target interface. Then, based on the target interface image and target video data, a screenshot live-action image with both static and dynamic effects can be generated. Compared to related technologies that can only capture static interface images, the screenshot live-action image provided in this application also has dynamic effects, allowing users to obtain the desired interface content through dynamic video data if they are not satisfied with the captured static interface image, thereby improving the flexibility of the method and enhancing the user's screenshot experience. Furthermore, target audio data associated with the target video data can be collected and packaged together with the screenshot live-action image, so that the subsequently displayed screenshot live-action image has sound, thereby improving the user's experience of viewing the screenshot live-action image. Finally, the displayed target video data can be decoded to obtain multiple frames of video images for the user's reference, allowing the user to select and save a satisfactory target video image from the displayed multiple frames, thereby improving the user experience.

[0143] Please refer to Figure 8, which is a schematic diagram of a screenshot device disclosed in an embodiment of this application. Optionally, this device can be applied to the electronic device described above, or other execution entities. This application embodiment uses an electronic device as an example for illustration and should not be construed as limiting the scope of this application embodiment. Optionally, the device may include a capture unit 802 and a generation unit 804, wherein:

[0144] The capture unit 802 is used to capture the current target interface image in response to the screenshot operation, and record target video data for a first duration for the target interface.

[0145] The generation unit 804 is used to generate a screenshot image corresponding to the screenshot operation based on the target interface image and the target video data.

[0146] Implementing the above-described apparatus, in response to a screenshot operation, it can capture the current image of the target interface and simultaneously record target video data for a first duration. Then, based on the target interface image and the target video data, a live screenshot image that possesses both static and dynamic effects can be generated. Compared to related technologies that can only capture static interface images, the live screenshot image provided in this application also has dynamic effects. This allows users to obtain the desired interface content through dynamic video data if they are not satisfied with the captured static interface image, thereby improving the flexibility of the method and ultimately enhancing the user's screenshot experience.

[0147] As an optional implementation, the generation unit 804 is further configured to insert target video data into the target interface image to obtain a screenshot live image corresponding to the screenshot operation; and to add insertion information of the target video data to the description file corresponding to the screenshot live image, wherein the insertion information is used to describe the position of the target video data in the screenshot live image.

[0148] By implementing the above device, electronic devices can package the target video data and the target interface image by inserting the target video data into the target interface image. This allows the target video data to be decoded and played at any time during the subsequent display of the static target interface image, thereby achieving the effect of playing dynamic images. This method is simple and efficient, reducing the difficulty and cost of implementation.

[0149] As an optional implementation, the capture unit 802 is also used to collect multi-frame real-time display data of the target interface; and to acquire multi-frame historical display data, which is the display data of the target interface cached before the screenshot operation is detected; and to generate target video data of a first duration based on the multi-frame real-time display data and the multi-frame historical display data.

[0150] By implementing the above device, the electronic device can generate a first-duration target video data based on multiple frames of real-time display data and multiple frames of historical display data. This target video data includes the display data of the target interface before the screenshot operation is detected. As a result, the user can view the interface content before the screenshot operation is triggered based on the target video data. This overcomes the defect that the user cannot obtain a satisfactory screenshot due to the delay in the screenshot operation triggered by the electronic device, and improves the user's screenshot experience.

[0151] As an optional implementation, the device shown in FIG8 may further include a storage unit (not shown), wherein:

[0152] The storage unit is used to store the display data of the target interface into the target cache space during the display of the target interface;

[0153] Furthermore, the interception unit 802 is also used to obtain multi-frame historical display data from the target cache space.

[0154] By implementing the above device, the electronic device can continuously cache the display data of the target interface in the target cache space during the display process, thereby meeting the electronic device's need to obtain and detect the historical display data of the target interface before the screenshot operation at any time.

[0155] As an optional implementation, the storage unit is also used to obtain the current frame display data of the target interface; if the amount of data stored in the target cache space does not reach the data amount threshold, the current frame display data is stored in the free storage space of the target cache space; if the amount of data stored in the target cache space reaches the data amount threshold, the display data stored first in the target cache space is overwritten with the current frame display data.

[0156] By implementing the above device, the electronic device can ensure that the target cache space always stores the latest display data by overwriting the oldest display data with the latest display data. This can meet the electronic device's need to obtain and detect the historical display data of the target interface before the screenshot operation at any time.

[0157] As an optional implementation, the device shown in FIG8 may further include a data acquisition unit (not shown), wherein:

[0158] The acquisition unit is used to acquire target audio data associated with target video data in the target interface in response to the screenshot operation, before generating the screenshot live image corresponding to the screenshot operation based on the target interface image and target video data.

[0159] In addition, the generation unit 804 is also used to generate a screenshot live image corresponding to the screenshot operation based on the target interface image, target video data and target audio data.

[0160] By implementing the above device, the electronic device can collect target audio data associated with the target video data and package them together into the screenshot live image, so that the screenshot live image displayed later has sound, thereby improving the user's experience of viewing the screenshot live image.

[0161] As an optional implementation, the device shown in FIG8 may further include a first display unit (not shown), wherein:

[0162] The first display unit is configured to, after generating a screenshot image corresponding to the screenshot operation based on the target interface image and target video data, in response to a first viewing operation of the screenshot image, display the target interface image and play the target video data in different display areas respectively; or...

[0163] Display the target interface image, and if a second viewing operation targeting the target video data is detected, play the target video data.

[0164] Implementing the above-mentioned device allows users to simultaneously view static target interface images and dynamic target video data, facilitating comparison between the two and improving the user experience of viewing live screenshots. Furthermore, the electronic device can first display the static target interface image for the user to view, saving power consumption. If the user is not satisfied with the current target interface image, they can further trigger the electronic device to play the target video data, allowing them to find satisfactory display data from the corresponding dynamic images, thus enhancing the user experience.

[0165] As an optional implementation, the device shown in FIG8 may further include a second display unit (not shown), wherein:

[0166] The second display unit is configured to, after playing the target video data, decode the target video data in response to a third viewing operation on the target video data to obtain multiple frames of video images and display the multiple frames of video images; and, in response to a saving operation on the target video images in the multiple frames of video images, store the target video images.

[0167] By implementing the above-mentioned device, the electronic device can decode the displayed target video data to obtain multiple frames of video images for the user to reference. This allows the user to select and save the target video image that they are satisfied with from the displayed multiple frames, thereby improving the user experience.

[0168] As an optional implementation, the target interface includes a real-time operation interface, which includes one or more touch components. When one or more touch components are triggered, the interface content of the real-time operation interface is changed; the real-time operation interface includes a game interface.

[0169] By implementing the above device, for real-time operation interfaces where the interface content changes frequently, the electronic device can generate a screenshot image that has both static and dynamic effects when it detects a screenshot operation on the real-time operation interface. This provides more content about the real-time operation interface, making it easier for users to understand the changes in the interface content and improving the user experience.

[0170] Please refer to Figure 9, which is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. As shown in Figure 9, the electronic device may include:

[0171] Memory 901 storing executable program code;

[0172] Processor 902 coupled to memory 901;

[0173] The processor 902 calls the executable program code stored in the memory 901 to execute the screenshot method disclosed in the above embodiments.

[0174] This application discloses a computer-readable storage medium storing a computer program that causes a computer to execute the screenshot methods disclosed in the above embodiments.

[0175] This application also discloses an application publishing platform, which is used to publish computer program products. When the computer program products are run on a computer, the computer performs some or all of the steps of the methods described in the above method embodiments.

[0176] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Those skilled in the art should also recognize that the embodiments described in the specification are optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0177] In the various embodiments of this application, it should be understood that the sequence number of each process does not necessarily imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0178] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they can be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0179] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0180] If the aforementioned integrated units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-accessible memory. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several requests to cause a computer device (which can be a personal computer, server, or network device, specifically a processor in the computer device) to execute some or all of the steps of the methods described in the various embodiments of this application.

[0181] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0182] The foregoing has provided a detailed description of the screenshot method and apparatus, electronic device, and computer-readable storage medium disclosed in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A screen capturing method, characterized by, The method includes: In response to a screenshot operation, capture the current target interface image and record target video data for a first duration for the target interface. Based on the target interface image and the target video data, a screenshot image corresponding to the screenshot operation is generated.

2. The method according to claim 1, characterized in that, The step of generating a screenshot image corresponding to the screenshot operation based on the target interface image and the target video data includes: Insert the target video data into the image data of the target interface image to obtain the screenshot live image corresponding to the screenshot operation; In the description file corresponding to the screenshot live image, add insertion information of the target video data, which is used to describe the position of the target video data in the screenshot live image.

3. The method according to claim 1, characterized in that, The recording of target video data for a first duration for the target interface includes: Collect multiple frames of real-time display data from the target interface; Acquire multi-frame historical display data, which is the display data of the target interface cached before the screenshot operation is detected; Based on the multi-frame real-time display data and the multi-frame historical display data, target video data of a first duration is generated.

4. The method according to claim 3, characterized in that, The method further includes: During the process of displaying the target interface, the display data of the target interface is stored in the target cache space; The acquisition of multi-frame historical display data includes: Obtain multiple frames of historical display data from the target cache space.

5. The method according to claim 4, characterized in that, The step of storing the display data of the target interface into the target cache space includes: Obtain the current frame display data of the target interface; If the amount of data stored in the target cache space does not reach the data amount threshold, the current frame display data will be stored in the free storage space of the target cache space. If the amount of data stored in the target cache space reaches the data amount threshold, then the display data stored first in the target cache space is overwritten with the display data of the current frame.

6. The method according to claim 1, characterized in that, Before generating the screenshot image corresponding to the screenshot operation based on the target interface image and the target video data, the method further includes: In response to a screenshot operation, target audio data associated with the target video data is collected from the target interface. The step of generating a screenshot image corresponding to the screenshot operation based on the target interface image and the target video data includes: Based on the target interface image, the target video data, and the target audio data, a screenshot image corresponding to the screenshot operation is generated.

7. The method according to claim 1, characterized in that, After generating the screenshot image corresponding to the screenshot operation based on the target interface image and the target video data, the method further includes: In response to a first viewing operation of the screenshot live image, the target interface image is displayed in different display areas and the target video data is played; or... The target interface image is displayed, and if a second viewing operation is detected for the target video data, the target video data is played.

8. The method according to claim 7, characterized in that, After playing the target video data, the method further includes: In response to a third viewing operation on the target video data, the target video data is decoded to obtain multiple video frames, and the multiple video frames are displayed. In response to a save operation for a target video image in the multi-frame video images, the target video image is stored.

9. The method according to any one of claims 1 to 8, characterized in that, The target interface includes a real-time operation interface, which includes one or more touch components. When the one or more touch components are triggered, the interface content of the real-time operation interface is changed. The real-time operation interface includes the game interface.

10. A screenshot device, characterized in that, The device includes: The capture unit is used to capture the current target interface image of the target interface in response to the screenshot operation, and record target video data for a first duration for the target interface. The generation unit is used to generate a screenshot image corresponding to the screenshot operation based on the target interface image and the target video data.

11. The apparatus according to claim 10, characterized in that, The generating unit is further configured to insert the target video data into the image data of the target interface image to obtain the screenshot live image corresponding to the screenshot operation; In addition, insertion information of the target video data is added to the description file corresponding to the screenshot live image. The insertion information is used to describe the position of the target video data in the screenshot live image.

12. The apparatus according to claim 10, characterized in that, The capture unit is further configured to collect multi-frame real-time display data of the target interface; and to acquire multi-frame historical display data, wherein the multi-frame historical display data is the display data of the target interface cached before the screenshot operation is detected; and to generate target video data of a first duration based on the multi-frame real-time display data and the multi-frame historical display data.

13. The apparatus according to claim 12, characterized in that, The device further includes a storage unit, which is used to store the display data of the target interface into a target cache space during the display of the target interface; Furthermore, the interception unit is also used to obtain multiple frames of historical display data from the target cache space.

14. The apparatus according to claim 13, characterized in that, The storage unit is also used to obtain the current frame display data of the target interface; if the amount of data stored in the target cache space does not reach the data amount threshold, the current frame display data is stored in the free storage space of the target cache space. If the amount of data stored in the target cache space reaches the data amount threshold, then the display data stored first in the target cache space is overwritten with the display data of the current frame.

15. The apparatus according to claim 10, characterized in that, The device further includes a collection unit, which is used to collect target audio data associated with the target video data in the target interface in response to the screenshot operation before generating the screenshot live image corresponding to the screenshot operation based on the target interface image and the target video data. Furthermore, the generating unit is also configured to generate a screenshot live image corresponding to the screenshot operation based on the target interface image, the target video data, and the target audio data.

16. The apparatus according to claim 10, characterized in that, The device further includes a first display unit, which is configured to, after generating a screenshot live image corresponding to the screenshot operation based on the target interface image and the target video data, display the target interface image and play the target video data in different display areas in response to a first viewing operation of the screenshot live image; or, The target interface image is displayed, and if a second viewing operation is detected for the target video data, the target video data is played.

17. The apparatus according to claim 16, characterized in that, The device further includes a second display unit, which is configured to, after the target video data is played, decode the target video data in response to a third viewing operation on the target video data to obtain multiple frames of video images and display the multiple frames of video images. In response to a save operation for a target video image in the multi-frame video images, the target video image is stored.

18. The apparatus according to claims 10-17, characterized in that, The target interface includes a real-time operation interface, which includes one or more touch components. When the one or more touch components are triggered, the interface content of the real-time operation interface is changed. The real-time operation interface includes the game interface.

19. An electronic device, characterized in that, The method includes a memory storing executable program code and a processor coupled to the memory; wherein the processor invokes the executable program code stored in the memory to perform the method as described in any one of claims 1 to 9.

20. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 9.