A window display method, computing device and storage medium

By creating parent and child processes in the operating system, using shared storage space to store and share data from application and plug-in interfaces, the stability and compatibility issues of application and plug-in interface display are solved, and efficient drawing of application windows is achieved and the stable operation of plug-ins.

CN114020268BActive Publication Date: 2024-12-27UNIONTECH SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111320544.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-27
Publication Date
2024-12-27
Estimated Expiration
2041-08-27

Smart Images

  • Figure CN114020268B_ABST
    Figure CN114020268B_ABST
Patent Text Reader

Abstract

The present invention discloses a window display method, a computing device and a storage medium. The window display method is suitable for being executed in a computing device and includes the following steps: creating a parent process in an operating system, generating interface data of an application interface according to the parent process running an application; creating a child process of the parent process, generating interface data of a plug-in interface according to the child process running an application plug-in; allocating a shared storage space in a memory, storing the interface data of the application interface and the plug-in interface in the shared storage space; determining the hierarchical relationship between the application interface and the plug-in interface according to the interface data of the application interface and the plug-in interface in the shared storage space; drawing an application window including the application interface and the plug-in interface according to the interface data of the application interface and the plug-in interface and the hierarchical relationship between the application interface and the plug-in interface. The present invention can improve the running stability of the plug-in in the application and the compatibility of the application to the plug-in.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention patent application filed on August 27, 2021. The application number of the original application is: 2021109930434, and the name of the invention is: A window display method, computing device and storage medium. Technical Field

[0002] The present invention relates to the field of software development, and in particular to a window display method, a computing device and a storage medium. Background Art

[0003] With the development of computer technology, more and more applications running on computers have emerged, and applications carry more and more functions. In the process of developing applications, using plug-ins to integrate corresponding functions in applications has become a mature practice. A plug-in is a special program that is called through an interface with an application. In the process of developing and running an application and presenting the interface, the compatibility of the application with the plug-in and the stability of the application after the plug-in is integrated are very important.

[0004] In the prior art, when displaying the interface of an application and its plug-in, a single-process graphic plug-in is used. Specifically, the plug-in process is loaded into the process space of the application process, the plug-in object is initialized and the window data of the plug-in object is obtained, and finally it is added to the main window for display. In the prior art, when the plug-in stability is poor, or there is a compatibility problem between the plug-in interface and the program interface, the entire program will fail to run and be forcibly stopped.

[0005] To do this, a new window display method is needed. Summary of the invention

[0006] To this end, the present invention provides a window display method to try to solve or at least alleviate the above problems.

[0007] According to one aspect of the present invention, there is provided a window display method, which is executed in a computing device, the computing device including a memory storing an application program and running an operating system, the method including the steps of: creating a parent process in the operating system, and generating interface data of an application interface according to running the application program in the parent process, wherein the application program also includes a plug-in; creating a child process of the parent process, and generating interface data of the plug-in interface according to running the plug-in of the application program in the child process; allocating a shared storage space in the memory, and storing the interface data of the application interface and the plug-in interface in the shared storage space; determining the hierarchical relationship between the application interface and the plug-in interface according to the interface data of the application interface and the plug-in interface in the shared storage space; and drawing an application window including the application interface and the plug-in interface according to the interface data of the application interface and the plug-in interface and the hierarchical relationship between the application interface and the plug-in interface.

[0008] Optionally, in the method according to the present invention, the operating system includes a communication unit, and allocating shared storage space in the memory includes the steps of: registering a parent process in the communication unit; and setting the shared storage space in the memory by calling the communication unit through the parent process.

[0009] Optionally, in the method according to the present invention, storing the interface data of the application interface and the plug-in interface in a shared storage space includes the steps of: calling a communication unit through a parent process to store the interface data of the application interface in a memory; registering a child process in the communication unit; and storing the interface data of the plug-in interface in a memory through the child process.

[0010] Optionally, in the method according to the present invention, the operating system also includes a drawing unit, and the method also includes the steps of: registering a parent process in the drawing unit; calling the communication unit through the child process to send an interface drawing message to the parent process; after the parent process receives the interface drawing message, the parent process calls the drawing unit to obtain the interface data of the application interface and the plug-in interface from the shared storage space, so as to determine the hierarchical relationship between the application interface and the plug-in interface based on the interface data of the application interface and the plug-in interface.

[0011] Optionally, in the method according to the present invention, determining the hierarchical relationship between the application interface and the plug-in interface based on the interface data of the application interface and the plug-in interface in the shared storage space includes the steps of: constructing the structural relationship between the application interface and the plug-in interface based on the interface data of the application interface and the plug-in interface; and determining the hierarchical relationship between the application interface and the plug-in interface based on the structural relationship between the application interface and the plug-in interface.

[0012] Optionally, in the method according to the present invention, drawing an application window including an application interface and a plug-in interface includes the steps of: drawing the application interface according to the interface data of the application interface; drawing the plug-in interface according to the interface data of the plug-in interface; combining the application interface and the plug-in interface to determine the overlapping area of ​​the application interface and the plug-in interface in the application window; and according to the hierarchical relationship between the application interface and the plug-in interface, shielding the application interface in the overlapping area to obtain the application window.

[0013] Optionally, the method according to the present invention also includes the steps of: generating interface data of a secondary interface according to a plug-in of an application running in a sub-process, the secondary interface being a sub-interface of the plug-in interface; storing the interface data of the secondary interface in a shared storage space; determining a hierarchical relationship between the plug-in interface and the secondary interface according to the interface data of the secondary interface and the plug-in interface in the shared storage space; and drawing the secondary interface in the application window according to the interface data of the plug-in interface and the hierarchical relationship between the plug-in interface and the secondary interface.

[0014] Optionally, in the method according to the present invention, determining the hierarchical relationship between the plug-in interface and the secondary interface based on the interface data of the secondary interface and the plug-in interface in the shared storage space includes the steps of: constructing a structural relationship between the plug-in interface and the secondary interface based on the interface data of the plug-in interface and the secondary interface; determining the hierarchical relationship between the plug-in interface and the secondary interface based on the structural relationship between the plug-in interface and the secondary interface.

[0015] Optionally, in the method according to the present invention, drawing the secondary interface in the application window includes the steps of: drawing the secondary interface according to the interface data of the secondary interface; combining the plug-in interface and the secondary interface to determine the overlapping area of ​​the plug-in interface and the secondary interface in the application window; and according to the hierarchical relationship between the plug-in interface and the secondary interface, masking the plug-in interface in the overlapping area of ​​the plug-in interface and the secondary interface, thereby drawing the secondary interface in the application window.

[0016] According to another aspect of the present invention, a computing device is provided, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include a method for executing a window display method according to the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium storing one or more programs is provided. The one or more programs include instructions that, when executed by a computing device, cause the computing device to execute a window display method according to the present invention.

[0018] The window display method of the present invention is suitable for execution in a computing device. The computing device includes a memory storing an application program and running an operating system. A parent process is created in the operating system, and the application program is run according to the parent process. Then, a child process of the parent process is created to run a plug-in of the application program. The parent process runs the application program to generate interface data of the application interface, and the child process runs the plug-in to generate interface data of the plug-in interface. The present invention allocates a shared storage space in the memory, and stores the interface data of the plug-in interface and the application interface in the shared storage space, so that the interface data of the application interface and the plug-in interface can be shared, thereby improving the speed of drawing the application program window. Then, the hierarchical relationship between the application interface and the plug-in interface is determined by the interface data of the application interface and the plug-in interface in the shared storage space, so that the interface data is directly obtained from the shared storage space and processed, and the hierarchical relationship between the application interface and the plug-in interface is obtained. Finally, according to the interface data of the application interface and the plug-in interface, and the hierarchical relationship between the application interface and the plug-in interface, an application window including the application interface and the plug-in interface is drawn, and the application interface and the plug-in interface are displayed simultaneously, thereby improving the running stability of the plug-in in the application program, and also improving the compatibility of the application program with the plug-in, and the flexibility of plug-in development. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to achieve the above and related purposes, certain illustrative aspects are described herein in conjunction with the following description and accompanying drawings, which indicate various ways in which the principles disclosed herein can be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. By reading the following detailed description in conjunction with the accompanying drawings, the above and other purposes, features and advantages disclosed by the present invention will become more apparent. Throughout the present disclosure, the same reference numerals generally refer to the same parts or elements.

[0020] Figure 1 A schematic diagram of an operating system according to an exemplary embodiment of the present invention is shown;

[0021] Figure 2 shows a block diagram of a computing device 200 according to an exemplary embodiment of the present invention;

[0022] Figure 3 A schematic flow chart of a window display method 300 according to an exemplary embodiment of the present invention is shown; and

[0023] Figure 4 A schematic diagram of an application window according to an exemplary embodiment of the present invention is shown. DETAILED DESCRIPTION

[0024] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to enable the scope of the present disclosure to be fully conveyed to those skilled in the art. The same reference numerals generally refer to the same components or elements.

[0025] The window display method of the present invention is suitable for being executed in a computing device. Figure 2 FIG. 2 shows a block diagram of a computing device 200 according to an exemplary embodiment of the present invention. Figure 2 As shown, in a basic configuration 202, computing device 200 typically includes a system memory 206 and one or more processors 204. A memory bus 208 may be used for communication between processor 204 and system memory 206.

[0026] Depending on the desired configuration, the processor 204 can be any type of processor, including but not limited to: a microprocessor (μP), a microcontroller (μC), a digital information processor (DSP), or any combination thereof. The processor 204 can include one or more levels of cache such as a primary cache 210 and a secondary cache 212, a processor core 214, and registers 216. An example processor core 214 can include an arithmetic logic unit (ALU), a floating point unit (FPU), a digital signal processing core (DSP core), or any combination thereof. An example memory controller 218 can be used with the processor 204, or in some implementations, the memory controller 218 can be an internal part of the processor 204.

[0027] Depending on the desired configuration, the system memory 206 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. The system memory 206 may include an operating system 220, one or more programs 222, and program data 228. In some embodiments, the program 222 may be arranged to be executed by one or more processors 204 on the operating system using the program data 228 to execute the instructions 223 of the method 300 according to the present invention.

[0028] The computing device 200 may also include a storage interface bus 234. The storage interface bus 234 enables communication from storage devices 232 (e.g., removable storage 236 and non-removable storage 238) to the basic configuration 202 via the bus / interface controller 230. At least a portion of the operating system 220, the program 222, and the data 224 may be stored on the removable storage 236 and / or the non-removable storage 238, and when the computing device 200 is powered on or the program 222 is to be executed, it is loaded into the system memory 206 via the storage interface bus 234 and executed by the one or more processors 204.

[0029] The computing device 200 may also include an interface bus 240 that facilitates communication from various interface devices (e.g., output devices 242, peripheral interfaces 244, and communication devices 246) to the basic configuration 202 via the bus / interface controller 230. Example output devices 242 include a graphics processing unit 248 and an audio processing unit 250. They can be configured to facilitate communication with various external devices such as a display or speakers via one or more A / V ports 252. Example peripheral interfaces 244 may include a serial interface controller 254 and a parallel interface controller 256, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboards, mice, pens, voice input devices, touch input devices) or other peripherals (e.g., printers, scanners, etc.) via one or more I / O ports 258. Example communication devices 246 may include a network controller 260, which may be arranged to communicate with one or more other computing devices 262 via a network communication link via one or more communication ports 264.

[0030] A network communication link can be an example of a communication medium. Communication media can generally be embodied as computer-readable instructions, data structures, program modules in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium. A "modulated data signal" can be a signal in which one or more of its data sets or its changes can be carried out in a manner that encodes information in the signal. As non-limiting examples, communication media can include wired media such as a wired network or a dedicated line network, and various wireless media such as sound, radio frequency (RF), microwave, infrared (IR) or other wireless media. The term computer-readable medium used herein can include both storage media and communication media.

[0031] In the computing device 200 according to the present invention, the program 222 includes multiple program instructions of the instruction execution method 300, and these program instructions can instruct the processor 204 to execute some steps in the window display method 300 running in the computing device 200 of the present invention, so that each part in the computing device 200 can display the window by executing the window display method 300 of the present invention.

[0032] The computing device 200 can be implemented as a server, such as a file server 240, a database 250, a server, an application server, etc. These electronic devices can be such as personal digital assistants (PDAs), wireless network browsing devices, application-specific devices, or hybrid devices that can include any of the above functions. It can be implemented as a personal computer including a desktop computer and a notebook computer configuration. In some embodiments, the computing device 200 is configured to execute the window display method 300.

[0033] The computing device also includes a memory storing application programs and running an operating system. Figure 1 FIG. 2 shows a schematic diagram of an operating system according to an exemplary embodiment of the present invention. Figure 1 As shown, the operating system 120 can support running the application 110, Figure 1 The number of application programs shown in the figure is only exemplary, and the present invention does not limit the number of application programs running on the operating system 120, nor does it limit the type of the operating system 120.

[0034] The operating system 120 includes a communication unit 121, a drawing unit 122 and a rendering unit 126, wherein the drawing unit 122 includes a management component 123, a synthesis component 124 and an interface component 125. The communication unit 121 is used to register a parent process so that the parent process calls the communication unit 121, and a shared storage space is set in the memory by the parent process calling the communication unit 121. The communication unit 121 is also used to register a child process so that the child process calls the communication unit 121, and the interface data of the plug-in interface is stored in the memory by the child process calling the communication unit 121.

[0035] The communication unit 121 also sends an interface drawing message to the parent process, notifying the parent process that the interface data of the application interface and the plug-in interface have been stored in the shared memory space, so that the parent process can call the drawing unit 122 to obtain the interface data of the application interface and the plug-in interface from the shared storage space.

[0036] The management component 123 in the drawing unit 122 determines the display position of the application interface according to the interface data of the application interface, and determines the display position of the plug-in interface according to the interface data of the plug-in interface.

[0037] When the application interface and the plug-in interface overlap in their respective display positions, the synthesis component 124 constructs a tree structure relationship according to the interface data of the application interface and the plug-in interface, and also determines the hierarchical relationship between the application interface and the plug-in interface according to the tree structure.

[0038] The synthesis component 124 also draws the application interface according to the interface data of the application interface, draws the plug-in interface according to the interface data of the plug-in interface, combines the application interface and the plug-in interface, determines the overlapping area of ​​the application interface and the plug-in interface in the application window, and according to the hierarchical relationship between the application interface and the plug-in interface, blocks the application interface in the overlapping area to obtain the application window.

[0039] The management component 123 is used to send the drawn application window to the rendering unit 126. The rendering unit 126 interacts with the graphics card of the computing device and sends the application window and a command to display the application window to the graphics card so as to display the application window on the display.

[0040] Figure 3 FIG. 3 is a flow chart of a window display method 300 according to an exemplary embodiment of the present invention. Figure 3 As shown, the window display method 300 begins at step S310, creates a parent process (not shown in the figure) in the operating system 120, runs the application 110 according to the parent process to generate interface data of the application interface, and the application 110 also includes a plug-in.

[0041] The application 110 includes a main program, and one or more plug-ins can be integrated into the main program. A plug-in is a program that follows a standard application program interface and can only run in conjunction with the application 110 and cannot run independently. The plug-in integrated in the application 110 can carry one or more functions. A parent process is created in the operating system 120. When the parent process runs the application 110, the main program of the application 110 is executed to generate interface data of the application interface so as to draw the application interface. The interface data of the application interface includes the shape, size, color, and position of the application interface, etc. The present invention does not limit the type of interface data of the application interface.

[0042] Subsequently, step S320 is executed to create a child process of the parent process (not shown in the figure), run the plug-in of the application 110 according to the child process, and generate interface data of the plug-in interface so as to draw the plug-in interface. According to one embodiment of the present invention, when creating a child process of the parent process, the child process of the parent process is created through the fork function to run the plug-in of the application 110. When the application 110 has multiple plug-ins to run, multiple child processes are created when creating the child process of the parent process to run multiple plug-ins respectively and generate interface data of multiple plug-in interfaces. The interface data of the plug-in interface includes the shape, size, color and position of the plug-in interface, and the present invention does not limit the type of interface data of the plug-in interface.

[0043] Then, step S330 is executed to allocate a shared storage space in the memory, and store the interface data of the application interface and the plug-in interface in the shared storage space.

[0044] When allocating a storage unit in the memory, first register the parent process in the communication unit 121 so that the parent process calls the communication unit 121. Then set the shared storage space in the memory by calling the communication unit 121. When setting the shared storage space in the memory, set the size of the shared storage space according to the storage needs.

[0045] When the interface data of the application interface and the plug-in interface are stored in the shared storage space, the parent process calls the communication unit 121 to store the interface data of the application interface in the memory. Then, the child process is registered in the communication unit 121 so that the child process calls the communication unit 121. Then, the child process calls the communication unit 121 to store the interface data of the plug-in interface in the memory.

[0046] According to one embodiment of the present invention, the parent process is also registered in the drawing unit 122 so that the parent process calls the drawing unit 122. After the child process stores the interface data of the plug-in interface in the memory, the child process calls the communication unit 121 to send an interface drawing message to the parent process. The interface drawing message notifies the parent process that the interface data of the application interface and the plug-in interface have been stored in the shared memory space. When the child process calls the communication unit 121 to send an interface drawing message to the parent process, the interface drawing message can be sent to the parent process through the message bus. The present invention does not limit the way of transmitting messages between the child process and the parent process. The communication unit 121 implements inter-process communication and interface encapsulation. The communication unit 121 can implement the sending of interface drawing messages through the following code:

[0047]

[0048] After the parent process receives the interface drawing message, the parent process calls the drawing unit 122 to obtain the interface data of the application interface and the plug-in interface from the shared storage space, so as to determine the hierarchical relationship between the application interface and the plug-in interface based on the interface data of the application interface and the plug-in interface, and further draw the application window including the application interface and the plug-in interface based on the interface data of the application interface and the plug-in interface and the hierarchical relationship between the application interface and the plug-in interface.

[0049] The communication between the child process and the parent process is realized by calling the communication unit 121, and the communication between the child process and the parent process, and between the child processes, is conveniently managed through the communication unit 121. Further, the communication between processes can be managed by the communication unit 121, and the communication between processes can be allowed or prohibited. And by managing the communication between processes, it is possible to prevent unauthorized processes from loading the code in the main program of the application 110, and set resource isolation between the plug-in and the main program. According to the above steps, the management of communication interaction data can be improved, and the security of the application running the plug-in can be improved.

[0050] According to an embodiment of the present invention, the parent process calls the drawing unit 122 and the communication unit 121, and the child process calls the drawing unit 122 and the communication unit 121, which can be achieved by creating a management program. Specifically, the parent process creates a parent process management program, and the parent process management program calls the drawing unit 122 and the communication unit 121; the child process creates a child process management program, and the child process management program calls the drawing unit 122 and the communication unit 121. The present invention does not limit the way in which the parent process calls the drawing unit 122 and the communication unit 121, and the child process calls the drawing unit 122 and the communication unit 121. The parent process and the child process can create a management program by executing the following code:

[0051] void init(){

[0052] for(){

[0053] fork();

[0054] if (pid == 0) {

[0055] loadPlugin();

[0056] initPluginManager();

[0057] }

[0058] }

[0059] if (pid!= 0) {

[0060] CreateMainWindow();

[0061] initManager();

[0062] }

[0063] }

[0064] Then, step S340 is executed to determine the hierarchical relationship between the application interface and the plug-in interface according to the interface data of the application interface and the plug-in interface in the shared storage space. When determining the hierarchical relationship between the application interface and the plug-in interface, firstly, a structural relationship between the application interface and the plug-in interface is constructed according to the interface data of the application interface and the plug-in interface; and then, the hierarchical relationship between the application interface and the plug-in interface is determined according to the structural relationship between the application interface and the plug-in interface.

[0065] Specifically, the management component 123 of the drawing unit 122 determines the display position of the application interface according to the interface data of the application interface, and determines the display position of the plug-in interface according to the interface data of the plug-in interface. When the application interface and the plug-in interface overlap in their respective display positions, the control module constructs a structural relationship of a tree structure according to the interface data of the application interface and the plug-in interface, and uses the application interface as the parent node of the tree structure, and uses the plug-in interface as the child node of the parent node in the tree structure. When the application 110 includes multiple plug-ins, multiple child processes are created, and each child process runs a plug-in to obtain a plug-in interface, and then obtains the interface data of multiple plug-in interfaces, multiple child nodes are constructed under the parent node according to the interface data of the multiple plug-in interfaces. The synthesis component 124 manages the structural relationship between the application interface and the plug-in interface according to the tree structure.

[0066] Then the control module determines the hierarchical relationship between the application interface and the plug-in interface according to the tree structure: the application interface that constitutes the parent node in the tree structure is used as the first-level interface; the plug-in interface that constitutes the child node of the parent node in the tree structure is used as the second-level interface. The display level of the second-level interface is higher than that of the first-level interface. When displaying, the second-level interface will be displayed on the first-level interface.

[0067] Finally, step S350 is executed to draw an application window including the application interface and the plug-in interface according to the interface data of the application interface and the plug-in interface and the hierarchical relationship between the application interface and the plug-in interface. When drawing an application window including the application interface and the plug-in interface, the synthesis component 124 of the drawing unit 122 first draws the application interface according to the interface data of the application interface, and draws the plug-in interface according to the interface data of the plug-in interface. When drawing the application interface and the plug-in interface, the drawing is performed according to the data such as the position, size, shape and color in the interface data.

[0068] Subsequently, the synthesis component 124 combines the application interface and the plug-in interface to determine the overlapping area of ​​the application interface and the plug-in interface in the application window. When combining the application interface and the plug-in interface, the combination is performed according to the positions where the application interface and the plug-in interface are displayed. The plug-in interface is a second-layer interface, and the application interface is a first-layer page. The plug-in interface is displayed on the upper layer of the application interface. When the plug-in interface is displayed on the upper layer of the application interface, the plug-in interface will cover part of the application interface, and the display area of ​​the plug-in interface will block the application interface, and the blocked part is the overlapping area.

[0069] Then, the synthesis component 124 performs a shielding operation on the application interface in the overlapping area according to the hierarchical relationship between the application interface and the plug-in interface to obtain an application window. Specifically, the shielding operation is performed in the overlapping area to shield the display content of this part of the application interface and not display this part of the display content, thereby obtaining an application window including the application interface and the plug-in interface.

[0070] In the prior art, a plug-in interface is drawn by multi-process graphics embedding, that is, the plug-in window is embedded into the current window using the window embedding function of the display server. However, this method does not support transparent background after the window is embedded, because the background transparency is achieved by the compositor of the window manager mapping the back background to the bottom of the window. The compositor cannot perform synthesis processing on the embedded window, and the image data of the embedded window cannot be operated in the program containing the embedded window.

[0071] In the present invention, the application interface and the plug-in interface are combined by the synthesis component 124 to determine the overlapping area of ​​the application interface and the plug-in interface in the application window. Then, the synthesis component 124 performs a shielding operation on the application interface in the overlapping area according to the hierarchical relationship between the application interface and the plug-in interface to obtain the application window, thereby solving the above technical problems and improving the applicability of the solution to window display.

[0072] According to an embodiment of the present invention, after the synthesis component 124 completes drawing the application window, the interface component 125 sends the drawn application window to the rendering unit 126. The rendering unit 126 is specifically implemented as a direct rendering manager (Direct Rendering Manager), and the present invention does not limit the specific form of the rendering unit 126. The rendering unit 126 interacts with the graphics card of the computing device and sends the application window and the command to display the application window to the graphics card so that the application window is displayed on the display.

[0073] Figure 4 FIG. 4 shows a schematic diagram of an application window according to an exemplary embodiment of the present invention. Figure 4 As shown, Figure 4 The application window shown includes a plug-in interface in the upper left corner and an application interface displayed in a layer below the plug-in interface.

[0074] According to one embodiment of the present invention, the child process running the plug-in can also generate a sub-interface of the plug-in interface based on the plug-in interface, that is, a secondary interface. The secondary interface belongs to the plug-in interface and carries some interactive functions, including but not limited to collecting user data required by the plug-in, returning user data to the plug-in, etc. The child process can also generate multiple sub-interfaces of the plug-in, that is, multiple secondary interfaces. The method also includes the steps of: generating interface data of the secondary interface according to the plug-in of the sub-process running the application 110, the secondary interface is a sub-interface of the plug-in interface, the interface data of the secondary interface includes the shape, size, color and position of the secondary interface, etc. The present invention does not limit the type of interface data of the secondary interface.

[0075] Then, the interface data of the secondary interface is stored in the shared storage space. When storing the interface data of the secondary interface, the communication unit 121 is called by the child process to store the interface data of the plug-in interface in the memory.

[0076] Then, according to the interface data of the secondary interface and the plug-in interface in the shared storage space, the hierarchical relationship between the plug-in interface and the secondary interface is determined. Specifically, first, according to the interface data of the plug-in interface and the secondary interface, the structural relationship between the plug-in interface and the secondary interface is constructed, and the management component 123 of the drawing unit 122 determines the display position of the secondary interface according to the interface data of the secondary interface. When the secondary interface and the plug-in interface overlap in their respective display positions, the control module constructs a structural relationship of a tree structure according to the interface data of the secondary interface and the plug-in interface, and uses the plug-in interface as the parent node of the tree structure, and uses the secondary interface as the child node of the parent node in the tree structure. When there are interface data of multiple secondary interfaces, multiple child nodes are constructed under the parent node according to the interface data of multiple secondary interfaces. The synthesis component 124 manages the structural relationship between the secondary interface and the plug-in interface according to the tree structure.

[0077] Then, according to the structural relationship between the plug-in interface and the secondary interface, the hierarchical relationship between the plug-in interface and the secondary interface is determined: the plug-in interface that constitutes the parent node in the tree structure is used as the second-level interface; the secondary interface that constitutes the child node of the parent node in the tree structure is used as the third-level interface. The display level of the third-level interface is higher than that of the second-level interface. When displaying, the third-level interface will be displayed on the second-level interface.

[0078] Subsequently, the secondary interface is drawn in the application window according to the interface data of the plug-in interface and the hierarchical relationship between the plug-in interface and the secondary interface. When drawing the secondary interface in the application window, the synthesis component 124 first draws the secondary interface according to the interface data of the secondary interface, and when drawing the secondary interface, it is drawn according to the data such as position, size, shape and color in the interface data.

[0079] Then, the synthesis component 124 combines the plug-in interface and the secondary interface to determine the overlapping area of ​​the plug-in interface and the secondary interface in the application window. When combining the secondary interface and the plug-in interface, the combination is performed according to the positions where the secondary interface and the plug-in interface are displayed. The secondary interface is a third-layer interface, and the plug-in interface is a second-layer page. The secondary interface is displayed on the upper layer of the plug-in interface. When the secondary interface is displayed on the upper layer of the plug-in interface, the secondary interface will cover part of the plug-in interface, and the display area of ​​the secondary interface will block the plug-in interface, and the blocked part is the overlapping area.

[0080] Subsequently, according to the hierarchical relationship between the plug-in interface and the secondary interface, the plug-in interface is shielded in the overlapping area of ​​the plug-in interface and the secondary interface, so as to draw the secondary interface in the application window. Specifically, the synthesis component 124 performs the shielding operation in the overlapping area to shield the display content of this part of the plug-in interface and not display this part of the display content, thereby obtaining an application window including the secondary interface.

[0081] Finally, the interface component 125 sends the drawn application window including the secondary interface to the rendering unit 126. The rendering unit 126 sends the application window including the secondary interface and a command to display the application window to the graphics card so as to display the application window on the display.

[0082] The window display method of the present invention is suitable for execution in a computing device. The computing device includes a memory storing an application program and running an operating system. A parent process is created in the operating system, and the application program is run according to the parent process. Then, a child process of the parent process is created to run a plug-in of the application program. The parent process runs the application program to generate interface data of the application interface, and the child process runs the plug-in to generate interface data of the plug-in interface. The present invention allocates a shared storage space in the memory, and stores the interface data of the plug-in interface and the application interface in the shared storage space, so that the interface data of the application interface and the plug-in interface can be shared, thereby improving the speed of drawing the application program window. Then, the hierarchical relationship between the application interface and the plug-in interface is determined by the interface data of the application interface and the plug-in interface in the shared storage space, so that the interface data is directly obtained from the shared storage space and processed, and the hierarchical relationship between the application interface and the plug-in interface is obtained. Finally, according to the interface data of the application interface and the plug-in interface, and the hierarchical relationship between the application interface and the plug-in interface, an application window including the application interface and the plug-in interface is drawn, and the application interface and the plug-in interface are displayed simultaneously, thereby improving the running stability of the plug-in in the application program, and also improving the compatibility of the application program with the plug-in, and the flexibility of plug-in development.

[0083] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0084] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.

[0085] Those skilled in the art will appreciate that the modules or units or groups of the devices in the examples disclosed herein may be arranged in the device as described in the embodiment, or alternatively may be located in one or more devices different from the devices in the example. The modules in the foregoing examples may be combined into one module or may be divided into multiple submodules.

[0086] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or groups in the embodiments may be combined into one module or unit or group, and in addition they may be divided into a plurality of submodules or subunits or subgroups. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device so disclosed may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0087] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0088] In addition, some of the embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices that perform the functions. Therefore, a processor with necessary instructions for implementing the method or method elements forms a device for implementing the method or method elements. In addition, the elements described herein of the device embodiments are examples of devices for implementing the functions performed by the elements for the purpose of implementing the invention.

[0089] The various techniques described herein may be implemented in combination with hardware or software, or a combination thereof. Thus, the method and apparatus of the present invention, or some aspects or portions of the method and apparatus of the present invention may be in the form of program codes (i.e., instructions) embedded in a tangible medium, such as a floppy disk, a CD-ROM, a hard disk drive, or any other machine-readable storage medium, wherein when the program is loaded into a machine such as a computer and executed by the machine, the machine becomes a device for practicing the present invention.

[0090] In the case where the program code is executed on a programmable computer, the computing device generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. The memory is configured to store the program code; the processor is configured to execute the method for determining the shutdown state of the device of the present invention according to the instructions in the program code stored in the memory.

[0091] By way of example and not limitation, computer readable media include computer storage media and communication media. Computer readable media include computer storage media and communication media. Computer storage media stores information such as computer readable instructions, data structures, program modules or other data. Communication media generally embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and includes any information delivery medium. Any combination of the above is also included within the scope of computer readable media.

[0092] As used herein, unless otherwise specified, the use of ordinal numbers "first," "second," "third," etc. to describe common objects merely indicates that different instances of similar objects are involved, and is not intended to imply that the objects so described must have a given order in time, space, order, or in any other manner.

[0093] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is selected primarily for readability and teaching purposes, rather than for explaining or defining the subject matter of the present invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is illustrative, not restrictive, with respect to the scope of the present invention, which is defined by the appended claims.

Claims

1. A window display method, suitable for execution in a computing device, wherein the computing device includes a memory storing an application program and running an operating system, the method comprising the steps of: Creating a parent process in the operating system, and running an application program according to the parent process to generate interface data of an application interface, wherein the application program further includes a plug-in; Creating a child process of the parent process, running a plug-in of the application according to the child process, and generating interface data of the plug-in interface; Allocating a shared storage space in the memory, and storing the interface data of the application interface and the plug-in interface in the shared storage space; Determining a hierarchical relationship between the application interface and the plug-in interface according to the interface data of the application interface and the plug-in interface in the shared storage space; Drawing an application window including the application interface and the plug-in interface according to the interface data of the application interface and the plug-in interface and the hierarchical relationship between the application interface and the plug-in interface; Running the plug-in of the application program according to the sub-process generates interface data of a secondary interface, wherein the secondary interface is a sub-interface of the plug-in interface; Storing the interface data of the secondary interface in the shared storage space; Determining the hierarchical relationship between the plug-in interface and the secondary interface according to the interface data of the secondary interface and the plug-in interface in the shared storage space; The secondary interface is drawn in the application window according to the interface data of the plug-in interface and the hierarchical relationship between the plug-in interface and the secondary interface.

2. The method of claim 1, wherein: The operating system includes a communication unit, and the allocation of shared storage space in the memory includes the steps of: registering a parent process in the communication unit; The parent process calls a communication unit to set a shared storage space in the memory.

3. The method of claim 2, wherein: The storing of the interface data of the application interface and the plug-in interface in the shared storage space comprises the steps of: Calling a communication unit through the parent process to store interface data of the application interface in the memory; registering a subprocess in the communication unit; The interface data of the plug-in interface is stored in the memory through the child process.

4. The method of claim 3, wherein: The operating system also includes a drawing unit, and the method further includes the steps of: Registering a parent process in the drawing unit; Calling the communication unit through the child process to send an interface drawing message to the parent process; After the parent process receives the interface drawing message, the parent process calls the drawing unit to obtain the interface data of the application interface and the plug-in interface from the shared storage space, so as to determine the hierarchical relationship between the application interface and the plug-in interface according to the interface data of the application interface and the plug-in interface.

5. The method according to any one of claims 1 to 4, wherein: The step of determining the hierarchical relationship between the application interface and the plug-in interface according to the interface data of the application interface and the plug-in interface in the shared storage space comprises the following steps: Constructing the structural relationship between the application interface and the plug-in interface according to the interface data of the application interface and the plug-in interface; According to the structural relationship between the application interface and the plug-in interface, the hierarchical relationship between the application interface and the plug-in interface is determined.

6. The method of claim 5, wherein: Drawing an application window including an application interface and a plug-in interface comprises the following steps: Drawing an application interface according to the interface data of the application interface; Draw a plug-in interface according to the interface data of the plug-in interface; combining the application interface and the plug-in interface, and determining an overlapping area of ​​the application interface and the plug-in interface in the application program window; According to the hierarchical relationship between the application interface and the plug-in interface, a shielding operation is performed on the application interface in the overlapping area to obtain an application program window.

7. The method of claim 6, wherein: The step of determining the hierarchical relationship between the plug-in interface and the secondary interface according to the interface data of the secondary interface and the plug-in interface in the shared storage space comprises the following steps: According to the interface data of the plug-in interface and the secondary interface, a structural relationship between the plug-in interface and the secondary interface is constructed; According to the structural relationship between the plug-in interface and the secondary interface, the hierarchical relationship between the plug-in interface and the secondary interface is determined.

8. The method of claim 7, wherein: Drawing the secondary interface in the application window comprises the following steps: Draw the secondary interface according to the interface data of the secondary interface; combining the plug-in interface and the secondary interface, and determining an overlapping area of ​​the plug-in interface and the secondary interface in the application window; According to the hierarchical relationship between the plug-in interface and the secondary interface, the plug-in interface is shielded in the overlapping area of ​​the plug-in interface and the secondary interface, so as to draw the secondary interface in the application window.

9. A computing device comprising: one or more processors; Memory; as well as One or more devices comprising instructions for executing the method according to any one of claims 1-8.

10. A computer-readable storage medium storing one or more programs, the one or more programs comprising instructions which, when executed by a computing device, cause the computing device to perform the method according to any one of claims 1-8.