CN109040419B - Screen recording method and device, mobile terminal and storage medium - Google Patents
Screen recording method and device, mobile terminal and storage medium Download PDFInfo
- Publication number
- CN109040419B CN109040419B CN201810597253.XA CN201810597253A CN109040419B CN 109040419 B CN109040419 B CN 109040419B CN 201810597253 A CN201810597253 A CN 201810597253A CN 109040419 B CN109040419 B CN 109040419B
- Authority
- CN
- China
- Prior art keywords
- layers
- layer
- current interface
- interface
- screen
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/7243—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
- H04M1/72439—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72463—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions to restrict the functionality of the device
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- User Interface Of Digital Computer (AREA)
- Storage Device Security (AREA)
- Document Processing Apparatus (AREA)
Abstract
The embodiment of the application discloses a screen recording method, a screen recording device, a mobile terminal and a storage medium, wherein the method comprises the following steps: in the screen recording process, when detecting that a current interface comprises a target layer needing security protection, setting at least part of image layers comprising the target layer in all the image layers of the current interface as image layers for prohibiting screen capture; and then recording the current interface to obtain a recording file corresponding to the current interface and not comprising the content of the target image layer. The method can protect the interface needing to be safely protected in the screen recording process of the user, prevent the interface content needing to be protected from being recorded, and improve the screen recording safety.
Description
Technical Field
The present application relates to the field of mobile terminal technologies, and in particular, to a screen recording method and apparatus, a mobile terminal, and a storage medium.
Background
Mobile terminals, such as mobile phones, have become one of the most common consumer electronics products in people's daily life. With the increase of the demand of people for mobile terminals, the functions realized by the mobile terminals are more and more. Recording the screen image is an important function of the mobile terminal. Recording the screen image records operations on the mobile terminal, and generally speaking, recording the screen image records a plurality of interface contents in a recording process. However, when recording interface content, the user's private content, security content, and the like may be recorded, and the user's private content, security content, and the like may be leaked when the recorded image file is played.
Disclosure of Invention
In view of the foregoing problems, embodiments of the present application provide a screen recording method, apparatus, mobile terminal, and storage medium, which can protect user privacy and improve security while recording a screen.
In a first aspect, an embodiment of the present application provides a screen recording method, where the method includes: in the screen recording process, when detecting that a current interface comprises a target layer needing security protection, setting at least part of image layers comprising the target layer in all the image layers of the current interface as image layers for prohibiting screen capture; and recording the current interface to obtain a recording file corresponding to the current interface and not comprising the content of the target image layer.
In a second aspect, an embodiment of the present application provides a screen recording apparatus, where the apparatus includes: the device comprises a layer setting module and a recording execution module, wherein the layer setting module is used for setting at least part of image layers including target image layers in all the image layers of a current interface as image layers forbidden to screen capture when detecting that the current interface includes the target image layers needing security protection; and the recording execution module is used for recording the current interface to obtain a recording file corresponding to the current interface and not comprising the content of the target image layer.
In a third aspect, an embodiment of the present application provides a mobile terminal, including a touch screen, a memory, and a processor, where the touch screen and the memory are coupled to the processor, and the memory stores instructions, and when the instructions are executed by the processor, the processor executes the screen recording method provided in the first aspect.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a program code executable by a processor, where the program code causes the processor to execute the screen recording method provided in the first aspect.
Compared with the prior art, according to the screen recording method, the screen recording device, the mobile terminal and the storage medium provided by the application, when the current interface is detected to include the target layer needing security protection in the screen recording process, at least part of the image layers including the target layer in all the image layers of the current interface are set as the image layers for prohibiting screen capture, and then the current interface is recorded, so that the recording file corresponding to the current interface and not including the content of the target layer is obtained. Therefore, in the screen recording process, when the current interface comprises the layer needing to be protected, the content of the target layer of the current interface cannot be recorded, the content of the current interface is protected, the content of the target layer in the current interface is not displayed in a recorded file, and the safety of user information is protected.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic interface diagram of a mobile terminal according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating another interface of a mobile terminal according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a screen recording method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a screen recording method according to another embodiment of the present application;
fig. 5 is a schematic diagram illustrating still another interface of a mobile terminal according to an embodiment of the present application;
fig. 6 is a flowchart illustrating step S310 in a screen recording method according to another embodiment of the present application;
fig. 7 is a block diagram illustrating a structure of a screen recording apparatus according to an embodiment of the present application;
fig. 8 is a block diagram illustrating a structure of a mobile terminal according to an embodiment of the present application;
fig. 9 is a block diagram of a mobile terminal according to an embodiment of the present application for executing a screen recording method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, when recording of an operation on a mobile terminal is required, a function of recording a screen image is generally used. The recording of the screen image is performed based on a screen capturing technology of the mobile terminal, and the recording of the screen image can be regarded as a dynamic screen capturing process, namely, a video file is generated according to the screenshots of multiple frames according to a time sequence.
In the existing technology for recording screen images, some image layers are prohibited from being recorded, and when a recorded file recorded in the image layer is displayed (played), an area corresponding to the image layer is a black area, that is, the recorded image does not have the content of the image layer.
The implementation principle of the layer prohibited from recording the screen is that the layer has a Secure attribute, that is, the FLAG (FLAG) of the window corresponding to the layer is FLAG _ Secure. By setting FALG of a window of a layer to FLAG _ SECURE, the layer can be prohibited from being screenshot.
The FLAG _ SECURE functions as follows: if the flag is set, the display device has a secure video output and is capable of displaying a secure interface, which may also display a protected buffer. If this flag is not set, the display device may not have a secure video output and the user may see an area on the screen that is not the contents of the secure interface or protected buffer.
Among other things, secure interfaces are used to prevent applications from appearing in screenshots or viewing content presented into these interfaces on unsecure displays. The protected buffer is used for similar purposes by the secure video decoder. An application in the mobile terminal creates a window with a SECURE surface by specifying a FLAG _ SECURE window FLAG.
The effect displayed by the part of the image layers in the recorded file is black, and the effect is that the part of the image layers is set to have a Secure attribute for information security. However, the Secure attribute of the layer is defined by the application developer, and not all application developers will set the interface to be protected to have the Secure attribute. For example, the layer of the Secure input method has a Secure attribute, when a password is input on a password input interface, a password input space is identified and the Secure input method pops up, and the Secure input method has the Secure attribute, so that the effect displayed in the screen-recorded file is that the keyboard layer of the Secure input method is a black area, but the password input frame is completely displayed, or each character is hidden after being displayed, which can cause leakage of password information of a user.
Referring to fig. 1 and fig. 2 together, fig. 1 shows an interface schematic diagram of a password input interface during screen recording, where the password input interface includes a layer a1 of a password input area and a security input method layer a2, fig. 2 shows an interface schematic diagram of a display effect of a screen recording image recorded on the interface in fig. 1 in the prior art, a1 in fig. 2 corresponds to a1 in fig. 1, and a2 in fig. 2 corresponds to a2 in fig. 1. It can be seen that the security input method layer a2 has a Secure attribute, so the security input method layer a2 will not be screenshot into the recorded image, and the security input method layer a2 will be displayed in a color area, while the layer a1 of the password input area will be screenshot into the recorded image without the Secure attribute, i.e. the same as the a1 area in fig. 1.
Therefore, although some application manufacturers may set some layers to have a Secure attribute in the current technology for recording screen images, so that the layers cannot be captured, most application manufacturers may not set the Secure attribute for an interface that needs to be protected, so that privacy information or security information of a user may be leaked during display of a screen recording file, and loss may be brought to the user.
In view of the above problems, the inventor has studied for a long time and proposed a screen recording method, an apparatus, a mobile terminal, and a storage medium provided in the embodiments of the present application, and when it is detected that an interface in a screen recording process includes a layer that needs to be protected, a target layer in all layers of a current interface is set as a layer that prohibits screen capture, so that the interface of the layer that needs to be protected cannot be captured, and leakage of privacy information or security information of a user is prevented. The screen recording method is described in detail in the following embodiments.
In an embodiment, please refer to fig. 3, and fig. 3 is a schematic flowchart illustrating a screen recording method according to an embodiment of the present application. According to the screen recording method, the interface in the screen recording process is detected, and when the interface is detected to comprise the layer needing security protection, the target layer in all layers of the current interface is set as the layer for prohibiting screen capture, so that the interface of the layer needing protection cannot be captured, and the leakage of privacy information or security information and the like of a user is prevented. In a specific embodiment, the screen recording method is applied to the screen recording apparatus 200 shown in fig. 7 and a mobile terminal equipped with the screen recording apparatus 200 (fig. 8). The following will describe a specific process of this embodiment by taking a mobile terminal as an example, and it is understood that the mobile terminal applied in this embodiment may be a smart phone, a tablet computer, a wearable electronic device, and the like, which is not limited specifically herein. As will be described in detail with respect to the flow shown in fig. 3, the screen recording method may specifically include the following steps:
step S110: in the screen recording process, when a current interface is detected to include a target layer needing security protection, at least part of image layers including the target layer in all the image layers of the current interface are set as image layers for prohibiting screen capture.
In the embodiment of the application, the mobile terminal detects the current interface displayed by the mobile terminal in the process of recording the screen image, and specifically detects whether the current interface comprises a target layer needing security protection. The target layer in the interface that needs to be protected by security may be a layer of an interface related to information such as privacy information and security information of the user, for example, a layer related to user information in an interface such as a password login interface, an account setting interface, and an account registration interface. The specific detection may determine whether the current interface displayed by the mobile terminal includes a target layer that needs to be protected according to the characteristics, attributes, contents, and the like of the layers in the interface.
Further, the mobile terminal may detect whether a target layer that needs to be secured is included in the current interface when the interface displayed by the mobile terminal changes, for example, when the interface of a certain application changes to another interface, for example, when the interface of a certain application changes to the interface of another application, for example, when specific display content in the display interface changes. Therefore, all interfaces in the screen image recording process are detected, and whether each interface in the screen image recording process comprises a target layer needing security protection or not is detected.
Therefore, the detection result of whether the current interface includes the target layer which needs to be subjected to the security protection can be obtained, so that whether the layer of the current interface needs to be subjected to the security protection processing can be determined according to the detection result.
After detecting whether the current interface comprises a target layer needing safety protection, if the current interface comprises the target layer needing safety protection, carrying out safety protection on the layer of the current interface. Specifically, the safety protection of the layer of the current interface is to set at least part of the image layers including the target image layer in all the layers of the current interface as the image layers for prohibiting screen capture.
It is understood that there may be one layer or multiple layers in the current interface, and the target layer may be a layer related to content that needs to be secured in all layers of the current interface. Therefore, all layers of the current interface can be read, and at least part of the image layers including the target image layer in all the layers of the current interface are set as the image layers for prohibiting screen capture, so that the target image layer cannot be captured, that is, the content of the image layer does not exist in the file corresponding to the current interface for subsequent recording, and the content of the image layer cannot be displayed in the recording file. Therefore, the layer is subjected to security protection, namely the current interface is subjected to security protection.
If the current interface does not comprise the target layer which needs to be subjected to the security protection, the layer of the current interface does not need to be subjected to the security protection, namely, the action that at least part of the layers comprising the target layer in all the layers of the current interface are set as the layers for prohibiting screen capture is not executed, and the screen recording operation can be directly executed, so that the contents of all the layers of the current interface are all recorded in the recording file.
In this embodiment of the application, setting at least part of the map layers including the target map layer in all the map layers of the current interface as the map layers for which screen capture is prohibited may be setting the target map layers as the map layers for which screen capture is prohibited. Of course, the target layer in all layers of the current interface and other layers except other layers may also be set together as the layer for prohibiting screen capture.
As a manner, the target layer is set as the layer for which screen capture is prohibited, where a FLAG of a window corresponding to the target layer is set as a safety FLAG, so that the target layer cannot be screen captured, that is, FLAG of the window corresponding to the target layer is set as FLAG _ SECURE. For example, can be obtained by
getWindow (). setFlags (Layout params. FLAG _ SECURE ), or
getWindow (). addFlags (WindowManager. LayoutParams. FLAG _ SECURE), or
getWindow (). setFlags (windows manager. layout params. flag _ SECURE, 0), the target layer is set as the layer for which screen capture is prohibited.
As another mode, the target layer of the current interface is set as the layer for prohibiting screen capture, that is, in the layers read by the screen capture interface, the target layer in the current interface is replaced by a pre-stored preset layer, so that the screen capture interface cannot read the content of the target layer, and only the content of the preset layer can be read, and the content of the target layer of the current interface does not exist in the recorded file.
In this embodiment of the application, the preset layer may be a layer without content to be protected, for example, the preset layer may be a layer formed by a color pattern, or the entire layer may be a color layer. Of course, the preset layer is not limited in this embodiment of the application, and may also be other layers, for example, the preset layer may also be formed by a user-defined image. Therefore, the subsequent recording of the current interface cannot record the content of the target layer, the content of the target layer is replaced by the content of the preset layer, the display effect of the recording file on the interface during display is not influenced, and the user experience is improved.
Step S120: and recording the current interface to obtain a recording file corresponding to the current interface and not comprising the content of the target image layer.
After the current interface includes a layer that needs to be subjected to security protection, at least part of the layers including the target layer in all the layers of the current interface are set as layers for which screen capture is prohibited, that is, after the current interface is subjected to security protection, recording of the current interface can be performed.
During recording, the screen capture interface reads and stores the layer data of the current interface to obtain a screen recording file corresponding to the current interface, namely a recorded video file. Because the target layer of the current interface is set as the layer for prohibiting screen capture, the screen capture interface cannot read the data of the target layer of the current interface, so that the content of the target layer of the current interface does not exist in the screen recording file stored in the screen recording storage.
According to the screen recording method provided by the embodiment of the application, in the recording process, at least part of image layers including the target image layer in all the image layers are set as image layers for prohibiting screen capture in the interface including the image layer needing to be subjected to security protection, and then recording is carried out, so that the security protection of the interface including the image layer needing to be subjected to security protection in the recording process is realized, the content of the target image layer needing to be subjected to security protection is not captured into the recorded file, namely the recorded file cannot show the content of the target image layer during playing, the information needing to be protected of a user is protected, and the leakage of important information of the user is prevented.
In an embodiment, please refer to fig. 4, and fig. 4 is a schematic flowchart illustrating a screen recording method according to an embodiment of the present application. As will be described in detail with respect to the flow shown in fig. 4, the screen recording method may specifically include the following steps:
step S210: in the screen recording process, when detecting that a current interface comprises a safe input method layer which prohibits screen capture, all layers of the current interface are set as layers which prohibit screen capture, and the layers which are prohibited from screen capture in all the layers of the current interface are marked.
In the input interface of other identity information such as password input, account input, identification number and the like, for example, in a login interface, after a user clicks an input box of the login interface, a keyboard of a secure input method is popped up for the user to type a password.
After the user clicks the input box of the login interface, the popped-up keyboard of the Secure input method has a Secure attribute, that is, the layer area of the Secure input method cannot be subjected to screen capture, so that the key operation of the user on the keyboard of the input method cannot be recorded in the screen recording process.
However, in these interfaces, only key operations can be protected, and the information input box in the interface can still be screenshot, resulting in screenshot of input contents in the information input box and leakage of the input contents.
Therefore, in the embodiment of the application, in the process of recording the screen image, the mobile terminal may detect whether a security input method layer for prohibiting screen capture exists in all layers of the current interface, that is, whether a popup security input method exists, so as to determine whether the current interface includes a layer that needs security protection. It can be understood that when the safety input method pops up, the current interface is the input interface, and the layer corresponding to the input display area in the input interface is the layer which needs to be subjected to safety protection.
In the embodiment of the application, when the security input method is popped up, a security input method layer with a Secure attribute needs to be newly created, so that the system of the mobile terminal can detect whether a security input method layer with a Secure attribute, i.e., a security input method layer for prohibiting screen capture, is newly created, so as to detect whether a security input method layer with a security attribute exists in the current interface. When a new security input method layer with a Secure attribute is detected, the security input method layer with the forbidden screen capture in the current interface is detected.
When the current interface is detected to include layers needing security protection, target layers of all layers of the current interface are set as layers for prohibiting screen capture, so that the current interface for inputting information is protected, and the content of the target layers of the current interface cannot be captured into a recorded recording file.
In the embodiment of the application, all layers of the current interface may be set as layers with a Secure attribute, that is, all layers are set as layers for which screen capture is prohibited, so that the target layer and other layers are set as layers for which screen capture is prohibited. Therefore, after all layers of the current interface are set as layers for prohibiting screen capture, all layers (including a target layer) of the current interface cannot be captured into a recording file, and the current interface is protected.
In the embodiment of the application, all layers of the current interface are set as layers for which screen capture is forbidden, and the marks of the windows of all layers of the current interface can be set as safety marks; or replacing all layers read by the screen capture interface with preset layers. Specifically, the mode of setting the layer for prohibiting screen capturing in the previous embodiment may be referred to, and details are not described herein.
In the embodiment of the application, in the process of setting all layers of the current interface as the layers prohibiting screen capturing, the layers originally having the Secure attribute and the layers not originally having the Secure attribute in all the layers may be obtained first, that is, the layers originally being the layers prohibiting screen capturing and the layers originally being the layers capable of screen capturing in all the layers may be obtained, and then the layers originally not having the Secure attribute are set as the layers having the Secure attribute, so that all the layers of the current interface are set as the layers prohibiting screen capturing.
In addition, the layer with the original Secure attribute, that is, the layer for which screen capture is prohibited, may also be marked, so as to facilitate subsequent restoration of all layers of the current interface. It can be understood that, before all layers of the current interface are set as layers for prohibiting screen capture, in all layers in the current interface, the layer marked represents the layer with the original Secure attribute, and the layer without the mark represents the layer without the original Secure attribute, so after the recording of the current interface is completed, the Secure attribute of the layer without the original Secure attribute needs to be cancelled, and the Secure attribute of the layer with the Secure attribute does not need to be cancelled, so that all layers are restored.
Step S220: and recording the current interface to obtain a recording file corresponding to the current interface and not comprising the content of the target image layer.
And after all layers of the current interface are set as layers for prohibiting screen capture, recording the current interface.
During recording, the screen capture interface reads and stores the layer data of the current interface to obtain a screen recording file corresponding to the current interface, namely a recorded video file. Because all layers of the current interface are set as layers for prohibiting screen capture, the screen capture interface cannot read data of any layer of the current interface, so that the content of the target layer of the current interface does not exist in the screen recording file stored in the screen recording storage. Therefore, any content of the current interface does not exist in the recorded file, so that all information input operations of the user on the current interface and the input information cannot be recorded, and the information input by the user is protected.
Referring to fig. 1 and 5 at the same time, fig. 1 shows an interface schematic diagram when a password input interface is recorded, where the password input interface includes a layer a1 of a password input area and a security input method layer a2, fig. 5 shows an interface schematic diagram of a display effect of a screen recording image recorded on the password input interface in fig. 1 according to an embodiment of the present disclosure, a1 in fig. 5 corresponds to a1 in fig. 1, and a2 in fig. 5 corresponds to a2 in fig. 1. It can be seen that after the screen recording method provided by the embodiment of the application is used for recording the screen of the password input interface, the recorded screen image has neither the content of the layer a2 of the secure input method nor the content of the layer a1 of the password input area, and both a1 and a2 are displayed in a certain color area, so that the content of the password input interface is protected.
Step S230: and restoring all the layers based on the marked layers to obtain original layers of all the layers.
In the embodiment of the application, after the current interface is recorded, that is, after the interface needing to be protected is recorded, the interface behind the current interface may not be the interface needing to be subjected to security protection, that is, the interface needing to be recorded normally, but the current interface is the same as most of the image layers of the interface behind the current interface, so that after the current interface is recorded, all the image layers of the current interface can be restored to ensure the normal recording of the interface behind the current interface.
For example, after the user enters the interface of "being logged in" after inputting information on the login interface, the content of the next interface needs to be recorded, the login interface and the interface of "being logged in" have many layers that are the same, and if all layers in the login interface are not restored, some layers in the interface of "being logged in" cannot be recorded normally because the layers are set as the layers for prohibiting screen capture.
In this embodiment of the application, restoring all layers based on the layers marked in step S210 to obtain original layers of all layers may include:
acquiring other layers except the marked layer in all the layers; and setting the other layers as layers allowing screen capture so as to obtain the original layers of all the layers.
It is understood that the layers marked in step S210 are layers whose screenshots are prohibited before all layers of the current interface are set as the screenshots-prohibited layers, that is, the layers originally having the Secure attribute. And acquiring other layers except the marked layer in all layers of the current interface, wherein the other layers are layers which are allowed to be subjected to screen capturing before all layers of the current interface are set as layers for prohibiting screen capturing, namely the layers without the original Secure attribute. Therefore, the Secure attribute of the other layers can be cancelled, so that the other layers can be restored to the layers allowing screen capture, and the Secure attribute of the marked layer can be maintained because the marked layer originally has the Secure attribute, so that restoration of all layers of the current interface to the original layers is realized.
In this embodiment of the application, when it is detected that the security input method layer is destroyed, that is, when the security input method keyboard is retracted, all layers may be restored based on the layer marked in step S210, so as to obtain the original layers of all layers. The timeliness and the accuracy of the restoration of the layer can be improved by using the destruction of the layer of the safety input method as the trigger condition for restoring the layer.
According to the screen recording method provided by the embodiment of the application, when whether the safe input method layer for prohibiting screen capture exists in the current interface is detected, all layers of the current interface are set as layers for prohibiting screen capture, and then the current interface is recorded. Therefore, when the interface in the recording process is the interface needing to be protected, the interface cannot be subjected to screen capture, the content of the interface does not exist in the recorded file, and the user information in the recorded screen is protected. In addition, after the interface is recorded, all the image layers of the interface are restored to the original image layers, so that the image layers can be recorded normally, and the normal recording of the screen image is ensured.
In one embodiment, the screen recording method may specifically include the following steps:
step S310: in the screen recording process, when a current interface is detected to include a target layer needing security protection, at least part of image layers including the target layer in all the image layers of the current interface are set as image layers for prohibiting screen capture.
In the embodiment of the application, the mobile terminal detects a current interface displayed by the mobile terminal in a screen image recording process, specifically detects whether the current interface includes a target layer which needs to be subjected to security protection, and sets at least part of image layers including the target layer in all the image layers of the current interface as image layers which prohibit screen capture when detecting that the current interface includes the target layer which needs to be subjected to security protection.
As an implementation manner in the embodiment of the present application, when it is detected that the current interface includes a target layer that needs to be subjected to security protection, setting at least part of the graph layers including the target layer in all the graph layers of the current interface as a graph layer for prohibiting screen capture, which may include:
when detecting that a text input box of a current interface obtains a focus, obtaining an input attribute of the text input box; judging whether the input attribute is a password attribute; and if the current interface is the password attribute, setting at least part of the image layers including the target image layer in all the image layers of the current interface as the image layers for prohibiting screen capture.
It can be understood that password information should be protected as important information for a user when a screen is recorded on an interface for inputting a password. When the password is input, the password is input after the input box is clicked. Therefore, it is possible to detect whether the text input box of the current interface obtains focus, i.e., whether the input box is clicked. Specifically, when the user clicks the text input box to prepare for input, an onfocus event (focus trigger event) is generated, and thus, if the onfocus event (focus trigger event) generated by the text input box component is captured, it is determined that the text input box is detected to obtain focus.
Further, when it is detected that the text input box of the current interface obtains a focus, the input attribute of the text input box is obtained to determine whether the text input box is an input box for inputting a password, that is, whether the text input box is a layer for inputting a password is determined.
In addition, there may be one text input box or multiple text input boxes in the current interface, and the input attribute of the text input box may be acquired when any text input box is detected to obtain the focus.
In this embodiment of the present application, an input attribute of the text input box may be obtained through an adb command of the system, for example, the adb shell dumpsys input _ method | grep input type obtains the input attribute inputType.
After the input attribute of the text input box is acquired, whether the input attribute is a password attribute is judged. Wherein the password attribute indicates that the text input box is password input.
When the input attribute of the text input box is the password attribute, the layer of the text input box is the layer of password input, that is, the current interface includes a target layer which needs to be subjected to security protection, so that the current interface needs to be subjected to security protection.
For example, when the input attribute inputType of the text input box is inputType 0x81 input options 0x4000006 private options null, the input attribute of the text input box may be determined to be a preset attribute, and for example, when the input attribute inputType of the text input box is inputType 0xe1 input options 0x4000006 private options null, the input attribute of the text input box may be determined to be a preset attribute, and for example, when the input attribute inputType of the text input box is inputType 0x12 input options 0x4000006 private options 91, the input attribute may be determined to be a preset attribute.
Therefore, when the input attribute of the text input box for obtaining the focus is detected to be the preset attribute, at least part of image layers including the target image layer in all image layers of the current interface are set as image layers for prohibiting screen capture.
As another implementation manner in this embodiment of the application, when it is detected that the current interface includes a target layer that needs to be subjected to security protection, setting at least part of map layers, including the target layer, in all map layers of the current interface as a layer for prohibiting screen capture, may include:
detecting whether preset keyword information exists in a current interface; and if the preset keyword information exists, setting at least part of image layers including the target image layer in all image layers of the current interface as image layers for prohibiting screen capture.
It can be understood that, usually, most of user information to be protected during screen recording is related to text information, for example, there are various keywords corresponding to interfaces that need to be protected, such as a text "password" in a password input interface, a text "identity card number" in an identity card number input interface, a text "address book" in an interface of an address book, and the like, and the keywords can be determined to be stored in the mobile terminal according to actual conditions and user requirements. The specific preset keyword is not limited in the embodiment of the present application.
The method comprises the steps of extracting characters in a current interface by using a word segmentation technology, splitting the characters into a plurality of words, and judging whether keywords exist in the characters in the current interface or not. When the preset keyword information exists in the current interface, the current interface is represented to include a target layer needing security protection, and at least part of image layers including the target layer in all image layers of the current interface are set as image layers for prohibiting screen capture. The method and the device determine whether the current interface comprises the target layer needing safety protection or not by using the keywords in the interface, are simple and efficient, and easily meet the actual requirements.
As another implementation manner in the embodiment of the present application, when it is detected that the current interface includes a target layer that needs to be subjected to security protection, setting at least part of the graph layers including the target layer in all the graph layers of the current interface as a graph layer for prohibiting screen capture, which may include:
detecting whether the current interface is an interface for reading a local file; and if the interface is the interface for reading the local file, setting at least part of the image layers including the target image layer in all the image layers of the current interface as the image layers for prohibiting screen capture.
It can be understood that the layer of the interface for reading the local file also carries information that needs to be protected by the user, such as a specific photo in the user terminal, the shooting time of the photo, the name of the document file, and the like. Therefore, it may be detected whether the current interface is an interface for reading the local file during the screen recording process, and specifically, when the interface for reading the local file is detected to be called during the screen recording process, the current interface may be determined as the interface for reading the local file. Of course, the above manner of determining the interface for reading the local document is not limited in the embodiments of the present application.
Therefore, when the current interface is detected to be the interface for reading the local file, at least part of the image layers including the target image layer in all the image layers of the current interface can be set as the image layers for prohibiting screen capture.
As another implementation manner in the embodiment of the present application, when it is detected that a current interface includes a target layer that needs to be subjected to security protection, setting at least part of image layers, including the target layer, in all image layers of the current interface as image layers for which screen capture is prohibited may include:
acquiring an application type of an application program corresponding to a current interface; judging whether the application type is a preset application type or not; and if the current interface is the preset application type, setting at least part of the image layers including the target image layer in all the image layers of the current interface as the image layers for prohibiting screen capture.
It is understood that there are various types of applications of the mobile terminal, such as a payment-type application, a social-type application, a game-type application, and the like. Among the various types of applications on a mobile terminal, there may be some types of applications that involve many users' private information, security information, etc., such as a payment treasure. If the interface used by the application is recorded, the information of the user needing security protection can be obtained through the recorded file.
Therefore, whether the current interface in the recording process includes a target layer needing security protection can be determined according to the type of the application program. Firstly, reading a type identifier of an application program corresponding to a current interface, wherein the type identifier represents the type of the application program; determining whether the application type of the application program corresponding to the current interface is a preset application type or not according to the type identifier; and if the current interface is the preset application type, setting at least part of the image layers including the target image layer in all the image layers of the current interface as the image layers for prohibiting screen capture. The preset application type is not limited in the embodiment of the present application, and for example, the preset application type may include a payment-type application and a chat-type application.
In this embodiment of the application, please refer to fig. 6, setting at least part of the map layers including the target map layer in all the map layers of the current interface as the map layers for prohibiting screen capturing may include:
step S311: and acquiring all layers included in a preset display area from all layers of the current interface, wherein the preset display area includes the target layer.
When the current interface is detected to include a target layer needing security protection, at least part of image layers including the target layer in all the image layers of the current interface are set as image layers for prohibiting screen capture, so that the current interface for inputting information is protected, and the content of the target layer of the current interface cannot be captured into a recorded recording file.
In the embodiment of the application, a preset display area corresponding to a target layer may be obtained, and then all layers included in the preset display area are subjected to security protection, that is, a layer of the preset display area is set as a layer for prohibiting screen capture. The preset display area may be a display area corresponding to the target layer, or may be a display area including an area corresponding to the target layer and a surrounding area thereof. Of course, the specific preset display area is not limited in the embodiment of the present application.
Firstly, all layers included in a preset display area in all layers of a current interface are obtained.
Step S312: and setting all layers included in the preset display area as layers for prohibiting screen capture.
After all layers included in the preset display area are obtained and include the target layer, all layers included in the preset display area may be set as layers for prohibiting screen capture, that is, layers with a Secure attribute, so that all layers included in the preset display area cannot be captured into a recorded recording file.
According to the implementation mode, only all layers included in the preset display area are set as the layers for prohibiting screen capture, the efficiency of layer setting can be improved, and therefore the whole screen recording method is smoother.
Step S320: and recording the current interface to obtain a recording file corresponding to the current interface and not comprising the content of the target image layer.
And after the target layer is set as the layer for prohibiting screen capture, recording the current interface.
During recording, the screen capture interface reads and stores the layer data of the current interface to obtain a screen recording file corresponding to the current interface, namely a recorded video file. Because the target layer of the current interface is set as the layer for prohibiting screen capture, the screen capture interface cannot read the data of the target layer of the current interface, so that the content of the target layer of the current interface does not exist in the screen recording file stored in the screen recording, that is, the content of the preset display area cannot be recorded, and the protection of user information is realized.
Of course, in this embodiment of the application, after step S320, the method in the previous embodiment may also be referred to, that is, the method sets all layers of the current interface as layers for which screen capture is prohibited, and then records the current interface.
In addition, after the current interface is recorded, the Secure attribute of the target layer can be cancelled, so that the original layer of the current interface can be obtained.
The screen recording method provided by the embodiment of the application provides various modes for determining whether the current interface comprises the layer needing security protection, namely, various conditions for performing security protection on the interface in the recording process are provided, and the related information of a user is fully protected. In addition, a mode that only the layer of the preset display area including the target layer is set as the layer of the forbidden screen capture is provided, so that the layer setting is more efficient, and the screen recording is smoother.
In one embodiment, referring to fig. 7, fig. 7 is a block diagram illustrating a screen recording apparatus 200 according to an embodiment of the present application. As will be explained below with respect to the block diagram shown in fig. 7, the screen recording apparatus 200 includes: an image layer setting module 210 and a recording execution module 220. Wherein: the layer setting module 210 is configured to, when detecting that the current interface includes a target layer that needs to be subjected to security protection in a screen recording process, set at least part of image layers, including the target layer, in all layers of the current interface as layers for which screen capture is prohibited; the recording execution module 220 is configured to record the current interface to obtain a recording file corresponding to the current interface and not including the content of the target image layer.
As a first implementation manner, the layer setting module 210 may be specifically configured to: when the current interface is detected to comprise the safe input method layer which prohibits screen capture, at least part of the image layers which comprise the target image layer in all the image layers of the current interface are set as the image layers which prohibit screen capture.
As a second implementation manner, the layer setting module 210 may be specifically configured to: when detecting that a text input box of a current interface obtains a focus, acquiring an input attribute of the text input box; judging whether the input attribute is a password attribute; and if the current interface is the password attribute, setting at least part of the image layers including the target image layer in all the image layers of the current interface as the image layers for prohibiting screen capture.
Further, the layer setting module 210 may be further specifically configured to: and setting the marks of the windows of all layers of the current interface as safety marks.
In this embodiment of the application, the layer setting module 210 may further be specifically configured to: and replacing the layers read by the screen capture interface with the preset layers from all layers of the current interface.
In this embodiment of the application, the layer setting module 210 may further be specifically configured to: marking the layer which is originally forbidden to screen capture in all layers of the current interface; after recording the current interface, the method further comprises: and restoring all the layers based on the marked layers to obtain original layers of all the layers.
Further, the layer setting module 210 restores all layers based on the marked layers to obtain original layers of all layers, including: acquiring other layers except the marked layer in all the layers; and setting other layers as layers allowing screen capture so as to obtain original layers of all the layers.
In this embodiment of the application, the layer setting module 210 may further be specifically configured to: acquiring all layers included in a preset display area from all layers of a current interface, wherein the preset display area comprises a target layer; and setting all layers included in the preset display area as layers for prohibiting screen capture.
To sum up, compared with the prior art, according to the screen recording method, the screen recording device, the mobile terminal and the storage medium provided by the application, when it is detected that the current interface includes a layer that needs to be subjected to security protection in the screen recording process, at least part of image layers including a target layer in all layers of the current interface are set as layers that are forbidden to capture a screen, and then the current interface is recorded, so that a recording file corresponding to the current interface and not including the content of the target layer is obtained. Therefore, in the screen recording process, when the current interface comprises the target layer needing to be protected, the content of the target layer of the current interface cannot be recorded, the content of the current interface is protected, the content of the current interface does not exist in the recorded file, and the safety of user information is protected.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. For any processing manner described in the method embodiment, all the processing manners may be implemented by corresponding processing modules in the apparatus embodiment, and details in the apparatus embodiment are not described again.
Referring to fig. 8 again, based on the above screen recording method and apparatus, the embodiment of the present application further provides a mobile terminal 100, which includes an electronic body 10, where the electronic body 10 includes a housing 12 and a main display 120 disposed on the housing 12. The housing 12 may be made of metal, such as steel or aluminum alloy. In this embodiment, the main display 120 generally includes a display panel 111, and may also include a circuit or the like for responding to a touch operation performed on the display panel 111. The Display panel 111 may be a Liquid Crystal Display (LCD) panel, and in some embodiments, the Display panel 111 is a touch screen 109.
Referring to fig. 9, in an actual application scenario, the mobile terminal 100 may be used as a smart phone terminal, in which case the electronic body 10 generally further includes one or more processors 102 (only one is shown in the figure), a memory 104, an RF (Radio Frequency) module 106, an audio circuit 110, a sensor 114, an input module 118, and a power module 122. It will be understood by those skilled in the art that the structure shown in fig. 9 is merely illustrative and is not intended to limit the structure of the electronic body 10. For example, the electronics body section 10 may also include more or fewer components than 8 shown in fig. 9, or have a different configuration than that shown in fig. 8.
Those skilled in the art will appreciate that all other components are peripheral devices with respect to the processor 102, and the processor 102 is coupled to the peripheral devices through a plurality of peripheral interfaces 124. The peripheral interface 124 may be implemented based on the following criteria: universal Asynchronous Receiver/Transmitter (UART), General Purpose Input/Output (GPIO), Serial Peripheral Interface (SPI), and Inter-Integrated Circuit (I2C), but the present invention is not limited to these standards. In some examples, the peripheral interface 124 may comprise only a bus; in other examples, the peripheral interface 124 may also include other elements, such as one or more controllers, for example, a display controller for interfacing with the display panel 111 or a memory controller for interfacing with a memory. These controllers may also be separate from the peripheral interface 124 and integrated within the processor 102 or a corresponding peripheral.
The memory 104 may be used to store software programs and modules, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 104. For example, the memory 104 stores software programs and modules corresponding to the screen recording method provided by the above embodiment, and the processor 102 executes the screen recording method provided by the above embodiment when running the software programs and modules corresponding to the screen recording method provided by the above embodiment. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the electronic body portion 10 or the primary display 120 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The RF module 106 is configured to receive and transmit electromagnetic waves, and achieve interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The RF module 106 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The RF module 106 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices via a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The Wireless network may use various Communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), wideband Code division multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (WiFi) (e.g., IEEE 802.10A, IEEE802.11 b, IEEE802.11g and/or IEEE802.11 n), voice over internet protocol (VoIP), world wide internet mail (wimax), and other instant messaging protocols, as well as any other suitable communication protocols, and may even include those that have not yet been developed.
The audio circuitry 110, earpiece 101, sound jack 103, microphone 105 collectively provide an audio interface between a user and the electronic body portion 10 or the main display 120. Specifically, the audio circuit 110 receives sound data from the processor 102, converts the sound data into an electrical signal, and transmits the electrical signal to the earpiece 101. The earpiece 101 converts the electrical signal into sound waves that can be heard by the human ear. The audio circuitry 110 also receives electrical signals from the microphone 105, converts the electrical signals to sound data, and transmits the sound data to the processor 102 for further processing. Audio data may be retrieved from the memory 104 or through the RF module 106. In addition, audio data may also be stored in the memory 104 or transmitted through the RF module 106.
The sensor 114 is disposed in the electronic body portion 10 or the main display 120, examples of the sensor 114 include, but are not limited to: light sensors 114F, operational sensors, pressure sensors 114G, gravity acceleration sensors, and other sensors.
Among them, the pressure sensor 114G may detect a pressure generated by pressing on the mobile terminal 100. That is, the pressure sensor 114G detects pressure generated by contact or pressing between the user and the mobile terminal, for example, contact or pressing between the ear of the user and the mobile terminal. Accordingly, the pressure sensor 114G may be used to determine whether contact or pressing has occurred between the user and the mobile terminal 100, as well as the magnitude of the pressure.
Referring to fig. 9 again, in the embodiment shown in fig. 9, the light sensor 114F and the pressure sensor 114G are disposed adjacent to the display panel 111. The light sensor 114F may turn off the display output when an object is near the main display 120, for example, when the electronic body portion 10 moves to the ear.
As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping) and the like for recognizing the attitude of the mobile terminal 100. In addition, the electronic body 10 may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer and a thermometer, which are not described herein,
in this embodiment, the input module 118 may include the touch screen 109 disposed on the main display 120, and the touch screen 109 may collect touch operations of the user (for example, operations of the user on or near the touch screen 109 using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a preset program. Optionally, the touch screen 109 may include a touch detection device and a touch controller. The touch detection device detects the touch direction 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 the touch information into touch point coordinates, sends the touch point coordinates to the processor 102, and can receive and execute commands sent by the processor 102. In addition, the touch detection function of the touch screen 109 may be implemented by various types, such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch screen 109, in other variations, the input module 118 may include other input devices, such as keys 107. The keys 107 may include, for example, character keys for inputting characters, and control keys for activating control functions. Examples of such control keys include a "back to home" key, a power on/off key, and the like.
The main display 120 is used to display information input by a user, information provided to the user, and various graphic user interfaces of the electronic body section 10, which may be composed of graphics, text, icons, numbers, video, and any combination thereof, and in one example, the touch screen 109 may be provided on the display panel 111 so as to be integrated with the display panel 111.
The power module 122 is used to provide power supply to the processor 102 and other components. Specifically, the power module 122 may include a power management system, one or more power sources (e.g., batteries or ac power), a charging circuit, a power failure detection circuit, an inverter, a power status indicator light, and any other components associated with the generation, management, and distribution of power within the electronic body portion 10 or the primary display 120.
The mobile terminal 100 further comprises a locator 119, the locator 119 being configured to determine an actual location of the mobile terminal 100. In this embodiment, the locator 119 implements the positioning of the mobile terminal 100 by using a positioning service, which is understood to be a technology or a service for obtaining the position information (e.g., longitude and latitude coordinates) of the mobile terminal 100 by using a specific positioning technology and marking the position of the positioned object on an electronic map.
It should be understood that the mobile terminal 100 described above is not limited to a smartphone terminal, but it should refer to a computer device that can be used in mobility. Specifically, the mobile terminal 100 refers to a mobile computer device equipped with an intelligent operating system, and the mobile terminal 100 includes, but is not limited to, a smart phone, a smart watch, a tablet computer, and the like.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (mobile terminal) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments. In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.
Claims (8)
1. A screen recording method, the method comprising:
in the screen recording process, when detecting that a current interface comprises a target layer needing security protection, marking layers originally with security attributes in all layers of the current interface;
setting marks of windows of at least part of graph layers including the target graph layer in all the graph layers of the current interface as safety marks;
recording the current interface to obtain a recording file corresponding to the current interface and not comprising the content of the target image layer;
acquiring other layers except the marked layer in all the layers;
and canceling the security attributes of the other layers to obtain the original layers of all the layers.
2. The method according to claim 1, wherein when it is detected that the current interface includes a layer that needs to be subjected to security protection, setting at least part of the layers including the target layer in all layers of the current interface as a layer for which screen capture is prohibited, includes:
when detecting that a current interface comprises a safety input method layer forbidden to screen capture, setting at least part of image layers comprising the target image layer in all the image layers of the current interface as the image layers forbidden to screen capture.
3. The method according to claim 1, wherein when it is detected that the current interface includes a layer that needs to be subjected to security protection, setting at least part of the layers including the target layer in all layers of the current interface as a layer for which screen capture is prohibited, includes:
when detecting that a text input box of a current interface obtains a focus, obtaining an input attribute of the text input box;
judging whether the input attribute is a password attribute;
and if the current interface is the password attribute, setting at least part of the image layers including the target image layer in all the image layers of the current interface as the image layers for prohibiting screen capture.
4. The method according to any one of claims 1 to 3, wherein the setting, as a safety flag, a flag of a window in all layers of the current interface, including at least part of the layers of the target layer, comprises:
and setting window marks of all layers of the current interface as safety marks.
5. The method according to any one of claims 1 to 3, wherein the setting, as a safety flag, a flag of a window in all layers of the current interface, including at least part of the layers of the target layer, comprises:
acquiring all layers included in a preset display area from all layers of the current interface, wherein the preset display area includes the target layer;
and setting window marks of all layers included in the preset display area as safety marks.
6. A screen recording apparatus, the apparatus comprising: a layer setting module and a recording execution module, wherein,
the layer setting module is used for marking layers which originally have safety attributes in all layers of the current interface when detecting that the current interface comprises a target layer which needs safety protection in the screen recording process, and setting marks of windows of at least part of the layers of the target layer in all the layers of the current interface as safety marks;
the recording execution module is used for recording the current interface to obtain a recording file corresponding to the current interface and not comprising the content of the target image layer;
the layer setting module is further configured to obtain other layers in all the layers except the marked layer, and cancel the security attributes of the other layers to obtain the original layers of all the layers.
7. A mobile terminal comprising a touch screen, a memory, and a processor, the touch screen and the memory coupled to the processor, the memory storing instructions that, when executed by the processor, the processor performs the method of any of claims 1-5.
8. A computer-readable storage medium having program code executable by a processor, the program code causing the processor to perform the method of any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810597253.XA CN109040419B (en) | 2018-06-11 | 2018-06-11 | Screen recording method and device, mobile terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810597253.XA CN109040419B (en) | 2018-06-11 | 2018-06-11 | Screen recording method and device, mobile terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109040419A CN109040419A (en) | 2018-12-18 |
CN109040419B true CN109040419B (en) | 2021-01-12 |
Family
ID=64612702
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810597253.XA Active CN109040419B (en) | 2018-06-11 | 2018-06-11 | Screen recording method and device, mobile terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109040419B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110187943A (en) * | 2019-04-15 | 2019-08-30 | 努比亚技术有限公司 | A kind of record screen method, terminal and computer readable storage medium |
CN110417991B (en) * | 2019-06-18 | 2021-01-29 | 华为技术有限公司 | Screen recording method and electronic equipment |
CN110825289A (en) | 2019-10-31 | 2020-02-21 | 北京字节跳动网络技术有限公司 | Method and device for operating user interface, electronic equipment and storage medium |
CN111131882A (en) * | 2019-12-30 | 2020-05-08 | 联想(北京)有限公司 | Screen recording method and device and electronic equipment |
CN111314773A (en) * | 2020-01-22 | 2020-06-19 | 广州虎牙科技有限公司 | Screen recording method and device, electronic equipment and computer readable storage medium |
CN112181556B (en) * | 2020-09-21 | 2024-04-19 | 北京字跳网络技术有限公司 | Terminal control processing method and device, electronic equipment and storage medium |
CN112423095A (en) * | 2020-11-02 | 2021-02-26 | 广州博冠信息科技有限公司 | Game video recording method and device, electronic equipment and storage medium |
CN112417533A (en) * | 2020-11-26 | 2021-02-26 | 江苏通付盾信息安全技术有限公司 | Anti-screenshot method and device, computer equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102004878A (en) * | 2010-11-22 | 2011-04-06 | 北京北信源软件股份有限公司 | Anti-screenshot technology-based file data protection method |
CN106529310A (en) * | 2016-10-31 | 2017-03-22 | 珠海市魅族科技有限公司 | Method and device for inhibiting screen capture |
CN107733773A (en) * | 2016-08-10 | 2018-02-23 | 中兴通讯股份有限公司 | Information protecting method, protection information dispensing device and protection information reception device |
CN107958168A (en) * | 2017-12-19 | 2018-04-24 | 广东欧珀移动通信有限公司 | Record screen method, apparatus and terminal |
CN108038396A (en) * | 2017-12-05 | 2018-05-15 | 广东欧珀移动通信有限公司 | Record screen method, apparatus and terminal |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006343884A (en) * | 2005-06-07 | 2006-12-21 | Sony Computer Entertainment Inc | Screen display program, computer-readable storage medium storing screen display program, screen display device, portable terminal device and screen display method |
CN106650441A (en) * | 2016-11-01 | 2017-05-10 | 宇龙计算机通信科技(深圳)有限公司 | Screen recording method and device |
US10546557B2 (en) * | 2016-11-14 | 2020-01-28 | Adobe Inc. | Removing overlays from a screen to separately record screens and overlays in a digital medium environment |
CN107426222B (en) * | 2017-07-28 | 2019-11-26 | Oppo广东移动通信有限公司 | Information protecting method, device, storage medium and electronic equipment |
CN108052835B (en) * | 2017-12-14 | 2023-07-18 | Oppo广东移动通信有限公司 | Screen recording file playing method and device and terminal |
-
2018
- 2018-06-11 CN CN201810597253.XA patent/CN109040419B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102004878A (en) * | 2010-11-22 | 2011-04-06 | 北京北信源软件股份有限公司 | Anti-screenshot technology-based file data protection method |
CN107733773A (en) * | 2016-08-10 | 2018-02-23 | 中兴通讯股份有限公司 | Information protecting method, protection information dispensing device and protection information reception device |
CN106529310A (en) * | 2016-10-31 | 2017-03-22 | 珠海市魅族科技有限公司 | Method and device for inhibiting screen capture |
CN108038396A (en) * | 2017-12-05 | 2018-05-15 | 广东欧珀移动通信有限公司 | Record screen method, apparatus and terminal |
CN107958168A (en) * | 2017-12-19 | 2018-04-24 | 广东欧珀移动通信有限公司 | Record screen method, apparatus and terminal |
Also Published As
Publication number | Publication date |
---|---|
CN109040419A (en) | 2018-12-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109040419B (en) | Screen recording method and device, mobile terminal and storage medium | |
WO2019233212A1 (en) | Text identification method and device, mobile terminal, and storage medium | |
CN108712561B (en) | Authority management method, device, mobile terminal and storage medium | |
CN114827914B (en) | Short message processing method and device and electronic equipment | |
CN108446211B (en) | Browser exception collection method and device, mobile terminal and storage medium | |
CN108932102B (en) | Data processing method and device and mobile terminal | |
US20210150050A1 (en) | Method for preventing information from being stolen, storage device, and mobile terminal | |
CN110457935B (en) | Permission configuration method and terminal equipment | |
CN111142724A (en) | Display control method and electronic equipment | |
CN110442771B (en) | Deep learning-based method and device for detecting station tampering | |
CN110557499B (en) | Information processing method and device and mobile terminal | |
CN109032491A (en) | Data processing method, device and mobile terminal | |
CN108229171B (en) | Driver processing method, device and storage medium | |
US20220215680A1 (en) | Note information display method, note information sending method, and electronic device | |
CN109522741B (en) | Application program permission prompting method and terminal equipment thereof | |
CN110020690B (en) | Cheating behavior detection method, device and storage medium | |
CN111597797A (en) | Method, device, equipment and medium for editing social circle message | |
CN109062648B (en) | Information processing method and device, mobile terminal and storage medium | |
CN108647070B (en) | Information reminding method and device, mobile terminal and computer readable medium | |
CN109005102B (en) | Information processing method and device and electronic device | |
CN110221736B (en) | Icon processing method and device, mobile terminal and storage medium | |
CN112231666A (en) | Illegal account processing method, device, terminal, server and storage medium | |
CN111427644A (en) | Target behavior identification method and electronic equipment | |
CN108132817B (en) | Object management method and device | |
CN111182153B (en) | System language setting method and device, storage medium and mobile terminal |
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 |