Floating window processing method, storage medium, electronic device and computer program product
By recording information and generating operation instructions when the floating window is created, the problem of users being unable to manage the floating window is solved, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2026-03-10
AI Technical Summary
Users cannot obtain relevant information about different floating windows, making floating window management difficult, increasing operational costs, and resulting in a poor user experience.
When creating a floating window, record relevant information and operation procedures, generate operation guides, and display floating window information, including application information and operation path, for users to view.
It enhances users' understanding and management of floating windows, reduces operational costs, and improves user experience.
Smart Images

Figure CN121636016A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and more specifically, to a method for processing floating windows, a storage medium, an electronic device, and a computer program product. Background Technology
[0002] Adding floating windows is a common practice when users use mobile phones, tablets, and other terminal products. For example, many functions in game assistants are implemented through floating windows. Floating windows can be displayed on any screen of the phone, making it convenient to use the functions of the currently used application in other application screens.
[0003] Currently, various floating windows displayed on the terminal can be added through interfaces provided by the system framework. Because adding them is very convenient, and as application functionality becomes more abundant, the scenarios for using floating windows are increasing.
[0004] Most related technologies focus on the operation or processing of the floating window itself. However, when many floating windows are added, users cannot know the relevant information of different floating windows, cannot manage multiple open floating windows, increase the user's operation cost for these open floating windows, and result in a poor user experience. Summary of the Invention
[0005] This application provides a method for processing floating windows, a storage medium, an electronic device, and a computer program product to at least solve the problem in related technologies where users cannot know the relevant information of different floating windows, resulting in a poor user experience.
[0006] According to one embodiment of this application, a method for processing a floating window is provided, comprising:
[0007] In response to the operation of creating a floating window, an operation guide is generated and the application information of the floating window is obtained; the operation guide is used to indicate the operation path for creating the floating window.
[0008] Based on the application information and the operation instructions, a floating window is generated.
[0009] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.
[0010] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0011] According to yet another embodiment of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0012] In this embodiment, in response to the operation of creating a floating window, an operation guide is generated and the application information of the floating window is obtained; the operation guide is used to indicate the operation path for creating the floating window; based on the application information and the operation guide, floating window information is generated, which can be provided to the user to view such information, solving the problem in related technologies that users know very little about the information of the floating window and the user experience is poor, and improving the user experience. Attached Figure Description
[0013] Figure 1 This is a hardware structure block diagram of a mobile terminal for a floating window processing method according to an embodiment of this application.
[0014] Figure 2 This is a flowchart of a method for processing a floating window according to an embodiment of this application;
[0015] Figure 3 This is a schematic diagram of a floating window information display window according to an embodiment of this application;
[0016] Figure 4 This is a schematic diagram of the process for generating floating window information according to an embodiment of this application;
[0017] Figure 5 This is a schematic diagram of the information flow using a floating window according to an embodiment of this application. Detailed Implementation
[0018] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.
[0019] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0020] Currently, since users can add floating windows at will, they cannot know which application added or opened the floating window, or the operation process for opening this floating window. This increases the operation cost and inconvenience for users of these already opened floating windows, resulting in a poor user experience.
[0021] Based on the aforementioned technical problems, this application proposes a method for processing floating windows. The technical concept is to record the relevant information and operation process of creating the floating window when the user creates it, and then provide this information to the user to view, thereby improving the user experience.
[0022] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a floating window processing method according to an embodiment of this application. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0023] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the floating window processing method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0024] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0025] This embodiment provides a method for processing floating windows running on the aforementioned mobile terminal. Figure 2 This is a flowchart of a floating window processing method according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:
[0026] Step S201: In response to the operation of creating a floating window, an operation guide is generated and the application information of the floating window is obtained; the operation guide is used to indicate the operation path for creating the floating window.
[0027] In a system, a floating window typically refers to a window that can be freely moved within the user interface, independent of the application's main interface, and can be overlaid on other applications. The terminal can support users in creating floating windows through interfaces provided by the system framework.
[0028] In this embodiment, the system can capture events indicating a user request to create a floating window. For example, the event to create a floating window may be triggered by a button click, gesture, or other input method on the user interface.
[0029] As an example, the system can generate operation instructions based on the captured event of creating a floating window. These instructions can be used to indicate the operation path for creating the floating window. For example, the operation path may include steps to launch the floating window, steps to adjust the size and position of the floating window, or steps to interact with the content within the floating window. These steps can guide the user on how to create the floating window.
[0030] As an example, the system can identify and retrieve application information associated with the creation of the floating window (e.g., application name, version, developer information, etc.).
[0031] The system can record the entire user's operation path from requesting the creation of a floating window to the window's completion, in order to generate operation instructions. These instructions, along with the acquired application information, can be displayed to the user. This can be achieved, for example, through the floating window itself, system notifications, or other user interface elements.
[0032] The system can provide users with clear and useful operation guidance, making it easier for users to use the floating window function more effectively, while obtaining and displaying relevant application information to enhance the user experience.
[0033] In one exemplary embodiment, obtaining the application information of the floating window includes:
[0034] Identify the application type to which the created floating window belongs;
[0035] Determine that the application type is a foreground application, and obtain the application information and interface information of the foreground application; or.
[0036] The application type is determined to be a background application. The context information for creating the floating window is obtained. The target background application to which the floating window belongs is determined based on the context information. The application information of the target background application is obtained. The application information includes background services or broadcasts.
[0037] As an example, when creating a floating window, the application type to which the floating window belongs can be identified. If the current floating window is created by a foreground application, the application and interface currently in the foreground can be obtained, which is the application and interface that created the floating window.
[0038] As an example, if the current floating window is created by a background application, a creation view is provided when the floating window is created. The view stores the context of the application at the time of creation. The application to which the floating window belongs can be determined based on the context information, thereby allowing the background application that created the floating window to be obtained.
[0039] For background applications, since there is no foreground operation, the user cannot know what operation triggered the display of the floating window. The method provided in this application embodiment can obtain the background service or broadcast of the application when the floating window pops up, store such information, and display it to the user when the floating window is displayed.
[0040] In one exemplary embodiment, the generation of operation instructions includes:
[0041] Image information is generated for the scene of the operation of creating the floating window, and finger operation information corresponding to the operation of creating the floating window is obtained;
[0042] The operation instructions are generated based on the image information and the finger operation information.
[0043] As an example, image information of the scene where a floating window is created can be generated; for instance, a screenshot of the scene can be taken. Finger input information within this scene can be obtained, and operation instructions can be generated based on the image information and the finger input information.
[0044] As an example, the data types of operation instructions include, but are not limited to, videos, animated GIFs, or image guides.
[0045] As an example, finger gestures can include, but are not limited to, tapping, long-pressing, swiping, or dragging.
[0046] In one exemplary embodiment, it further includes:
[0047] A unique identifier is created for the floating window;
[0048] The information of the floating window is stored in the record corresponding to the unique identifier.
[0049] As an example, when a user creates a floating window through an interface provided by the system framework, these operations are implemented by code within the system framework, not the application itself. Therefore, the system framework has the ability to insert additional code to perform specific tasks, such as logging, when these interfaces are invoked.
[0050] As an example, a unique identifier ID can be pre-created for each floating window. Through the ID of the floating window, all information related to that floating window can be quickly identified and accessed, making it easy to index and retrieve the floating window's data in a database or file system.
[0051] As an example, the information in the floating window can be stored in the phone's database, such as an SQLite database; or it can be stored in the file system, such as in JSON, XML, or custom-formatted files.
[0052] As an example, a logging operation can be added to the system framework to record information about the floating window, such as its creation information, usage information, size, position, creation time, and usage duration.
[0053] As an example, the information about the floating window stored in the record may include, in addition to the information about the floating window itself, user behavior that interacts with the floating window, such as the position of the finger, the type of operation (such as clicking, long pressing, swiping, dragging, etc.), or the timestamp of the operation.
[0054] Step S202: Generate floating window information based on the application information and the operation instructions.
[0055] For example, the information of the floating window may include the ID of the floating window, the creation time, the associated application, and other information.
[0056] In one exemplary embodiment, it further includes:
[0057] In response to an operation to view floating window information, the floating window information is displayed; wherein the floating window information is used to indicate at least one of the following: application information of the floating window, operation instructions for creating the floating window.
[0058] As an example, the system can also provide the function of displaying information in a floating window. This information can be displayed based on the user's actions in viewing the floating window.
[0059] As an example, floating window information can indicate at least one of the following: application information of the floating window, or instructions on how to create the floating window.
[0060] As an example, when a user selects the method to view floating window information, the system can quickly identify and access the floating window information stored in the record based on the floating window's ID, and pop up relevant information such as the application information of the floating window and the operation instructions for creating the floating window.
[0061] As an example, users can choose whether to enable or disable the function of viewing floating window information in system settings. For instance, if this function is disabled, users will not be able to view the relevant information in the floating window; if this function is enabled, users need to further configure how to view the information.
[0062] In one exemplary embodiment, the operation of viewing the floating window information includes at least the following: long-pressing the floating window for a preset duration, pressing a preset function key of the device where the floating window is located, and double-clicking the floating window.
[0063] As an example, users can view floating window information through specific actions, which may include at least the following: pressing and holding the floating window for more than a preset time (e.g., 5 seconds), pressing a preset function key on the device, or double-tapping the floating window. Any combination of the above actions is also possible, such as pressing a volume button and double-tapping the floating window.
[0064] In one exemplary embodiment, it further includes:
[0065] Based on the application information of the floating window and the preset graylist application information, determine whether the floating window is a pop-up window of the graylist application;
[0066] If the floating window is a pop-up window for the graylisted application, it alerts the user.
[0067] As an example, the system in this application embodiment can provide detailed information about the floating window, including the corresponding application, interface or background service, broadcast and operation instructions, and users can click on these instructions to learn how to handle the floating window.
[0068] As an example, the system can maintain a pre-defined graylist of applications, which can be risky or unpopular applications or known malware on the market.
[0069] As an example, the application information of the floating window can be compared with a gray list to determine whether the floating window belongs to an application on the gray list.
[0070] If the application with the floating window is on a gray list, the user can be alerted or notified. This alert or notification can be implemented through pop-ups, notifications, or other user interface elements.
[0071] As an example, for the floating window that pops up when a graylisted app appears, the system will provide an additional reminder. The floating window can include a close button, which the user can click to close the floating window.
[0072] As an example, the system can periodically collect recognized malware from the market through app stores and the internet, and update the greylist. This allows the system to promptly identify and alert users to newly emerging potentially greylisted applications.
[0073] As an example, users can add a blacklist in the system settings to add unwanted applications. Once an application is added to the blacklist, the system will prevent it from displaying pop-up windows.
[0074] This application's embodiments, through the setting of blacklists and graylists, can reduce the annoyance of users by unnecessary floating windows, while providing sufficient information and control, allowing users to manage these windows according to their needs. By setting graylists and blacklists, users can more effectively control which applications can pop up floating windows, thereby improving the user experience.
[0075] For example, Figure 3 This is a schematic diagram of a floating window information display window according to an embodiment of this application, such as... Figure 3As shown, users can bring up the floating window information window by long-pressing the floating window for 5 seconds, or by pressing the volume button and double-tapping the floating window. The floating window information window can display at least one of the following: information such as the application of the floating window; floating window operation instructions; if it is a graylisted application, it will be displayed and remind the user; or a close button to close the floating window information window.
[0076] In this embodiment, in response to the operation of creating a floating window, an operation guide is generated and the application information of the floating window is obtained; the operation guide is used to indicate the operation path for creating the floating window; based on the application information and the operation guide, floating window information is generated, which can be provided to the user to view such information, solving the problem in related technologies that users know very little about the information of the floating window and the user experience is poor, and improving the user experience.
[0077] The following two examples further illustrate the process of generating and using floating window information according to embodiments of this application:
[0078] Example 1
[0079] Figure 4 This is a schematic diagram illustrating the process of generating floating window information according to an embodiment of this application, such as... Figure 4 As shown, the following steps may be included:
[0080] S401, determine whether to add a floating window via WindowManager's addView method;
[0081] For example, in the Android system, WindowManager is a system service used to manage windows (including floating windows). The addView method allows developers to add a view to the screen, which can be a floating window.
[0082] S402, when a floating window is added via WindowManager's addView method, records the application and corresponding activity to which the floating window belongs;
[0083] For example, recording the application to which the floating window belongs and the corresponding current screen interface Activity can be achieved by analyzing the code that calls addView. The context in which this method is called can be obtained, and then the application information can be extracted from it.
[0084] S403: Capture the image of the floating window being created and record the finger movements to generate operation instructions;
[0085] S404 combines images and operation instructions to generate a floating window message.
[0086] For example, the data type of the information in the floating window can be video, animated GIF, image guide, etc.
[0087] For example, combining screenshots and operation instructions generates a complete floating window information, which can be used to help users understand the function of the floating window and how to use it.
[0088] Example 2
[0089] Figure 5 This is a schematic diagram illustrating the process of using floating window information according to an embodiment of this application, such as... Figure 5 As shown, the specific steps may include:
[0090] S501, determine whether to enable the function to view floating window information;
[0091] S502, when already started, sets the method for obtaining floating window information;
[0092] For example, obtaining information about a floating window may include pressing and holding the floating window for 5 seconds or pressing the volume button and double-tapping the floating window.
[0093] After setting up the S503, users can view information in the floating window through the operation.
[0094] In Examples 1 and 2 above, by recording the application and operation process information when a user adds a floating window and providing it to the user for viewing, the user experience is improved and the user's operation cost is reduced.
[0095] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0096] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.
[0097] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0098] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0099] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0100] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0101] Embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0102] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0103] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for processing floating windows, characterized in that, The method comprises the following steps: in response to an operation of creating a floating window, generating operation guidance and obtaining application information of the floating window; the operation guidance is used to indicate an operation path of creating the floating window; according to the application information and the operation guidance, generating floating window information.
2. The method of claim 1, wherein, The step of obtaining the application information of the floating window comprises: identifying an application type to which the created floating window belongs; determining that the application type is a foreground application, obtaining application information and interface information of the foreground application; or. determining that the application type is a background application, obtaining context information of creating the floating window, determining a target background application to which the floating window belongs according to the context information, and obtaining application information of the target background application; wherein the application information comprises a background service or a broadcast.
3. The method of claim 1, wherein, The step of generating the operation guidance comprises: generating image information of a scene of the operation of creating the floating window, and obtaining finger operation information corresponding to the operation of creating the floating window; generating the operation guidance according to the image information and the finger operation information.
4. The method of claim 1, wherein, Further comprising: creating a unique identifier of the floating window; storing the floating window information into a record corresponding to the unique identifier.
5. The method of claim 1, wherein, Further comprising: in response to an operation of viewing floating window information, displaying the floating window information; wherein the floating window information is used to indicate at least one of the following information: application information of the floating window, operation guidance of creating the floating window.
6. The method of claim 5, wherein, The operation of viewing the floating window information comprises at least one of the following: long pressing the floating window for more than a preset time, pressing a preset function key of a device on which the floating window is located, and double-clicking the floating window.
7. The method of claim 1, wherein, Further comprising: determining whether the floating window is a pop-up window of a gray list application according to the application information of the floating window and preset gray list application information; in the case that the floating window is the pop-up window of the gray list application, reminding a user.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, wherein the computer program is executed by a processor to implement the steps of the method in any one of claims 1 to 7.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the method in any one of claims 1 to 7.
10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7.