CN109976859B - Screenshot method, terminal and computer readable storage medium - Google Patents

Screenshot method, terminal and computer readable storage medium Download PDF

Info

Publication number
CN109976859B
CN109976859B CN201910242569.1A CN201910242569A CN109976859B CN 109976859 B CN109976859 B CN 109976859B CN 201910242569 A CN201910242569 A CN 201910242569A CN 109976859 B CN109976859 B CN 109976859B
Authority
CN
China
Prior art keywords
display
display content
terminal
application
elements
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910242569.1A
Other languages
Chinese (zh)
Other versions
CN109976859A (en
Inventor
严敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201910242569.1A priority Critical patent/CN109976859B/en
Publication of CN109976859A publication Critical patent/CN109976859A/en
Application granted granted Critical
Publication of CN109976859B publication Critical patent/CN109976859B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The embodiment of the invention discloses a screenshot method which is applied to a terminal, and the method comprises the following steps: intercepting a first display content of a current screen; controlling the page of the current screen to roll a preset distance; intercepting a second display content after the current screen page is scrolled; identifying the first display content and the second display content; after the display elements with consistent display of the first display content and the second display content are identified, determining the position coordinates of the display elements with consistent display on the screen; and clearing the display elements with consistent display based on the position coordinates. The invention also provides a terminal and a computer readable storage medium, by implementing the scheme, the problem that the suspended display advertisement elements are repeatedly intercepted when the terminal performs long screenshot is avoided, and the user experience of the long screenshot is improved.

Description

Screenshot method, terminal and computer readable storage medium
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a screenshot method, a terminal, and a computer readable storage medium.
Background
At present, the principle of realizing long screenshot on a mobile phone terminal is to perform screenshot after scrolling a certain distance, and then splice a plurality of screenshot contents.
This has a problem in that: some floating promotion advertisement layout elements are always displayed at the fixed positions of the page, when the user scrolls on the screen to browse the interface content, the floating promotion advertisement layout elements are always displayed at the fixed positions of the screen, the display positions of the floating promotion advertisement layout elements cannot be changed along with the up-and-down scrolling of the screen content, when the long screenshot is transmitted to simulate the user's finger scrolling event to scroll the screen display content when the long screenshot is performed on the interface, the floating promotion advertisement layout elements cannot be changed, the same floating promotion advertisement layout elements are contained in the screenshot content after each scroll, a large number of repeated floating promotion contents are contained in the finally spliced long screenshot, the obtained screenshot content is not attractive, and the floating advertisement contents can shield the webpage content below the long screenshot content, so that the effective content information content contained in the long screenshot is influenced.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a screenshot method, a terminal, and a computer storage medium, so that the terminal can avoid the problem that the suspension display advertisement element is repeatedly intercepted when performing long screenshot, thereby improving the user experience of the long screenshot.
In order to solve the above problems, the present invention provides a screenshot method applied to a terminal, the method comprising: intercepting a first display content of a current screen; controlling the page of the current screen to roll a preset distance; intercepting a second display content after the current screen page is scrolled; identifying the first display content and the second display content; after the display elements with consistent display of the first display content and the second display content are identified, determining the position coordinates of the display elements with consistent display on the screen; and clearing the display elements with consistent display based on the position coordinates.
Optionally, before said intercepting the first display content of the current screen, the method further comprises: judging whether the current application of the terminal is a browser application or not; if yes, further judging whether the browser application has a display element clearing function; if yes, intercepting the first display content of the current screen.
Optionally, the step of determining whether the current application of the terminal is a browser application specifically includes: acquiring an application package name of a current application of the terminal; judging whether the application package name belongs to a preset first application package database or not, wherein the preset first application package database is a browser application package database; if yes, judging that the current application of the terminal is a browser application.
Optionally, the step of determining whether the browser application has a display element clearing function specifically includes: acquiring an application entry of a current application of the terminal; judging whether the application package name belongs to a preset second application package database or not, wherein the preset second application package database is a browser application package database with a display element clearing function; if yes, judging that the browser application has a display element clearing function.
Optionally, the step of controlling the page scrolling preset distance of the current screen specifically includes: sending an analog finger sliding event to the terminal driving layer; and the driving layer controls the page of the current screen to roll a preset distance according to the finger sliding event.
Optionally, the step of identifying the first display content and the second display content specifically includes: extracting display elements in the first display content and the second display content; and comparing the display elements in the first display content with the display elements in the second display content.
Optionally, the step of identifying that the first display content and the second display content have display elements consistent with each other specifically includes: if the display pixels in the first display content and the second display content are completely the same, displaying elements with the same display pixels are displayed in the first display content and the second display content; and if so, identifying that the first display content and the second display content have display identical display elements.
Optionally, the step of clearing the display element with consistent display based on the position coordinates specifically includes: and calling a display element clearing function of the browser application to clear the display element corresponding to the position coordinate.
Further, the present invention also provides a terminal, which further includes: memory, communication bus, and processor, wherein: the memory is used for storing a screenshot program; the communication bus is used for realizing connection communication between the processor and the memory; the processor is configured to execute the screenshot program stored in the memory to implement the steps described above.
Further, the present invention also provides a computer readable storage medium storing one or more programs executable by one or more processors to implement the steps of the screenshot method as described in any one of the above.
By implementing the scheme, when the terminal performs long screenshot, the suspended advertisements which are not moved in a suspended manner are automatically filtered, so that the long screenshot without the suspended advertisements is realized, the attractiveness of the long screenshot is improved, and the user experience of a user during the long screenshot is improved.
Drawings
In the drawings (which are not necessarily drawn to scale), like numerals may describe similar components in different views. Like reference numerals having different letter suffixes may represent different instances of similar components. The drawings illustrate generally, by way of example and not by way of limitation, various embodiments discussed herein.
Fig. 1 is a schematic diagram of a hardware structure of a terminal implementing various embodiments of the present invention;
fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention;
FIG. 3 is a flow chart of a screenshot method of the present invention;
FIG. 4 is a schematic block diagram of a terminal according to the present invention;
fig. 5 is a schematic diagram of a terminal structure according to the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present invention, and have no specific meaning per se. Thus, "module," "component," or "unit" may be used in combination.
The terminal may be implemented in various forms. For example, the terminals described in the present invention may include mobile terminals such as cell phones, tablet computers, notebook computers, palm computers, personal digital assistants (Personal Digital Assistant, PDA), portable media players (Portable Media Player, PMP), navigation devices, terminals, smart bracelets, pedometers, and fixed terminals such as digital TVs, desktop computers, and the like.
The following description will be given by taking a terminal as an example, and those skilled in the art will understand that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for a moving purpose.
Referring to fig. 1, which is a schematic hardware structure of a terminal implementing various embodiments of the present invention, the terminal 100 may include: radio Frequency (RF) unit 101, wiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal structure shown in fig. 1 is not limiting of the mobile terminal and that the terminal may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The various components of terminal 100 are described in detail below in conjunction with fig. 1:
the radio frequency unit 101 may be used for receiving and transmitting signals during the information receiving or communication process, specifically, after receiving downlink information of the base station, processing the downlink information by the processor 110; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 may also communicate with networks and other devices via wireless communications. The wireless communications may use any communication standard or protocol including, but not limited to, global System for Mobile communications (Global System of Mobile communication, GSM), general packet radio service (General Packet Radio Service, GPRS), code Division multiple Access 2000 (Code Division Multiple Access, CDMA2000), wideband code Division multiple Access (Wideband Code Division Multiple Access, WCDMA), time Division synchronous code Division multiple Access (Time Division-Synchronous Code Division Multiple Access, TD-SCDMA), frequency Division Duplex Long term evolution (Frequency Division Duplexing-Long Term Evolution, FDD-LTE), time Division Duplex Long term evolution (Time Division Duplexing-Long Term Evolution, TDD-LTE), and the like.
WiFi belongs to a short-distance wireless transmission technology, and a mobile terminal can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 102, so that wireless broadband Internet access is provided for the user. Although fig. 1 shows a WiFi module 102, it is understood that it does not belong to the necessary constitution of a mobile terminal, and can be omitted entirely as required within a range that does not change the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the terminal 100. The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive an audio or video signal. The a/V input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, the graphics processor 1041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound into audio data. The processed audio (voice) data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting the audio signal.
The terminal 100 further comprises at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the terminal 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; as for other sensors such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured in the mobile phone, the detailed description thereof will be omitted.
The display unit 106 is used to display information input by a user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the mobile terminal. In particular, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1071 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 110, and can receive and execute commands sent from the processor 110. Further, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc., as specifically not limited herein.
Further, the touch panel 1071 may overlay the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or thereabout, the touch panel 1071 is transferred to the processor 110 to determine the type of touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in fig. 1, the touch panel 1071 and the display panel 1061 are two independent components for implementing the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 may be integrated with the display panel 1061 to implement the input and output functions of the terminal, which is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the terminal 100. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal 100 or may be used to transmit data between the terminal 100 and an external device.
Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The terminal 100 may further include a power source 111 (e.g., a battery) for supplying power to the respective components, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system.
Although not shown in fig. 1, the terminal 100 may further include a bluetooth module or the like, which is not described herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the terminal of the present invention is based will be described below.
Referring to fig. 2, fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention, where the communication network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a User Equipment (UE) 201, an evolved UMTS terrestrial radio access network (Evolved UMTS Terrestrial Radio Access Network, E-UTRAN) 202, an evolved packet core (Evolved Packet Core, EPC) 203, and an IP service 204 of an operator that are sequentially connected in communication.
In general, the UE201 may be the terminal 100 described above, and will not be described herein.
The E-UTRAN202 includes eNodeB2021 and other eNodeB2022, etc. The eNodeB2021 may be connected with other eNodeB2022 by a backhaul (e.g., an X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide access from the UE201 to the EPC 203.
EPC203 may include a mobility management entity (Mobility Management Entity, MME) 2031, a home subscriber server (Home Subscriber Server, HSS) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, pgw (PDN Gate Way) 2035, and policy and tariff function entity (Policy and Charging Rules Function, PCRF) 2036, etc. The MME2031 is a control node that handles signaling between the UE201 and EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location registers (not shown) and to hold user specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034 and PGW2035 may provide IP address allocation and other functions for UE201, PCRF2036 is a policy and charging control policy decision point for traffic data flows and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IP multimedia subsystem (IP Multimedia Subsystem, IMS), or other IP services, etc.
Although the LTE system is described above as an example, it should be understood by those skilled in the art that the present invention is not limited to LTE systems, but may be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems. Based on the above terminal hardware structure and the communication network system, various embodiments of the method of the present invention are provided.
Fig. 3 is a schematic flow chart of a screenshot method according to an embodiment of the present invention, which is applied to a terminal. It will be appreciated that the flow charts in the method embodiments are not intended to limit the order in which the steps are performed.
As shown in fig. 3, the method comprises the steps of:
step S300, intercepting the first display content of the current screen.
In this embodiment, the first display content of the current screen is a display interface of a current terminal running application at a current moment, where the current terminal running application may be an instant messaging application, a game application, or a browser application.
In this embodiment, before intercepting the first display content of the current screen, it is determined whether the current application of the terminal is a browser application; if yes, further judging whether the browser application has a display element clearing function; if yes, intercepting the first display content of the current screen. Further, acquiring an application package name of the current application of the terminal; judging whether the application package name belongs to a preset first application package database or not, wherein the preset first application package database is a browser application package database; if yes, judging that the current application of the terminal is a browser application. Further, acquiring an application entry of the current application of the terminal; judging whether the application package name belongs to a preset second application package database or not, wherein the preset second application package database is a browser application package database with a display element clearing function; if yes, judging that the browser application has a display element clearing function. In the above embodiment, the first application package database is an application package database including various application names, and the second application package database is an application package database identifying a browser having a display element clearing function.
Step S302, controlling the page of the current screen to scroll a preset distance.
In an embodiment of the present invention, the step of controlling the preset distance for scrolling the page of the current screen specifically includes: sending an analog finger sliding event to the terminal driving layer; and the driving layer controls the page of the current screen to roll a preset distance d according to the finger sliding event. Specifically, the preset distance d is preferably one half of the display screen.
And S304, intercepting the second display content after the current screen page is scrolled.
In the embodiment of the invention, when the current page is scrolled to the preset distance d, the scrolled second display content is intercepted. The second display content has different display content information than the first display content.
Step S306, identifying the first display content and the second display content.
In this embodiment, the step of identifying the first display content and the second display content specifically includes: extracting display elements in the first display content and the second display content; and comparing the display elements in the first display content with the display elements in the second display content. If the display pixels in the first display content and the second display content are completely the same, displaying elements with the same display pixels are displayed in the first display content and the second display content; and if so, identifying that the first display content and the second display content have display identical display elements. Specifically, display elements in the first display content and the second display content are extracted, pixels of the display elements are decomposed, pixels of the display elements are compared, whether the display elements with identical pixels exist or not is judged, and if the constituent pixels of at least two display elements are identical, at least two display elements are judged to be identical.
Step S308, after identifying that the first display content and the second display content have display elements with consistent display, determining position coordinates of the display elements with consistent display on the screen.
In this embodiment, when there is a display element whose display is identical between the first display content and the second display content, the position coordinates of the display element whose display is identical on the screen are determined. By means of the position coordinates, the display elements with consistent display can be accurately positioned. In this embodiment, the display element with consistent display is a floating advertisement element.
And step S310, clearing the display elements with consistent display based on the position coordinates.
In this embodiment, the step of clearing the display element with consistent display based on the position coordinates specifically includes: and calling a display element clearing function of the browser application to clear the display element corresponding to the position coordinate. After the display elements with consistent display in the first display content and the second display content are cleared, merging the cleared first display content and the cleared second display content, so as to generate a long screenshot without any floating advertisement.
By implementing the screenshot method, when the terminal performs long screenshot, the suspended advertisements which are not moved in a suspended manner are automatically filtered, so that long screenshot without suspended advertisements is realized, the attractiveness of the long screenshot is improved, and the user experience of a user during the long screenshot is improved.
Fig. 4 is a schematic block diagram of a terminal according to the present invention. The terminal includes a screenshot module 400, a scrolling module 402, an identification module 404, a determination module 406, a clearing module 408, a memory 410 and a processor 412, where the program modules are stored in the memory 410 as hard codes and executed by the processor 412 to implement the steps or methods of the embodiments described above.
The screenshot module 400 is configured to intercept a first display content of a current screen.
In this embodiment, the first display content of the current screen is a display interface of a current terminal running application at a current moment, where the current terminal running application may be an instant messaging application, a game application, or a browser application.
In this embodiment, before intercepting the first display content of the current screen, it is determined whether the current application of the terminal is a browser application; if yes, further judging whether the browser application has a display element clearing function; if yes, intercepting the first display content of the current screen. Further, acquiring an application package name of the current application of the terminal; judging whether the application package name belongs to a preset first application package database or not, wherein the preset first application package database is a browser application package database; if yes, judging that the current application of the terminal is a browser application. Further, acquiring an application entry of the current application of the terminal; judging whether the application package name belongs to a preset second application package database or not, wherein the preset second application package database is a browser application package database with a display element clearing function; if yes, judging that the browser application has a display element clearing function. In the above embodiment, the first application package database is an application package database including various application names, and the second application package database is an application package database identifying a browser having a display element clearing function.
And the scrolling module 402 is used for controlling the page of the current screen to scroll a preset distance.
In an embodiment of the present invention, the step of controlling the preset distance for scrolling the page of the current screen specifically includes: sending an analog finger sliding event to the terminal driving layer; and the driving layer controls the page of the current screen to roll a preset distance d according to the finger sliding event. Specifically, the preset distance d is preferably one half of the display screen.
The screenshot module 400 is further configured to intercept the second display content after the current screen page is scrolled.
In the embodiment of the invention, when the current page is scrolled to the preset distance d, the scrolled second display content is intercepted. The second display content has different display content information than the first display content.
An identification module 404 is configured to identify the first display content and the second display content.
In this embodiment, the step of identifying the first display content and the second display content specifically includes: extracting display elements in the first display content and the second display content; and comparing the display elements in the first display content with the display elements in the second display content. If the display pixels in the first display content and the second display content are completely the same, displaying elements with the same display pixels are displayed in the first display content and the second display content; and if so, identifying that the first display content and the second display content have display identical display elements. Specifically, display elements in the first display content and the second display content are extracted, pixels of the display elements are decomposed, pixels of the display elements are compared, whether the display elements with identical pixels exist or not is judged, and if the constituent pixels of at least two display elements are identical, at least two display elements are judged to be identical.
And the determining module 406 is configured to determine, after identifying that the first display content and the second display content have display elements that are consistent in display, position coordinates of the display elements that are consistent in display on the screen.
In this embodiment, when there is a display element whose display is identical between the first display content and the second display content, the position coordinates of the display element whose display is identical on the screen are determined. By means of the position coordinates, the display elements with consistent display can be accurately positioned. In this embodiment, the display element with consistent display is a floating advertisement element.
A clearing module 408, configured to clear the display element that is consistent in display based on the location coordinate.
In this embodiment, the step of clearing the display element with consistent display based on the position coordinates specifically includes: and calling a display element clearing function of the browser application to clear the display element corresponding to the position coordinate. After the display elements with consistent display in the first display content and the second display content are cleared, merging the cleared first display content and the cleared second display content, so as to generate a long screenshot without any floating advertisement.
By implementing the screenshot method, when the terminal performs long screenshot, the suspended advertisements which are not moved in a suspended manner are automatically filtered, so that long screenshot without suspended advertisements is realized, the attractiveness of the long screenshot is improved, and the user experience of a user during the long screenshot is improved.
Fig. 5 is a schematic diagram of the composition structure of the terminal of the present invention. As shown in fig. 5, the terminal at least includes: a memory 501, a communication bus 502, and a processor 503. Wherein:
the memory 501 is configured to store a screenshot program;
the communication bus 502 is used for realizing connection communication between the processor and the memory;
the processor 503 is configured to execute a screenshot program stored in the memory, so as to implement the following steps:
and intercepting the first display content of the current screen.
In this embodiment, the first display content of the current screen is a display interface of a current terminal running application at a current moment, where the current terminal running application may be an instant messaging application, a game application, or a browser application.
In this embodiment, before intercepting the first display content of the current screen, it is determined whether the current application of the terminal is a browser application; if yes, further judging whether the browser application has a display element clearing function; if yes, intercepting the first display content of the current screen. Further, acquiring an application package name of the current application of the terminal; judging whether the application package name belongs to a preset first application package database or not, wherein the preset first application package database is a browser application package database; if yes, judging that the current application of the terminal is a browser application. Further, acquiring an application entry of the current application of the terminal; judging whether the application package name belongs to a preset second application package database or not, wherein the preset second application package database is a browser application package database with a display element clearing function; if yes, judging that the browser application has a display element clearing function. In the above embodiment, the first application package database is an application package database including various application names, and the second application package database is an application package database identifying a browser having a display element clearing function.
And controlling the page of the current screen to scroll a preset distance.
In an embodiment of the present invention, the step of controlling the preset distance for scrolling the page of the current screen specifically includes: sending an analog finger sliding event to the terminal driving layer; and the driving layer controls the page of the current screen to roll a preset distance d according to the finger sliding event. Specifically, the preset distance d is preferably one half of the display screen.
And intercepting the second display content after the current screen page is scrolled.
In the embodiment of the invention, when the current page is scrolled to the preset distance d, the scrolled second display content is intercepted. The second display content has different display content information than the first display content.
The first display content and the second display content are identified.
In this embodiment, the step of identifying the first display content and the second display content specifically includes: extracting display elements in the first display content and the second display content; and comparing the display elements in the first display content with the display elements in the second display content. If the display pixels in the first display content and the second display content are completely the same, displaying elements with the same display pixels are displayed in the first display content and the second display content; and if so, identifying that the first display content and the second display content have display identical display elements. Specifically, display elements in the first display content and the second display content are extracted, pixels of the display elements are decomposed, pixels of the display elements are compared, whether the display elements with identical pixels exist or not is judged, and if the constituent pixels of at least two display elements are identical, at least two display elements are judged to be identical.
And after the display elements with consistent display exists in the first display content and the second display content, determining the position coordinates of the display elements with consistent display on the screen.
In this embodiment, when there is a display element whose display is identical between the first display content and the second display content, the position coordinates of the display element whose display is identical on the screen are determined. By means of the position coordinates, the display elements with consistent display can be accurately positioned. In this embodiment, the display element with consistent display is a floating advertisement element.
And clearing the display elements with consistent display based on the position coordinates.
In this embodiment, the step of clearing the display element with consistent display based on the position coordinates specifically includes: and calling a display element clearing function of the browser application to clear the display element corresponding to the position coordinate. After the display elements with consistent display in the first display content and the second display content are cleared, merging the cleared first display content and the cleared second display content, so as to generate a long screenshot without any floating advertisement.
By implementing the screenshot method, when the terminal performs long screenshot, the suspended advertisements which are not moved in a suspended manner are automatically filtered, so that long screenshot without suspended advertisements is realized, the attractiveness of the long screenshot is improved, and the user experience of a user during the long screenshot is improved.
The invention also provides a computer readable storage medium. The computer readable storage medium has stored thereon a screenshot program which when executed by a processor performs the steps as described above.
It should be noted that the description of the terminal embodiment above is similar to the description of the method embodiment above, and has similar advantageous effects as the method embodiment. For technical details not disclosed in the terminal embodiments of the present invention, please refer to the description of the method embodiments of the present invention for understanding.
It should be noted that, in the embodiment of the present invention, if the above-mentioned screenshot method is implemented in the form of a software function module, and is sold or used as a separate product, the screenshot method may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in essence or a part contributing to the prior art in the form of a software product stored in a storage medium, including several instructions for causing a computing device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present invention.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (6)

1. A screenshot method applied to a terminal, the method comprising:
intercepting a first display content of a current screen;
controlling the page of the current screen to roll a preset distance;
intercepting a second display content after the current screen page is scrolled;
identifying the first display content and the second display content;
after the display elements with consistent display of the first display content and the second display content are identified, determining the position coordinates of the display elements with consistent display on the screen;
wherein the identifying that the first display content and the second display content have display consistent display elements includes:
judging whether display elements with identical display pixels exist in the first display content and the second display content; if so, identifying that the first display content and the second display content have display elements consistent with each other;
and clearing the display elements with consistent display based on the position coordinates, wherein the display elements with consistent display are floating advertisement elements, and the step of clearing the display elements with consistent display based on the position coordinates specifically comprises the following steps: invoking a display element clearing function of the browser application to clear the display element corresponding to the position coordinate;
wherein, before the intercepting the first display content of the current screen, the method further comprises:
judging whether the current application of the terminal is a browser application or not;
if the current application of the terminal is a browser application, further judging whether the browser application has a display element clearing function, wherein the step of judging whether the browser application has the display element clearing function specifically comprises the following steps: acquiring an application package name of a current application of the terminal; judging whether the application package name belongs to a preset second application package database or not, wherein the preset second application package database is a browser application package database with a display element clearing function; if yes, judging that the browser application has a display element clearing function;
and if the browser application has a display element clearing function, intercepting the first display content of the current screen.
2. The screenshot method according to claim 1, wherein the step of determining whether the current application of the terminal is a browser application specifically includes:
acquiring the application package name of the current application of the terminal;
judging whether the application package name belongs to a preset first application package database or not, wherein the preset first application package database is a browser application package database;
if yes, judging that the current application of the terminal is a browser application.
3. The screenshot method according to claim 1, wherein the step of controlling the page scrolling preset distance of the current screen specifically includes:
sending an analog finger sliding event to the terminal driving layer;
and the driving layer controls the page of the current screen to roll a preset distance according to the finger sliding event.
4. The method of screenshot according to claim 1, wherein the step of identifying the first display content and the second display content comprises:
extracting display elements in the first display content and the second display content;
and comparing the display elements in the first display content with the display elements in the second display content.
5. A terminal, the terminal at least further comprising: memory, communication bus, and processor, wherein:
the memory is used for storing a screenshot program;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute a screenshot program stored in a memory to implement the steps of the screenshot method according to any one of claims 1 to 4.
6. A computer readable storage medium having stored thereon a screenshot program which when executed by a processor implements the steps of the screenshot method of any one of claims 1 to 4.
CN201910242569.1A 2019-03-28 2019-03-28 Screenshot method, terminal and computer readable storage medium Active CN109976859B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910242569.1A CN109976859B (en) 2019-03-28 2019-03-28 Screenshot method, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910242569.1A CN109976859B (en) 2019-03-28 2019-03-28 Screenshot method, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109976859A CN109976859A (en) 2019-07-05
CN109976859B true CN109976859B (en) 2023-09-19

Family

ID=67081250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910242569.1A Active CN109976859B (en) 2019-03-28 2019-03-28 Screenshot method, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109976859B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112288635A (en) * 2020-10-30 2021-01-29 上海淇玥信息技术有限公司 Method and device for processing application program page and electronic equipment
CN112363787A (en) * 2020-10-30 2021-02-12 维沃软件技术有限公司 Image processing method and device and electronic equipment
CN113805993B (en) * 2021-09-03 2023-06-06 四川新网银行股份有限公司 Method for rapidly and continuously capturing images

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105487680A (en) * 2015-11-24 2016-04-13 小米科技有限责任公司 Terminal screen capture method and apparatus and terminal
CN105760050A (en) * 2016-02-04 2016-07-13 上海卓易科技股份有限公司 Screen capturing method and device
CN105955604A (en) * 2016-04-20 2016-09-21 乐视控股(北京)有限公司 Method and device for screen capture
CN106970754A (en) * 2017-03-28 2017-07-21 北京小米移动软件有限公司 The method and device of screenshotss processing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105487680A (en) * 2015-11-24 2016-04-13 小米科技有限责任公司 Terminal screen capture method and apparatus and terminal
CN105760050A (en) * 2016-02-04 2016-07-13 上海卓易科技股份有限公司 Screen capturing method and device
CN105955604A (en) * 2016-04-20 2016-09-21 乐视控股(北京)有限公司 Method and device for screen capture
CN106970754A (en) * 2017-03-28 2017-07-21 北京小米移动软件有限公司 The method and device of screenshotss processing

Also Published As

Publication number Publication date
CN109976859A (en) 2019-07-05

Similar Documents

Publication Publication Date Title
CN108572764B (en) Character input control method and device and computer readable storage medium
CN107807767B (en) Communication service processing method, terminal and computer readable storage medium
CN109144441B (en) Screen adjusting method, terminal and computer readable storage medium
CN109471571B (en) Display method of suspension control, mobile terminal and computer readable storage medium
CN108553896B (en) State information display control method, terminal and computer readable storage medium
CN109195213B (en) Mobile terminal screen control method, mobile terminal and computer readable storage medium
CN108449513B (en) Interactive regulation and control method, equipment and computer readable storage medium
CN109976859B (en) Screenshot method, terminal and computer readable storage medium
CN109840444B (en) Code scanning identification method, equipment and computer readable storage medium
CN109766119B (en) Recovery partition upgrade method, terminal and computer readable storage medium
CN109584897B (en) Video noise reduction method, mobile terminal and computer readable storage medium
CN110020386B (en) Application page sharing method, mobile terminal and computer readable storage medium
CN111427709B (en) Application program splitting control method, device and computer readable storage medium
CN109683797B (en) Display area control method and device and computer readable storage medium
CN109117069B (en) Interface operation method, terminal and computer readable storage medium
CN107153551B (en) Font switching method, mobile terminal and computer readable storage medium
CN109948368B (en) Privacy authority control method, device and computer readable storage medium
CN110083294B (en) Screen capturing method, terminal and computer readable storage medium
CN110187934B (en) Application control method, terminal and computer readable storage medium
CN109684020B (en) Theme switching method, device and computer readable storage medium
CN109711850B (en) Secure payment method, device and computer readable storage medium
CN109800097B (en) Notification message reminding method, storage medium and mobile terminal
CN109710168B (en) Screen touch method and device and computer readable storage medium
CN109683796B (en) Interaction control method, equipment and computer readable storage medium
CN108566476B (en) Information processing method, terminal and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant