Method and system for dynamically identifying and recognizing remote application windowTechnical Field
The invention belongs to the technical field of cloud application, and particularly relates to a method for dynamically identifying and recognizing a remote application window.
Background
With the change of cloud computing and cloud desktop technologies, the use scenes of people are further developed from cloud on office desktops to cloud on applications. Through deployment of the cloud application, a user can use existing computer software like a WeChat applet, various redundant software does not need to be installed on the computer of the user, and the traditional Office, 3D design and even software application developed by the user can be opened through direct double-click of an application software store, so that various problems of insufficient space of a personal computer, system compatibility of software, trouble in operation and maintenance of computer failure, too few software licenses, document confidentiality and the like are avoided, and the most obvious advantage brought by the cloud application is achieved.
The cloud application is different from a desktop in that application programs needed by daily work are uniformly deployed in a cloud platform, a local computer where a user is located only needs to install a unique client software package, the application programs needed by the work can be browsed and searched in an application store interface of the cloud platform after being opened and logged in, then the user can directly click and open the application programs for use, downloading and installation on the local computer are not needed, and the experience of using the application programs on the local computer is not different.
The difference between the process of using the cloud application by the user and the cloud desktop is that only the program window running at the cloud end is seen, and the program window is displayed on the local computer desktop of the user just like the running of software installed on a local computer. In fact, the opening, rendering and interaction processes of the cloud application window adopt a window management mechanism of a Windows operating system kernel, when an application program on a cloud host desktop is opened, attribute parameter information of the window object is transmitted to a client through a network channel by capturing a series of events in the life cycle of the window object, and the client constructs the same window object locally by using the data and renders the same window object on the client desktop.
When a user performs window interaction on a cloud application on a local computer, an interaction behavior is sent to the cloud for processing, and a result is fed back, for example: mouse events, keyboard events, touch screen events, other peripheral events, and the like. The window interaction behaviors of the client are sent to the cloud end as required, the appearance, the position and the size of the window are triggered to change or destroy, the process experience is the same as that of the corresponding window on the local computer, and the cloud end and the local are seamlessly integrated.
In the whole process of window interaction of a user on a local computer for cloud applications, the user sees that the user runs a plurality of cloud applications on the local computer, but the application windows are all windows played by the same cloud application client software, and a task manager of the local computer cannot find a process corresponding to the cloud applications. This can be troublesome for some scenarios. For example, a user may want to see what application processes are behind these cloud application windows, and although they can be identified by the naked eye, they cannot be identified by programming means, and they cannot obtain application information accurately only by using information such as window type, window title, window size, window position coordinates, window appearance bitmap, etc.
Disclosure of Invention
The invention aims to provide a method for dynamically identifying and recognizing a remote application window, which solves the technical problems that in the existing cloud application technology, a user cannot look up a process corresponding to a cloud application in a task manager of a local computer and cannot identify what application program process is behind the cloud application windows through a programming means.
In order to solve the technical problems, the invention adopts the technical scheme that:
a method for dynamically identifying and recognizing remote application windows is characterized in that a sub-window with an identity mark is added to each opened cloud application window in a cloud server, and original data information of an application program of the cloud application window is carried on a title bar of the sub-window.
Since the cloud application relates to countless business software for office, teaching and design, and the software itself cannot modify source codes to transmit more information in a cloud application scene, a cloud application daemon agent needs to be added, a hidden and fully transparent child window with an identity is added to each cloud application window, application metadata information of the cloud application window, such as original information of a program name, a process ID and the like, is carried on a title bar of the child window, and thus a complete and accurate original data structure can be transmitted to a client. The original data information of the cloud application window is transmitted by using a cross-process child window technology, so that a client can know which applications each window belongs to, and a user can be supported to prevent repeated opening of an instant messaging program, confirm which applications are running from a client logout window, and count and report additional functions such as which cloud applications the client uses, and the like.
The method for further optimizing, dynamically identifying and recognizing the remote application window comprises the following specific steps:
1) designing a cloud application daemon agent in the cloud server, wherein the agent always runs in the context of each session between a client and the cloud server through a cloud application client;
2) when the agent program detects that the cloud application is opened, a corresponding identification window is established as a child window, the original information of the cloud application is recorded in a title character string of the identification window, and a parent window of the child window is set as a corresponding cloud application window;
3) because the operating system supports the cross-process parent-child window relationship setting behavior, the parent-child relationship information is transmitted to the cloud application client, and a user can analyze the application program background information of the parent window from the character string information recorded in the title of the identification window by detecting the parent window handle of the identification window at the cloud application client, so that all original data of the cloud application are obtained.
Further optimization, in the step 2), the cloud application window monitoring module in the agent program is started along with the login of the user on the cloud application client and is operated all the time. The method comprises the steps that a monitoring module monitors that a certain cloud application is started through a mechanism of capturing window events, a new cloud application window is opened, information of the cloud application window is obtained according to a cloud application window handle, the information is spliced into character strings in a json format and packaged into management metadata, and the character strings are used as title bars to create a corresponding identification window; the size and the position of the identification window can be consistent with those of the corresponding cloud application window and can be adjusted along with the adjustment of the corresponding cloud application window.
Further optimization, in the step 3), when the cloud application client detects that a new window is opened, detecting whether the title bar format of the window is a legal json character string, and if so, analyzing the content of the character string; when the analyzed information conforms to the content of the cloud application identification window, setting the information as an identification window; and then obtaining all the identification information of the cloud application window by obtaining the corresponding father window handle.
Further optimized, the application raw data information of the application window includes, but is not limited to, an application process ID, a path of an application executable file, an application package name, and an application version number.
Further optimization, the creation process of the identification window is completely dynamic, and the identification window is automatically created along with the conventional operations of opening, moving, closing and the like of a new cloud application window in the using process of a user. The appearance of the identification window is a hidden watermark or an explicit watermark.
A system for dynamically identifying and recognizing remote application windows, comprising:
the device terminal is used for accessing the cloud application server through the cloud application client and displaying a cloud application window;
the cloud application client is used for receiving a cloud application request instruction of a user and transmitting the cloud application request instruction to the cloud application server; then receiving the opened cloud application window;
the cloud application server is used for receiving a cloud application request instruction sent by the cloud application client, opening a corresponding cloud application and returning an opened cloud application window to the cloud application client;
the cloud application window monitoring module is used for monitoring the starting of the cloud application, creating a corresponding identification window as a child window, recording original information of the cloud application in a title character string of the identification window, and setting a parent window of the child window as a corresponding cloud application window;
the cloud application client detection module is used for detecting whether the newly opened window is an identification window or not and then obtaining all identification information of the corresponding parent window; by detecting the father window handle of the identification window at the cloud application client, the user can analyze the application program background information of the father window from the character string information recorded in the identification window header, so that all original data of the cloud application are obtained.
The technical scheme of the invention has the beneficial effects that:
1. according to the method and the device, the hidden fully transparent sub-window with the identity is added to each cloud application window, and the application program metadata information of the cloud application window, such as program name, process ID and other original information, is carried on the title bar of the sub-window, so that a complete and accurate original data structure can be transmitted to the client.
2. According to the method and the device, on the basis of the original data transmission of the cloud application window image, the identification and recognition technology of the application window is enhanced, so that the client can know which applications each window belongs to, the user can be supported to prevent the instant messaging program from being repeatedly opened, the applications are confirmed to be running from the client logout window, and the additional functions of reporting which cloud applications are used by the client and the like are counted.
Drawings
FIG. 1 is a schematic diagram of a system for dynamically identifying and recognizing remote application windows in accordance with the present invention;
FIG. 2 is a block diagram of dynamically identifying and recognizing remote application windows;
FIG. 3 is a flow chart of a method of dynamically identifying and recognizing remote application windows;
FIG. 4 is a flow diagram of an adjustment of an identification window with an adjustment of a corresponding cloud application window;
fig. 5 is a schematic diagram of opening a plurality of cloud applications and establishing a plurality of corresponding identification windows.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
As shown in fig. 1 to 5, a method for dynamically identifying and recognizing a remote application window takes a system for dynamically identifying and recognizing a remote application window as an execution object, and as shown in fig. 1, the system includes anapparatus terminal 1, acloud application client 2, a cloud applicationclient detection module 21, a cloud application server 3, and a cloud applicationwindow monitoring module 31. The device terminal is used for accessing the cloud application server through the cloud application client and displaying a cloud application window; the cloud application client is used for receiving a cloud application request instruction of a user and transmitting the cloud application request instruction to the cloud application server; then receiving the opened cloud application window; the cloud application server is used for receiving a cloud application request instruction sent by the cloud application client, opening a corresponding cloud application and transmitting an opened cloud application window back to the cloud application client; the cloud application window monitoring module is used for monitoring the starting of the cloud application and creating a corresponding identification window; and the client detection module is used for detecting whether the newly opened window is the identification window or not and then obtaining all the identification information of the corresponding parent window.
As shown in fig. 2, in the system, a window event signal capture interface is supported on the bottom layer of a Windows operating system, a new window object can be known to be generated by capturing a window creating and displaying event on a cloud server, information such as a process to which a window belongs, a corresponding cloud application and the like is extracted by using an object handle, and then the information is encapsulated into management metadata and transmitted to a client, so that the cloud application client can use the management metadata to identify the window identity, and more enhanced management behaviors can be realized due to the abundant window identity information.
Specifically, the method for dynamically identifying and recognizing the remote application window, as shown in fig. 3, includes the following steps:
step 1: a cloud application daemon agent program is designed in a cloud server, and a cloud application window monitoring module in the agent program is started along with the fact that a user logs in a cloud application client and always runs in the context of each conversation between the client and the cloud server through the cloud application client.
Step 2: the monitoring module monitors that the cloud application A is started through a mechanism of capturing window events, opens a new cloud application window, acquires information of the cloud application window according to a cloud application window handle, then splices the information into character strings in a json format, packages the character strings into management metadata, and creates a corresponding identification window A by using the character strings as a title bar. The size and position of the identification window and the corresponding cloud application window can be kept consistent, and the size, position and level of the identification window can be adjusted along with the movement, size adjustment, maximization, minimization and level change of the cloud application window, so that the identification window can completely follow the cloud application window, as shown in fig. 4.
And 3, because the operating system supports the setting behavior of the parent-child window relationship of the cross-process, the parent-child relationship information is transmitted to the cloud application client. When the cloud application client detection module detects that a new window is opened, detecting whether the title bar format of the window is a legal json character string, and if so, analyzing the character string content; when the analyzed information conforms to the content of the cloud application identification window, setting the information as an identification window; and then obtaining all the identification information of the cloud application window by obtaining the corresponding father window handle.
The process is completely dynamic, and the new cloud application window is automatically created along with the conventional operations of opening, moving, closing and the like of the new cloud application window in the using process of a user.
In this embodiment, the application raw data information of the application window includes, but is not limited to, an application process ID, a path of an application executable file, an application package name, and an application version number.
In this embodiment, the identification window is a hidden fully transparent sub-window
In other embodiments, the appearance of the identification window may be an explicit watermark.
In other embodiments, when a user opens multiple cloud applications, for example, when a cloud application window monitoring module in a proxy detects that a cloud application a, a cloud application B, and a cloud application C are started, corresponding identification windows a, B, and C are respectively established in sequence according to the start time and are transmitted to a cloud application client, and then the user can obtain all identification information of the three cloud application windows, as shown in fig. 5.
The above examples are merely illustrative for clarity and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.