CN106055998A - Method and device for carrying out screen capturing at mobile terminal - Google Patents
Method and device for carrying out screen capturing at mobile terminal Download PDFInfo
- Publication number
- CN106055998A CN106055998A CN201610400742.2A CN201610400742A CN106055998A CN 106055998 A CN106055998 A CN 106055998A CN 201610400742 A CN201610400742 A CN 201610400742A CN 106055998 A CN106055998 A CN 106055998A
- Authority
- CN
- China
- Prior art keywords
- picture data
- view
- picture
- replacing
- user
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 69
- 230000004048 modification Effects 0.000 abstract description 10
- 238000012986 modification Methods 0.000 abstract description 10
- 238000012545 processing Methods 0.000 abstract description 9
- 238000010422 painting Methods 0.000 abstract description 2
- 230000006870 function Effects 0.000 description 18
- 230000008569 process Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 15
- 238000004590 computer program Methods 0.000 description 7
- 238000001914 filtration Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 238000005259 measurement Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000004075 alteration Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000003973 paint Substances 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
- G06F21/6245—Protecting personal data, e.g. for financial or medical purposes
- G06F21/6254—Protecting personal data, e.g. for financial or medical purposes by anonymising data, e.g. decorrelating personal data from the owner's identification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04845—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Bioethics (AREA)
- Medical Informatics (AREA)
- Databases & Information Systems (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Human Computer Interaction (AREA)
- Processing Or Creating Images (AREA)
Abstract
The embodiment of the invention provides a method and a device for carrying out screen capturing at a mobile terminal. The method comprises the steps of searching first picture data representing a user head portrait in a current interface when a screen capturing request is received at the mobile terminal; replacing the first picture data by using preset second picture data; and carrying out screen capturing operation for the interface after the first picture data is replaced by the second picture data based on the screen capturing request. According to the embodiment, a special picture editing tool is prevented from being used for manual painting, the technical threshold height of anonymous processing is greatly reduced, the probability of error is reduced, the anonymous modification quality is increased; and normal reading is not affected as the picture is replaced directly while the screen capturing is carried out.
Description
Technical Field
The present invention relates to the field of mobile terminal technology, and in particular, to a method and an apparatus for performing screen capture in a mobile terminal.
Background
With the development of mobile communication technology, mobile terminals such as mobile phones, tablet computers, smart watches and the like are widely popularized, and are increasingly applied to life, study and work of people.
In these mobile terminals, users often use communication tools of third parties to communicate with other users.
In some scenarios, users may share session records when communicating with other users.
For example, the seller of the electronic commerce shares the conversation record of the seller and the buyer about a certain question, so that other buyers can read the conversation record conveniently and answer the question of all the buyers.
For another example, the user shares the self wonderful conversation record to other friends, so that the self wonderful language record and the thought can be conveniently diffused.
However, during sharing, the user generally shares the session content, and in order to protect privacy, the name and the avatar of the dialog person are generally not shared at the same time.
Therefore, users can capture the screen, store the image as the picture, and then use a special picture editing tool to manually paint the user name and the head portrait to realize anonymity, but the anonymous modification mode has a high technical threshold, the painting is easy to make mistakes, the manual modification is needed, the time is long, and the quality of the anonymous modification is poor.
Disclosure of Invention
In view of the above problems, in order to solve the problems of high threshold, long time consumption and poor anonymous modification quality of the anonymous modification technology, embodiments of the present invention provide a method for performing screen capturing in a mobile terminal and a corresponding apparatus for performing screen capturing in a mobile terminal.
In order to solve the above problem, an embodiment of the present invention discloses a method for performing screen capture in a mobile terminal, including:
when a screen capture request is received in a mobile terminal, searching first picture data representing a user head portrait in a current interface;
replacing the first picture data with preset second picture data;
and performing screen capturing operation on the interface after the second picture data is replaced by the screen capturing request.
Preferably, the method further comprises the following steps:
and when the screen capture is finished, replacing the second picture data with the first picture data.
Preferably, the step of searching for the first picture data representing the avatar of the user in the current interface includes:
searching a view group at the topmost layer in the current interface;
traversing the view group, and searching a picture view, wherein the picture view has candidate picture data;
and when the position of the candidate picture data is matched with the position of preset user head portrait data, determining that the candidate picture data is first picture data representing a user name.
Preferably, the step of replacing the first picture data with preset second picture data includes:
replacing all the first picture data with the same second picture data;
or,
identifying individual first picture data;
replacing the separate first picture data with separate second picture data.
Preferably, the step of replacing the first picture data with preset second picture data includes:
measuring, laying out and drawing the picture view to which the first picture data belongs again, and replacing the first picture data with preset second picture data during drawing;
and measuring, laying out and drawing a target view again, wherein the target view is a view in the view group except for the picture view to which the first picture data belongs.
Preferably, the step of replacing the second picture data with the first picture data comprises:
measuring, laying out and drawing the picture view to which the second picture data belongs again, and replacing the second picture data with the first picture data during drawing;
and measuring, laying out and drawing a target view again, wherein the target view is a view in the view group except for the picture view to which the first picture data belongs.
The embodiment of the invention also discloses a device for carrying out screen capture in the mobile terminal, which comprises the following steps:
the picture data searching module is used for searching first picture data representing the head portrait of the user in a current interface when a screen capturing request is received in the mobile terminal;
the first picture data replacing module is used for replacing the first picture data with preset second picture data;
and the screen capturing module is used for performing screen capturing operation on the interface after the second picture data is replaced by the screen capturing request.
Preferably, the method further comprises the following steps:
and the second picture data replacing module is used for replacing the second picture data with the first picture data when the screen capture is finished.
Preferably, the picture data searching module includes:
the view group searching submodule is used for searching the view group at the topmost layer in the current interface;
the picture view searching submodule is used for traversing the view group and searching a picture view, and the picture view has candidate picture data;
and the user name data matching sub-module is used for determining the candidate picture data as first picture data representing the head portrait of the user when the position of the candidate picture data is matched with the position of preset head portrait data of the user.
Preferably, the first picture data replacement module includes:
the first replacement sub-module is used for replacing all the first picture data with the same second picture data;
or,
an individual picture identification sub-module for identifying individual first picture data;
and the second replacement sub-module is used for replacing the single first picture data with the single second picture data.
Preferably, the first picture data replacement module includes:
the first drawing submodule is used for measuring, laying out and drawing the picture view to which the first picture data belongs again, and replacing the first picture data with preset second picture data during drawing;
and the second drawing submodule is used for measuring, laying out and drawing a target view again, wherein the target view is a view in the view group except for the picture view to which the first picture data belongs.
Preferably, the second picture data replacement module includes:
the third drawing submodule is used for measuring, arranging and drawing the picture view to which the second picture data belongs again, and replacing the second picture data with the first picture data during drawing;
and the fourth drawing submodule is used for measuring, laying out and drawing a target view again, wherein the target view is a view in the view group except for the picture view to which the first picture data belongs.
The embodiment of the invention has the following advantages:
according to the embodiment of the invention, the first picture data representing the head portrait of the user is replaced by the preset second picture data, and then screen capturing is carried out, so that the privacy of the user is protected, meanwhile, a special picture editing tool is prevented from being used for manual smearing, the technical threshold height of anonymous processing is greatly reduced, the error probability is reduced, the quality of anonymous modification is improved, and in addition, the pictures are directly replaced during screen capturing, so that the normal reading is not influenced.
Drawings
FIG. 1 is a flowchart illustrating the steps of one embodiment of a method for performing a screen shot in a mobile terminal according to the present invention;
FIGS. 2A-2D are schematic diagrams of a set of views according to the present invention;
3A-3B are exemplary diagrams of an anonymous screen shot of the present invention;
3C-3D are schematic diagrams of second picture data according to the present invention;
FIG. 4 is a flowchart illustrating steps of an embodiment of a method for performing a screen shot in a mobile terminal according to the present invention;
FIG. 5 is a block diagram of an embodiment of an apparatus for performing screen capturing in a mobile terminal according to the present invention;
fig. 6 is a block diagram of an embodiment of an apparatus for performing screen capturing in a mobile terminal according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flowchart illustrating steps of embodiment 1 of a method for performing screen capture in a mobile terminal according to the present invention is shown, which may specifically include the following steps:
step 101, when a screen capture request is received in a mobile terminal, searching first picture data representing a user head portrait in a current interface;
it should be noted that the embodiment of the present invention may be applied to a mobile terminal, for example, a mobile phone, a tablet computer, a smart watch, and the like, and the embodiment of the present invention is not limited thereto.
The operating systems of these mobile terminals may include Android (Android), IOS, Windows Phone, and the like, and may generally support communication tools of third parties for communication, such as instant messaging tools, mailbox clients, microblog applications, forum applications, and the like.
Under the condition that a User intends to show conversation contents of communication performed by a communication tool of a third party and the like, the User can trigger screen capture operation and send a screen capture request to the system, and then the system can search first picture data representing a User avatar in a current UI (User Interface).
It should be noted that the screen capturing operation in the embodiment of the present invention may refer to anonymous screen capturing, that is, screen capturing after anonymous processing of the user name and the user avatar.
The anonymous screen capture can be controlled through a separate screen capture entry or an option of an anonymous screen capture switch in the device.
Of course, the embodiment of the invention can also provide non-anonymous screen capture, namely normal screen capture, and retain the user name and the user head portrait.
In one embodiment of the present invention, step 101 may comprise the following sub-steps:
a substep S11, searching the view group at the topmost layer in the current interface;
as shown in fig. 2A, in the Android system, each display control in the UI interface is inherited to View (View), and the ViewGroup is a container for accommodating the controls.
A control container class ViewGroup may also contain View and ViewGroup.
A complex UI may include multiple views and viewgroups that form a hierarchy in the layout.
In one example, the UI interface shown in fig. 2B performs maintenance and control of each spatial display process through a view hierarchy data structure shown in fig. 2C in the Android system.
In FIG. 2C, controls such as TextView and ImageView are inherited to View, and FrameLayout, LinearLayout and RelativeLayout are inherited to ViewGroup.
Note that ViewGroup is also inherited to View.
Further, in the Android system, the topmost window of the application is called decoview, which is derived from FrameLayout, which is derived from ViewGroup, and therefore, the topmost window mentioned in the present invention is referred to as decoview.
When an application program creates a display window, a DecorView object is created in advance, and when the DecorView is created, a BroadcastReceiver is registered to receive a screen capture request of a user.
When a user triggers screen capture, a screen capture broadcast is sent to the DecorView, and the DecorView receives the broadcast and then redraws a window.
Substep S12, traversing the view group, and finding a picture view;
in a specific implementation, the ImageView (picture view) is generally used for displaying pictures, that is, candidate picture data is in the picture view, and therefore, the user head portrait data in the current UI interface is in one or more of the imageviews.
And a substep S13 of determining the candidate picture data as first picture data representing the avatar of the user when the position of the candidate picture data matches the position of preset avatar data of the user.
By applying the embodiment of the invention, the position of the head portrait data of the user can be obtained in advance and stored in the database.
In one example, since the user avatar data that is simultaneously communicated is usually loaded through ImageView in the session, that is, the user avatar is loaded on the current display interface through a fixed control, the position of the user avatar data may be obtained by obtaining the position of the control corresponding to the ImageView.
Further, if the third-party application provides operations such as marking and forwarding, the user may manually copy the user avatar data, and if not, the user may also manually select the user avatar data.
Of course, the specification of the UI interface of the third-party application is relatively stable for a certain period of time except for the user copying and selecting, so that the user avatar data can be read from a specific location together with the specification of the UI interface, and the like, which is not limited by the embodiment of the present invention.
When the user head portrait is identified, the user head portrait data can be read from the database, and if the candidate picture data of the ImageView is matched with the user head portrait data, the candidate picture data of the ImageView can be represented as a user name.
Furthermore, because the specification of the UI interface of the third-party application is relatively stable within a certain period of time, the user avatar data can be read from a specific position together with the specification of the UI interface, that is, when the user avatar is identified, if the position information corresponding to the candidate picture data of the ImageView matches the position information corresponding to the user avatar data in the UI interface of the third-party application, the candidate picture data of the ImageView can be represented as the user avatar.
For example, as shown in fig. 2D, the current display interface includes ImageView a, TextView B, ImageView C, and TextView D, where according to the specification of the UI interface of the third-party application, the user avatar data is loaded through ImageView a and ImageView C, that is, the picture data loaded by ImageView a is the avatar corresponding to user a, and the picture data loaded by ImageView C is the avatar corresponding to user C, so that the position information of the user avatar data of the current display interface can be obtained by obtaining the position information of ImageView a and ImageView C, or the picture data loaded by ImageView a and ImageView C is directly determined as the first picture data representing the avatar of the user.
Step 102, replacing the first picture data with preset second picture data;
in the embodiment of the invention, before screenshot, anonymization processing can be performed on the user avatar of the current UI, that is, first picture data representing the user avatar is replaced by second picture data not representing the user avatar.
For example, the second picture data may be a plant picture as shown in fig. 3C and an animal picture as shown in fig. 3D, and so on.
In an alternative, all of the first picture data may be replaced with the same second picture data, such as replacing all of the user's head with "■ ■ ■".
In another alternative, the individual first picture data may be identified and replaced with the individual second picture data.
So-called individual, i.e., single, independent, there are no repetitions.
For example, if the user head portraits in the current UI interface are respectively the user head portraits corresponding to "three-piece" and "four-piece", the user head portraits corresponding to "three-piece" of the user may be replaced by the plant picture shown in fig. 3C, the user head portraits corresponding to "four-piece" of the user may be replaced by the animal picture shown in fig. 3D, and so on.
In one embodiment of the present invention, step 102 may include the following sub-steps:
substep S21, measuring, laying out and drawing the picture view to which the first picture data belongs again, and replacing the first picture data with preset second picture data during drawing;
and a substep S22 of re-measuring, laying out and drawing the target view.
The target view is a view in the view group except the picture view to which the first picture data belongs, and the target view includes a picture view and a text view.
The process of displaying the UI interface by the system is actually a process of performing traversal measurement (measure), layout (layout), and drawing (draw) for each View, starting from the outermost View group.
The measurement (measure) is mainly used for determining the size of the control View, the actual size of the entire View tree is calculated, namely the actual height (corresponding attribute: mMeasuredHeight) and width (corresponding attribute: mMeasureWidth) are set, and the actual width and height of the control of each View are determined by the parent View and the own View.
The specific call chain is as follows:
the attribute mView (the type of the mView is a ViewGroup type generally) of a ViewRoot root object calls a measure () method to calculate the size of a View tree, and calls back an onMeasure () method of the View/ViewGroup object, wherein the method realizes the following functions:
1. setting the final size of the View, and realizing the function, setting the actual height (corresponding attribute: mMeasuredHeight) and width (corresponding attribute: mMeasureWidth) by calling a setMeasuredDimension () method;
2. If the View object is a ViewGroup type, the method of the onMeasure () needs to be rewritten, and the measure () process of traversing the child View is needed.
2.1 the measure () process of each sub-View is realized by calling the measure containment within the java class of the parent View group, because the measure containment within the map storage () process is a transition layer simpler process of directly calling the measure () process of the View object, the process simply calls the measure () process of the View object.
And (4) layout (layout) mainly determines the position of the control View, and the entire View tree is put on a proper position according to the size of the sub-View and the layout parameters.
The specific call chain is as follows:
lay () starts the layout of the View tree and then calls back to the lay () method in the View/View group class. The specific process is as follows:
1. The layout method sets the View to be located on the coordinate axes of the parent View, namely mLeft, mTop, mLeft, mBottom (call setFrame () function to implement);
next, the onLayout () method is called back (if the View is the ViewGroup object, the method needs to be implemented, and each sub-View is laid out).
2. If the View is a ViewGroup type, it is necessary to traverse each child View and call the layout () method of the child View to set its coordinate values.
Rendering (draw) primarily determines the display of the control View.
Calling a draw () method by a performTraversals () method of a Viewroot object to initiate drawing of the View tree, and noteworthy that when drawing is initiated each time, the View of each View tree is not redrawn, but only the views which need to be redrawn are redrawn, wherein a View class internal variable comprises a flag bit DRAWN, and when the View needs to be redrawn, the flag bit is added to the View.
The calling process is as follows:
draw () starts drawing, and the draw () method implements the following functions:
1. Drawing a background of the View;
2. Preparing to display the gradual change frame;
3. invoking the onDraw () method to draw the View itself (each View needs to reload the method, the ViewGroup does not need to implement the method);
4. calling the dispatchDraw () method to draw a child View (if the View type is not ViewGroup, i.e., does not contain a child View, the method does not need to be reloaded);
it should be noted that the ViewGroup class has rewritten the function implementation of dispatcdraw () for us, and the application program generally does not need to rewrite the method, but can reload the parent class function to implement the specific function.
4.1 DispatchDraw () method internally traverses each child view, calling Drawchild () to recall the draw () method of each child view (note that this place the "redrawn needed" view will call the draw () method).
It should be noted that the ViewGroup class has rewritten the function implementation of the dispatchDraw (), and the application program generally does not need to rewrite the method, but may reload the parent function to implement the specific function.
5. Drawing a scroll bar.
In the embodiment of the invention, after the topmost ViewGroup receives the screen capture request, each sub-View or sub-ViewGroup can be traversed to perform re-measurement, layout and drawing.
The redrawing is started from the DecorView, and all the sub-views or sub-Viewgroups can be guaranteed to have an opportunity to be redrawn, so that the interface of the whole application program is redrawn, all the anonymously displayed character strings can be guaranteed to be updated and drawn, and the problem of incomplete replacement of the first picture data is solved.
In the Android system, picture data calls canvas.
And storing second picture data to be drawn currently before the DrawText function is executed, filtering and replacing the first picture data according to a preset character string filtering mode, generating new second picture data to be displayed after filtering and replacing are finished, and calling the DrawText function to draw a new display character string.
And 103, performing screen capturing operation on the interface after the second picture data is replaced according to the screen capturing request.
When the mobile terminal captures the screen, a screen capturing broadcast is sent to the DecorView, the DecorView receives the broadcast, redraws the topmost ViewGroup, and sends the redrawn to the SurfaceFlinger or other modes for screen capturing.
The surfefinger discloses a screen capture interface, which may directly perform screen capture, or may perform screen capture through other ways, for example, a manner of directly reading a frame buffer or a manner of reading a gpu image buffer, which is not limited in this embodiment of the present invention.
In an application scenario, as shown in fig. 3A, in a group, a user with the user name "wang jian epi" prompts that an elevator is dangerous, and the current user wants to capture a screen to tell other users, as shown in fig. 3B, when capturing the screen, head images corresponding to the user names "wang jian epi" and "zhangzhi" are respectively replaced by pictures shown in fig. 3C and 3D, and meanwhile, the user names "wang jian epi" and "zhangzhi" are replaced by "■ ■ ■", so that anonymous screen capture is realized, and privacy safety of the user is ensured.
According to the embodiment of the invention, the first picture data representing the user name is replaced by the preset second picture data, and then screen capturing is carried out, so that the privacy of the user is protected, meanwhile, a special picture editing tool is prevented from being used for manual smearing, the technical threshold of anonymous processing is greatly lowered, the error probability is lowered, and the quality of anonymous modification is improved.
Referring to fig. 4, a flowchart illustrating steps of embodiment 2 of a method for performing screen capture in a mobile terminal according to the present invention is shown, which may specifically include the following steps:
step 401, when a screen capture request is received in a mobile terminal, searching first picture data representing a user head portrait in a current interface;
step 402, replacing the first picture data with preset second picture data;
step 403, performing screen capture operation on the interface after replacing with the second picture data according to the screen capture request;
and step 404, replacing the second picture data with the first picture data when the screen capture is finished.
In a specific implementation, the screen capture call is a synchronous interface, and the screen capture end is indicated by the return of the interface call.
If the screen capture is finished, the second picture data can be replaced by the first picture data, and the normal operation of the application program is ensured.
In one embodiment of the present invention, step 404 may include the following sub-steps:
substep S31, measuring, laying out and drawing the picture view to which the second picture data belongs again, and replacing the second picture data with the first picture data during drawing;
a substep S32 of re-measuring, laying out and drawing the target view;
wherein the target view is a view in the view group except for the picture view to which the first picture data belongs.
In the embodiment of the invention, after the topmost View group receives the broadcast of which the screen capturing is finished, each sub View or sub View group can be traversed to carry out re-measurement, layout and drawing.
And starting redrawing from the DecorView, which can ensure that all the sub-views or sub-Viewgroups have an opportunity to redraw, therefore, the interface of the whole application program is redrawn, all the anonymously displayed character strings can be ensured to be updated and drawn, and the problem of incomplete data replacement of the second picture is avoided.
In the Android system, picture data calls canvas.
And storing the first picture data to be drawn before the DrawImage function is executed, filtering and replacing the second picture data according to a preset picture filtering mode, generating new first picture data to be displayed after filtering and replacing are finished, and calling the DrawImage function to draw a new display character string.
It should be noted that each ImageView has its own instance in the memory, and the instances are isolated from each other and will not affect each other.
Therefore, the first picture data to be held by each ImageView may be saved in one member variable of the instance itself.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 5, a block diagram of a structure of an embodiment 1 of the apparatus for performing screen capture in a mobile terminal of the present invention is shown, which may specifically include the following modules:
the image data searching module 501 is configured to search first image data representing a user identity in a current interface when a screen capture request is received in the mobile terminal;
a first picture data replacing module 502, configured to replace the first picture data with preset second picture data;
and a screen capture module 503, configured to perform a screen capture operation on the interface after the second picture data is replaced with the second picture data according to the screen capture request.
In an embodiment of the present invention, the picture data searching module 501 may include the following sub-modules:
the view group searching submodule is used for searching the view group at the topmost layer in the current interface;
the picture view searching submodule is used for traversing the view group and searching a picture view, and the picture view has candidate picture data;
and the user name data matching sub-module is used for determining the candidate picture data as first picture data representing the identity of the user when the position of the candidate picture data is matched with the position of preset user head portrait data.
In an embodiment of the present invention, the first picture data replacing module 502 may include the following sub-modules:
the first replacement sub-module is used for replacing all the first picture data with the same second picture data;
or,
an individual picture identification sub-module for identifying individual first picture data;
and the second replacement sub-module is used for replacing the single first picture data with the single second picture data.
In an embodiment of the present invention, the first picture data replacing module 502 may include the following sub-modules:
the first drawing submodule is used for measuring, laying out and drawing the picture view to which the first picture data belongs again, and replacing the first picture data with preset second picture data during drawing;
and the second drawing submodule is used for measuring, laying out and drawing a target view again, wherein the target view is a view in the view group except for the picture view to which the first picture data belongs.
Referring to fig. 6, a block diagram of a structure of an embodiment 2 of the apparatus for performing screen capture in a mobile terminal of the present invention is shown, which may specifically include the following modules:
the image data searching module 601 is configured to search first image data representing a user identity in a current interface when a screen capture request is received in the mobile terminal;
a first picture data replacing module 602, configured to replace the first picture data with preset second picture data;
and a screen capture module 603, configured to perform a screen capture operation on the interface after the second picture data is replaced with the second picture data according to the screen capture request.
And a second picture data replacing module 604, configured to replace the second picture data with the first picture data when the screen capture is finished.
In an embodiment of the present invention, the second picture data replacing module 604 may include the following sub-modules:
the third drawing submodule is used for measuring, arranging and drawing the picture view to which the second picture data belongs again, and replacing the second picture data with the first picture data during drawing;
and the second redrawing submodule is used for measuring, laying out and drawing a target view again, wherein the target view is a view in the view group except for the picture view to which the first picture data belongs.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, 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 terminal 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 terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal 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 terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The method for performing screen capturing in a mobile terminal and the device for performing screen capturing in a mobile terminal provided by the present invention are described in detail above, and specific examples are applied herein to illustrate the principles and embodiments of the present invention, and the above description of the embodiments is only used to help understanding the method and the core ideas of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (12)
1. A method for screen capture in a mobile terminal, comprising:
when a screen capture request is received in a mobile terminal, searching first picture data representing a user head portrait in a current interface;
replacing the first picture data with preset second picture data;
and performing screen capturing operation on the interface after the second picture data is replaced by the screen capturing request.
2. The method of claim 1, further comprising:
and when the screen capture is finished, replacing the second picture data with the first picture data.
3. The method according to claim 1 or 2, wherein the step of searching the first picture data representing the avatar of the user in the current interface comprises:
searching a view group at the topmost layer in the current interface;
traversing the view group, and searching a picture view, wherein the picture view has candidate picture data;
and when the position of the candidate picture data is matched with the position of preset user head portrait data, determining that the candidate picture data is first picture data representing a user name.
4. The method according to claim 3, wherein the step of replacing the first picture data with preset second picture data comprises:
replacing all the first picture data with the same second picture data;
or,
identifying individual first picture data;
replacing the separate first picture data with separate second picture data.
5. The method according to claim 3, wherein the step of replacing the first picture data with preset second picture data comprises:
measuring, laying out and drawing the picture view to which the first picture data belongs again, and replacing the first picture data with preset second picture data during drawing;
and measuring, laying out and drawing a target view again, wherein the target view is a view in the view group except for the picture view to which the first picture data belongs.
6. The method of claim 3, wherein the step of replacing the second picture data with the first picture data comprises:
measuring, laying out and drawing the picture view to which the second picture data belongs again, and replacing the second picture data with the first picture data during drawing;
and measuring, laying out and drawing a target view again, wherein the target view is a view in the view group except for the picture view to which the first picture data belongs.
7. An apparatus for performing screen capture in a mobile terminal, comprising:
the picture data searching module is used for searching first picture data representing the head portrait of the user in a current interface when a screen capturing request is received in the mobile terminal;
the first picture data replacing module is used for replacing the first picture data with preset second picture data;
and the screen capturing module is used for performing screen capturing operation on the interface after the second picture data is replaced by the screen capturing request.
8. The apparatus of claim 7, further comprising:
and the second picture data replacing module is used for replacing the second picture data with the first picture data when the screen capture is finished.
9. The apparatus of claim 8 or 9, wherein the picture data lookup module comprises:
the view group searching submodule is used for searching the view group at the topmost layer in the current interface;
the picture view searching submodule is used for traversing the view group and searching a picture view, and the picture view has candidate picture data;
and the user head portrait data matching sub-module is used for determining the candidate picture data as first picture data representing the head portrait of the user when the position of the candidate picture data is matched with the preset position of the user head portrait data.
10. The method of claim 9, wherein the first picture data replacement module comprises:
the first replacement sub-module is used for replacing all the first picture data with the same second picture data;
or,
an individual picture identification sub-module for identifying individual first picture data;
and the second replacement sub-module is used for replacing the single first picture data with the single second picture data.
11. The apparatus of claim 9, wherein the first picture data replacement module comprises:
the first drawing submodule is used for measuring, laying out and drawing the picture view to which the first picture data belongs again, and replacing the first picture data with preset second picture data during drawing;
and the second drawing submodule is used for measuring, laying out and drawing a target view again, wherein the target view is a view in the view group except for the picture view to which the first picture data belongs.
12. The apparatus of claim 9, wherein the second picture data replacement module comprises:
the third drawing submodule is used for measuring, arranging and drawing the picture view to which the second picture data belongs again, and replacing the second picture data with the first picture data during drawing;
and the fourth drawing submodule is used for measuring, laying out and drawing a target view again, wherein the target view is a view in the view group except for the picture view to which the first picture data belongs.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610400742.2A CN106055998A (en) | 2016-06-08 | 2016-06-08 | Method and device for carrying out screen capturing at mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610400742.2A CN106055998A (en) | 2016-06-08 | 2016-06-08 | Method and device for carrying out screen capturing at mobile terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106055998A true CN106055998A (en) | 2016-10-26 |
Family
ID=57169727
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610400742.2A Pending CN106055998A (en) | 2016-06-08 | 2016-06-08 | Method and device for carrying out screen capturing at mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106055998A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106529335A (en) * | 2016-10-27 | 2017-03-22 | 北京奇虎科技有限公司 | Method and device for restraining screenshot, and portable mobile terminal |
CN107145800A (en) * | 2017-05-31 | 2017-09-08 | 北京小米移动软件有限公司 | Method for protecting privacy and device, terminal and storage medium |
CN107426222A (en) * | 2017-07-28 | 2017-12-01 | 广东欧珀移动通信有限公司 | Information protecting method, device, storage medium and electronic equipment |
CN107682525A (en) * | 2017-08-29 | 2018-02-09 | 努比亚技术有限公司 | Screenshot processing method, terminal and computer-readable recording medium |
CN107679419A (en) * | 2017-10-17 | 2018-02-09 | 田进 | A kind of screenshotss method and device |
CN109388977A (en) * | 2017-10-24 | 2019-02-26 | 浙江华途信息安全技术股份有限公司 | A kind of anti-screenshotss method and apparatus |
CN114520796A (en) * | 2022-01-27 | 2022-05-20 | 维沃移动通信有限公司 | Head portrait display method and device and electronic equipment |
CN114706638A (en) * | 2022-03-11 | 2022-07-05 | 维沃移动通信有限公司 | Interface display method and device, electronic equipment and medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120169762A1 (en) * | 2010-12-30 | 2012-07-05 | International Business Machines Corporation | Protecting screen information |
CN104021350A (en) * | 2014-05-13 | 2014-09-03 | 小米科技有限责任公司 | Privacy-information hiding method and device |
CN104408686A (en) * | 2014-10-31 | 2015-03-11 | 宇龙计算机通信科技(深圳)有限公司 | Method, system and terminal for screen capturing |
CN105068723A (en) * | 2015-07-27 | 2015-11-18 | 联想(北京)有限公司 | Information processing method and electronic device |
CN105260674A (en) * | 2015-09-30 | 2016-01-20 | 深圳天珑无线科技有限公司 | Screen capture processing method and apparatus and intelligent terminal |
CN105580024A (en) * | 2014-09-04 | 2016-05-11 | 华为技术有限公司 | Screenshot method and apparatus |
-
2016
- 2016-06-08 CN CN201610400742.2A patent/CN106055998A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120169762A1 (en) * | 2010-12-30 | 2012-07-05 | International Business Machines Corporation | Protecting screen information |
CN104021350A (en) * | 2014-05-13 | 2014-09-03 | 小米科技有限责任公司 | Privacy-information hiding method and device |
CN105580024A (en) * | 2014-09-04 | 2016-05-11 | 华为技术有限公司 | Screenshot method and apparatus |
CN104408686A (en) * | 2014-10-31 | 2015-03-11 | 宇龙计算机通信科技(深圳)有限公司 | Method, system and terminal for screen capturing |
CN105068723A (en) * | 2015-07-27 | 2015-11-18 | 联想(北京)有限公司 | Information processing method and electronic device |
CN105260674A (en) * | 2015-09-30 | 2016-01-20 | 深圳天珑无线科技有限公司 | Screen capture processing method and apparatus and intelligent terminal |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106529335A (en) * | 2016-10-27 | 2017-03-22 | 北京奇虎科技有限公司 | Method and device for restraining screenshot, and portable mobile terminal |
CN106529335B (en) * | 2016-10-27 | 2019-12-13 | 北京安云世纪科技有限公司 | Method and device for limiting screenshot and portable mobile terminal |
CN107145800A (en) * | 2017-05-31 | 2017-09-08 | 北京小米移动软件有限公司 | Method for protecting privacy and device, terminal and storage medium |
CN107426222B (en) * | 2017-07-28 | 2019-11-26 | Oppo广东移动通信有限公司 | Information protecting method, device, storage medium and electronic equipment |
CN107426222A (en) * | 2017-07-28 | 2017-12-01 | 广东欧珀移动通信有限公司 | Information protecting method, device, storage medium and electronic equipment |
CN107682525A (en) * | 2017-08-29 | 2018-02-09 | 努比亚技术有限公司 | Screenshot processing method, terminal and computer-readable recording medium |
CN107679419A (en) * | 2017-10-17 | 2018-02-09 | 田进 | A kind of screenshotss method and device |
CN107679419B (en) * | 2017-10-17 | 2020-07-14 | 南通纤麦家纺科技有限公司 | Screen capturing method and device |
CN109388977A (en) * | 2017-10-24 | 2019-02-26 | 浙江华途信息安全技术股份有限公司 | A kind of anti-screenshotss method and apparatus |
CN109388977B (en) * | 2017-10-24 | 2021-01-01 | 浙江华途信息安全技术股份有限公司 | Anti-screen-capture method and device |
CN114520796A (en) * | 2022-01-27 | 2022-05-20 | 维沃移动通信有限公司 | Head portrait display method and device and electronic equipment |
CN114520796B (en) * | 2022-01-27 | 2024-05-24 | 维沃移动通信有限公司 | Head portrait display method and device and electronic equipment |
CN114706638A (en) * | 2022-03-11 | 2022-07-05 | 维沃移动通信有限公司 | Interface display method and device, electronic equipment and medium |
CN114706638B (en) * | 2022-03-11 | 2024-08-23 | 维沃移动通信有限公司 | Interface display method and device, electronic equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105653281B (en) | A kind of method and apparatus carrying out screenshotss in a mobile device | |
CN106055998A (en) | Method and device for carrying out screen capturing at mobile terminal | |
US10963145B1 (en) | Prioritizing display of user icons associated with content | |
US10424290B2 (en) | Cross device companion application for phone | |
KR102263125B1 (en) | Smart Carousel of Image Changers | |
CN111385186B (en) | Project group creating method, project management method and device | |
KR102609823B1 (en) | Media collection generation and privacy mechanisms | |
KR102467236B1 (en) | Real-time tracking compensation image effect | |
US20140043325A1 (en) | Facetted browsing | |
KR20190122249A (en) | Virtual vision system | |
US10430456B2 (en) | Automatic grouping based handling of similar photos | |
US20170364531A1 (en) | Image sharing method and apparatus, and terminal device | |
US10755487B1 (en) | Techniques for using perception profiles with augmented reality systems | |
EP4002107A1 (en) | Data binding method, apparatus, and device of mini program, and storage medium | |
US10176611B2 (en) | Layer-based image updates | |
US11468613B2 (en) | Annotating an image with a texture fill | |
US11516169B2 (en) | Electronic messaging platform that allows users to change the content and attachments of messages after sending | |
US11659094B2 (en) | Scheduling automatically initiated call between users | |
CN109756348B (en) | Batch calling method and device | |
US20150261426A1 (en) | Method and apparatus for communication using images, sketching, and stamping | |
US20230260654A1 (en) | Systems and methods for machine learning-based state prediction and visualization | |
CN109240678A (en) | code generating method and device | |
US20220294774A1 (en) | Password protecting selected message content | |
WO2016197709A1 (en) | Information processing method and mobile terminal | |
CN104780255A (en) | Address book processing method and system based on mobile terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20161026 |