Application program control method, electronic equipment, storage medium and computer program product

By identifying some visible and unchanged target background applications in multiple applications, reducing their computing resources occupation, solving the problem of wasted computing resources when partially visible in the application window is viewed, and optimizing resource utilization and maintaining user experience is achieved.

CN120144296APending Publication Date: 2025-06-13FEITENG TECH (GUANGZHOU) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510229052.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In the case where the application window part is visible, it is difficult for electronic devices to effectively reduce the waste of computing resources, because even if the user does not care about the application, the device will still maintain its high computing resource occupancy.

Method used

By determining the target background application in multiple applications, the application is in a partially visible state and the page elements in the visual area have not changed within the target duration, it is judged that the user is less concerned about the application and reduces the computing resources it occupies without affecting the user experience.

Benefits of technology

It effectively reduces the waste of computing resources, avoids the problem of excessive resource usage caused by users not caring about some visual applications, and ensures that the user experience is not affected.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144296A_ABST
    Figure CN120144296A_ABST
Patent Text Reader

Abstract

The invention discloses an application program control method, electronic equipment, a storage medium and a computer program product, and the method comprises the steps that under the condition that multiple application programs run, a target background application program is determined from the multiple application programs, and the target background application program comprises the application program window part visible and the application program window part visible; the page elements in the visible area of the application program window do not change within the target duration; and under the condition that the target background application program is not subjected to the operation of reducing the computing resources, reducing the computing resources occupied by the target background application program in the electronic equipment. According to the application, the target background application program is in a partial visual state, and the page elements in the visual area are not changed within the target duration. Therefore, the application program can be regarded as an application program which is not actually concerned by the user. The occupied computing resources are reduced, and the waste of the computing resources can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of software control, and more specifically, to a control method for application programs, an electronic device, a storage medium, and a computer program product. Background Art

[0002] An application program refers to a computer program for completing a certain or multiple specific tasks. Usually, application programs are installed in electronic devices with operating systems. In some usage scenarios of electronic devices, users will open multiple application programs simultaneously for use, resulting in the situation where the windows of each application program block each other.

[0003] In order to reduce the waste of computing resources, for application programs whose windows are completely invisible or completely blocked, the computing resources they occupy are usually reduced. However, when the window of an application program is not completely blocked and there is still a small part of it in the visible state, the electronic device will think that the user cares about all the display information of this application program, and thus will not reduce the computing resources occupied by this application program.

[0004] However, in many cases, users actually don't care much about application programs with partially visible windows. At this time, if this application program continues to occupy a large amount of computing resources, it will inevitably cause waste of computing resources. Therefore, keeping the computing resources unchanged when the window of an application program is partially visible may lead to waste of computing resources. Summary of the Invention

[0005] To solve the above technical problems, the present application provides a control method for application programs, an electronic device, a storage medium, and a computer program product, so as to achieve the purpose of reducing waste of computing resources when the window of an application program is partially visible.

[0006] To achieve the above technical purpose, the embodiments of the present application provide the following technical solutions:

[0007] In a first aspect, the embodiments of the present application provide a control method for application programs, and the control method for application programs includes:

[0008] In the case of running multiple application programs, determine a target background application program from the multiple application programs, where the target background application program includes: a background application program whose window is partially visible and the page elements within the visible area of the application program window have not changed within a target duration;

[0009] In the case where the target background application program has not been subjected to an operation of reducing computing resources, reduce the computing resources occupied by the target background application program in the electronic device.

[0010] In a second aspect, an embodiment of the present specification provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the control method of the application program as described in the first aspect when executing the computer program.

[0011] In a third aspect, an embodiment of the present specification provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the control method of the application program as described in the first aspect is implemented.

[0012] In a fourth aspect, an embodiment of the present specification provides a computer program product, wherein a computer program is stored on the computer program product, and when the computer program is executed by a processor, the control method of the application program as described in the first aspect is implemented.

[0013] The control method of the application provided in the embodiment of the present application can determine the target background application from multiple running applications, wherein the target background application is in a partially visible state, and the page elements in the visible area do not change within the target duration. It can be considered that the user does not actually care much about the target background application, and when the target background application is not subjected to the operation of reducing computing resources, the computing resources occupied by the target background application in the electronic device are reduced to reduce the waste of computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0015] Figure 1 A flowchart of a control method for an application program provided in an embodiment of the present application;

[0016] Figure 2 A schematic diagram showing different application windows on a display screen of an electronic device;

[0017] Figure 3 This is a schematic diagram of one of the steps of closing an avatar window in an embodiment of the present application;

[0018] Figure 4 This is a second schematic diagram of the steps of closing the avatar window in the embodiment of the present application;

[0019] Figure 5 An example diagram showing an application window for an electronic device;

[0020] Figure 6 It is an application schematic diagram of the control method of the application program provided by the embodiment of the present application;

[0021] Figure 7 It is a schematic diagram of the system monitoring service provided by the embodiment of the present application;

[0022] Figure 8 It is a structural block diagram of a control device of an application program provided by the embodiment of the present application;

[0023] Figure 9 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Specific Embodiments

[0024] Unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application shall have the ordinary meanings understood by those of ordinary skill in the art to which this specification pertains. The "first", "second" and similar terms used in the embodiments of the present application do not denote any order, quantity or importance, but are only used to avoid confusion of components.

[0025] Unless otherwise required by the context, throughout the specification, "a plurality" means "at least two", and "including" is interpreted as open and inclusive, that is, "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "examples", "specific examples" or "some examples" etc. are intended to indicate that the specific features, structures, materials or characteristics related to the embodiment or example are included in at least one embodiment or example of this specification. The schematic representations of the above terms are not necessarily referring to the same embodiment or example.

[0026] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of this specification, rather than all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this specification.

[0027] Overview

[0028] As described in the background art, when multiple application windows are opened simultaneously, occlusion often occurs between the application windows in most cases. To avoid wasting computing resources, first, it is determined whether the user is concerned about the corresponding application based on whether the application window is completely occluded / wholly invisible. If the application window is completely invisible (fully occluded or minimized), it is considered that the user is not concerned about this application, and thus the computing resources occupied by this application will be reduced. For example, if the application for playing a video is minimized, it can be seen that the CPU utilization rate of this application decreases significantly. If the application window is partially visible, it is considered that the user is concerned about this application, and thus the computing resources occupied by this application are maintained. For example, when playing a video through a browser, even if the user can only see the blank part of the browser window displaying the video currently, the CPU occupancy of this browser application will not decrease because the user cannot see the video content at all.

[0029] Therefore, the partial visibility of the application window does not necessarily mean that the user is definitely concerned about this application. Thus, in the case where the application window is partially visible, there is a situation of wasted computing resources.

[0030] In view of the above technical status quo, the inventors of the present application found that for an application window with real-time changing display content, if the user is concerned about the content displayed in this application window, usually other application windows will not be allowed to occlude it. Therefore, in the case where the application window is partially visible, it can be further determined whether the content displayed in the visible part changes, thereby determining whether the user is truly concerned about this application or the content displayed in this application window. Furthermore, the inventors proposed a control method for an application, which can determine a target background application from multiple running applications, wherein the target background application is in a partially visible state, and the page elements in the visible area have not changed within the target duration. Further, it can be considered that the user is actually not very concerned about this target background application. In the case where the target background application has not performed an operation to reduce computing resources, the computing resources occupied by the target background application in the electronic device are reduced to reduce the waste of computing resources.

[0031] Exemplary Method

[0032] An embodiment of the present application provides a control method for an application program, which can be applied to an electronic device. Among them, multiple application programs can be installed on the electronic device. For example, the electronic device can be a desktop computer, a tablet computer, a laptop computer, a smart phone, a digital assistant, a shopping guide terminal, a television, etc. Any operating system can be installed on the electronic device, which is not limited here. In some embodiments, a first mechanism and / or a second mechanism are set in the operating system of the electronic device. The first mechanism includes: reducing the computing resources occupied by a background application program when the application program window of the background application program is completely blocked; the second mechanism includes: reducing the computing resources occupied by a background application program when the application program window of the background application program is minimized.

[0033] As Figure 1 shown, the control method for the application program includes:

[0034] S101: In the case of running multiple application programs, determine a target background application program from the multiple application programs.

[0035] In this step, the target background application program includes: a background application program whose application program window is partially visible and the page elements in the visible area of the application program window have not changed within the target duration. Among them, the partial visibility of the application program in this article can be understood as the partial visibility of the application window of the application program, which will not be explained below. In some embodiments, the background application program running on the electronic device can refer to an application program that cannot currently obtain keyboard input. The foreground application program corresponding to the background application program can refer to an application program that can currently obtain keyboard input. For example, in some window systems, it is the point-to-make-active mechanism, that is, when the mouse falls within the visible area of an application program window, this application program window can obtain keyboard and mouse input. At this time, the application program to which the application program window that has the right to obtain input belongs is the foreground application program, and the remaining other application programs are all background application programs. In some window systems, it is the click-to-make-active mechanism, that is, a mouse click is required to activate an application program window. At this time, unless there is an "always on top" application program window superimposed on it, otherwise this application program window will be placed on the top. The application program to which the activated application program window belongs is the foreground application program, and the remaining other application programs are all background application programs.

[0036] In this embodiment, the multiple running applications may include a foreground application and at least one background application. The target background application is one of the at least one background applications. Moreover, the application that obscures the window of the target background application may include the foreground application or the background application, which is not limited here. For example, the electronic device is running the first application, the second application, the third application, the fourth application, and the fifth application at the same time, and the fourth application is the foreground application, and the remaining applications are all background applications. As Figure 2 shown, on the display screen 200 of the electronic device, a first window 201 corresponding to the first application, a second window 202 corresponding to the second application, a third window 203 corresponding to the third application, a fourth window 204 corresponding to the fourth application, and a fifth window 205 corresponding to the fifth application can be displayed. Among them, a first area 2021 of the second window 202 is partially obscured, a second area 2022 of the second window 202 is completely obscured, a third area 2031 of the third window 203 is partially obscured, and the fifth window 205 is completely obscured. Assume that the first area 2021 displays text content and does not change over time. The second area 2022 and the third area 2031 display video content and change in real time. Then, when determining the target background application from the multiple applications of the electronic device, since the second window 202 is partially obscured and the content displayed in the first area 2021 of the second window 202 has not changed within the target duration, the second application can be determined as the target background application. In some embodiments, since the fifth window is completely obscured, an operation of reducing the computing resources occupied by the fifth application can be performed.

[0037] The target duration can be a relatively short duration set in advance. For example, the target duration can be 1 second, 10 seconds, 1 minute, etc. The page elements within the visible area of the application window can be understood as the data content displayed within the visible area of the application window. Here, if the page elements within the visible area of the application window have not changed within the target duration, it can be considered that the user is less concerned about the data content displayed in the application window.

[0038] S102: When the target background application has not been executed to reduce computing resources, reduce the computing resources occupied by the target background application in the electronic device.

[0039] In this step, the target background application can be regarded as an object that needs to reduce the occupied computing resources. To avoid continuously reducing the computing resources occupied by the same object multiple times within a short period. Therefore, first determine whether the object that needs to reduce the occupied computing resources has already performed an operation to reduce the computing resources. If so, it means that there is no situation of wasting computing resources, and there is no need to continue reducing the computing resources it occupies. Otherwise, it means that there is a situation of wasting computing resources, and it is necessary to reduce the computing resources it occupies. In some embodiments, when determining whether an operation to reduce the computing resources has been performed, it can be determined whether an operation to reduce the computing resources has been performed within the target period of the application. Wherein, the start time of the target period is the nearest time when it was in the fully visible state from the current time. For example, after performing an operation to reduce the computing resources on the application, an execution mark can be added to the application. When the application is in the fully visible state again, the execution mark is removed. In this way, when determining whether an operation to reduce the computing resources has been performed, it is only necessary to check whether there is an execution mark for the application. If there is an execution mark, it is regarded as having been performed an operation to reduce the computing resources. If there is no execution mark, it is regarded as not having been performed an operation to reduce the computing resources.

[0040] It should be noted that this application does not limit the computing resources to be reduced. For example, it can include memory resources, CPU resources, etc. Similarly, this application does not limit the way to reduce the computing resources. For example, the priority can be reduced, the process can be paused or suspended, the memory usage can be restricted, the CPU time slice can be reduced, etc. For example, the window system can also be instructed to perform certain operations to reduce the computing resources occupied by the target background application. Such as instructing the window system not to send the display request of this target background application to the GPU anymore, and not considering its window information when synthesizing the desktop graphics display information, thereby saving computing resources. In some embodiments, when reducing the computing resources, only the computing resources occupied by the invisible part of the target background application can be reduced.

[0041] In the embodiments of this application, the target background application can be determined from multiple running applications. Among them, the target background application is in a partially visible state, and the page elements within the visible area have not changed within the target duration. Furthermore, it can be regarded that the user actually doesn't care much about the target background application. In the case where the target background application has not been performed an operation to reduce the computing resources, the computing resources occupied by the target background application in the electronic device are reduced to reduce the waste of computing resources.

[0042] In some embodiments of this application, determining the target background application from multiple applications includes:

[0043] Based on the application window information of multiple applications, determine the background applications with partially visible application windows as candidate background applications;

[0044] Generate a first image and a second image based on the screen contents displayed by the candidate application window at a first moment and a second moment; wherein, the candidate application window is the application window of the candidate background application, and the time duration between the first moment and the second moment is greater than or equal to the target duration;

[0045] Process the first image and the second image respectively, and adjust the first region of the first image and the second region of the second image to the same image content; wherein, both the first region and the second region are regions corresponding to the invisible parts in the candidate application window;

[0046] For each candidate background application, when the processed first image and the processed second image are the same, determine the candidate background application as the target background application.

[0047] It should be noted that the target background application can be one or more of the multiple applications currently running on the electronic device. Moreover, the target background application has two conditions that must be met. First, part of the application window is visible; second, the content displayed in the visible part has not changed within the target duration. Therefore, background applications that meet these two conditions can be screened out from multiple applications, and the screened-out background applications can be regarded as target background applications. In this embodiment, when determining whether the first condition is met, the application window information needs to be used. In some embodiments, the application window information may include information such as the window position, window size, and window stacking order of each application. Among them, the window position is the position of the application window on the display screen, and the window stacking order is the order of the application window among all the windows displayed on the display screen.

[0048] In some embodiments, the steps in this embodiment can be executed periodically to continuously determine the target background application from multiple application programs. When generating the first image and the second image, for example, the image of the entire screen can be captured by taking a screenshot, and then the image content corresponding to the candidate application window can be captured from the image of the entire screen, and finally the first image and the second image are obtained. In this embodiment, since only the data content or image displayed in the visible part of the candidate application window needs to be compared. Therefore, for the invisible part of the candidate application window, the corresponding image content can be adjusted to the same image content, and then the adjusted first image and the second image are compared, and this comparison result is used as the comparison result of the visible part. When adjusting the image content corresponding to the invisible part of the candidate application window to the same image content, the corresponding image content can be adjusted to the same pixel value. For example, the first image and the second image are processed respectively, and the first area of the first image and the second area of the second image are adjusted to the same image content, including: adjusting all pixel values of the first area of the first image to the first pixel value; adjusting all pixel values of the second area of the second image to the first pixel value. The first pixel value can be any gray value, any RGB value, but not limited thereto.

[0049] In some embodiments, for each candidate application, the screen content displayed in the visible part of the candidate application window at the first moment and the second moment can also be captured to generate a third image and a fourth image. Then, the third image and the fourth image are directly compared. When the third image and the fourth image are the same, the background application or the candidate application to which the candidate application window belongs is determined as the target background application.

[0050] In the embodiment of the present application, an image is generated for the screen content displayed in the entire application window. After processing the area corresponding to the invisible part, the entire application window is directly compared. Compared with the method of intercepting and comparing the visible part, it is simpler and more convenient.

[0051] In some embodiments of the present application, generating the first image and the second image based on the screen content displayed by the candidate application window at the first moment and the second moment includes:

[0052] Hiding the mouse pointer; at the first moment, taking a screenshot of the area of the candidate application window on the screen to generate the first image; at the second moment, taking a screenshot of the area of the candidate application window on the screen to generate the second image; restoring the mouse pointer.

[0053] It should be noted that in some implementation environments, data content of non-application windows is displayed on the screen. For example, a mouse pointer. When the mouse pointer is located on the candidate application window, directly taking a screenshot of the area of ​​the candidate application window on the screen will inevitably cause the presence of a mouse pointer in the generated image. At this time, if the mouse pointer is at different positions of the visible part of the candidate application window at the first moment and the second moment, even if the screen content displayed by the visible part of the candidate application window has not changed, the processed first image and the processed second image may be regarded as different. This will cause a misjudgment of the target background application. Among them, the screen content displayed by the application window is only related to the application to which it belongs, and does not include the mouse pointer.

[0054] Therefore, in order to avoid interference from the mouse pointer, in the process of generating the first image and the second image, the embodiment of the present application first hides the mouse pointer, and restores the display of the mouse pointer after the first image and the second image are generated. In some embodiments, in the process of generating the first image and the second image, other data content of the non-application window can also be hidden, and restored to display after the first image and the second image are generated. This application does not limit the method of hiding the mouse pointer and the method of restoring the display of the mouse pointer.

[0055] In the embodiment of the present application, the interference of the mouse pointer in the display screen can be eliminated, thereby reducing the misjudgment of the target background application.

[0056] In some embodiments of the present application, the case where the processed first image is the same as the processed second image includes:

[0057] The results of bitwise XOR of the pixel values ​​of corresponding pixels in the processed first image and the processed second image are all 0; or, except for the mouse pointer area, the results of bitwise XOR of the pixel values ​​of corresponding pixels in the processed first image and the processed second image are all 0.

[0058] It should be noted that this embodiment determines whether the processed first image and the processed second image are the same by the result obtained by bitwise XOR of the pixel values ​​of the corresponding pixels. Among them, for the pixel values ​​of each pair of pixels, the bitwise XOR result is 0, indicating that the pixel values ​​are the same. Otherwise, the pixel value is 1. It can be understood that both the processed first image and the processed second image are images generated based on the candidate application window. Therefore, the two have the same size, and each pixel in the first image has a unique corresponding pixel in the second image. The relative positions of the two corresponding pixels in their respective images are the same. For example, the pixel at the coordinates of (5,9) in the first image has the coordinates of the corresponding pixel in the second image (5,9).

[0059] It should be noted that for the case where there is a mouse pointer in the processed first image and / or the processed second image, to avoid the interference of the mouse pointer, it is necessary to exclude the mouse pointer area for comparison. In some embodiments, when generating the first image and the second image, the mouse is not hidden, but the position and shape of the current mouse are obtained, so as to calculate the positions affected by the mouse, and the image of the positions affected by the mouse is set to the pixel values of the area not covered by the mouse nearby. After performing a bitwise exclusive OR on the pixel values, if the non-zero area completely falls within the position affected by the mouse, it is considered that the processed first image and the processed second image are the same. In the case of using a substitute window to cover the application window of the target background application, if the processed first image and the processed second image only differ in the mouse position, the display content of the substitute window is the content with the mouse image removed; if the mouse positions in the processed first image and the processed second image are exactly the same, since the pixel values of the mouse position do not come from the display form of the mouse, the mouse will not be displayed on the screen, thus preventing the user from misjudging the mouse position.

[0060] In the embodiments of the present application, by using the bitwise exclusive OR method between pixel values, it is possible to quickly determine whether the processed first image and the processed second image are the same.

[0061] In some embodiments of the present application, determining the target background application from multiple applications includes:

[0062] Screening out background applications whose computing resource occupancy rate exceeds the target threshold from multiple applications; determining the target background application from the background applications whose computing resource occupancy rate exceeds the target threshold.

[0063] It should be noted that for background applications with a low computing resource occupancy rate, their computing resources may have no room for decline, or the room for decline may be too small. In this regard, in the embodiments of the present application, the target background application can be screened out from the background applications whose computing resource occupancy rate exceeds the target threshold. Among them, the target threshold can be a pre-set judgment threshold. If the computing resource occupancy rate of an application exceeds this target threshold, it is regarded that the computing resource occupancy rate of this application is high. On the contrary, if the computing resource occupancy rate of an application is lower than this target threshold, it is regarded that the computing resource occupancy rate of this application is low. Among them, the computing resource occupancy rate includes but is not limited to the CPU utilization rate. For example, Figure 2 As shown, if the first application and the third application are both background applications with low resource occupancy; the second application and the fifth application are both background applications with high resource occupancy. Then, the target background application can be directly determined from the second application and the fifth application.

[0064] It is worth noting that the process of determining the target background application from the background applications whose computing resource occupancy rate exceeds the target threshold is similar to the process of determining the target background application from multiple applications using the candidate background application, the first image, and the second image in the above embodiment. The difference is that the present application can determine the candidate background application from the background applications whose computing resource occupancy rate exceeds the target threshold. To avoid repetition, it will not be repeated here.

[0065] In the embodiment of the present application, applications with low computing resource usage can be ignored, thereby reducing the complexity of the entire processing process.

[0066] In some embodiments of the present application, reducing the computing resources occupied by the target background application in the electronic device includes:

[0067] The computing resources occupied by the target background application in the electronic device are reduced, and the electronic device is controlled to keep displaying the target display content, wherein the target display content includes: the display content within the visible area of ​​the target application window, and the target application window is the application window of the target background application.

[0068] It should be noted that before reducing the computing resources occupied by the target background application, the target background application is in a partially visible state. At this time, certain content is usually displayed in the visible area of ​​the target application window. There may be content that the user is concerned about in these displayed contents. If this part of the visible window is minimized or completely blocked, the user will not be able to view these contents. For this reason, the present embodiment will keep displaying the target display content (for example, the target display content can be displayed in the form of a static picture, but is not limited to this) while reducing the computing resources occupied by the target background application in the electronic device. Thereby, hiding or eliminating the content that the user may be concerned about can be avoided.

[0069] In some embodiments of the present application, reducing the computing resources occupied by the target background application in the electronic device and controlling the electronic device to keep displaying the target display content includes:

[0070] Creating a surrogate window for a target background application, controlling the surrogate window to be displayed at a position of the target application window to block a visible area of ​​the target application window, and controlling the surrogate window to display target display content, triggering a first mechanism in the electronic device, wherein the first mechanism includes: reducing the computing resources occupied by the background application when the application window is completely blocked;

[0071] or,

[0072] Create a substitute window for the target background application, control the position where the substitute window is displayed in the target application window, and control the substitute window to display the target display content. Minimize the target application window to trigger the second mechanism in the electronic device, where the second mechanism includes: reducing the computing resources occupied by the background application when its application window is minimized.

[0073] It should be noted that the substitute window is a window created for the target background application and is not the application window of the target background application. When the number of target background applications is multiple, the number of substitute windows is also multiple, and each target background application corresponds to a substitute window. The substitute window can perform an overlay operation or a replacement operation on the application window of its corresponding target background application. Among them, for the selection of the overlay operation and the replacement operation, it is based on the first mechanism and / or the second mechanism set in the operating system of the electronic device in the foregoing content. For example, when the first mechanism is set in the operating system, perform the overlay operation, that is, control the substitute window to be displayed at the position of the target application window to block the visible area of the target application window, and control the substitute window to display the target display content, triggering the first mechanism in the electronic device. When the second mechanism is set in the operating system, perform the replacement operation, that is, control the substitute window to be displayed at the position of the target application window, and control the substitute window to display the target display content, minimize the target application window, and trigger the second mechanism in the electronic device.

[0074] In some embodiments, the positions and sizes of the visible areas in the substitute window of the target background application and the target application window are the same. In other embodiments, the substitute window of the target background application and the target application window have the same window position and window size. Thus, the creation process of the substitute window can be simplified.

[0075] In the embodiments of the present application, a substitute window can be created for the target background application, and then through the overlay operation or the replacement operation, the first mechanism or the second mechanism in the operating system is triggered to reduce the computing resources occupied by the target background application.

[0076] In some embodiments of the present application, controlling the substitute window to be displayed at the position of the target application window includes:

[0077] Perform a first operation on each application window in the substitute window and the window sequence in turn; where the window sequence includes a sequence formed by arranging all the application windows above the target application window in ascending order; the first operation is an operation of placing the application window on the top layer.

[0078] It should be noted that for the setting of the stacking order among application windows on the display screen of an electronic device, a dedicated interface provided by the operating system can be used for direct setting. Regarding this, no further elaboration will be made here. For an operating system without a dedicated interface, the method provided in this embodiment can be used for setting. After creating a substitute window, the stacking order of the substitute window is the bottommost position above its corresponding application window. Continuing with Figure 2 as an example. The stacking order of application windows on the display screen from low to high is the first window 201, the second window 202, the third window 203, the fifth window 205, and the fourth window 204. Assume that the target background application is the second application, then a substitute window will be created for the second application. At the same time, the application windows in the window sequence are the third window 203, the fifth window 205, and the fourth window 204 in order from low to high. After performing the first operation on the substitute window, the stacking order of application windows on the display screen from low to high is the first window 201, the second window 202, the third window 203, the fifth window 205, the fourth window 204, and the substitute window. Next, the first operation will be performed on the third window 203. After the operation, the stacking order of application windows on the display screen from low to high is the first window 201, the second window 202, the fifth window 205, the fourth window 204, the substitute window, and the third window 203. Similarly, finally, the first operation will be performed on the fourth window 204. After the operation, the stacking order of application windows on the display screen from low to high is the first window 201, the second window 202, the substitute window, the third window 203, the fifth window 205, and the fourth window 204.

[0079] In the embodiment of the present application, by means of the operation of placing the application window on the top layer, the adjustment of the stacking order of the substitute window can be achieved.

[0080] To avoid the situation where the target background application cannot respond to user operations due to the existence of the substitute window, after triggering the first mechanism or the second mechanism in the electronic device, the method further includes:

[0081] When the second operation is monitored, close the substitute window and continue to display the target application window; where the second operation includes: any one of a mouse operation on the substitute window and a first adjustment operation on any application window in the window set, and the window set includes: application windows above the target application window and excluding the substitute window.

[0082] It should be noted that when the substitute window covers or replaces the application window of the target background application, usually the user cannot directly operate on the application window of the target background application. However, in some scenarios, the user may continue to pay attention to or care about the target background application at any time, and then operate on the target background application. At this time, if the target background application cannot respond to the user's operation, it will surely affect the user experience. Therefore, this embodiment can monitor the mouse operation on the substitute window and use it as the mouse operation on its corresponding target background application. After closing the substitute window, control the target background application to respond. For the user, they cannot perceive the substitute window and directly operate on the target background application. Among them, the mouse operation includes but is not limited to single click, double click, scroll, long press, etc. For example, Figure 3 As shown, after the substitute window receives the mouse event, execute S301 to forward the mouse event to the corresponding application. The corresponding application is the target background application corresponding to the substitute window that receives the mouse event. S302, close the display of the substitute window. Among them, for the case where the substitute window directly covers the application window of its corresponding target background application, it is only necessary to close the display of the substitute window, and the corresponding application window will be visible again. For the case where the substitute window replaces the application window of its corresponding target background application, while closing the display of the substitute window, restore the corresponding application window from the minimized state to the original state. In some embodiments, the original state may include the stacking order, position, size, etc. where the application window was originally located. In some embodiments, when the mouse event is a mouse click event, when restoring the corresponding application window from the minimized state to the original state, set the stacking order of the corresponding application window to the top layer.

[0083] In other scenarios, the user does not need to directly operate on the application window of the target background application, but operating on some special application windows may also affect the display of the application window of the target background application. Here, the special application windows include: application windows above the target application window and other than the substitute window. For example, perform a first adjustment operation on the application window above the substitute window that blocks the target application window. Without the existence of the substitute window, the content displayed by the target application window will surely change. In order to also make the user unaware, close the substitute window and continue to display the target application window. The target application window will display the corresponding data content based on the first adjustment operation. For example, Figure 4 As shown, after the window system in the operating system receives the window change event, execute S401 to determine whether the window change affects the display of the substitute window. S402, in the case of yes, notify this substitute window to exit.

[0084] In some embodiments, when the substitute window exits and the display of the substitute window is closed, an exit event will be generated for the corresponding substitute window, and then this exit event will trigger the corresponding application to cancel the created / registered substitute window.

[0085] In the embodiments of the present application, it is possible to avoid the situation where the target background application cannot respond to user operations due to the existence of the substitute window.

[0086] In order to avoid the situation where the target background application cannot respond to user operations due to the existence of the substitute window, after triggering the first mechanism in the electronic device, the method further includes:

[0087] When a second adjustment operation for any application window in the window set is monitored and the display content of the new visible area changes, control the substitute window to display the display content of the new visible area; wherein, the window set includes: application windows above the target application window and excluding the substitute window, and the new visible area includes: after the second adjustment operation, the visible area of the target application window relative to all application windows in the window set.

[0088] It should be noted that the user does not need to directly operate on the application window of the target background application, but operating on some special application windows may also affect the display of the application window of the target background application. Here, the special application windows include: application windows above the target application window and excluding the substitute window. To avoid closing the substitute window, in the embodiments of the present application, the data content displayed by the substitute window will be adjusted. For example, when a second adjustment operation for any application window in the window set is monitored and the visible area of the application window of the target background application corresponding to the substitute window changes, the size and position of the substitute window will be adjusted to be the same as those of the new visible area.

[0089] In the embodiments of the present application, it is possible to avoid the situation where the target background application cannot respond to user operations due to the existence of the substitute window. At the same time, it is possible to avoid closing the substitute window.

[0090] When some visible windows have relatively high resource utilization rates, but the changes in their visible display content are not frequent, this part of the visible windows may be identified as being able to be blocked by static pictures using substitute windows so that this part of the visible windows is completely invisible. The consequence of this is that when the visible display content of this part of the visible windows is updated, the user can only see the outdated static pictures. Therefore, after triggering the first mechanism or the second mechanism in the electronic device, the method further includes:

[0091] Redisplay the target application window every first duration; when the display content in the visible area of the redisplayed target application window is different from that of the substitute window, close the substitute window.

[0092] It should be noted that the data content in the visible part of the target application window may be updated irregularly. For example Figure 5 As shown, when the user watches an online course, the main window 501 plays the courseware text of the lecturer, and the small window 502 shows the real-time picture of the lecturer. However, the user uses the note software window 503 to cover the real-time picture of the lecturer in the small window 502. At this time, the following scenario will occur: a substitute window will cover the main window 501, and the content displayed in the substitute window is the same as the content displayed in the main window 501 when the substitute window is created. When the lecturer updates the content displayed in the main window 501, the user will not see the updated content. Therefore, it is necessary to adopt the method provided in this embodiment to close the substitute window after determining that the content displayed in the main window 501 is updated. In some embodiments, a substitute window can also be re-established after a second duration.

[0093] The first duration can be a relatively short duration set in advance. For example, the first duration can be 30 seconds, 1 minute, 3 minutes, 10 minutes, etc. The fact that the display content in the visible area of the redisplayed target application window is different from that of the substitute window indicates that the data in the visible area of the target application window has been updated. Therefore, by closing the substitute window and continuing to display the target application window, the user can timely learn the updated data. The fact that the display content in the visible area of the redisplayed target application window is the same as that of the substitute window indicates that the data in the visible area of the target application window has not been updated. At this time, the substitute window can continue to be displayed.

[0094] In the embodiments of the present application, it is possible to prevent the user from missing the updated data content in the visible part of the target application window due to the existence of the substitute window.

[0095] In some embodiments of the present application, when a first mechanism in the electronic device is triggered, redisplaying the target application window includes:

[0096] Exchanging the stacking order of the target application window and the substitute window; or, adjusting the substitute window to a completely transparent state.

[0097] It should be noted that the purpose of redisplaying the target application window is to place the target application window in a partially visible state or eliminate the influence of the substitute window. Therefore, this purpose can be achieved by adjusting the stacking order or the transparency of the substitute window.

[0098] In the embodiments of the present application, the influence of the substitute window can be eliminated by adjusting the stacking order or the transparency of the substitute window, so that the target application window can be redisplayed.

[0099] For ease of understanding, the following uses a specific example to illustrate the control method of the application provided by the present application. The control method of the application is applied to a computer, and multiple applications are installed in the computer.

[0100] In the case where multiple applications are running simultaneously on the computer, the display examples of the multiple applications can be as Figure 2 shown. First, periodically obtain the occupancy of computing resources by each currently running application, and then execute according to the steps shown in Figure 6 each cycle, so as to control each currently running application. Figure 6 The steps shown include:

[0101] S601: Obtain an application whose computing resource utilization rate exceeds the threshold.

[0102] S602: Determine whether the obtained application is a foreground application. If so, execute S601 to obtain another application whose computing resource utilization rate exceeds the threshold. If not, execute S603.

[0103] S603: Determine whether there is a corresponding substitute window for this application. If so, execute S601 to obtain another application whose computing resource utilization rate exceeds the threshold. If not, execute S604.

[0104] S604: Hide the mouse, capture the visible part of the application, obtain its image content, and restore the mouse display.

[0105] S605: Delay for a predefined time. For example, it can be 10 seconds, 30 seconds.

[0106] S606: Hide the mouse, capture the visible part of the application, obtain its image content, and restore the mouse display.

[0107] S607: Perform a bitwise exclusive OR on the image contents of the two visible parts.

[0108] S608: Determine whether the result of the bitwise exclusive OR is all 0. If not, execute S601 to obtain another application whose computing resource utilization rate exceeds the threshold. If so, execute S609.

[0109] S609: Create a substitute window for this application. And control the substitute window to display the data content of the visible part, and at the same time cover the substitute window on the window of this application and be in the bottommost position.

[0110] In the process of executing the above steps, you can Figure 7 As shown, the system monitoring service 701 is used to create a first avatar window 702 and a second avatar window 703. The first avatar window 702 can display content 1, and the second avatar window 703 can display content 2. The system monitoring service 701 can also monitor the computing resource utilization of each application and the foreground application, and execute the above-mentioned process steps for determining whether to create an avatar window. In some embodiments, the system monitoring service 701 can also intercept the window adjustment events of all application windows stacked on the avatar window. When these application windows are monitored to change, it is determined whether the display area of ​​the avatar window will change due to the application window adjustment event based on the position and stacking relationship of the application windows. If a change occurs, the corresponding avatar window is closed.

[0111] Exemplary Apparatus

[0112] Some embodiments of the present application also provide a control device for an application program, such as Figure 8 As shown, the control device of the application includes:

[0113] The screening module 801 is used to determine a target background application from among multiple applications when multiple applications are running, wherein the target background application includes: a background application whose application window is partially visible and whose page elements within the visible area of ​​the application window have not changed within a target time period; the reducing module 802 is used to reduce the computing resources occupied by the target background application in the electronic device when the computing resource reduction operation is not executed on the target background application.

[0114] In some embodiments of the present application, the screening module 801 includes:

[0115] A candidate unit for determining a background application with a partially visible application window as a candidate background application based on the application window information of the multiple applications; an image generation unit for generating a first image and a second image based on the screen contents displayed by the candidate application window at a first moment and a second moment; wherein, the candidate application window is the application window of the candidate background application, and the time duration between the first moment and the second moment is greater than or equal to the target duration; an image processing unit for respectively processing the first image and the second image, and adjusting a first region of the first image and a second region of the second image to the same image content; wherein, both the first region and the second region are regions corresponding to the invisible parts in the candidate application window; an image comparison unit for, for each candidate background application, determining the candidate background application as the target background application when the processed first image and the processed second image are the same.

[0116] In some embodiments of the present application, the image processing unit is specifically configured to adjust all pixel values of the first region of the first image to a first pixel value; and adjust all pixel values of the second region of the second image to the first pixel value.

[0117] In some embodiments of the present application, the image generation unit is specifically configured to hide the mouse pointer; at the first moment, take a screenshot of the region of the candidate application window on the screen to generate the first image; at the second moment, take a screenshot of the region of the candidate application window on the screen to generate the second image; and restore the mouse pointer.

[0118] In some embodiments of the present application, the situation where the processed first image and the processed second image are the same includes:

[0119] The result obtained by performing bitwise exclusive OR on the pixel values of the corresponding pixels in the processed first image and the processed second image is all 0; or, except for the mouse pointer region, the result obtained by performing bitwise exclusive OR on the pixel values of the corresponding pixels in the processed first image and the processed second image is all 0.

[0120] In some embodiments of the present application, the screening module 801 is specifically configured to: screen out background applications with a computing resource occupancy rate exceeding a target threshold from the multiple applications; and determine the target background application from the background applications with a computing resource occupancy rate exceeding the target threshold.

[0121] In some embodiments of the present application, the reduction module 802 is specifically used to reduce the computing resources occupied by the target background application in the electronic device, and control the electronic device to keep displaying the target display content, wherein the target display content includes: the display content within the visible area of ​​the target application window, and the target application window is the application window of the target background application.

[0122] In some embodiments of the present application, the reducing module 802 is specifically used to create a substitute window for the target background application, control the substitute window to be displayed at the position of the target application window to block the visible area of ​​the target application window, and control the substitute window to display the target display content, triggering a first mechanism in the electronic device, wherein the first mechanism includes: reducing the computing resources occupied by the background application when the application window is completely blocked;

[0123] or,

[0124] Create a substitute window for the target background application, control the substitute window to be displayed at the position of the target application window, control the substitute window to display the target display content, minimize the target application window, and trigger a second mechanism in the electronic device, wherein the second mechanism includes: reducing the computing resources occupied by the application window of the background application when it is minimized.

[0125] In some embodiments of the present application, the avatar window of the target background application and the target application window have the same window position and window size.

[0126] In some embodiments of the present application, controlling the position of the substitute window to be displayed in the target application window includes: executing a first operation on the substitute window and each application window in the window sequence in turn; wherein the window sequence includes a sequence of all application windows above the target application window arranged in order from low to high; and the first operation is an operation of placing the application window on the top layer.

[0127] In some embodiments of the present application, the device also includes: a first monitoring module, which is used to close the substitute window and continue to display the target application window when a second operation is monitored; wherein the second operation includes: any one of a mouse operation on the substitute window and a first adjustment operation on any application window in a window set, and the window set includes: application windows above the target application window and other than the substitute window.

[0128] In some embodiments of the present application, the device further includes: a second monitoring module, configured to control the substitute window to display the display content of the new visible area when a second adjustment operation for any application window in the window set is monitored and the display content of the new visible area changes; wherein, the window set includes: application windows above the target application window and excluding the substitute window, and the new visible area includes: after the second adjustment operation, the visible area of the target application window relative to all application windows in the window set.

[0129] In some embodiments of the present application, the device further includes: a data consistency module, configured to redisplay the target application window every first period; and close the substitute window when the display content of the visible area of the redisplayed target application window is different from the display content of the substitute window.

[0130] In some embodiments of the present application, the data consistency module is specifically configured to exchange the stacking order of the target application window and the substitute window; or adjust the substitute window to a completely transparent state.

[0131] The control device for an application provided by the embodiment of the present application belongs to the same inventive concept as the control method for an application provided by the above embodiment of the present application. For technical details not described in detail in this embodiment, reference may be made to the specific processing content of the control method for an application provided by the above embodiment of the present application, which will not be elaborated here.

[0132] Exemplary Electronic Device

[0133] Another embodiment of the present application further provides an electronic device, including a processor configured to execute the steps in the control method for an application according to various embodiments of the present application described in the above embodiment of the present application. Refer to Figure 9 As shown, an exemplary embodiment of the present application further provides an electronic device, including: a memory and a processor, where the memory stores a computer program, and the processor executes the steps in the control method for an application according to various embodiments of the present application described in the above embodiment of the present application when executing the computer program.

[0134] The internal structure of the electronic device may be as Figure 9As shown, the electronic device includes a processor, a memory, a network interface, and an input device connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it performs the steps in the control method of the application program according to various embodiments of the present application described in the above embodiments of the present application.

[0135] The processor may include a main processor and may also include a baseband chip, a modem, etc.

[0136] The memory stores a program for implementing the technical solution of the present invention and may also store an operating system and other key services. Specifically, the program may include program code, and the program code includes computer operation instructions. More specifically, the memory may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk memory, a flash memory, etc.

[0137] The processor may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present invention. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0138] The input device may include a device for receiving user input data and information, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor, etc.

[0139] The output device may include a device for allowing output of information to the user, such as a display screen, a printer, a speaker, etc.

[0140] The communication interface may include any device such as a transceiver for communicating with other devices or communication networks, such as an Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc.

[0141] The processor executes the program stored in the memory and calls other devices, which can be used to implement each step of the control method of any application program provided in the above embodiments of the present application.

[0142] The electronic device may further include a display component and a voice component. The display component may be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device may be a touch layer covered on the display component, or a button, a trackball or a touchpad provided on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0143] Those skilled in the art can understand that Figure 9 the structure shown in

[0144] Exemplary Computer Program Product and Storage Medium

[0145] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0146] The computer program product may be written in any combination of one or more programming languages for executing the program code of the operations of the embodiments of the present application. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, executed as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0147] In addition, the embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by the processor to perform the steps in the control method of the application program according to various embodiments of the present application described in the above "Exemplary Method" section.

[0148] Those of ordinary skill in the art can understand that all or part of the processes in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in this application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0149] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as within the scope recorded in this application.

[0150] The above-described embodiments only represent several embodiments of this application. The description is relatively specific and detailed, but it should not be construed as limiting the scope of the solutions provided by the embodiments of this application. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of the patent of this application should be subject to the appended claims.

Claims

1. A method for controlling an application, characterized in that: The method comprises: In the case of running multiple applications, determining a target background application from the multiple applications, wherein the target background application includes: a background application whose application window is partially visible and whose page elements in the visible area of ​​the application window do not change within a target time length; In a case where the target background application is not subjected to the operation of reducing computing resources, the computing resources occupied by the target background application in the electronic device are reduced.

2. The method according to claim 1, characterized in that: Determining a target background application from the plurality of applications includes: Based on the application window information of the plurality of applications, determining a background application whose application window is partially visible as a candidate background application; Generate a first image and a second image based on the screen contents displayed by the candidate application window at the first moment and the second moment; wherein the candidate application window is the application window of the candidate background application, and the duration between the first moment and the second moment is greater than or equal to the target duration; Processing the first image and the second image respectively, adjusting a first area of ​​the first image and a second area of ​​the second image to have the same image content; wherein the first area and the second area are both areas corresponding to the invisible part of the candidate application window; For each of the candidate background applications, when the processed first image and the processed second image are the same, the candidate background application is determined as the target background application.

3. The method according to claim 2, characterized in that Processing the first image and the second image respectively to adjust a first region of the first image and a second region of the second image to have the same image content includes: adjusting all pixel values ​​of the first area of ​​the first image to first pixel values; All pixel values ​​in the second area of ​​the second image are adjusted to the first pixel values.

4. The method according to claim 2, characterized in that: Generating a first image and a second image based on screen contents displayed by the candidate application window at a first moment and a second moment, including: Hide the mouse pointer; At the first moment, taking a screenshot of the area of ​​the candidate application window on the screen to generate the first image; At the second moment, taking a screenshot of the area of ​​the candidate application window on the screen to generate the second image; Restores the mouse pointer.

5. The method according to claim 2, characterized in that: The case where the processed first image and the processed second image are the same includes: The results of bitwise XOR of the pixel values ​​of corresponding pixels in the processed first image and the processed second image are all 0; or, except for the mouse pointer area, the results of bitwise XOR of the pixel values ​​of corresponding pixels in the processed first image and the processed second image are all 0.

6. The method according to claim 1, characterized in that Determining a target background application from the plurality of applications includes: Selecting background applications whose computing resource occupancy rate exceeds a target threshold from the plurality of applications; The target background application is determined from background applications whose computing resource occupancy rates exceed a target threshold.

7. The method according to claim 1, characterized in that Reducing the computing resources occupied by the target background application in the electronic device, including: Reduce the computing resources occupied by the target background application in the electronic device, and control the electronic device to keep displaying target display content, wherein the target display content includes: display content within a visible area of ​​a target application window, and the target application window is an application window of the target background application.

8. The method according to claim 7, characterized in that Reducing the computing resources occupied by the target background application in the electronic device and controlling the electronic device to keep displaying the target display content, including: Creating a surrogate window for the target background application, controlling the surrogate window to be displayed at a position of the target application window to block a visible area of ​​the target application window, and controlling the surrogate window to display the target display content, triggering a first mechanism in the electronic device, wherein the first mechanism includes: reducing the computing resources occupied by the background application when the application window is completely blocked; or, Create a substitute window for the target background application, control the substitute window to be displayed at the position of the target application window, control the substitute window to display the target display content, minimize the target application window, and trigger a second mechanism in the electronic device, wherein the second mechanism includes: reducing the computing resources occupied by the application window of the background application when it is minimized.

9. The method according to claim 8, characterized in that The avatar window of the target background application and the target application window have the same window position and window size.

10. The method according to claim 8, characterized in that Controlling the position where the avatar window is displayed in the target application window includes: executing a first operation on the avatar window and each application window in the window sequence in sequence; The window sequence includes a sequence of all application windows above the target application window arranged in order from low to high; and the first operation is an operation of placing the application window on the top layer.

11. The method according to claim 8, characterized in that After triggering the first mechanism in the electronic device or triggering the second mechanism in the electronic device, the method further includes: When the second operation is detected, closing the avatar window and continuing to display the target application window; The second operation includes any one of a mouse operation on the avatar window and a first adjustment operation on any application window in a window set, and the window set includes application windows above the target application window but excluding the avatar window.

12. The method according to claim 8, characterized in that After triggering the first mechanism in the electronic device, the method further includes: When a second adjustment operation on any application window in the window set is monitored and the display content of the new visible area changes, controlling the avatar window to display the display content of the new visible area; The window set includes: application windows above the target application window except the substitute window, and the new visible area includes: the visible area of ​​the target application window relative to all application windows in the window set after the second adjustment operation.

13. The method according to claim 8, characterized in that After triggering the first mechanism in the electronic device or triggering the second mechanism in the electronic device, the method further includes: Redisplaying the target application window at a first time interval; When the display content of the visible area of ​​the redisplayed target application window is different from the display content of the alias window, the alias window is closed.

14. The method according to claim 13, characterized in that In case of triggering the first mechanism in the electronic device, redisplaying the target application window comprises: The stacking order of the target application window and the stacking order of the alias window are exchanged; or, the alias window is adjusted to a completely transparent state.

15. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the control method of the application program as claimed in any one of claims 1 to 14 when executing the computer program.

16. 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 control method of the application program according to any one of claims 1 to 14 is implemented.

17. A computer program product, characterized in that The computer program product stores a computer program, and when the computer program is executed by a processor, the control method of the application program according to any one of claims 1 to 14 is implemented.