Watermark adding method, electronic equipment and storage medium
By adaptively adjusting the watermark position and size within the cloned app's interface, the problem of cloned app interface recognition and security protection is solved, achieving fast and accurate interface recognition and security protection, and improving the user experience.
Patent Information
- Application Number
- CN202310843469.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-10
- Publication Date
- 2025-01-10
AI Technical Summary
In existing technologies, the interface of cloned applications is difficult to quickly and accurately identify and distinguish between the main application and cloned applications, and there is a lack of effective security protection measures during data transmission.
By identifying the display mode of the cloned application, determining the screen information, and adaptively adjusting the watermark position and size according to the screen information, the watermark is added to the interface of the cloned application, with the watermark layer placed on top, achieving rapid identification and security protection.
It improves the accuracy and security of cloned app interface recognition, enhances the user's visual experience, and protects the displayed content of cloned apps from being affected.
Smart Images

Figure CN119292712A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a method for adding a watermark, an electronic device and a storage medium. Background Art
[0002] With the rapid development of electronic technology, the popularity of electronic devices such as mobile phones and tablet computers is increasing, and they have become indispensable tools in people's daily life and work. And with the development of electronic devices, the application clone function is becoming more and more popular.
[0003] In daily life and work, users sometimes need to open a clone of an application in an electronic device to log in to multiple accounts of the application at the same time. In this case, multiple identical applications can be installed on an electronic device with the application clone function, and multiple accounts can be logged in and used simultaneously through multiple identical applications, bringing convenience to users in life and work. Summary of the invention
[0004] The present application provides a method for adding a watermark, an electronic device and a storage medium, which can adaptively adjust the position and size of the watermark according to different display modes.
[0005] In a first aspect, the present application provides a method for adding a watermark, which is executed by an electronic device, the electronic device including a main application and a clone application, the clone application and the main application being the same application that can run independently of each other, the method comprising: identifying the display mode corresponding to the running clone application; determining the screen information corresponding to the clone application in the display mode; determining the watermark position based on the screen information; based on the watermark position, adding a first watermark to the interface corresponding to the clone application; and pinning the layer corresponding to the first watermark to the top.
[0006] The display mode is any one of a full screen mode, a split screen mode and a floating window mode.
[0007] The screen information includes the camera position of the electronic device, the navigation bar position, and the interface size of the clone application.
[0008] In this implementation, on the one hand, the related art does not add a watermark to the interface corresponding to the clone application. The method for adding a watermark provided in the embodiment of the present application adds a watermark to the interface corresponding to the clone application, which facilitates the rapid and accurate identification of the clone application through the watermark, thereby better distinguishing the main application from the clone application. And because a watermark is added to the interface corresponding to the clone application, when data is transmitted based on the interface, such as sending interface screenshots, interface screen recordings and other data, the added watermark can effectively protect the display content in the interface corresponding to the clone application, thereby improving the security of the clone application.
[0009] On the other hand, in the related art, when adding a watermark to the interface of the main application, no matter what the display mode of the main application is, the added watermark is only adapted to the interface of the main application in full-screen mode. In the method for adding a watermark provided in the embodiment of the present application, the screen information is determined according to the display mode corresponding to the clone application (full-screen mode, split-screen mode, or floating window mode), and the watermark position is determined according to the screen information, so that the determined watermark position matches the display mode; in other words, the watermark position can be adaptively adjusted according to different display modes; adding a watermark based on the watermark position can make the final added watermark adapt to the interface corresponding to the clone application, thereby improving the flexibility of adding watermarks and enhancing the user's visual experience. Moreover, the layer corresponding to the watermark is pinned to the top, so that the added watermark can be suspended above the interface corresponding to the clone application, which will not affect the display of the interface corresponding to the clone application and the interaction with the clone application, thus bringing a better user experience to the user.
[0010] In a possible implementation, the method for adding a watermark provided by the present application, before identifying the display mode corresponding to the running clone application, further includes: detecting a first operation on an icon corresponding to the clone application; in response to the first operation, starting the clone application;
[0011] Based on the watermark position, a first watermark is added to the interface corresponding to the clone application, including: displaying the first main interface of the clone application, and adding the first watermark to the first main interface based on the watermark position.
[0012] Optionally, the first operation may be a click operation; or, the first operation may be a click operation and a rotation operation; or, the first operation may be a click operation and a display mode switching operation.
[0013] In this implementation, the related art does not add a watermark to the interface corresponding to the clone application. The method for adding a watermark provided in the embodiment of the present application adds a watermark to the first main interface of the clone application, which is convenient for quickly and accurately identifying the clone application through the watermark when the clone application is started for the first time, so as to better distinguish the main application from the clone application. And because a watermark is added to the first main interface of the clone application, when data is transmitted based on the interface, such as sending interface screenshots, interface screen recordings and other data, the added watermark can effectively protect the display content in the first main interface of the clone application, thereby improving the security of the clone application.
[0014] The electronic device may include a set of multiple applications, and the set of multiple applications includes at least one clone application.
[0015] In one possible implementation, the method for adding watermarks provided by the present application, before identifying the display mode corresponding to the running clone application, also includes: detecting a second operation on the icon corresponding to the multi-application set; in response to the second operation, starting and running the multi-application set; displaying the second main interface of the multi-application set, and adding a second watermark to the second main interface; and pinning the layer corresponding to the second watermark to the top.
[0016] In this implementation, a watermark is added to the second main interface of the multi-application collection, so that when the multi-application collection is launched for the first time, the watermark can be used to quickly determine that the user has entered the multi-application collection, reminding the user to click the icon in the second main interface to start and run the clone application.
[0017] In a possible implementation, when the display mode is a floating window mode, the method for adding a watermark provided in the present application further includes: displaying a second main interface and a floating window with a second watermark added thereto.
[0018] The floating window floats on the second main interface; the floating window displays the interface with the first watermark added.
[0019] In this implementation, on the one hand, a watermark is added to the second main interface of the multi-application set, so that when the multi-application set is started for the first time, the user can quickly determine that the multi-application set has been entered through the watermark, and remind the user to click the icon in the second main interface to start and run the clone application. On the other hand, a watermark is added to the interface corresponding to the clone application, so that the clone application can be quickly and accurately identified through the watermark, so as to better distinguish the main application from the clone application. And through the method of adding watermarks provided in the embodiment of the present application, a suitable watermark can be added to the interface of the clone application in the floating window mode, which improves the flexibility of adding watermarks and enhances the user's visual experience.
[0020] In a possible implementation, when the display mode is a split-screen mode, the method for adding a watermark provided by the present application further includes: displaying a first split-screen window and a second split-screen window.
[0021] Among them, the first split-screen window and the second split-screen window are displayed side by side; the interface with the first watermark added is displayed in the first split-screen window or the second split-screen window.
[0022] In one possible implementation, based on the watermark position, a first watermark is added to the interface corresponding to the clone application, including: through a view overlay mechanism, the layer corresponding to the first watermark is pinned to the top; through a view tree, the layer corresponding to the pinned first watermark is added to the watermark position in the interface corresponding to the clone application.
[0023] In this implementation, the layer corresponding to the first watermark can be pinned to the top through the view overlay mechanism, and then the pinned layer can be added to the watermark position in the corresponding interface of the clone application through the view tree. On the one hand, the related art does not add a watermark to the interface corresponding to the clone application. The method for adding a watermark provided in the embodiment of the present application adds a watermark to the interface corresponding to the clone application, which is convenient for quickly and accurately identifying the clone application through the watermark, so as to better distinguish the main application from the clone application. On the other hand, regardless of whether the display mode corresponding to the clone application is full-screen mode, split-screen mode, or floating window mode, the first watermark can be suspended above the interface of the clone application, and will not affect the display of the interface of the clone application and the interaction with the clone application.
[0024] In one possible implementation, a second watermark is added to the second main interface of a multi-application collection, including: through a view overlay mechanism, placing the layer corresponding to the second watermark on top; and through a view tree, adding the layer corresponding to the placed second watermark to the second main interface.
[0025] In this implementation, the layer corresponding to the second watermark can be pinned to the top through the view overlay mechanism, and then the pinned layer can be added to the watermark position in the corresponding interface of the clone application through the view tree. Adding a watermark to the second main interface of the multi-application collection makes it easy to quickly determine that the multi-application collection has been entered when the multi-application collection is started, and remind the user to click the icon in the second main interface to start and run the clone application.
[0026] In one possible implementation, the method for adding watermarks provided in the present application, before determining the watermark position based on screen information, further includes: obtaining the display content in the interface corresponding to the clone application; when the display content meets preset conditions, determining to add a first watermark to the interface corresponding to the clone application.
[0027] Among them, the preset conditions include that the displayed content is not advertising content and is not game content.
[0028] In this implementation, it is determined whether to add the first watermark to the interface corresponding to the clone application according to the displayed content; when the displayed content does not meet the preset conditions, it is determined not to add the first watermark to the interface corresponding to the clone application, which can improve the user experience and save the power consumption of the electronic device. When the displayed content meets the preset conditions, it is determined to add the first watermark to the interface corresponding to the clone application, and the clone application can be quickly and accurately identified through the added watermark, so as to better distinguish the main application from the clone application.
[0029] In a possible implementation, the method for adding watermarks provided in the present application, before determining the watermark position according to screen information, further includes: determining the watermark size of the first watermark according to the interface size of the clone application; and constructing a watermark style for the first watermark.
[0030] The watermark style may include at least one of the watermark text, color, transparency, font, font size, pattern, quantity, etc.
[0031] In this implementation, watermark styles are constructed according to user preferences and needs, which increases the diversity of watermark styles and improves user experience.
[0032] Optionally, in a possible implementation, before adding the second watermark to the second main interface, the watermark size of the second watermark may be determined according to the interface size of the clone application, and the watermark style of the second watermark may be constructed.
[0033] In a possible implementation, the watermark position is determined according to the screen information, including: in this display mode, the watermark position is determined based on the interface size of the clone application, the watermark size, the camera position, and the navigation bar position.
[0034] Among them, the position of the navigation bar is determined by the navigation method of the electronic device, and the navigation methods include gesture navigation and three-button navigation.
[0035] The navigation bar position includes a left hot zone, a right hot zone and a bottom hot zone; the height of the bottom hot zone of the gesture navigation is smaller than the height of the bottom hot zone of the three-button navigation.
[0036] In this implementation, the screen information is determined based on the display mode corresponding to the clone application (full-screen mode, split-screen mode, or floating window mode), and the watermark position is determined based on the screen information, so that the determined watermark position matches the display mode; in other words, the watermark position can be adaptively adjusted according to different display modes.
[0037] In a second aspect, the present application provides an electronic device, comprising: one or more processors; one or more memories; a module with multiple applications installed; the memory stores one or more programs, and when one or more programs are executed by the processor, the electronic device executes the method in the above-mentioned first aspect and any possible implementation thereof.
[0038] In a third aspect, the present application provides a chip, including a processor. The processor is used to read and execute a computer program stored in a memory to perform the method in the first aspect and any possible implementation thereof.
[0039] Optionally, the chip also includes a memory, and the memory is connected to the processor via a circuit or wire.
[0040] Optionally, the chip also includes a communication interface.
[0041] In a fourth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor executes the method in the first aspect and any possible implementation thereof.
[0042] In a fifth aspect, the present application provides a computer program product, which includes: a computer program code, which, when executed on an electronic device, enables the electronic device to execute the method in the first aspect and any possible implementation thereof.
[0043] The technical effects obtained by the above-mentioned second, third, fourth and fifth aspects are similar to the technical effects obtained by the corresponding technical means in the above-mentioned first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1A A schematic diagram of a clone application is shown as an exemplary embodiment of the present application;
[0045] Figure 1B This is a schematic diagram of another avatar application shown as an exemplary embodiment of the present application;
[0046] Figure 2A This is a schematic diagram of a full-screen mode corresponding to a clone application shown in an exemplary embodiment of the present application;
[0047] Figure 2B A schematic diagram of mode switching shown in an exemplary embodiment of the present application;
[0048] Figure 2C This is a schematic diagram of a split-screen mode corresponding to a clone application shown in an exemplary embodiment of the present application;
[0049] Figure 2D This is a schematic diagram of a floating window mode corresponding to a clone application shown in an exemplary embodiment of the present application;
[0050] Figure 3 A schematic diagram of the hardware structure of an electronic device shown as an exemplary embodiment of the present application;
[0051] Figure 4 A schematic diagram of a flow chart of a method for adding a watermark provided in an embodiment of the present application;
[0052] Figure 5 A schematic diagram of a navigation method shown in an exemplary embodiment of the present application;
[0053] Fig. 6A This is an effect diagram of adding a watermark as shown in an exemplary embodiment of the present application;
[0054] Figure 6B This is another effect diagram of adding a watermark as shown in an exemplary embodiment of the present application;
[0055] Figure 6C This is another effect diagram of adding a watermark as shown in an exemplary embodiment of the present application;
[0056] Fig.6D This is another effect diagram of adding a watermark as shown in an exemplary embodiment of the present application;
[0057] Fig. 7A This is a watermark effect diagram shown in an exemplary embodiment of the present application;
[0058] Figure 7B Another watermarking effect diagram is shown as an exemplary embodiment of the present application;
[0059] Figure 7C This is another watermarking effect diagram shown in an exemplary embodiment of the present application;
[0060] Fig.7D This is another watermark effect diagram shown in an exemplary embodiment of the present application;
[0061] Fig. 7E This is another watermarking effect diagram shown in an exemplary embodiment of the present application;
[0062] Figure 8 A flowchart of another method for adding a watermark provided in an embodiment of the present application;
[0063] Fig. 9 A flowchart of another method for adding a watermark provided in an embodiment of the present application;
[0064] Fig.10 This is an effect diagram of adding a second watermark as shown in an exemplary embodiment of the present application;
[0065] Fig.11 This is another effect diagram of adding a second watermark as shown in an exemplary embodiment of the present application;
[0066] Fig.12 A schematic diagram of determining a watermark position is shown as an exemplary embodiment of the present application;
[0067] Fig.13 Another schematic diagram of determining a watermark position is shown as an exemplary embodiment of the present application;
[0068] Fig.14 This is another schematic diagram of determining a watermark position according to an exemplary embodiment of the present application;
[0069] Fig.15 This is another schematic diagram of determining a watermark position according to an exemplary embodiment of the present application;
[0070] Fig.16 A software structure block diagram of an electronic device shown as an exemplary embodiment of the present application;
[0071] Fig.17 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0072] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0073] In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0074] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0075] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0076] First, some terms in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
[0077] 1. Window
[0078] A window is an area of visual view displayed on the screen of an electronic device. In the Android system, each activity corresponds to a window, and all windows are presented by views. It should be understood that a tree-structured view composed of views can form the interface of an activity. Usually, windows in the Android system are divided into three types, namely application windows, subwindows and system windows.
[0079] Among them, the application window refers to the window corresponding to an Activity; the child window refers to the window that must be attached to a parent window; the system window refers to the window created by the system process, which does not depend on any application or is not attached to any parent window.
[0080] 2. View Tree
[0081] In the Android system, the View tree refers to a hierarchical structure composed of View objects. This hierarchy is used to describe the layout of the application interface and the relationship between elements; in other words, the View tree defines the parent-child relationship and layout rules between views.
[0082] The view tree starts with the root view, which is the top-level view on the entire screen of the electronic device. The root view can contain one or more subviews, each of which can be a container view or a terminal view.
[0083] Among them, the container view is a special type of view that can contain other views as its subviews. The container view determines the position and size of the subviews by setting different layout parameters and rules.
[0084] Terminal views are usually the final elements in the interface, such as buttons (Button), controls that display text content (TextView), controls that display images (ImageView), etc. Terminal views cannot contain other views, and they display actual user interface elements.
[0085] When laying out the application interface, the Android system places each view in the correct position according to the structure of the View tree.
[0086] In the embodiment of the present application, a watermark may be added to an application window (window of an application program) by operating the View tree.
[0087] 3. View Overlay mechanism
[0088] ViewOverlay is a class in Android that is used to add additional drawing content to a view hierarchy. It allows developers to overlay drawing on an existing view hierarchy without affecting the layout and interaction of the original view.
[0089] Through the ViewOverlay mechanism, developers can dynamically add drawing content to the view when the application is running, such as drawing graphics, drawing text, and adding animation effects. These contents will be displayed in the form of floating on the view and will not affect the original view's borders, position, touch events and other properties.
[0090] In the embodiment of the present application, the layer corresponding to the added watermark can be placed on top through the ViewOverlay mechanism.
[0091] 4. Window Manager Service (WMS)
[0092] WMS is a key service in the Android system. It is responsible for managing the display and layout of the interface / window, as well as handling events and interactions related to the interface / window.
[0093] For example, WMS is responsible for creating, displaying, updating, and destroying application windows, managing the hierarchical relationship, size, and position between application windows, and handling window switching and focus changes between multiple applications.
[0094] WMS ensures that each window is laid out and drawn in the correct order, taking into account the hierarchical relationship and layout parameters of the windows, ensuring that the windows are correctly displayed on the electronic device screen and complying with the user interface design specifications.
[0095] WMS is responsible for processing user interaction events related to windows, such as touch events, key events, and gesture events, etc. These events are passed to the corresponding window to realize the interaction between the user and the application.
[0096] WMS defines some window policies, such as full screen mode, split screen mode, resizing, floating window, and permission control, etc. It manages the behavior and style of windows according to the needs of applications and systems.
[0097] 5. Vendor Warehouse
[0098] In the embodiment of the present application, the Vendor warehouse is used by the vendor to store independently developed businesses, logic, etc.
[0099] 6. Gesture Navigation
[0100] Gesture navigation refers to mobile phone navigation that relies on gestures, which is different from traditional mobile phone navigation that relies on physical buttons or virtual buttons.
[0101] 7. Gesture navigation windows: multiple transparent windows added to the system of the electronic device to implement gesture navigation, which are respectively set on the left, right and bottom of the display interface of the electronic device.
[0102] The above is a brief introduction to the terms involved in the embodiments of the present application, which will not be repeated below.
[0103] With the rapid development of electronic technology, the popularity of electronic devices such as mobile phones and tablet computers is increasing, and they have become indispensable tools in people's daily life and work. And with the development of electronic devices, the application clone function is becoming more and more popular.
[0104] In daily life and work, users sometimes need to open a clone of an application in an electronic device to log in to multiple accounts of the application at the same time; or use the clone of the application as their own private application to improve data security, etc. In this case, multiple identical applications can be installed on electronic devices with the application clone function, bringing convenience to users in life and work.
[0105] The following embodiment of the present application takes the electronic device as a mobile phone (such as a folding screen mobile phone) as an example to illustrate the application clone function. Figure 1A and Figure 1B , Figure 1A This is a schematic diagram of a clone application shown as an exemplary embodiment of the present application. Figure 1B This is another schematic diagram of a clone application according to an exemplary embodiment of the present application. For example, when the display mode of the foldable screen mobile phone is the full screen mode, or when the foldable screen mobile phone is in the unfolded state, the main interface 101 is displayed, such as Figure 1A As shown; the main interface 101 may include icons of multiple applications, such as a music icon, a gallery icon, a WeChat icon, a parallel space icon 102, etc. Among them, the application indicated by the parallel space icon 102 is a multi-open application set, and the multi-open application set includes at least one clone application. In other words, the parallel space application indicated by the parallel space icon 102 is a multi-open application set program, and the parallel space application includes at least one clone application.
[0106] It is worth noting that the applications represented by the icons of multiple applications included in the main interface 101 are main applications, and the one or more applications included in the multi-application set (such as Parallel Space) are clone applications; among them, the clone application and the main application are the same applications that can run independently of each other.
[0107] For example, the user clicks / touches the parallel space icon 102, and the electronic device detects the user's click / touch operation on the parallel space icon 102, and displays the main interface 103 of the parallel space, such as Figure 1B As shown; the main interface 103 of the parallel space may include multiple clone application icons, such as music icons, gallery icons, WeChat icons, Weibo icons, etc. When the user wants to use a clone application, he clicks the icon corresponding to the clone application in the main interface 103 of the parallel space. After the electronic device detects the user's click / touch operation on the icon corresponding to the clone application, it starts and runs the clone application.
[0108] Exemplarily, the gallery application indicated by the gallery icon in the main interface 101 is the main application, and the gallery application indicated by the gallery icon in the main interface 103 of the parallel space is the clone application, and the two gallery applications are the same applications that can run independently of each other; the WeChat application indicated by the WeChat icon in the main interface 101 is the main application, and the WeChat application indicated by the WeChat icon in the main interface 103 of the parallel space is the clone application, and the two WeChat applications are the same applications that can run independently of each other; the same applies to other applications, which will not be repeated here.
[0109] Optionally, when the user wants to exit the Parallel Space application, the user can click / touch the exit control 104 in the upper right corner of the main interface 103; the electronic device detects the user's click / touch operation on the exit control 104, closes the Parallel Space application, and displays the following information: Figure 1A The main interface 101 is shown.
[0110] The application clone function brings convenience to the user's life and work, but it is precisely because in the application clone function, the clone application and the main application are two identical applications that can run independently of each other, which often leads to the situation that it is impossible to distinguish which is the clone application and which is the main application. In view of this, an embodiment of the present application provides a method for adding a watermark, which is applied to an electronic device. Through this method, a watermark can be added to the interface corresponding to the clone application, so as to quickly and accurately identify the clone application, thereby distinguishing the main application from the clone application.
[0111] It is worth noting that the clone application in the electronic device can have a variety of different display modes, such as full screen mode, split screen mode and floating window mode, etc. The method for adding watermarks provided in the embodiment of the present application can adaptively adjust the position and size of the watermark according to different display modes when adding a watermark to the interface corresponding to the clone application, thereby improving the user's visual experience while quickly and accurately identifying the clone application. And because the watermark is added to the interface corresponding to the clone application, the display content in the interface can be effectively protected, thereby improving the security of the clone application.
[0112] The following first describes the various different display modes of the clone application provided in the embodiments of the present application in conjunction with the accompanying drawings.
[0113] See also Figure 2A , Figure 2A This is a schematic diagram of the full-screen mode corresponding to the clone application shown in an exemplary embodiment of the present application. For example, the electronic device is a foldable screen mobile phone, and the clone application is a gallery application. For example, the foldable screen mobile phone is in the unfolded state, the display mode of the clone application is in the full-screen mode, and the user clicks / touches the Figure 1B After the electronic device detects the user's click / touch operation on the gallery icon, it starts and runs the gallery application and displays the following Figure 2A The main interface 201 of the gallery application is shown.
[0114] The gallery application main interface 201 also includes a mode switching control 202 , through which different display modes can be switched.
[0115] For example, see Figure 2B , Figure 2B FIG. 1 is a schematic diagram of a mode switching of an exemplary embodiment of the present application. For example, when a user clicks / touches Figure 2A The mode switching control 202 shown in FIG. 1 shows the electronic device. Figure 2B The main interface 203 of the gallery application is shown. Figure 2B As shown, in the main interface 203 of the gallery application, the area that originally displayed the mode switching control 202 displays a full-screen mode control 2021, a split-screen mode control 2022 and a floating window mode control 2023.
[0116] Among them, the full-screen mode control 2021 is used to switch the display mode of the clone application to the full-screen mode; the split-screen mode control 2022 is used to switch the display mode of the clone application to the split-screen mode; the floating window mode control 2023 is used to switch the display mode of the clone application to the floating window mode.
[0117] For example, the user clicks / touches the full screen mode control 21, and after the electronic device detects the user's click / touch operation on the full screen mode control 21, the electronic device displays the following: Figure 2A The main interface 201 of the gallery application is shown.
[0118] For example, see Figure 2C , Figure 2C This is a schematic diagram of the split-screen mode corresponding to the clone application shown in an exemplary embodiment of the present application. For example, the user clicks / touches Figure 2BAfter the electronic device detects the user's click / touch operation on the split-screen mode control 2022, the display mode of the gallery application is switched from the full-screen mode to the split-screen mode, and the display is shown as follows: Figure 2C The split screen interface 204 is shown.
[0119] It is worth noting that in split-screen mode, the display interface of the electronic device can display the interfaces of two clone applications, and both of these clone applications can be selected by the user. Figure 2C In the split screen interface 204 shown, the calculator application interface is displayed on the left, and the gallery application interface is displayed in parallel on the right.
[0120] For example, Figure 2C The split screen interface 204 shown in the figure also includes a split screen bar 205. In the split screen mode, the user can change the interface size of the two clone applications by dragging the split screen bar 205 to the left or right. For example, the user drags the split screen bar 205 to the right, and the electronic device responds to the user's drag operation to the right and expands the calculator application interface, and correspondingly, the gallery application interface displayed on the right is reduced. For another example, the user drags the split screen bar 205 to the left, and the electronic device responds to the user's drag operation to the left and expands the gallery application interface, and correspondingly, the calculator application interface displayed on the left is reduced.
[0121] For example, see Figure 2D , Figure 2D This is a schematic diagram of the floating window mode corresponding to the clone application shown in an exemplary embodiment of the present application. For example, the user clicks / touches Figure 2B After the electronic device detects the user's click / touch operation on the floating window mode control 2023, it switches the display mode of the gallery application from the full screen mode to the floating window mode, and displays the following Figure 2D The floating window 206 shown in FIG. 206 displays an interface corresponding to the gallery application.
[0122] The above describes the various display modes of the clone application provided in the embodiment of the present application. The method for adding a watermark provided in the embodiment of the present application can adaptively adjust the position and size of the watermark according to these different display modes, and add the watermark to the interface corresponding to the clone application in different display modes. In this way, not only can the clone application be identified quickly and accurately, but also the user's visual experience can be improved. And because a watermark is added to the interface corresponding to the clone application, the display content in the interface can be effectively protected, thereby improving the security of the clone application.
[0123] Before introducing in detail the method for adding watermarks provided in the embodiment of the present application, a brief introduction is first given to the electronic device and the structure of the electronic device in the embodiment of the present application.
[0124] The electronic device in the embodiments of the present application can be various types of mobile phones (such as foldable screen mobile phones, flat screen mobile phones, curved screen mobile phones, etc.), tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, handheld computers, laptops, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc., including touch screen devices. The embodiments of the present application do not impose any restrictions on the specific type and form of the electronic device.
[0125] The hardware structure of the electronic device involved in the embodiments of the present application is briefly introduced below with reference to the accompanying drawings.
[0126] See also Figure 3 , Figure 3 The figure is a schematic diagram of the hardware structure of an electronic device according to an exemplary embodiment of the present application.
[0127] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0128] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0129] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0130] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0131] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0132] In an embodiment of the present application, the processor 110 can perform the steps of identifying the display mode corresponding to the running clone application; determining the screen information corresponding to the clone application in the display mode; determining the watermark position according to the screen information; adding a first watermark to the interface corresponding to the clone application based on the watermark position, and placing the layer corresponding to the first watermark on top. For example, the processor 110 can run the software code of the method for adding watermarks provided in an embodiment of the present application, so as to be able to adaptively adjust the position and size of the watermark according to different display modes of the clone application.
[0133] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI) interface, a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0134] It is understandable that the interface connection relationship between the modules shown in this embodiment is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0135] The charging management module 140 is used to receive charging input from a charger. While the charging management module 140 is charging the battery 142 , it can also supply power to the electronic device 100 through the power management module 141 .
[0136] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. In some other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
[0137] The wireless communication function of the electronic device 100 can be implemented through components such as the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
[0138] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The structures of antenna 1 and antenna 2 in this embodiment are only examples. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0139] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 2G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0140] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0141] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0142] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS) and / or satellite based augmentation system (SBAS). It is understood that in the embodiments of the present application, the hardware module in the positioning or navigation system may be referred to as a positioning sensor.
[0143] The electronic device 100 can realize the display function through the GPU, the display screen 194 and the application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU can also be used to perform mathematical and posture calculations for graphics rendering, etc. The processor 110 may include one or more GPUs, which can generate or change display information by executing program instructions.
[0144] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In the embodiment of the present application, the electronic device 100 may include N display screens 294, where N is a positive integer greater than 1.
[0145] The display screen 194 of the electronic device 100 displays a control. A control is a GUI element, which is a software component included in an application program and controls all data processed by the application program and the interactive operations on the data. A user can interact with the control through direct manipulation to read or edit the relevant information of the application program. Generally speaking, a control may include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
[0146] In an embodiment of the present application, the display screen 194 can be used to display the interface of the main application, the interface of the clone application in different display modes, added watermarks, etc.
[0147] The display screen 194 in the embodiment of the present application may be a touch screen. A touch sensor 180K may be integrated in the display screen 194. The touch sensor 180K may also be referred to as a "touch panel". In other words, the display screen 194 may include a display panel and a touch panel, and the touch sensor 180K and the display screen 194 form a touch screen, also known as a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. After the touch operation detected by the touch sensor 180K, it can be passed to the upper layer by the driver of the kernel layer (such as the TP driver) to determine the type of touch event. Visual output related to the touch operation can be provided by the display screen 194. In other embodiments, the touch sensor 180K may also be arranged on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0148] In the embodiment of the present application, the touch sensor 180K detects the user's click / touch operation. For example, when the user touches the display screen 194, the touch sensor 180K detects the user's touch operation, which is passed to the upper layer by the kernel layer driver (such as the TP driver) to determine the type of touch event, such as clicking the icon corresponding to the clone application, the icon corresponding to the multi-open application set, etc. In response to the user's touch operation, the processor 110 provides visual output related to the touch operation through the display screen 194, such as the display screen 194 displays the interface of the clone application with a watermark added in different display modes.
[0149] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0150] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an APP required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc.
[0151] In addition, the internal memory 121 may include a high-speed random access memory; the internal memory 121 may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (Universal Flash Storage, UFS), etc.
[0152] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device 100 can also calculate the touch position based on the detection signal of the pressure sensor 180A. In some embodiments, acting on different touch positions but different touch durations can correspond to different operation instructions.
[0153] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally the x-axis, y-axis and z-axis). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. The acceleration sensor 180E can also be used to identify the posture of the electronic device 100 as an input parameter for applications such as horizontal and vertical screen switching and pedometers.
[0154] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0155] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize functions such as unlocking, accessing application locks, taking photos, and answering calls.
[0156] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0157] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
[0158] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, message, missed call, notification, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card may be connected to or disconnected from the electronic device 100 by inserting the SIM card interface 195 or pulling the SIM card interface 195 out. The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 may support Nano SIM card, Micro SIM card, SIM card, etc.
[0159] In addition, various types of operating systems are running on the above components. For example, Android system, IOS operating system, Symbian operating system, BlackBerry operating system, Linux operating system, Windows operating system, etc. This is only an exemplary description and is not limited to this. Different applications can be installed and run on these operating systems, such as main applications, clone applications, multi-open application collections, etc.
[0160] The method for adding a watermark provided in the embodiment of the present application can be implemented in the electronic device 100 having the above hardware structure.
[0161] The above briefly introduces the structure of the electronic device 100 involved in the embodiments of the present application. Figure 3 Taking the electronic device with the structure shown as an example, the method for adding watermarks provided in the embodiment of the present application is specifically described in combination with the accompanying drawings and application scenarios.
[0162] It should be understood that the method for adding watermarks provided in the embodiments of the present application is applicable to various types of mobile phones, such as folding screen mobile phones, flat screen mobile phones, curved screen mobile phones, etc., without limitation. The following embodiments are described by taking the electronic device being a folding screen mobile phone as an example.
[0163] See also Figure 4 , Figure 4 A schematic diagram of a method for adding a watermark provided in an embodiment of the present application. The method includes:
[0164] S11. Identify the display mode corresponding to the running clone application.
[0165] Exemplarily, the electronic device may include a main application and a clone application, where the clone application and the main application are the same application that can run independently of each other, or in other words, the clone application is a multiple-open application of the main application.
[0166] In the embodiment of the present application, the main application runs in the main space (also called the ordinary space) of the electronic device, and the icon corresponding to the main application is displayed in the main interface corresponding to the main space; Figure 1A In the main interface 101 shown, the gallery application indicated by the gallery icon is the main application.
[0167] The embodiment of the present application also provides a multi-application set, which includes at least one clone application. In the embodiment of the present application, the multi-application set can be a parallel space, which provides a running space for the clone application, and the icon corresponding to the clone application is displayed in the main interface corresponding to the parallel space; Figure 1B In the main interface 103 of the parallel space shown, the gallery application indicated by the gallery icon is a clone application.
[0168] Exemplarily, the display mode corresponding to the clone application may be any one of a full-screen mode, a split-screen mode, and a floating window mode.
[0169] The full screen mode means that the interface / window corresponding to the clone application occupies the entire screen space of the electronic device. For example, if the clone application is a gallery application, Figure 2A As shown, the display mode corresponding to the gallery application is full screen mode.
[0170] Split-screen mode means dividing the screen of an electronic device into multiple interfaces / windows, and supporting the simultaneous running of two or more applications in these interfaces / windows; at least one of the applications is a clone application. The applications running in each interface / window can be operated separately without affecting the functions of each application.
[0171] Take the clone application as an example, Figure 2C As shown, the display mode corresponding to the gallery application is split-screen mode.
[0172] Optionally, multiple interfaces / windows in the split-screen mode may be displayed side by side or one above the other, without limitation.
[0173] Optionally, the size of each interface / window in the split-screen mode can be adjusted. Exemplarily, the size of the entire screen of the electronic device is fixed, and in the split-screen mode, the size of the interface / window of one application is relative to the size of the interface / window of another application. If the interface / window of one application is enlarged, the interface / window of the other application will be reduced.
[0174] The floating window mode means that the interface / window corresponding to the clone application can be suspended on other interfaces / windows; among them, other interfaces / windows can be as follows Figure 1A The main interface 101 shown, Figure 1B The main interface 103 of the parallel space, interfaces / windows corresponding to other main applications, interfaces / windows corresponding to other clone applications, etc. are shown.
[0175] Take the clone application as an example, Figure 2D As shown, the display mode corresponding to the gallery application is the floating window mode; wherein, the interface / window corresponding to the gallery application is suspended above the main interface of the parallel space.
[0176] Exemplarily, the electronic device may include a window manager, or a window management service, which includes a multi-window management module; the multi-window management module is used to identify the display mode corresponding to the running clone application.
[0177] For example, the multi-window management module detects that there is only one interface / window on the screen of the current electronic device, and the size of the interface / window matches the size of the screen, then determines that the display mode corresponding to the running clone application is full-screen mode.
[0178] For another example, the multi-window management module detects that there are two interfaces / windows on the screen of the current electronic device, and the two interfaces / windows correspond to the same level, then determines that the display mode corresponding to the running clone application is the split-screen mode.
[0179] For another example, the multi-window management module detects that there are two interfaces / windows on the screen of the current electronic device, and the level corresponding to one of the interfaces / windows is higher than the level corresponding to the other interface / window, then determines that the display mode corresponding to the running clone application is the floating window mode.
[0180] Optionally, the unique identifiers (UID) of the main application and the clone application are different, and the electronic device can determine whether the currently running application is the main application or the clone application through the UID.
[0181] S12. Determine the screen information corresponding to the clone application in the display mode.
[0182] Exemplarily, the screen information may include the camera position of the electronic device, the navigation bar position, and the interface size of the clone application.
[0183] The camera of the electronic device is fixed, so the camera position is also fixed. It is understandable that when the user rotates the electronic device, the camera position will change relatively, such as rotating the camera position 90° clockwise, 270° clockwise (90° counterclockwise), etc.
[0184] It should be understood that the interface size of the clone application is related to the display mode corresponding to the clone application, and different display modes correspond to different interface sizes.
[0185] Exemplarily, the position of the navigation bar is determined by the navigation mode of the electronic device. In the embodiment of the present application, the navigation mode may include gesture navigation, three-button navigation (also known as three-key navigation in the screen), and the like.
[0186] Optionally, the user can select a preferred navigation method in the system of the electronic device. For example, open the settings in the system of the electronic device, then click on the accessibility function; enter the accessibility function, pull down and click on the system navigation method; in the system navigation method, click and select gesture navigation to turn on gesture navigation. The method of turning on three-button navigation is similar, so it will not be repeated here.
[0187] Exemplarily, the navigation bar position may include a left hot zone, a right hot zone, and a bottom hot zone, wherein the height of the bottom hot zone of the gesture navigation is smaller than the height of the bottom hot zone of the three-button navigation.
[0188] See also Figure 5 , Figure 5 FIG. 1 is a schematic diagram of a navigation method according to an exemplary embodiment of the present application. Figure 5 The gesture navigation shown in the figure may include a left hot zone 301, a right hot zone 302, and a bottom hot zone 303 for the corresponding navigation bar position; the three-button navigation may include a left hot zone 304, a right hot zone 305, and a bottom hot zone 306 for the corresponding navigation bar position. The height of the gesture navigation bottom hot zone 303 is less than the height of the three-button navigation bottom hot zone 306.
[0189] It should be understood that the window manager is responsible for managing the display and layout of the interface / window, as well as processing events and interactions related to the interface / window, so it can obtain the screen information corresponding to the clone application in the current display mode. For example, the window manager obtains the camera position and navigation mode in the electronic device system; determines the navigation bar position through the navigation mode; detects the display mode corresponding to the clone application through the multi-window management module, and determines the interface size of the clone application according to the display mode.
[0190] S13. Determine the watermark position according to the screen information.
[0191] Exemplarily, the electronic device may further include a watermark module. After the window manager obtains the screen information corresponding to the clone application in the current display mode, it passes the screen information to the watermark module by way of a function call; the watermark module obtains the screen information corresponding to the clone application in the display mode, and determines the watermark position according to the screen information.
[0192] S14. Based on the watermark position, add a first watermark to the interface corresponding to the clone application.
[0193] Exemplarily, the first watermark is added to the watermark position in the interface corresponding to the clone application. The layer corresponding to the first watermark is placed on top, so no matter whether the display mode corresponding to the clone application is full screen mode, split screen mode, or floating window mode, the first watermark can be suspended on the interface corresponding to the clone application, and will not affect the display of the interface corresponding to the clone application and the interaction with the clone application.
[0194] In this implementation, on the one hand, the related art does not add a watermark to the interface corresponding to the clone application. The method for adding a watermark provided in the embodiment of the present application adds a watermark to the interface corresponding to the clone application, which facilitates the rapid and accurate identification of the clone application through the watermark, thereby better distinguishing the main application from the clone application. And because a watermark is added to the interface corresponding to the clone application, when data is transmitted based on the interface, such as sending interface screenshots, interface screen recordings and other data, the added watermark can effectively protect the display content in the interface corresponding to the clone application, thereby improving the security of the clone application.
[0195] On the other hand, in the related art, when adding a watermark to the interface of the main application, no matter what the display mode of the main application is, the added watermark is only adapted to the interface of the main application in full-screen mode. In the method for adding a watermark provided in the embodiment of the present application, the screen information is determined according to the display mode corresponding to the clone application (full-screen mode, split-screen mode, or floating window mode), and the watermark position is determined according to the screen information, so that the determined watermark position matches the display mode; in other words, the watermark position can be adaptively adjusted according to different display modes; adding a watermark based on the watermark position can make the final added watermark adapt to the interface corresponding to the clone application, thereby improving the flexibility of adding watermarks and enhancing the user's visual experience. Moreover, the layer corresponding to the watermark is pinned to the top, so that the added watermark can be suspended above the interface corresponding to the clone application, which will not affect the display of the interface corresponding to the clone application and the interaction with the clone application, thus bringing a better user experience to the user.
[0196] The following is a diagram showing the effect of adding a watermark to the interface corresponding to the avatar application through the method for adding a watermark provided in an embodiment of the present application.
[0197] See also Fig. 6A , Fig. 6A This is a watermarking effect diagram shown in an exemplary embodiment of the present application. Fig. 6A As shown, the left side is the effect picture of adding the first watermark when the display mode is full screen mode and the navigation mode is gesture navigation; the right side is the effect picture of adding the first watermark when the display mode is full screen mode and the navigation mode is three-button navigation.
[0198] Since the height of the bottom hot zone of the gesture navigation is less than the height of the bottom hot zone of the three-button navigation, accordingly, the position of the first watermark is adaptively adjusted through the method for adding watermarks provided in the embodiment of the present application, such as Fig. 6A As shown, the positions of the two first watermarks are different.
[0199] It should be understood that the style of the first watermark can be set by the user according to actual needs. For example, the style of the first watermark can be "Parallel Space Power by MagicGuard" or "Parallel Space". When the style of the first watermark is "Parallel Space Power by MagicGuard", Parallel Space and Power by MagicGuard can be displayed in one line or in two lines, without limitation.
[0200] In this example, the style of the first watermark is "Parallel Space" as an example for explanation. Please refer to the first watermark shown in each figure for details. This is only an exemplary description and is not limited to this.
[0201] It is worth mentioning that Fig. 6A The electronic device shown is a flat screen mobile phone. It should be understood that it is only a schematic diagram and does not limit the type of electronic device. For example, when the display mode of a curved screen mobile phone is full screen mode and the navigation mode is gesture navigation or three-button navigation, the effect diagram of adding the first watermark is also as shown in FIG. Fig. 6A For another example, when the foldable screen mobile phone is in the folded state (for example, the foldable screen mobile phone is folded to the state of a flat screen mobile phone), and the navigation mode is gesture navigation or three-button navigation, the effect picture of adding the first watermark is also as shown in FIG. Fig. 6A shown.
[0202] See also Figure 6B , Figure 6B Another effect diagram of adding a watermark is shown in an exemplary embodiment of the present application. For example, the electronic device is a folding screen mobile phone, the folding screen mobile phone is in the unfolded state, the display mode is the full screen mode, and the navigation mode is gesture navigation. The effect diagram of adding the first watermark is as follows: Figure 6B It is worth noting that Figure 6B The effect diagram of adding watermarks shown is only a schematic diagram and does not limit the type of electronic device.
[0203] See also Figure 6C , Figure 6C Another effect diagram of adding a watermark is shown in an exemplary embodiment of the present application. For example, the electronic device is a folding screen mobile phone, the state of the folding screen mobile phone is the unfolded state, the display mode is the floating window mode, and the navigation mode is the gesture navigation. The effect diagram of adding the first watermark is as follows: Figure 6C Optionally, in this scenario, in addition to adding the first watermark to the interface corresponding to the floating window, a watermark may also be added to the interface below the floating window.
[0204] See also Fig.6D , Fig.6DThis is another effect diagram of adding a watermark as shown in an exemplary embodiment of the present application. For example, when the electronic device is a tablet, the display mode is full screen mode, and the navigation mode is gesture navigation, the effect diagram of adding the first watermark is as follows: Fig.6D shown.
[0205] The following takes the clone application as an example of a gallery application, and combines the accompanying drawings to show the effect of adding a watermark to the interface corresponding to the gallery application through the method of adding watermarks provided by the embodiment of the present application.
[0206] See also Fig. 7A , Fig. 7A This is a watermarking effect diagram shown in an exemplary embodiment of the present application. For example, the electronic device is a folding screen mobile phone, the folding screen mobile phone is in the unfolded state, the display mode corresponding to the gallery application is the full screen mode, and the navigation mode of the electronic device is gesture navigation. The effect diagram of adding the first watermark is as follows: Fig. 7A It is worth noting that Fig. 7A The effect diagram of adding watermarks shown is only a schematic diagram and does not limit the type of electronic device.
[0207] Optionally, when the display mode corresponding to the clone application is the split-screen mode, the first split-screen window and the second split-screen window are displayed on the screen of the electronic device; wherein the first split-screen window and the second split-screen window are displayed side by side, and the first split-screen window or the second split-screen window displays an interface with a first watermark added thereto. For example, if the first split-screen window displays the interface corresponding to the clone application, then the first watermark is added to the interface displayed in the first split-screen window; for another example, if the second split-screen window displays the interface corresponding to the clone application, then the first watermark is added to the interface displayed in the second split-screen window. This is only an exemplary description and is not limited to this.
[0208] See also Figure 7B , Figure 7B Another watermarking effect diagram is shown in an exemplary embodiment of the present application. For example, the electronic device is a folding screen mobile phone, the folding screen mobile phone is in the unfolded state, the display mode corresponding to the gallery application is the split screen mode, and the navigation mode of the electronic device is gesture navigation. The effect diagram of adding the first watermark is as follows: Figure 7B Among them, the gallery application corresponds to the first split-screen window, and the calculator application corresponds to the second split-screen window.
[0209] Optionally, when the display mode corresponding to the clone application is the split-screen mode, and another application running simultaneously with the clone application is also a clone application, a watermark is added to the interfaces displayed by the first split-screen window and the second split-screen window respectively.
[0210] For example, when the display mode corresponding to the gallery application is the split-screen mode, and another application running simultaneously with the gallery application is also a clone application, the first watermark can also be added to the interface corresponding to the other clone application.
[0211] See also Figure 7C , Figure 7C This is another watermarking effect diagram of an exemplary embodiment of the present application. For example, the electronic device is a folding screen mobile phone, the folding screen mobile phone is in the unfolded state, the display mode corresponding to the gallery application is the split screen mode, and another clone application running simultaneously with the gallery application is a calculator application. When the navigation mode of the electronic device is gesture navigation, the first watermark is added to the interface corresponding to the gallery application and the interface corresponding to the calculator application, respectively. Figure 7C shown.
[0212] It should be understood that in split-screen mode, if the interface / window of one application (main application or clone application) is enlarged, the interface / window of the other application (main application or clone application) will be reduced. In this case, the size of the added first watermark will also be adaptively adjusted with the size of the interface / window. For example, when the interface / window of a clone application is enlarged, the size of the first watermark added to it is enlarged; when the interface / window of a clone application is reduced, the size of the first watermark added to it is reduced.
[0213] See also Fig.7D , Fig.7D This is another watermarking effect diagram of an exemplary embodiment of the present application. For example, the electronic device is a folding screen mobile phone, the folding screen mobile phone is in the unfolded state, the display mode corresponding to the gallery application is the floating window mode, and the navigation mode of the electronic device is gesture navigation. A first watermark is added to the interface corresponding to the gallery application, such as Fig.7D shown.
[0214] Optionally, in the floating window mode, dragging the edge of the floating window can adjust the size of the floating window, that is, adjust the size of the interface corresponding to the gallery application. In this case, the size of the added first watermark will also be adaptively adjusted with the size of the interface.
[0215] See also Fig. 7E , Fig. 7E Another watermarking effect diagram is shown in an exemplary embodiment of the present application. For example, the electronic device is a folding screen mobile phone, the folding screen mobile phone is in the unfolded state, the display mode corresponding to the gallery application is the floating window mode, and the navigation mode of the electronic device is gesture navigation. When the size of the floating window is reduced, that is, the size of the interface corresponding to the gallery application is reduced, the size of the first watermark added to the interface corresponding to the gallery application is also reduced accordingly, such as Fig. 7E shown.
[0216] The method for adding watermarks provided in the embodiment of the present application can adaptively adjust the position and size of the watermark according to different display modes, so that the final added watermark can be adapted to the interface corresponding to the clone application, thereby improving the user's visual experience. In addition, the layer corresponding to the watermark is placed on top, so that the added watermark can be suspended above the interface corresponding to the clone application, without affecting the display of the interface corresponding to the clone application and the interaction with the clone application, thus providing users with a better user experience.
[0217] Optionally, in a possible implementation, the method for adding a watermark provided in the embodiment of the present application may further include, before identifying the display mode corresponding to the running clone application: detecting a first operation on the icon corresponding to the clone application; and starting the clone application in response to the first operation. Figure 8 , Figure 8 A flowchart of another method for adding a watermark provided in an embodiment of the present application. The method includes:
[0218] S21. Detecting a first operation on an icon corresponding to the clone application.
[0219] S22. In response to the first operation, start the clone application.
[0220] In one example, the first operation is used to start the clone application, and the first operation can be a click operation. Figure 1B Click on the corresponding icon of any clone application shown in the figure.
[0221] Optionally, the above description uses the example of a click operation as the first operation; in an embodiment of the present application, the first operation may also be an operation of starting a clone application through voice instructions, etc.; the present application does not impose any limitation on this.
[0222] Exemplarily, after the electronic device detects a first operation performed by a user on an icon corresponding to a clone application, it starts and runs the clone application in response to the first operation triggered by the user.
[0223] Optionally, in this example, the state of the foldable screen mobile phone can be an unfolded state or a folded state, for example, the foldable screen mobile phone is folded to the state of a flat screen mobile phone. Since only a click operation is performed on the icon corresponding to the clone application, the interface / window corresponding to the running clone application directly occupies the entire screen space of the electronic device; at this time, the display mode corresponding to the running clone application identified by the multi-window management module is full-screen mode.
[0224] In another example, the first operation may be a click operation and a rotation operation. For example, the user may click on the icon corresponding to any of the avatar applications, and then rotate the electronic device; or the user may first rotate the electronic device, and then click on the icon corresponding to any of the avatar applications. The rotation operation may include a 90° clockwise rotation, a 270° clockwise rotation (90° counterclockwise rotation), and the like.
[0225] Optionally, in this example, the state of the foldable screen mobile phone can be in an unfolded state or a folded state. Although the first operation is a click operation and a rotation operation, the display mode corresponding to the clone application is not switched, and the interface / window corresponding to the running clone application still directly occupies the entire screen space of the electronic device; at this time, the display mode corresponding to the running clone application identified by the multi-window management module is still full-screen mode.
[0226] In another example, the first operation may be a click operation and a display mode switching operation. For example, the user may click on an icon corresponding to any clone application, and then switch the display mode corresponding to the clone application. Figure 2A The mode switching control 202 shown in the figure switches different display modes. For example, the full screen mode control 2021 is used to switch the display mode of the clone application to the full screen mode; the split screen mode control 2022 is used to switch the display mode of the clone application to the split screen mode; and the floating window mode control 2023 is used to switch the display mode of the clone application to the floating window mode.
[0227] Optionally, in this example, the state of the foldable screen mobile phone can be in an unfolded state or a folded state. The first operation is a click operation and a display mode switching operation. Since the display mode corresponding to the clone application is adjusted, the display mode corresponding to the running clone application identified by the multi-window management module may be a full-screen mode, a split-screen mode, or a floating window mode.
[0228] S23. Identify the display mode corresponding to the running clone application.
[0229] S24. Determine the screen information corresponding to the clone application in the display mode.
[0230] S25. Determine the watermark position according to the screen information.
[0231] For the description of steps S23 to S25 in the embodiment of the present application, reference may be made to the description of steps S11 to S13 above, which will not be repeated here.
[0232] S26. Display the first main interface of the clone application, and add a first watermark to the first main interface based on the watermark position.
[0233] The first main interface of the clone application is the interface displayed when the clone application is started.
[0234] Exemplarily, the first watermark is added to the watermark position in the first main interface. The layer corresponding to the first watermark is placed on top, so no matter whether the display mode corresponding to the clone application is full screen mode, split screen mode, or floating window mode, the first watermark can be suspended on the first main interface of the clone application, and will not affect the display of the first main interface of the clone application and the interaction with the clone application.
[0235] It should be noted that the interface corresponding to the clone application in the above step S14 refers to any interface, which can be the first main interface of the clone application or other interfaces of the clone application during its operation.
[0236] In this implementation, on the one hand, the related art does not add a watermark to the interface corresponding to the clone application. The method for adding a watermark provided in the embodiment of the present application adds a watermark to the first main interface of the clone application, which is convenient for quickly and accurately identifying the clone application through the watermark when the clone application is started for the first time, so as to better distinguish the main application from the clone application. And because a watermark is added to the first main interface of the clone application, when data is transmitted based on the interface, such as sending interface screenshots, interface screen recordings and other data, the added watermark can effectively protect the display content in the first main interface of the clone application, thereby improving the security of the clone application.
[0237] On the other hand, in the related art, when adding a watermark to the interface of the main application, no matter what the display mode of the main application is, the added watermark is only adapted to the interface of the main application in full-screen mode. In the method for adding a watermark provided in the embodiment of the present application, the screen information is determined according to the display mode (full-screen mode, split-screen mode, or floating window mode) corresponding to the clone application, and the watermark position is determined according to the screen information, so that the determined watermark position matches the display mode; in other words, the watermark position can be adaptively adjusted according to different display modes; adding a watermark based on the watermark position can make the final added watermark adapt to the first main interface of the clone application, thereby improving the user's visual experience. Moreover, the layer corresponding to the watermark is pinned to the top, so that the added watermark can be suspended above the first main interface of the clone application, which will not affect the display of the first main interface of the clone application and the interaction with the clone application, thus bringing a better user experience to the user.
[0238] Optionally, in a possible implementation, the method for adding a watermark provided in the embodiment of the present application may further include steps S31 to S33 before identifying the display mode corresponding to the running avatar application. Fig. 9 , Fig. 9A flowchart of another method for adding a watermark provided in an embodiment of the present application.
[0239] S31. Detecting a second operation on icons corresponding to the multi-open application set.
[0240] Exemplarily, the multi-application set includes at least one clone application. In an embodiment of the present application, the multi-application set may be Parallel Space. It can be understood that the Parallel Space application is a multi-application set program, and the Parallel Space application includes at least one clone application.
[0241] For example, the second operation is used to start the multi-application set, and the second operation can be a click operation. Figure 1A Click the corresponding icon of the parallel space shown in the figure.
[0242] Optionally, the above description uses the example of the second operation being a click operation; in an embodiment of the present application, the second operation may also be an operation of starting a multi-application set through voice instructions, etc.; the present application does not impose any limitation on this.
[0243] S32. In response to the second operation, start and run a set of multiple applications.
[0244] Exemplarily, after the electronic device detects the user's second operation on the icon corresponding to the multi-application set (such as the icon corresponding to Parallel Space), it responds to the second operation triggered by the user to start and run the multi-application set (such as Parallel Space).
[0245] S33. Display the second main interface of the multi-application set and add a second watermark to the second main interface.
[0246] The second main interface of the multi-application set is the interface displayed when the multi-application set is started.
[0247] For example, the user clicks / touches Figure 1A The electronic device detects the user's click / touch operation on the parallel space icon 102 and displays the main interface 103 of the parallel space (i.e., the second main interface of the parallel space), such as Figure 1B As shown; the main interface 103 of the parallel space may include icons of multiple clone applications, such as music icons, gallery icons, WeChat icons, Weibo icons, etc.
[0248] Exemplarily, the method for determining the watermark position of the second watermark can refer to the method for determining the watermark position of the first watermark, which will not be repeated here. The second watermark is added to the second main interface, and the layer corresponding to the second watermark is pinned to the top. Therefore, regardless of whether the display mode corresponding to the multi-application set (such as Parallel Space) is full-screen mode, split-screen mode, or floating window mode, the second watermark can be suspended above the second main interface corresponding to the multi-application set (such as Parallel Space), and will not affect the display of the second main interface and the interaction with the multi-application set (such as Parallel Space), etc., giving users a better user experience.
[0249] In this implementation, a watermark is added to the second main interface of the multi-application collection, so that when the multi-application collection is launched for the first time, the watermark can be used to quickly determine that the user has entered the multi-application collection, reminding the user to click the icon in the second main interface to start and run the clone application.
[0250] The following takes a parallel space of a multi-application collection as an example, and combines the accompanying drawings to show the effect of adding a watermark to the second main interface of the multi-application collection through the method of adding watermarks provided in an embodiment of the present application.
[0251] See also Fig.10 , Fig.10 This is an effect diagram of adding a second watermark as shown in an exemplary embodiment of the present application. For example, the electronic device is a folding screen mobile phone, the folding screen mobile phone is in the unfolded state, the multi-open application set is a parallel space, the display mode is the full screen mode, and the navigation mode of the electronic device is gesture navigation. The effect diagram of adding a second watermark to the second main interface of the parallel space is as follows: Fig.10 It is worth noting that Fig.10 The effect diagram of adding the second watermark is only a schematic diagram and does not limit the type and display mode of the electronic device.
[0252] It is worth noting that the style of the second watermark can be set by the user according to actual needs, and the style of the second watermark can be the same as or different from the style of the first watermark. In the embodiment of the present application, the style of the second watermark is the same as the style of the first watermark, which is only an exemplary description and is not limited to this.
[0253] Optionally, when the display mode corresponding to the clone application is a floating window mode, a second main interface and a floating window with a second watermark added thereto are displayed on the screen of the electronic device.
[0254] Among them, the floating window floats on the second main interface; the second main interface is the main interface of a multi-application collection (such as Parallel Space); the floating window displays the interface corresponding to the clone application with the first watermark added.
[0255] In this implementation, on the one hand, a watermark is added to the second main interface of the multi-application set, so that when the multi-application set is started for the first time, the user can quickly determine that the multi-application set has been entered through the watermark, and remind the user to click the icon in the second main interface to start and run the clone application. On the other hand, a watermark is added to the interface corresponding to the clone application, so that the clone application can be quickly and accurately identified through the watermark, so as to better distinguish the main application from the clone application. And through the method of adding watermarks provided in the embodiment of the present application, a suitable watermark can be added to the interface of the clone application in the floating window mode, which improves the flexibility of adding watermarks and enhances the user's visual experience.
[0256] See also Fig.11 , Fig.11 This is another effect diagram of adding a second watermark as shown in an exemplary embodiment of the present application. For example, the electronic device is a folding screen mobile phone, the folding screen mobile phone is in the unfolded state, the multi-open application set is a parallel space, the display mode corresponding to the clone application (such as the gallery application) is the floating window mode, and the navigation mode of the electronic device is gesture navigation. A second watermark is added to the second main interface of the parallel space, and a first watermark is added to the interface corresponding to the gallery application, such as Fig.11 As shown, the corresponding interface of the gallery application is suspended above the second main interface of the parallel space.
[0257] Optionally, in a possible implementation, when the display mode corresponding to the clone application is a floating window mode, and the floating window just floats on the second watermark added to the second main interface, the second watermark is covered by the floating window. For the user, the interface corresponding to the clone application with the first watermark added can be seen, but the second watermark added to the second main interface cannot be seen.
[0258] Optionally, in another possible implementation, when the display mode corresponding to the clone application is the floating window mode, the second watermark may not be added to the second main interface of the multi-application set (such as Parallel Space).
[0259] Optionally, as an example of the present application, a specific implementation of the above step S14 may include S141 and S142, as follows.
[0260] S141: The layer corresponding to the first watermark is placed on top through a view overlay mechanism.
[0261] In the embodiment of the present application, the view overlay mechanism can be used to add additional drawing content (i.e., the first watermark) to the interface corresponding to the clone application. For example, by calling the class corresponding to the view overlay mechanism, the layer corresponding to the first watermark is placed on top. At this time, the layer corresponding to the first watermark is above the interface corresponding to the clone application.
[0262] S142: Add the top layer to the watermark position in the corresponding interface of the clone application through the view tree.
[0263] The view tree is a hierarchical structure, which can be used to describe the hierarchical structure between the interface corresponding to the clone application and the layer corresponding to the first watermark in the embodiment of the present application.
[0264] Exemplarily, the hierarchical structure between the interface corresponding to the clone application and the layer corresponding to the first watermark is determined through the view tree, for example, it is determined that the layer corresponding to the first watermark has a higher level than the layer corresponding to the interface corresponding to the clone application. The window manager places the interface corresponding to the clone application and the layer corresponding to the first watermark in the correct position according to the determined hierarchical structure. For example, the top layer is added to the watermark position in the interface corresponding to the clone application.
[0265] In this implementation, the layer corresponding to the first watermark can be pinned to the top through the view overlay mechanism, and then the pinned layer can be added to the watermark position in the corresponding interface of the clone application through the view tree. On the one hand, the related art does not add a watermark to the interface corresponding to the clone application. The method for adding a watermark provided in the embodiment of the present application adds a watermark to the interface corresponding to the clone application, which is convenient for quickly and accurately identifying the clone application through the watermark, so as to better distinguish the main application from the clone application. On the other hand, regardless of whether the display mode corresponding to the clone application is full-screen mode, split-screen mode, or floating window mode, the first watermark can be suspended above the interface of the clone application, and will not affect the display of the interface of the clone application and the interaction with the clone application.
[0266] Optionally, the method for adding watermarks provided in the embodiment of the present application can also use the view overlay mechanism to put the layer corresponding to the second watermark on top; and add the layer corresponding to the second watermark on top to the second main interface of the multi-open application set through the view tree. The specific implementation method can refer to the description in the above steps S141 and S142, which will not be repeated here.
[0267] Optionally, in a possible implementation, the method for adding a watermark provided in the embodiment of the present application may further include step S41 and step S42 before determining the watermark position according to the screen information.
[0268] S41. Obtain display content in the interface corresponding to the clone application.
[0269] Exemplarily, the electronic device may further include a watermark module. The window manager obtains the display content in the interface corresponding to the clone application, and then passes the display content to the watermark module by way of a function call; after the watermark module obtains the display content, it determines whether to add a first watermark to the interface corresponding to the clone application according to the display content.
[0270] S42: When the displayed content meets the preset conditions, determine to add a first watermark to the interface corresponding to the clone application.
[0271] The preset condition may include that the displayed content is not advertising content and is not game content.
[0272] Optionally, the preset condition may further include that the displayed content is not advertisement content, is not game content, and is not e-book content.
[0273] Exemplarily, when the displayed content does not meet the preset conditions, it is determined not to add the first watermark to the interface corresponding to the clone application, and the entire process ends without further performing the steps of determining the watermark position according to the screen information and the subsequent steps. When it is detected that the displayed content in the interface corresponding to the clone application changes, step S41 and step S42 are performed again.
[0274] For example, when the displayed content is advertising content, game content, or e-book content, in order to improve the user experience and save power consumption of the electronic device, there is no need to add the first watermark to these displayed contents. At this time, it is determined not to add the first watermark to the interface corresponding to the clone application.
[0275] When the displayed content meets the preset conditions, it is determined to add the first watermark to the interface corresponding to the clone application. For example, when the displayed content does not belong to advertising content and does not belong to game content, or when the displayed content does not belong to advertising content, does not belong to game content, and does not belong to e-book content, it is determined to add the first watermark to the interface corresponding to the clone application, and then steps S13 and 14 are executed.
[0276] In this implementation, it is determined whether to add the first watermark to the interface corresponding to the clone application according to the displayed content; when the displayed content does not meet the preset conditions, it is determined not to add the first watermark to the interface corresponding to the clone application, which can improve the user experience and save the power consumption of the electronic device. When the displayed content meets the preset conditions, it is determined to add the first watermark to the interface corresponding to the clone application, and the clone application can be quickly and accurately identified through the added watermark, so as to better distinguish the main application from the clone application.
[0277] Optionally, in a possible implementation, the method for adding a watermark provided in the embodiment of the present application may further include step S51 and step S52 before determining the watermark position according to the screen information.
[0278] S51. Determine the watermark size of the first watermark according to the interface size of the clone application.
[0279] Exemplarily, the window manager obtains the interface size of the clone application, and then passes the interface size to the watermark module through a function call; after the watermark module obtains the interface size, it determines the watermark size of the first watermark according to the interface size.
[0280] In a possible implementation, the watermark size of the first watermark may be set to a fixed size, and the fixed size may be applicable to an interface corresponding to the clone application in any display mode.
[0281] In another possible implementation, the ratio between the interface size of the clone application and the watermark size of the first watermark is preset, and the specific ratio can be set and adjusted according to actual conditions, and there is no limitation on this. When the watermark module obtains the interface size, it reduces the interface size according to the ratio to obtain the watermark size of the first watermark.
[0282] In this implementation, the interface size of the clone application is determined by the display mode of the clone application. Determining the watermark size of the first watermark according to the interface size of the clone application is equivalent to determining the watermark size of the first watermark according to the display mode of the clone application. It realizes adaptive adjustment of the watermark size according to different display modes, so that the finally added watermark can be adapted to the interface size corresponding to the clone application, thereby improving the user visual experience.
[0283] S52: Construct a watermark pattern of a first watermark.
[0284] Exemplarily, the electronic device may further include a view module, the view module being used to construct a watermark pattern of the first watermark, wherein the watermark pattern may include at least one of the text, color, transparency, font, font size, pattern, quantity, etc. of the watermark.
[0285] For example, the user can input the watermark text, color, transparency, font, font size, pattern, quantity and other information in the electronic device according to his or her preferences and needs. After the view module obtains this information, it constructs the first watermark that conforms to these watermark styles.
[0286] Optionally, in a possible implementation, when constructing the watermark style of the first watermark, the constructed watermark style of the first watermark may be displayed in real time in the interface of the electronic device for user review, so that the user can adjust the watermark style of the first watermark in time.
[0287] After constructing the watermark style of the first watermark, execute steps S13 and S14. It is worth noting that when executing step S14, that is, adding the first watermark to the interface corresponding to the avatar application based on the watermark position, the size of the added first watermark is the watermark size determined in step S51, and the style of the first watermark is the watermark style determined in step S52.
[0288] In this implementation, watermark styles are constructed according to user preferences and needs, which increases the diversity of watermark styles and improves user experience.
[0289] Optionally, in a possible implementation, before adding the second watermark to the second main interface, the watermark size of the second watermark can be determined according to the interface size of the clone application, and the watermark style of the second watermark can be constructed. The specific implementation method can be referred to the description in step S51 and step S52, which will not be repeated here.
[0290] Optionally, as an example of the present application, the specific implementation method of the above step S13 may include: in the display mode, determining the watermark position based on the interface size of the clone application, the watermark size, the camera position and the navigation bar position.
[0291] Exemplarily, the navigation bar position may include a left hot zone, a right hot zone, and a bottom hot zone. Determine the camera area according to the camera position; calculate the first distance based on the interface size of the clone application, the watermark size, and the left hot zone; calculate the second distance based on the interface size of the clone application, the watermark size, and the camera area; calculate the third distance based on the right hot zone; calculate the fourth distance based on the bottom hot zone; determine the watermark position based on the first distance, the second distance, the third distance, and the fourth distance.
[0292] See also Fig.12 , Fig.12 The present invention is a schematic diagram of determining a watermark position according to an exemplary embodiment of the present invention. Fig.12 In the scenario shown, when the electronic device is a foldable screen mobile phone, Fig.12 The screen of the electronic device shown is a folding screen outer screen; when the electronic device is a flat screen mobile phone, Fig.12 The screen of the electronic device shown is a flat screen; in this scenario, the navigation mode of the electronic device is gesture navigation, and the display mode of the clone application is full-screen mode.
[0293] like Fig.12 As shown in the figure, the lower boundary of the camera area is determined based on the tangent line drawn through the camera. The tangent line is parallel to the upper boundary of the interface of the clone application. The camera area is composed of the upper boundary, left boundary, right boundary and the tangent line of the interface of the clone application. It should be understood that this is only an example. You can also set the size of the camera area by yourself, just include the camera. For example, the camera distance can be Fig.12 The one shown is longer.
[0294] Exemplarily, the watermark area is determined by the watermark size. It should be understood that the larger the watermark size, the larger the watermark area; the smaller the watermark size, the smaller the watermark area.
[0295] The first distance represents the distance between the left border of the watermark area and the right border of the left hot zone; the second distance represents the distance between the upper border of the watermark area and the lower border of the camera area; the third distance represents the distance between the right border of the watermark area and the left border of the right hot zone, or in other words, the third distance is the width of the right hot zone; the fourth distance represents the distance between the lower border of the watermark area and the upper border of the bottom hot zone, or in other words, the fourth distance is the height of the bottom hot zone.
[0296] The width of the left hot zone, the right hot zone, and the height of the bottom hot zone can be set and adjusted according to actual conditions. For example, the width of the left hot zone can be set to 24 device independent pixels (dp); the width of the right hot zone, i.e., the third distance, can be set to 24dp; and the height of the bottom hot zone, i.e., the fourth distance, can be set to 38dp. This is only an exemplary description and is not limited to this.
[0297] For example, the interface size of the clone application is known, and the first distance is obtained by subtracting the third distance from the width of the interface size, the width of the watermark area, and the width of the left hot zone; the second distance is obtained by subtracting the fourth distance from the height of the interface size, the height of the watermark area, and the camera distance; the third distance is the width of the right hot zone; and the fourth distance is the height of the bottom hot zone. The watermark position can be determined based on the calculated first distance, second distance, third distance, and fourth distance.
[0298] Optionally, when the user rotates the electronic device, the position of the camera may change relatively; Fig.12 As shown, the camera position rotates 90° clockwise, 270° clockwise (90° counterclockwise), etc. Correspondingly, the watermark position will also be adaptively adjusted with the rotation operation. The method of determining the watermark position in this scenario is similar to the method of determining the watermark position when the electronic device is used vertically, and will not be repeated here.
[0299] It is worth noting that when the display mode of the cloned application is split-screen mode, the watermark position can be determined by considering the boundary of the corresponding interface of another application. Figure 7C As shown, to determine the watermark position of the first watermark of the corresponding interface of the gallery application, it is necessary to calculate the distance between the left boundary of the first watermark area and the right boundary of the corresponding interface of the calculator application. The remaining distance calculation methods can refer to the above description and will not be repeated here.
[0300] When the display mode of the clone application is the floating window mode, the watermark position can be determined by considering the size of the floating window and the top indicator bar area and the bottom indicator bar area in the floating window. Fig.7DAs shown, to determine the watermark position of the first watermark of the corresponding interface of the gallery application, it is not necessary to consider the camera position and the navigation bar position, and it can be obtained by calculating according to the size of the floating window, the top indicator bar area and the bottom indicator bar area. Among them, the top indicator bar area refers to the area at the top of the floating window containing long strip controls, and the bottom indicator bar area refers to the area at the bottom of the floating window containing long strip controls.
[0301] See also Fig.13 , Fig.13 Another schematic diagram of determining a watermark position is shown as an exemplary embodiment of the present application. Fig.13 The scene shown is similar to Fig.12 The difference between the scenarios shown is that Fig.12 In the scenario shown, the navigation mode of the electronic device is gesture navigation. Fig.13 The navigation mode of the electronic device in the scene shown is three-button navigation. It should be noted that the height of the bottom hot zone of the gesture navigation is less than the height of the bottom hot zone of the three-button navigation. The method of determining the watermark position in this embodiment can refer to Fig.12 The description in the corresponding embodiments will not be repeated here.
[0302] It should be understood that when the display mode of the clone application is split screen mode or floating window mode, the method for determining the watermark position can refer to Fig.12 The description in the corresponding embodiments will not be repeated here.
[0303] See also Fig.14 , Fig.14 This is another schematic diagram of determining a watermark position according to an exemplary embodiment of the present application. Fig.14 In the scenario shown, when the electronic device is a foldable screen mobile phone, Fig.14 The screen of the electronic device shown is the inner screen of the folding screen, and the state of the folding screen mobile phone is the unfolded state; in this scenario, the navigation mode of the electronic device is gesture navigation, and the display mode of the clone application is full-screen mode.
[0304] The method for determining the watermark position in this implementation can refer to Fig.12 The description of the corresponding embodiment will not be repeated here. It should be understood that when the display mode of the clone application is split screen mode or floating window mode, the method for determining the watermark position can refer to Fig.12 The description in the corresponding embodiments will not be repeated here.
[0305] Optionally, when the navigation mode of the electronic device is three-button navigation, the method for determining the watermark position can refer to Fig.13 The description in the corresponding embodiments will not be repeated here.
[0306] See also Fig.15 , Fig.15FIG. 1 is another schematic diagram of determining a watermark position according to an exemplary embodiment of the present application. Fig.15 As shown, the navigation method of the electronic device in the scene shown on the left is gesture navigation, which is different from Fig.12 The difference between the scenes shown is that an indicator bar area is added at the bottom of the interface of the clone application. When determining the watermark position, the height of the indicator bar area needs to be considered when calculating the fourth distance. For other calculation methods and applicable scenarios (such as rotating the electronic device, the display mode of the clone application is split-screen mode, floating window mode, etc.), please refer to Fig.12 The description in the corresponding embodiments will not be repeated here.
[0307] like Fig.15 As shown, the navigation mode of the electronic device in the scene shown on the right is three-button navigation, which is different from Fig.13 The difference between the scenes shown is that an indicator bar area is added at the bottom of the interface of the clone application. When determining the watermark position, the height of the indicator bar area needs to be considered when calculating the fourth distance. For other calculation methods and applicable scenarios (such as rotating the electronic device, the display mode of the clone application is split-screen mode, floating window mode, etc.), please refer to Fig.13 The description in the corresponding embodiments will not be repeated here.
[0308] It is worth noting that the watermark positions in the various figures provided in this application are for exemplary purposes only. For example, the watermark position can also be in the upper left corner, upper right corner, lower left corner, center, etc. of the interface of the clone application, without limitation.
[0309] The following is a brief introduction to the software structure involved in the embodiment of this application. Fig.16 , Fig.16 The software structure block diagram of an electronic device shown in an exemplary embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the electronic device 100 is an Android system as an example for explanation. In the embodiment of the present application, the Android system is divided into an application layer and an application framework layer.
[0310] The application layer can include a series of application packages. The application layer can include the main application and a collection of multiple applications. Fig.16 As shown, in the embodiment of the present application, the application program layer may include a parallel space application. The parallel space application may include a parallel space application startup module and a parallel space application watermark module.
[0311] Among them, the parallel space application startup module is used to respond to the user's first operation; the parallel space application watermark module can be used to display the interface corresponding to the clone application with the first watermark added.
[0312] The application framework layer may include a window manager and a vendor repository.
[0313] The window manager, or window management service, includes a multi-window management module; the multi-window management module is used to identify the display mode corresponding to the running clone application.
[0314] In the embodiment of the present application, the Vendor warehouse is used by the vendor to store independently developed services, logic, etc. The Vendor warehouse may include a watermark module and a view module.
[0315] Among them, the watermark module is used to obtain the screen information corresponding to the clone application in the display mode, and determine the watermark position according to the screen information.
[0316] The view module is used to construct the watermark style of the first watermark and the watermark style of the second watermark.
[0317] The following describes the process of the method for adding watermarks provided by the present application in combination with the software structure of the electronic device, as follows:
[0318] S101: A user triggers a first operation.
[0319] For example, the first operation may be a click operation; or the first operation may be a click operation and a rotation operation; or the first operation may be a click operation and a display mode switching operation. The specific implementation method of the user triggering the first operation can refer to the description in the above steps S21 and S22, which will not be repeated here.
[0320] S102: The window manager identifies a display mode corresponding to the running clone application.
[0321] Please refer to the description in the above step S11, which will not be repeated here.
[0322] S103: The watermark module determines to add a first watermark to the interface corresponding to the clone application.
[0323] Please refer to the description in the above step S41 and step S42, which will not be repeated here.
[0324] S104: The view module constructs a watermark style of the first watermark.
[0325] Please refer to the description in the above step S51 and step S52, which will not be repeated here.
[0326] S105. The watermark module determines the screen information corresponding to the clone application in the display mode.
[0327] S106: The watermark module determines the watermark position according to the screen information.
[0328] S107. The window manager adds a first watermark to the interface corresponding to the clone application based on the watermark position.
[0329] The description of steps S105 to S107 in the embodiment of the present application can refer to the description of steps S12 to S14 above, which will not be repeated here.
[0330] S108. The parallel space application watermark module displays the interface corresponding to the clone application with the first watermark added.
[0331] Exemplarily, the window manager may also realize displaying the interface corresponding to the clone application with the first watermark added thereto, and the parallel space application watermark module realizes displaying the interface corresponding to the clone application with the first watermark added thereto within the parallel space application.
[0332] In this implementation, on the one hand, the related art does not add a watermark to the interface corresponding to the clone application. The method for adding a watermark provided in the embodiment of the present application adds a watermark to the interface corresponding to the clone application, which facilitates the rapid and accurate identification of the clone application through the watermark, thereby better distinguishing the main application from the clone application. And because a watermark is added to the interface corresponding to the clone application, when data is transmitted based on the interface, such as sending interface screenshots, interface screen recordings and other data, the added watermark can effectively protect the display content in the interface corresponding to the clone application, thereby improving the security of the clone application.
[0333] On the other hand, in the related art, when adding a watermark to the interface of the main application, no matter what the display mode of the main application is, the added watermark is only adapted to the interface of the main application in full-screen mode. In the method for adding a watermark provided in the embodiment of the present application, the screen information is determined according to the display mode corresponding to the clone application (full-screen mode, split-screen mode, or floating window mode), and the watermark position is determined according to the screen information, so that the determined watermark position matches the display mode; in other words, the watermark position can be adaptively adjusted according to different display modes; adding a watermark based on the watermark position can make the final added watermark adapt to the interface corresponding to the clone application, thereby improving the flexibility of adding watermarks and enhancing the user's visual experience. Moreover, the layer corresponding to the watermark is pinned to the top, so that the added watermark can be suspended above the interface corresponding to the clone application, which will not affect the display of the interface corresponding to the clone application and the interaction with the clone application, thus bringing a better user experience to the user.
[0334] The above describes in detail an example of a method for adding a watermark provided by an embodiment of the present application. It is understandable that, in order to implement the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.
[0335] The embodiment of the present application can divide the functional modules of the electronic device according to the above method example. For example, each function can be divided into various functional modules, such as an identification unit, a first determination unit, a second determination unit, an adding unit, etc., or two or more functions can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0336] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0337] The electronic device provided in this embodiment is used to execute the above-mentioned method of adding watermarks, and thus can achieve the same effect as the above-mentioned implementation method.
[0338] In the case of an integrated unit, the electronic device may further include a processing module, a storage module and a communication module. The processing module may be used to control and manage the actions of the electronic device. The storage module may be used to support the electronic device to execute stored program codes and data, etc. The communication module may be used to support the electronic device to communicate with other devices.
[0339] Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, a WiFi chip, etc.
[0340] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device involved in this embodiment may be a Figure 3 Device of the structure shown.
[0341] The embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor executes the method for adding a watermark in any of the above embodiments.
[0342] The embodiment of the present application further provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the method for adding a watermark in the above-mentioned embodiment.
[0343] The present application also provides a chip. Fig.17 , Fig.17 A schematic diagram of the structure of a chip provided in an embodiment of the present application. Fig.17 The chip shown can be a general-purpose processor or a dedicated processor. The chip includes a processor 210. The processor 210 is used to execute the method for adding watermarks in any of the above embodiments.
[0344] Optionally, the chip further includes a transceiver 220, which is used to accept control of the processor and to support the communication device in executing the technical solution shown above.
[0345] Optional, Fig.17 The chip shown may further include: a storage medium 230 .
[0346] It should be noted that Fig.17 The chip shown can be implemented using the following circuits or devices: one or more field programmable gate arrays (FPGAs), programmable logic devices (PLDs), controllers, state machines, gate logic, discrete hardware components, any other suitable circuits, or any combination of circuits that can perform the various functions described throughout this application.
[0347] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.
[0348] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0349] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0350] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0351] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0352] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0353] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for adding a watermark, characterized in that: Applied to an electronic device, the electronic device includes a main application and a clone application, the clone application and the main application are the same application that can run independently of each other, the method includes: Identify a display mode corresponding to the running clone application, where the display mode is any one of a full-screen mode, a split-screen mode, and a floating window mode; Determine screen information corresponding to the clone application in the display mode, the screen information including a camera position and a navigation bar position of the electronic device and an interface size of the clone application; Determine the watermark position according to the screen information; Based on the watermark position, a first watermark is added to the interface corresponding to the clone application, and the layer corresponding to the first watermark is placed on top.
2. The method according to claim 1, characterized in that Before identifying the display mode corresponding to the running clone application, the method further includes: Detecting a first operation on an icon corresponding to the clone application; In response to the first operation, starting the clone application; The adding a first watermark on the interface corresponding to the clone application based on the watermark position includes: The first main interface of the clone application is displayed, and based on the watermark position, the first watermark is added to the first main interface.
3. The method according to claim 1, characterized in that The electronic device includes a set of multiple open applications, the set of multiple open applications includes at least one of the clone applications, and before identifying a display mode corresponding to the running clone application, the method further includes: Detecting a second operation on an icon corresponding to the set of multiple open applications; In response to the second operation, starting and running the multi-application set; The second main interface of the multi-application set is displayed, a second watermark is added to the second main interface, and the layer corresponding to the second watermark is pinned to the top.
4. The method according to claim 3, characterized in that When the display mode is the floating window mode, the method further includes: A second main interface and a floating window added with the second watermark are displayed, wherein the floating window floats on the second main interface, and the floating window displays an interface added with the first watermark.
5. The method according to any one of claims 1 to 4, characterized in that: When the display mode is the split-screen mode, the method further includes: A first split-screen window and a second split-screen window are displayed, wherein the first split-screen window and the second split-screen window are displayed side by side, and an interface with the first watermark added thereto is displayed in the first split-screen window or the second split-screen window.
6. The method according to any one of claims 1 to 5, characterized in that: The adding a first watermark on the interface corresponding to the clone application based on the watermark position includes: By using a view overlay mechanism, the layer corresponding to the first watermark is placed on top; Through the view tree, the top layer is added to the watermark position in the corresponding interface of the clone application.
7. The method according to any one of claims 1 to 6, characterized in that: Before determining the watermark position according to the screen information, the method further includes: Obtaining the display content in the interface corresponding to the clone application; When the displayed content meets the preset condition, it is determined to add the first watermark to the interface corresponding to the clone application.
8. The method according to claim 7, characterized in that The preset condition includes that the displayed content is not advertisement content and is not game content.
9. The method according to any one of claims 1 to 8, characterized in that Before determining the watermark position according to the screen information, the method further includes: Determining a watermark size of the first watermark according to an interface size of the avatar application; A watermark style of a first watermark is constructed, wherein the watermark style includes at least one of text, color, transparency, and font.
10. The method according to claim 9, characterized in that The step of determining the watermark position according to the screen information includes: In the display mode, the watermark position is determined based on the interface size of the clone application, the watermark size, the camera position and the navigation bar position.
11. The method according to claim 10, characterized in that The navigation bar position is determined by the navigation mode of the electronic device, which includes gesture navigation and three-button navigation. The navigation bar position includes a left hot zone, a right hot zone and a bottom hot zone. The height of the gesture navigation bottom hot zone is smaller than the height of the three-button navigation bottom hot zone.
12. An electronic device, characterized in that: include: one or more processors; one or more memories; The memory stores one or more programs, and when the one or more programs are executed by the processor, the electronic device executes the method according to any one of claims 1 to 11.
13. A chip, characterized in that: include: A processor, used to call and run a computer program from a memory, so that an electronic device equipped with the chip executes a method as claimed in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 11.