Window generation method and device, equipment, medium and program product

By obtaining the application startup information of the application to be protected and generating a target protection window, the problem of difficult to prevent screenshots and/or screen recordings in the prior art is solved, and the effect of effectively preventing data leakage without modifying the underlying code of the application is achieved.

CN119960881APending Publication Date: 2025-05-09BEIJING ZHIZHANGYI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510046749.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-05-09

Smart Images

  • Figure CN119960881A_ABST
    Figure CN119960881A_ABST
Patent Text Reader

Abstract

The invention discloses a window generation method and device, equipment, a medium and a program product, and relates to the technical field of data security. Acquiring application starting information of the to-be-protected application; the application starting information comprises an application process identifier and an application identifier; obtaining a target window, a window identifier of the target window and target window information from a system window list based on the application process identifier; generating a target protection window based on the window identifier and the target window information; and placing the target protection window on a target window of the to-be-protected application so as to prevent screen capture and / or screen recording on the target window. By the adoption of the technical scheme, screen capture and / or screen recording of the to-be-protected application are / is prevented by creating the protection window, bottom-layer codes of the application do not need to be transformed, and the risk of data leakage of sensitive applications is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data security technology, and in particular to a window generation method, device, equipment, medium and program product. Background Art

[0002] With the development of computer technology and network technology, more and more data are stored in computers. While electronic data brings convenience to people in storage and transmission, it also causes data security issues. There are endless incidents of leaking corporate and personal data through screenshots or screen recordings.

[0003] At present, the method of implementing anti-screenshot application on Mac system is generally to set a mark for the window that needs to be protected through source code modification; or to create an interception window when the window that needs to be protected by screen capture is started through hook method.

[0004] However, the above method cannot achieve source code modification for general applications without source code; and the Hook injection operation on the application poses a great risk to the safe use of the system, and some applications also need to be de-signed, which poses certain security risks. Summary of the invention

[0005] The present invention provides a window generation method, apparatus, device, medium and program product to solve the problem of how to prevent screenshots and / or screen recordings of a protected application without modifying the underlying code of the protected application.

[0006] According to one aspect of the present invention, there is provided a window generation method, comprising:

[0007] Obtaining application startup information of the application to be protected; the application startup information includes an application process identifier and an application identifier;

[0008] Acquire a target window, a window identifier of the target window, and target window information from a system window list based on the application process identifier;

[0009] Generate a target protection window based on the window identifier and the target window information;

[0010] The target protection window is placed on the target window of the application to be protected to prevent screenshots and / or recordings of the target window.

[0011] According to another aspect of the present invention, there is provided a window generating device, comprising:

[0012] An application startup information acquisition module, used to acquire application startup information of the application to be protected; the application startup information includes an application process identifier and an application identifier;

[0013] A target window determination module, used to obtain a target window from a system window list based on the application process identifier, as well as a window identifier and target window information of the target window;

[0014] A target protection window generating module, used for generating a target protection window based on the window identifier and the target window information;

[0015] A protection module is used to place the target protection window on the target window of the application to be protected to prevent screenshots and / or recordings of the target window.

[0016] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0017] at least one processor; and

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the window generating method described in any embodiment of the present invention.

[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the window generation method described in any embodiment of the present invention when executed.

[0021] According to another aspect of the present invention, a computer program product is provided. The computer program product comprises a computer program. When the computer program is executed by a processor, the window generating method according to any embodiment of the present invention is implemented.

[0022] The technical solution of the embodiment of the present invention creates a protection window based on the target window and the window information corresponding to the window, which solves the problem of how to prevent screenshots and / or recordings of the protected application without the need to modify the underlying application code, effectively reducing the risk of data leakage of sensitive applications.

[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 is a flow chart of a window generation method provided according to an embodiment of the present invention;

[0026] Figure 2 This is a flow chart of a method for determining an application to be protected adopted in an embodiment of the present invention;

[0027] Figure 3 is a flow chart of a window generation method provided according to an embodiment of the present invention;

[0028] Figure 4 is a flow chart of a window generation method provided according to an embodiment of the present invention;

[0029] Figure 5 is a structural schematic diagram of a window generating device provided according to an embodiment of the present invention;

[0030] Figure 6 It is a structural schematic diagram of an electronic device for implementing the window generation method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0032] In addition, it should be noted that in the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of window system data involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0033] Figure 1This is a flowchart of a window generation method provided according to an embodiment of the present invention. The present invention can be applied to prevent screenshots and / or screen recordings of applications, and is particularly applicable to screenshots and / or screen recordings of protected applications in Mac systems. The method can be executed by a window generation device provided by an embodiment of the present invention. The window generation device can be implemented in the form of hardware and / or software, and can be integrated into an electronic device that carries the window generation function, such as a mobile terminal or a PC. Figure 1 As shown, the method includes:

[0034] S110. Obtain application startup information of the application to be protected; the application startup information includes an application process identifier and an application identifier.

[0035] Among them, the application to be protected is an application with sensitive information; the application process identifier is the application Pid (Processsindentifier), which is used to distinguish the application process identifier. Every time a software is started in the system, a process will be generated, and a corresponding application process identifier will be generated at the same time. During the software operation, the application process identifier is unique; the application identifier is the application Bundle Id, which is the unique identifier of the application in the system, used to ensure that users can distinguish between different applications on the device.

[0036] Specifically, after the application to be protected is started, an application identifier of the application to be protected and a corresponding application process identifier are obtained from the system as application startup information.

[0037] Optional, such as Figure 2 The flowchart of a method for determining an application to be protected shown in the figure further includes: before obtaining application startup information of the application to be protected:

[0038] S111. Obtain a list of applications to be protected from a server.

[0039] The list of applications to be protected is a list of application identifiers to be protected, which may be a list of application Bundle Ids.

[0040] Specifically, the server provides an interface to obtain the application BundleId list that needs to be protected from screenshots and / or screen recordings and is transmitted by the upper-layer application, and only includes the identification of the application to be protected and stores it.

[0041] S112: Monitor an application startup event of the application to be started, and determine whether the application to be started is an application to be protected based on the list of applications to be protected.

[0042] The applications to be started are applications currently being started in the system, including applications to be protected and applications that do not require protection.

[0043] Specifically, the monitoring module monitors the application startup event of the application to be started in the system, obtains the corresponding application startup information, and queries the list of applications to be protected based on the application identifier in the application startup information to see whether there is a matching application identifier. If there is a match, the application to be started is the application to be protected, and step S120 can be executed; if there is no match, the application to be started is an application that does not require protection and no processing is performed.

[0044] Exemplarily, by monitoring the system event NSWorkspaceDidLaunchApplicationNotification, the application launch event in the system is obtained, and the application launch information is obtained by querying the NSWorkspaceApplicationKey field. Based on the application identifier in the application launch information, it is queried in the list of applications to be protected whether there is a matching application identifier. If there is a match, step S120 is executed.

[0045] It should be noted that the monitoring module is set to monitor system application operation events. A script can be written to regularly check the system process list or a third-party tool can be used to monitor application operation events. Relevant technical personnel can set up a suitable monitoring mechanism to monitor system application operation events according to actual needs. The embodiment of the present invention does not specifically limit this.

[0046] S120: Acquire a target window, a window identifier of the target window, and target window information from a system window list based on the application process identifier.

[0047] Among them, the system window list is the windows opened in the current device, including windows opened by the application to be protected and windows opened by other applications; the target window is the window opened by the application to be protected; the window identifier is the unique identifier of each window; the target window information is the coordinate information of the target window in the device display screen and the corresponding window size information.

[0048] Specifically, according to the application process identifier, a query and comparison is performed from all window lists started by the current device to obtain the window list information corresponding to the application to be protected, including the target window, and the window identifier of the target window, the target window coordinate information and the target window size information.

[0049] Exemplarily, after obtaining the application process ID, the CGWindowListCopyWindowInfo method is used to obtain a list of all windows that have been started on the current device, including the application process ID and the window ID, which are compared with the application process ID corresponding to the application to be protected, to obtain a list of windows corresponding to the application to be protected, including the target window of the application to be protected, and the window ID, target window coordinate information, and target window size information corresponding to the target window.

[0050] S130: Generate a target protection window based on the window identifier and the target window information.

[0051] A protection window is generated according to the target window coordinate information and the target window size information in the target window information, and the protection window is associated with the window identifier as a target protection window. The target protection window has the same size as the target window and the same position on the display screen of the device.

[0052] Optionally, generating a target protection window based on the target window identifier and the target window information includes:

[0053] Generate an initial artboard according to the window size information in the target window information;

[0054] Set the background color of the initial artboard to transparent and borderless to obtain the target artboard;

[0055] Generate a target protection window according to the window identifier, the window coordinate information in the target window information and the target drawing board.

[0056] Specifically, the initial canvas is determined according to the window size information in the target window information, and the background color of the initial canvas is set to transparent and borderless, so that the initial canvas becomes a colorless and transparent target canvas, and based on the window identifier, the window coordinate information in the target window information and the target canvas, a target protection window is generated. The target protection window is the colorless and transparent target canvas containing the window identifier and window coordinate information.

[0057] It can be understood that the corresponding initial drawing board is generated based on the window size information, and there is no need to hide the information that does not need to be protected, thereby realizing personalized hiding of sensitive information; and a colorless and transparent target drawing board is generated as a target protection window, which is only grayed out during screenshots and / or screen recordings to ensure that daily use does not affect users.

[0058] Exemplarily, the target artboard can be constructed through NSPanel in the MacOS development framework, the initial artboard can be determined according to the window size information in the target window information, and the background color of the initial artboard can be set to transparent and borderless, so that the NSPanel initial artboard becomes a colorless and transparent target artboard, so that the window can be grayed out during screenshots and / or screen recording by subsequently calling the CGSSetWindowCaptureExcludeShepe method.

[0059] It can be understood that by generating the target protection window based on the native view of the Mac system, while prohibiting applications from taking screenshots and / or recording screens, it does not interfere with the operation of other applications and system processes, and has good compatibility and stability; and compared to the solution of using third-party tools to manually hide and gray out information, the embodiment of the present invention automatically grays out the window to ensure the effective hiding of sensitive information.

[0060] S140: Placing a target protection window on a target window of the application to be protected, so as to prevent screenshots and / or screen recordings of the target window.

[0061] The target protection window is associated with the target window of the application to be protected and placed on the target window to prevent screenshots and / or screen recordings of the target window.

[0062] Exemplarily, after obtaining the target protection window, the target protection window is associated with the target window and placed on the target window by calling the [windoworderv,indow.NS,VindowAbo.erelatiweTo:[dc[@rkCGVndowNumber]intValue] method, so that when the target window is subsequently screenshoted and / or recorded, the target window is gray and the information in the window is not displayed.

[0063] It can be understood that associating the target protection window with the target window and placing it on the target window, that is, setting the target window as a colorless and transparent protective shell, not only ensures the normal use of the user, but also effectively avoids the leakage of sensitive information during screenshots and / or screen recording. Furthermore, based on the window size information of the target window, the protection of other interfaces is effectively avoided, thereby achieving precise protection of sensitive information.

[0064] In an optional manner of the present invention, the target protection window is stored in a protection window storage list.

[0065] The protection window storage list may include the window ID and application process ID information of the target protection window, which is used to subsequently identify which window and process the target protection window belongs to, facilitate the subsequent use of the target protection window, and realize the calling, adjustment and destruction of the target protection window.

[0066] Optionally, the application to be protected is a Mac system application.

[0067] Mac system is an operating system developed by Apple and runs on Macintosh series computers. One of the existing methods to prevent applications from taking screenshots and / or recording screens is to modify the underlying code. However, windows in the Mac system are not shared with other applications, and some application software does not provide source code to the outside, which leads to great limitations of this method. Another method is to intercept window creation when the application is started and the protection window needs to be started through a hook, but it is necessary to turn off the SIP (System Integrity Protection) of the Mac system, which poses a great risk to the safe use of the system. At the same time, this solution also requires de-signing for some applications, which poses certain security risks.

[0068] Based on this, the present invention can be improved in the original mechanism of the Mac system to construct an application anti-screenshot method that conforms to the Mac system. The implementation of the target protection window in the above technical solution can be created based on the native view of the Mac system. While preventing the application from taking screenshots, it does not interfere with the operation of other applications and system processes. The compatibility and stability are good, and the monitoring of system applications can also be implemented based on the monitoring mechanism provided by the Mac system, which is more reliable. The Mac system does not need to turn off SIP (System Integrity Protection), it does not need to modify the application source code, and does not need to perform Hook and de-signing processing to prevent the application from taking screenshots and / or recording, thereby effectively reducing the risk of data leakage of sensitive applications.

[0069] In an optional method of the present invention, the generation of the target protection window can support Intel and M1 chips, improving compatibility with operating systems and device types; and related monitoring functions and target protection window generation functions are encapsulated as a framework library to ensure easy application integration and use.

[0070] The embodiment of the present invention obtains application startup information of the application to be protected; the application startup information includes an application process identifier and an application identifier; based on the application process identifier, a target window, as well as the window identifier and target window information of the target window are obtained from a system window list; based on the window identifier and the target window information, a target protection window is generated; the target protection window is placed on the target window of the application to be protected to prevent screenshots and / or screen recordings of the target window; the above technical solution solves the problem of how to prevent screenshots and / or screen recordings of the application to be protected without modifying the underlying code of the application, and generates a target protection window through application startup information, associates the target protection window with the target window and places it on the target window; while realizing the prevention of screenshot and screen recording of the application window, it does not interfere with the operation of other APPs and system processes, and has good compatibility and stability, effectively preventing the risk of screenshot leakage, while non-protected applications can capture screenshots normally to avoid affecting the user's use process.

[0071] Figure 3 is a flow chart of a window generation method provided according to an embodiment of the present invention. Based on the above embodiment, the embodiment of the present invention supplements the target protection window adjustment method after the target window is refreshed. It should be noted that for the part not described in detail in the embodiment of the present invention, please refer to the relevant description of other embodiments. Figure 3 As shown, the method includes:

[0072] S210. Obtain application startup information of the application to be protected; the application startup information includes an application process identifier and an application identifier.

[0073] S220: Acquire a target window, a window identifier of the target window, and target window information from a system window list based on the application process identifier.

[0074] S230: Generate a target protection window based on the window identifier and the target window information.

[0075] S240: placing a target protection window on a target window of the application to be protected, so as to prevent screenshots and / or screen recordings of the target window.

[0076] S250: Monitor application refresh events of the application to be protected.

[0077] Among them, the events involved in the target window refresh include mouse click, mouse drag, keyboard click, window full screen / exit full screen, etc.; the application refresh event may include the application process identifier and the window identifier.

[0078] Monitor the events related to window refresh in the system, which can be the jump window after the mouse click, the movement of the window after the mouse is dragged, the keyboard click, and the change of the window size when the window is full screen / exit full screen, and obtain the corresponding window ID.

[0079] Exemplarily, addGlobalMonitorForEventsMatchingMask is used to register event listeners that cause window refreshes in the Mac system, including: mouse clicks (NSEventMaskLeftMouseUp, NSEventMaskLeftMouseDown), mouse drags (NSEventMaskLeftMouseDragged), and keyboard clicks (NSEventMaskKeyUp, NSEventMaskKeyDown), to obtain the corresponding window identifiers; NSWorkspaceActiveSpaceDidChangeNotification is used to register window full-screen and exit full-screen events in the Mac system to obtain the corresponding window identifiers.

[0080] S260: Acquire a refresh window corresponding to the target window and refresh window information of the refresh window from the system window list based on the window identifier.

[0081] Among them, the refresh window is the window after the target window is changed, and the change mode may be at least one of window movement, window enlargement or window reduction; the refresh window information is the window coordinate information and / or window size information corresponding to the refresh window, the window coordinate information is the position of the refreshed window after the movement, and the window size information may be the size of the refresh window after the size of the target window is changed.

[0082] Specifically, query and compare all window lists in the current device according to the window identifier to obtain window list information after the target window corresponding to the window identifier is refreshed, which may include the refresh window and the refresh window information corresponding to the refresh window.

[0083] Exemplarily, the cGvindowListCopyWindowinio method is used to obtain a list of all windows in the current device, and query and compare based on the window identifier to obtain the corresponding new window and refresh window information.

[0084] S270. Adjust the target protection window according to the refresh window information to obtain an updated target protection window.

[0085] The target protection window is adjusted according to the refresh window information; it can be that if the coordinate information of the refresh window changes, the target protection window is adjusted based on the window coordinate information in the refresh window information to obtain an updated target protection window; if the size information of the refresh window changes, the target protection window is adjusted based on the window size information in the refresh window information to obtain an updated target protection window.

[0086] In an optional manner of the present invention, the target protection window is searched from the protection window storage list based on the window identifier in the refresh window information.

[0087] After the target protection window is found, the target protection window is adjusted according to the refresh window coordinate information, the refresh window size information, etc. to obtain an updated target protection window.

[0088] It can be understood that by storing the target protection window, after the target window changes, the target protection window is adjusted based on the changed window information, thereby improving the utilization efficiency of the protection window, avoiding excessive occupation of server resources, and ensuring that the target protection window changes with the target window. The entire solution is simple to implement and has low invasiveness to the protected application itself, and can quickly and efficiently implement application protection and deployment.

[0089] The embodiment of the present invention monitors the refresh events of the application to be protected and adjusts the target protection window based on the refresh window information, so as to protect the application to be protected in real time and effectively prevent the leakage of sensitive information of the application to be protected. The overall solution is simple, there is no need to invade the application to be protected, and there is no need to redraw the target window after the change, thereby improving the effective utilization of internal resources of the server.

[0090] Figure 4is a flow chart of a window generation method provided according to an embodiment of the present invention. Based on the above embodiment, the embodiment of the present invention supplements the closing of the target protection window of the protected application. It should be noted that for the part not described in detail in the embodiment of the present invention, please refer to the relevant description of other embodiments. Figure 4 As shown, the method includes:

[0091] S310. Obtain application startup information of the application to be protected; the application startup information includes an application process identifier and an application identifier.

[0092] S320: Acquire a target window, a window identifier of the target window, and target window information from a system window list based on the application process identifier.

[0093] S330: Generate a target protection window based on the window identifier and the target window information.

[0094] S340: placing a target protection window on the target window of the application to be protected, so as to prevent screenshots and / or screen recordings of the target window.

[0095] S350: Monitor an application closing event of the application to be protected, and obtain application closing information of the application to be protected.

[0096] Monitor the closing of applications in the system, and further obtain application closing information of the application to be protected, including the application process ID and application ID.

[0097] Exemplarily, the application closing event is obtained by monitoring the system event NSWorkspaceDidTerminateApplicationNotification, and the application details, including the application process ID and the application ID, are obtained by querying the NSWorkspaceApplicationKey field.

[0098] In an optional method of the present invention, monitoring application closing events of applications to be protected may include: monitoring application closing events in the Mac system, obtaining information about closed applications, including: application process identifier and application identifier, and querying from a list of applications to be protected based on the application identifier; if the application identifier is found, the closed application is the application to be protected, and step S360 is executed; if the application identifier is not found, the closed application is an application that does not require protection, and it does not have a corresponding target protection window, so it is not processed.

[0099] S360. Based on the application closing information, query at least one target protection window from the protection window storage list, and close the target protection windows in sequence.

[0100] According to the application process identifier in the application closing information, all corresponding protection layer windows corresponding to the application to be protected are found from the protection window storage list, and the closing operation is performed in sequence.

[0101] It can be understood that after the protected application exits normally, the corresponding target protection window is queried based on the application process identifier, and the corresponding target protection window is destroyed. The resources occupied by the window are correctly released when the window is destroyed, which helps to maintain the stability of the application to avoid affecting system performance or causing problems in other applications.

[0102] After the application to be protected exits normally, the embodiment of the present invention sequentially destroys all target protection windows created and associated with the application to be protected, releasing the resources occupied by the created target protection windows, which helps to maintain the stability of the application and further ensures that when creating and destroying the target protection windows, it does not interfere with the operation of other applications and system processes, and has good compatibility and stability.

[0103] Figure 5 is a structural diagram of a window generation device provided according to an embodiment of the present invention. The present invention can be applied to the case of preventing screenshots and / or screen recordings of applications, and is particularly applicable to the case of screenshots and / or screen recordings of protected applications in a Mac system. The window generation device can be implemented in the form of hardware and / or software, and can be integrated into an electronic device that carries the window generation function, such as a mobile terminal or a PC. Figure 5 As shown, the window generating device 400 includes an application startup information obtaining module 410 , a target window determining module 420 , a target protection window generating module 430 and a protection module 440 .

[0104] The application startup information acquisition module 410 is used to acquire the application startup information of the application to be protected; the application startup information includes the application process identifier and the application identifier;

[0105] A target window determination module 420 is used to obtain a target window, a window identifier of the target window, and target window information from a system window list based on an application process identifier;

[0106] A target protection window generating module 430, configured to generate a target protection window based on the window identifier and the target window information;

[0107] The protection module 440 is used to place a target protection window on the target window of the application to be protected to prevent screenshots and / or recordings of the target window.

[0108] The embodiment of the present invention obtains application startup information of the application to be protected; the application startup information includes an application process identifier and an application identifier; based on the application process identifier, a target window, as well as the window identifier and target window information of the target window are obtained from a system window list; based on the window identifier and the target window information, a target protection window is generated; the target protection window is placed on the target window of the application to be protected to prevent screenshots and / or screen recordings of the target window; the above technical solution solves the problem of how to prevent screenshots and / or screen recordings of the application to be protected without modifying the underlying code of the application, and generates a target protection window through application startup information, associates the target protection window with the target window and places it on the target window; while realizing the prevention of screenshot and screen recording of the application window, it does not interfere with the operation of other APPs and system processes, and has good compatibility and stability, effectively preventing the risk of screenshot leakage, while non-protected applications can capture screenshots normally to avoid affecting the user's use process.

[0109] Optionally, the target protection window generation module 430 includes an initial drawing board generation unit, a target drawing board generation unit and a target protection window generation unit:

[0110] An initial artboard generating unit, used to generate an initial artboard according to the window size information in the target window information;

[0111] A target artboard generating unit, used for setting the background color of the initial artboard to be transparent and borderless, to obtain a target artboard;

[0112] The target protection window generating unit is used to generate a target protection window according to the target window identifier, the window coordinate information in the target window information and the target drawing board.

[0113] Optionally, the window generating device 400 also includes a window refresh module, which is used to monitor application refresh events of the application to be protected; obtain a refresh window corresponding to the target window and refresh window information of the refresh window from the system window list based on the window identifier; adjust the target protection window according to the refresh window information to obtain an updated target protection window.

[0114] Optionally, the window generating device 400 also includes a window closing module, which is used to monitor application closing events of the application to be protected and obtain application closing information of the application to be protected; based on the application closing information, query at least one target protection window from the protection window storage list, and close the target protection windows in turn.

[0115] Optionally, the window generating device 400 further includes a monitoring module, which is used to obtain a list of applications to be protected from a server; monitor application startup events of the application to be started, and determine whether the application to be started is an application to be protected based on the list of applications to be protected.

[0116] Optionally, the application to be protected is a Mac system application.

[0117] The window generating device provided in the embodiment of the present invention can execute the window generating method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the executing method.

[0118] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.

[0119] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0120] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0121] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0122] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a window generation method.

[0123] In some embodiments, the window generation method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the window generation method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the window generation method in any other appropriate manner (e.g., by means of firmware).

[0124] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0125] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0126] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0127] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0128] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0129] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0130] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0131] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A window generation method, characterized in that: include: Obtaining application startup information of the application to be protected; the application startup information includes an application process identifier and an application identifier; Acquire a target window, a window identifier of the target window, and target window information from a system window list based on the application process identifier; Generate a target protection window based on the window identifier and the target window information; The target protection window is placed on the target window of the application to be protected to prevent screenshots and / or recordings of the target window.

2. The method according to claim 1, characterized in that Generating a target protection window based on the target window identifier and the target window information includes: Generate an initial drawing board according to the window size information in the target window information; The background color of the initial drawing board is set to be transparent and borderless to obtain a target drawing board; A target protection window is generated according to the window identifier, the window coordinate information in the target window information and the target drawing board.

3. The method according to claim 1, characterized in that After placing the target protection window on the target window of the application to be protected, the method further includes: Monitoring application refresh events of the application to be protected; Acquire a refresh window corresponding to the target window and refresh window information of the refresh window from the system window list based on the window identifier; The target protection window is adjusted according to the refresh window information to obtain an updated target protection window.

4. The method according to claim 1, characterized in that: After placing the target protection window on the target window of the application to be protected, the method further includes: Monitoring an application closing event of the application to be protected, and obtaining application closing information of the application to be protected; At least one target protection window is queried from the protection window storage list based on the application closing information, and the target protection windows are closed in sequence.

5. The method according to claim 1, characterized in that: Before obtaining the application startup information of the application to be protected, the method further includes: Get the list of applications to be protected from the server; An application startup event of the application to be started is monitored, and based on the list of applications to be protected, it is determined whether the application to be started is an application to be protected.

6. The method according to any one of claims 1 to 5, characterized in that The application to be protected is a Mac system application.

7. A window generating device, characterized in that: include: An application startup information acquisition module, used to acquire application startup information of the application to be protected; The application startup information includes an application process identifier and an application identifier; A target window determination module, used to obtain a target window from a system window list based on the application process identifier, as well as a window identifier and target window information of the target window; A target protection window generating module, used for generating a target protection window based on the window identifier and the target window information; A protection module is used to place the target protection window on the target window of the application to be protected to prevent screenshots and / or recordings of the target window.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the window generating method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the window generation method according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the window generation method according to any one of claims 1 to 6.