Implementation Method, Device, Equipment and Medium of a C / S Architecture Graphics Engine
By establishing parent-child window relationship and high-performance communication of C/S architecture graphics engine in the browser, the problem that C/S architecture graphics engine cannot run seamlessly in modern browsers is solved, efficient and cross-platform graphics engine development is achieved, and front-end development efficiency and performance are improved.
Patent Information
- Application Number
- CN202410030893.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-09
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2044-01-09
AI Technical Summary
The security mechanism limitations of modern browsers and the characteristics of JavaScript language lead to inefficiency of browser-based graphics engines, which cannot effectively support high-load computing and efficient rendering, and the existing C/S architecture graphics secondary development engine cannot run seamlessly in modern browsers.
The C/S architecture graphics secondary development engine developed using C++ language establishes a parent-child window relationship through the API provided by the operating system interface framework, attaches the engine window to the specified area of the browser, uses high-performance gRPC communication service to communicate with the browser side, and embeds the browser kernel loading UI interface in the engine window to realize superimposed display and operation event response.
It realizes seamless operation of high-performance graphics engines in modern browsers, improves the efficiency of front-end interface development, has high performance, high response, and cross-platform characteristics, simulates the pseudo-B/S architecture software operation system, supports cross-platform reuse, and avoids duplicate development.
Smart Images

Figure CN117874388B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and particularly to a method, device, equipment and medium for implementing a C / S architecture graphics engine. Background Art
[0002] With the in-depth development of modern browser technology, the performance has been gradually improved, and the native cross-platform feature has better support for OpenGL ES (OpenGL for Embedded Systems). There are a large number of front-end developers, and products on the market emerge in an endless stream. Coupled with the low hardware requirements, users are increasingly accepting the graphics secondary development engine based on the B / S (Browser / Server) architecture of the browser, such as frameworks like Cesium to achieve the purpose of browsing and using a three-dimensional graphics engine.
[0003] However, due to the limitations of the modern browser security mechanism and the characteristics of the JavaScript language itself, its execution speed and efficiency are far from reaching the level of the C++ language, and the browser's utilization of hardware is not very perfect either. This has led to the low performance of graphics software developed based on modern browsers, and it cannot effectively support heavy-load computing work and efficient rendering.
[0004] Therefore, how to provide a solution to the above technical problems is what those skilled in the art need to solve currently. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for implementing a C / S architecture graphics engine, which can realize the normal development and use of the graphics engine in a modern browser and achieve the purpose of surpassing the B / S graphics engine in all aspects. The specific solutions are as follows:
[0006] In the first aspect, the present application discloses a method for implementing a C / S architecture graphics engine, which is applied to the browser side and includes:
[0007] Determine the current main window, and select a target parent window for the client of the C / S architecture graphics secondary development engine in the main window; the C / S architecture graphics secondary development engine is a graphics engine developed by using the C++ language for the C / S architecture graphics engine;
[0008] Establish a parent-child window relationship between the target parent window and the engine window of the C / S architecture graphics secondary development engine through the application program interface provided by the operating system interface framework;
[0009] Obtain the opening instruction of the target web page called by the preset JavaScript library, and connect to the background service process according to the opening instruction, so that the background service process opens the engine window through the application programming interface based on the parent-child window relationship; wherein, when the engine window is opened, the browser kernel embedded in the engine window simultaneously loads the UI interface of the target web page;
[0010] Overlay and display the engine window and the UI interface and output a target rendering window. When an operation event for the target web page is detected, determine an operation target corresponding to the operation event based on the target rendering window, so as to respond to the operation event according to the operation target.
[0011] Optionally, determining the current main window and selecting a target parent window for the client of the C / S architecture graphics secondary development engine in the main window includes:
[0012] Determine the current main window and determine the current browser tab based on the theme window;
[0013] Determine the current operating system type and the modern browser type corresponding to the browser side;
[0014] Determine the corresponding browser feature identifier according to the modern browser type, and call the corresponding application programming interface based on the current operating system type to capture the handle of the window to which the client area of the browser tab belongs according to the browser feature identifier;
[0015] Determine the window to which the client area of the browser tab belongs as the target parent window of the client of the C / S architecture graphics secondary development engine according to the handle.
[0016] Optionally, in the process of determining the window to which the client area of the browser tab belongs as the target parent window of the client of the C / S architecture graphics secondary development engine according to the handle, it further includes:
[0017] Detect sibling windows at the same position according to the target parent window, and use the application programming interface to perform a Z-order bottom operation or a demotion operation on the target sibling window that affects the display and interaction of the target parent window among the sibling windows.
[0018] Optionally, the implementation method of the C / S architecture graphics engine further includes:
[0019] When the browser tab is initialized and / or the size of the browser tab changes, the first screen position of the engine window relative to the client area, the width information, and the height information of the engine window are obtained in real time through the preset JavaScript library;
[0020] Correspondingly, obtaining an opening instruction of a target web page called by a preset JavaScript library, and connecting to a background service process according to the opening instruction, so that the background service process opens the engine window through the application programming interface based on the parent-child window relationship, includes:
[0021] Obtaining an opening instruction of a target web page called by a preset JavaScript library, and connecting to a background service process according to the opening instruction, so that the background service process performs engine screen rendering based on the parent-child window relationship according to the first screen position, the width information, and the height information, and opens the obtained engine window after rendering through the application programming interface.
[0022] Optionally, superimposing the engine window on the UI interface and outputting a target rendering window, and when an operation event for the target web page is detected, determining an operation target corresponding to the operation event based on the target rendering window, so as to respond to the operation event according to the operation target, includes:
[0023] Superimposing the engine window on the UI interface and outputting a target rendering window, and when an operation event for the target web page is detected, determining a second screen position of the execution subject in the operation event in the engine window based on the target rendering window;
[0024] Judging whether the transparency channel value in the RGBA color space at the second screen position is lower than a first preset threshold;
[0025] If the transparency channel value is lower than the first preset threshold, determining that the operation target corresponding to the operation event is the engine window and executing the operation event on the engine window;
[0026] If the transparency channel value is not lower than the first preset threshold, determining that the operation target corresponding to the operation event is the UI interface and performing function calls on the UI interface according to the operation event.
[0027] Optionally, superimposing the engine window on the UI interface and outputting a target rendering window, and when an operation event for the target web page is detected, determining an operation target corresponding to the operation event based on the target rendering window, so as to respond to the operation event according to the operation target, includes:
[0028] Constructing a top window and covering the top window on the engine window in real time;
[0029] Overlay the top window and the UI interface and output a target rendering window. When an operation event for the target web page is detected, determine the third screen position of the execution subject in the operation event in the top window based on the target rendering window;
[0030] Judge whether the transparency channel value in the RGBA color space at the third screen position is lower than a second preset threshold;
[0031] If the transparency channel value is lower than the second preset threshold, determine that the operation target corresponding to the operation event is the top window and execute the operation event on the top window;
[0032] If the transparency channel value is not lower than the second preset threshold, determine that the operation target corresponding to the operation event is the UI interface and perform function calls on the UI interface according to the operation event.
[0033] Optionally, the implementation method of the C / S architecture graphics engine further includes:
[0034] Obtain all other windows except the top window and the engine window;
[0035] Obtain the handle of the top window, the handle of the engine window, and the handles of the target windows among all the other windows that are above the engine window;
[0036] Determine the position intersection between the engine window and the target window according to the handle of the engine window and the handle of the target window;
[0037] Determine a specified area in the top window corresponding to the position intersection according to the handle of the top window, and set the specified area to be not displayed or cropped and displayed.
[0038] In a second aspect, the present application discloses an implementation device of a C / S architecture graphics engine, which is applied to the browser side and includes:
[0039] A parent window selection module, configured to determine the current main window and select a target parent window for the client of the C / S architecture graphics secondary development engine in the main window; the C / S architecture graphics secondary development engine is a graphics engine developed by using the C++ language to develop the C / S architecture graphics engine;
[0040] A parent-child window relationship establishment module, configured to establish a parent-child window relationship between the target parent window and the engine window of the C / S architecture graphics secondary development engine through an application program interface provided by the operating system interface framework;
[0041] A display module, configured to obtain an opening instruction of a target web page called by a preset JavaScript library, and connect to a background service process according to the opening instruction, so that the background service process opens the engine window through the application programming interface based on the parent-child window relationship; wherein, when the engine window is opened, a browser kernel embedded in the engine window simultaneously loads a UI interface of the target web page;
[0042] An operation module, configured to superimpose and display the engine window and the UI interface and output a target rendering window, and when an operation event for the target web page is detected, determine an operation target corresponding to the operation event based on the target rendering window, so as to respond to the operation event according to the operation target.
[0043] In a third aspect, the present application discloses an electronic device, which includes a processor and a memory; wherein, the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the implementation method of the C / S architecture graphics engine as described above.
[0044] In a fourth aspect, the present application discloses a computer-readable storage medium, which is used to store a computer program; wherein the computer program, when executed by a processor, implements the implementation method of the C / S architecture graphics engine as described above.
[0045] The present application provides an implementation method of a C / S architecture graphics engine, which is applied to a browser side and includes: determining a current main window, and selecting a target parent window for a client of a C / S architecture graphics secondary development engine in the main window; the C / S architecture graphics secondary development engine is a graphics engine developed by using the C++ language to develop the C / S architecture graphics engine; establishing a parent-child window relationship between the target parent window and an engine window of the C / S architecture graphics secondary development engine through an application programming interface provided by an operating system interface framework; obtaining an opening instruction of a target web page called by a preset JavaScript library, and connecting to a background service process according to the opening instruction, so that the background service process opens the engine window through the application programming interface based on the parent-child window relationship; wherein, when the engine window is opened, a browser kernel embedded in the engine window simultaneously loads a UI interface of the target web page; superimposing and displaying the engine window and the UI interface and outputting a target rendering window, and when an operation event for the target web page is detected, determining an operation target corresponding to the operation event based on the target rendering window, so as to respond to the operation event according to the operation target.
[0046] The beneficial technical effects of this application are as follows: first, the client of the C / S architecture graphics secondary development engine is attached to the designated area of a modern browser in a parent-child window relationship, so as to achieve the purpose of seamlessly embedding the rendering screen into the browser, realize seamless docking with modern browsers, and satisfy the actual operation experience of users. In addition, a wider secondary development group is introduced, and the C / S architecture graphics engine is secondary developed using the C++ language, realizing the transformation from JavaScript to C++, so that it has high performance, high response, cross-platform and other characteristics, which is conducive to the promotion and application of product marketing. Secondly, when accessing the target web page on the browser side, it can communicate with the client of the C / S architecture graphics secondary development engine, and display the web page UI interface in the engine screen to achieve the superimposed display effect. Finally, the target rendering window based on the superimposed display determines the operation target corresponding to the operation event for the target web page, responds to the operation event according to the operation target, and ensures that the C / S architecture client can stably support the operation in the browser. In this way, through a series of transformations from the front-end UI interface to the back-end image engine, from JavaScript to C++, from the application program interface provided by the operating system interface framework to the local network high-performance communication, different software system processes are connected, and a pseudo-B / S architecture software operating system that is indistinguishable from the real thing is simulated. A set of codes can meet the needs of cross-platform reuse and avoid repeated development; it has better performance output performance under the same browser environment. It can be seen that through the technical solution of this application, the efficiency of front-end interface development is greatly improved compared with client interface development, the effect is also more outstanding, and it is highly customizable, which helps promote the use of high-performance C / S architecture software in the post-browser era.
[0047] In addition, the implementation device, equipment and storage medium of a C / S architecture graphics engine provided by the present application correspond to the implementation method of the C / S architecture graphics engine mentioned above, and the effects are the same as above. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0049] Figure 1 A flowchart of a method for implementing a C / S architecture graphics engine disclosed in this application;
[0050] Figure 2 A schematic diagram of communication from an operating system API to a local network disclosed in this application;
[0051] Figure 3A schematic diagram of a response operation event for a target web page disclosed in this application;
[0052] Figure 4 A schematic diagram of the implementation system module of a C / S architecture graphics engine disclosed in this application;
[0053] Figure 5 A schematic diagram of the relationships between various windows in a browser client disclosed in this application;
[0054] Figure 6 A schematic diagram of window display under a window filtering mechanism disclosed in this application;
[0055] Figure 7 A schematic diagram of the structure of an implementation device of a C / S architecture graphics engine disclosed in this application;
[0056] Figure 8 A structural diagram of an electronic device disclosed in this application. Detailed implementation manners
[0057] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0058] Currently, most of the graphics secondary development engines based on the browser's B / S architecture on the market are used to achieve the purpose of browsing and using a 3D graphics engine. However, the C / S architecture graphics secondary development engine developed based on the C++ language is restricted by the modern browser security mechanism and cannot run inside the browser in the form of a plugin. It can only run on various operating systems in the form of an independent client, with many environmental restrictions, strong professionalism, and a shortage of corresponding developers, which has an adverse impact on the popularization of secondary development.
[0059] Therefore, this application provides an implementation solution for a C / S architecture graphics engine, which can solve the problem that the C / S architecture graphics secondary development engine does not support seamless operation and use in modern browsers, and realizes the normal development and use of the graphics engine in modern browsers, achieving the purpose of surpassing the B / S graphics engine in all aspects.
[0060] An embodiment of the present invention discloses a method for implementing a C / S architecture graphics engine. Refer to Figure 1 as shown, which is applied to the browser client. The method includes:
[0061] S101: Determine the current main window, and select a target parent window for the client of the C / S architecture graphics secondary development engine in the main window; the C / S architecture graphics secondary development engine is a graphics engine developed by using the C++ language to develop the C / S architecture graphics engine.
[0062] In the embodiments of the present application, it is applied to the browser side. First, determine the current main window in the browser, and select a suitable target parent window for the graphics engine based on the current main window. It can be understood that in a common interface framework, under the condition that the rendering relationship between the parent and child windows always remains in the same area position, the rendering of the child window is always above the rendering of the parent window to form an overlay effect.
[0063] Due to the security mechanism limitations of modern browsers and the characteristics of the JavaScript language itself, its execution speed and efficiency are far from reaching the level of the C++ language. And the software developed based on C++ has characteristics such as high performance, high responsiveness, and cross-platform. Therefore, in the embodiments of the present application, based on the C / S (Client / Server) architecture graphics secondary development engine developed by using the C++ language, a target parent window is selected for the client of the C / S architecture graphics secondary development engine, and the rendering of the engine side is used to cover the rendering of the target parent window by using the parent-child characteristics to simulate the effect of the client using on the browser. In this way, for the situation where modern browsers do not support the C / S architecture graphics secondary development engine, a reasonable and efficient solution is provided.
[0064] It should be noted that the C / S architecture graphics secondary development engine (engine side) is developed based on the C++ language, and for operating systems such as Windows, Linux, and Mac, the code implementations that utilize the operating system API (Application Program Interface) and characteristics are adapted one by one to ensure the cross-platform compatibility of the engine itself. And a reasonable external C++ secondary development API interface is designed for the C / S architecture graphics secondary development engine, which can be docked with the operating system API. At the same time, this interface can provide good object, method, and process encapsulation, and is accompanied by a detailed API description document.
[0065] S102: Establish a parent-child window relationship between the target parent window and the engine window of the C / S architecture graphics secondary development engine through the application program interface provided by the operating system interface framework.
[0066] In the embodiments of the present application, the engine end uses the APIs provided by the operating system interface framework to set the window of the engine itself to a window without a title bar, a toolbar, and a borderless type, and then establishes a parent-child window relationship with the target parent window, and attaches the client of the C / S architecture graphics secondary development engine to the client area of a specified tab page of a modern browser in a parent-child window relationship, so as to achieve the purpose of seamlessly embedding the rendered picture into the browser. Assume that the engine window of the C / S architecture graphics secondary development engine is window C and the target parent window is window P. Then, establishing the parent-child window relationship between the target parent window and the engine window of the C / S architecture graphics secondary development engine can be setting window C as a child window of window P, or setting window P as the parent window of window C.
[0067] It should be noted that when setting the parent-child window relationship, there may be other sibling windows at the same position as window P. Therefore, in the embodiments of the present application, the sibling windows at the same position are detected according to the target parent window, and the target sibling window that affects the display and interaction of the target parent window among the sibling windows is subjected to a Z-order bottom operation or a demotion operation by using the operating system API.
[0068] S103: Obtain the opening instruction of the target web page called by the preset JavaScript library, and connect to the background service process according to the opening instruction, so that the background service process opens the engine window through the application programming interface based on the parent-child window relationship; wherein, when the engine window is opened, the browser kernel embedded in the engine window loads the UI interface of the target web page at the same time.
[0069] It should be noted that in the embodiments of the present application, a high-performance gRPC (Google Remote Procedure Call) communication service component is accessed in the engine end to communicate with the browser end. By writing a proto file, designing related structures and methods in the engine end, the C++ backend implements the methods defined by the proto, and then the JavaScript on the browser end encapsulates a layer of API interface JS library that is convenient to use and understand based on the proto to obtain the preset JavaScript library.
[0070] Next, the target web page needs to be set. Usually, when a browser accesses content, it needs to enter a specified URL (Uniform Resource Locator) address in the address bar for access. In the embodiments of the present application, the address bar points to the address of the target web page, and the target web page calls the opening instruction through the preset JavaScript library. The opening instruction will first connect to the background service process at the port specified by the local address. After the connection is successful, the background service process opens the engine window through the operating system API.
[0071] In the embodiment of the present application, the background service process is automatically started when the operating system is started, and usually exists as an operating system service. It has an embedded module for network communication, which occupies a fixed communication port to receive external communication instructions at any time. In a specific implementation, it can specifically refer to a specific network request initiated by the browser. The background service process can open the program corresponding to the engine window at the specified location, and can also force restart or close the program corresponding to the engine window.
[0072] It is understandable that the engine interface is usually developed by the front end, and in a conventional B / S architecture, the browser engine is responsible for rendering the interface. In the embodiment of the present application, the rendering of the C++ engine side takes over the rendering of the browser engine, which will cause the rendered UI (User Interface) interface elements of the browser client area to be covered and replaced by the rendered screen of the C++ engine side. Therefore, when the engine window is started, if you still want to superimpose the UI interface on the C++ engine side screen, you need to introduce an additional browser kernel module in the C++ engine side, which is called module W here, which is responsible for parsing and superimposing the UI interface web page elements.
[0073] Furthermore, the engine side will call module W when it is initialized, and then start module W to load the UI web page of the specified path. That is, when the engine window is opened, the UI interface of the target web page is loaded at the same time through the browser kernel embedded in the engine window. It should be pointed out that module W, namely CEF (Chromium Embedded Framework), is embedded in the engine side. At this time, the UI interface has been taken over by the CEF framework connected to the engine side, and all front-end interface rendering is controlled under it. Figure 2 The diagram shows the module W using the communication service component and the preset JavaScript library to interact with the engine window. In this way, the engine window can perform corresponding analysis according to the encapsulation of the relevant API in the preset JavaScript library, convert it into a C++ language call, and finally realize the use of a certain function of the engine.
[0074] S104: The engine window is superimposed on the UI interface and a target rendering window is output. When an operation event for the target web page is detected, an operation target corresponding to the operation event is determined based on the target rendering window, so as to respond to the operation event according to the operation target.
[0075] In the embodiment of the present application, when the engine window is started, the module W corresponding to the browser kernel will be started, and the module W will load the interface UI web page of the specified address. Finally, the client area of the browser tab will output the final rendering result of the window to obtain the target rendering window.
[0076] Further, when the user operates on the target web page, the operation target corresponding to the operation event for the target web page is determined based on the target rendering window, so as to judge the forwarding-related operations and determine whether the operation target is the UI interface or the engine window. When the operation target is the UI interface, relevant functions are called according to the API triggered by the UI web page elements; when the operation target is the engine window, the engine window is controlled to perform operations such as starting, refreshing, and closing the engine window. As Figure 3 shown is a schematic diagram of a complete background communication mechanism to ensure that the C / S architecture client can stably support starting, refreshing, and exiting from the browser. When the web page is refreshed, the preset JavaScript library detects the relevant event and immediately calls the operating system API to perform a close operation on the engine window; when the load event is detected, the operating system API is called again to perform an open operation on the engine window.
[0077] It should be noted that the preset JavaScript library encapsulates instructions such as opening and closing, which are used by the background service process to control the engine window. At the same time, it is necessary to interface with the start, refresh, and close events of the browser web page itself to ensure that the operations of the browser itself can be timely fed back to the preset JavaScript library for unified management.
[0078] The present application provides a method for implementing a C / S architecture graphics engine, which is applied to the browser side and includes: determining the current main window, and selecting a target parent window for the client of the C / S architecture graphics secondary development engine in the main window; the C / S architecture graphics secondary development engine is a graphics engine developed by using the C++ language to develop the C / S architecture graphics engine; establishing a parent-child window relationship between the target parent window and the engine window of the C / S architecture graphics secondary development engine through the application programming interface provided by the operating system interface framework; obtaining the open instruction of the target web page called by the preset JavaScript library, and connecting to the background service process according to the open instruction, so that the background service process opens the engine window through the application programming interface based on the parent-child window relationship; wherein, when the engine window is opened, the browser kernel embedded in the engine window simultaneously loads the UI interface of the target web page; the engine window and the UI interface are superimposed and displayed to output a target rendering window, and when an operation event for the target web page is detected, the operation target corresponding to the operation event is determined based on the target rendering window, so as to respond to the operation event according to the operation target.
[0079] The beneficial technical effects of this application are as follows: first, the client of the C / S architecture graphics secondary development engine is attached to the designated area of a modern browser in a parent-child window relationship, so as to achieve the purpose of seamlessly embedding the rendering screen into the browser, realize seamless docking with modern browsers, and satisfy the actual operation experience of users. In addition, a wider secondary development group is introduced, and the C / S architecture graphics engine is secondary developed using the C++ language, realizing the transformation from JavaScript to C++, so that it has high performance, high response, cross-platform and other characteristics, which is conducive to the promotion and application of product marketing. Secondly, when accessing the target web page on the browser side, it can communicate with the client of the C / S architecture graphics secondary development engine, and display the web page UI interface in the engine screen to achieve the superimposed display effect. Finally, the target rendering window based on the superimposed display determines the operation target corresponding to the operation event for the target web page, responds to the operation event according to the operation target, and ensures that the C / S architecture client can stably support the operation in the browser. In this way, through a series of transformations from the front-end UI interface to the back-end image engine, from JavaScript to C++, from the application program interface provided by the operating system interface framework to the local network high-performance communication, different software system processes are connected, and a pseudo-B / S architecture software operating system that is indistinguishable from the real thing is simulated. A set of codes can meet the needs of cross-platform reuse and avoid repeated development; it has better performance output performance under the same browser environment. It can be seen that through the technical solution of this application, the efficiency of front-end interface development is greatly improved compared with client interface development, the effect is also more outstanding, and it is highly customizable, which helps promote the use of high-performance C / S architecture software in the post-browser era.
[0080] like Figure 4 The diagram shows a schematic diagram of the system structure module of a C / S architecture graphic secondary development engine supporting a browser solution provided in an embodiment of the present application. Among them, the browser window P is the target parent window selected for the C / S architecture client, and the engine window C is always rendered on the parent window as its child window to form an overlay effect. Therefore, the parent-child feature can be used to allow the rendering of the engine end to overwrite the rendering of the parent window to simulate the effect of the client using the browser. Module W is a browser kernel module, which is used to implement the superposition of the UI interface on the C++ engine end screen, and is responsible for the parsing and superimposed rendering of the UI interface web page elements. When the engine end starts initialization, it will call module W to load the UI web page of the specified path. The embedded browser module W uses the communication module G (communication service component) to communicate with the client, display the web UI interface in the engine screen, and respond to the API call triggered by the interface element.
[0081] The JavaScript library on the browser side encapsulates the API interfaces for docking with the C / S architecture graphics secondary development engine and the APIs for adapting to different operating system interface libraries; at the same time, it also encapsulates instructions such as opening and closing, which are used by the background service process D to control the window C. The library J needs to dock with the startup, refresh, and close events of the browser web page itself to ensure that the operations of the browser itself can be timely fed back to the library J for unified management by the library J.
[0082] The background service process D has the following functions: it automatically starts in the background when the operating system starts and usually exists in the form of an operating system service; it embeds a network communication module that occupies a fixed communication port and can receive external communication instructions at any time. In this example, it specifically refers to a specific network request initiated by the browser side; it can open the window C program at a specified location and can also force the restart or shutdown of the window C program.
[0083] In addition, in the embodiments of the present application, relevant interface UI web pages can be developed for the module W, and the engine functions can be logically managed and called using the interfaces provided by the library J. Through the research and development at this stage, the interface and the engine can achieve the ideal secondary development goal.
[0084] It can be seen that on the basis of the high performance and cross-platform of the C / S architecture graphics secondary development engine developed using the C++ language, by using the characteristics of stackable rendering of the operating system form, the built-in browser kernel, and the local network service communication technology, the graphics engine can be normally developed and used in modern browsers, achieving the goal of surpassing the B / S graphics engine in all aspects.
[0085] Based on the above embodiments, this embodiment will specifically elaborate on S101 in the above embodiments. Among them, in order to enable the operator to clearly and intuitively understand how to select the target parent window for the client of the C / S architecture graphics secondary development engine, the process of determining the current main window and selecting the target parent window for the client of the C / S architecture graphics secondary development engine in the main window may include the following steps:
[0086] Step 11: Determine the current main window and determine the current browser tab based on the theme window;
[0087] Step 12: Determine the current operating system type and the type of modern browser corresponding to the browser side;
[0088] Step 13: Determine the corresponding browser feature identifier according to the type of modern browser, and call the corresponding application programming interface based on the current operating system type to capture the handle of the window to which the client area of the browser tab belongs according to the browser feature identifier;
[0089] Step 14: Determine the window to which the client area of the browser tab belongs as the target parent window of the client of the C / S architecture graphics secondary development engine according to the handle.
[0090] In the embodiment of the present application, the C / S architecture client is attached to the client area of a specified tab of a modern browser in a parent-child window relationship to achieve the purpose of seamlessly embedding the rendered picture into the browser. The core is to determine the target parent window for attachment. Therefore, first, a suitable target parent window, referred to as window P here, needs to be selected for the client. For different operating systems and different types of modern browsers, using the relevant operating system interface library APIs, the handle of the window P to which the client area of the browser tab with a specific identifier belongs is captured according to the characteristic identifier of each browser for setting the parent-child window relationship under the API condition; at the same time, the sibling windows at the same position are detected, and the sibling windows that affect the display or interaction of window P are placed at the bottom or degraded in the Z order using the system interface library APIs.
[0091] Based on the above embodiment, in a feasible implementation manner, in order to enable the engine window to always be above the target parent window, for example, when the browser only displays the engine picture in some areas, in the embodiment of the present application, the position and size of the relevant area of the engine picture are detected. Specifically, the following steps may further be included:
[0092] When the browser tab is initialized and / or the size of the browser tab changes, the first screen position of the engine window relative to the client area, the width information, and the height information of the engine window are obtained in real time through the preset JavaScript library.
[0093] In the embodiment of the present application, as Figure 5 shown, in some application scenarios, the browser does not display the engine picture in the entire client area but only in some areas. Therefore, the position and size of the relevant area of the engine window are detected. This task is responsible for by library J. The main principle is to obtain the screen position, width, and height information of a specified page element id relative to the client area in real time when the browser page is initialized or the size changes, and communicate with the engine side in a timely manner.
[0094] Correspondingly, obtaining the open instruction of the target web page called by the preset JavaScript library and connecting to the background service process according to the open instruction, so that the background service process opens the engine window through the application program interface based on the parent-child window relationship, includes:
[0095] Obtain the opening instruction of the target web page called by the preset JavaScript library, and connect to the background service process according to the opening instruction, so that the background service process performs engine screen rendering based on the parent-child window relationship according to the first screen position, the width information, and the height information, and opens the obtained engine window after rendering through the application programming interface.
[0096] In the embodiment of the present application, the engine side uses the API provided by the operating system interface framework to set the window of the engine itself to a window without a title bar, a toolbar, and a borderless type, which is called window C here; then set window C as the child window of window P, or set window P as the parent window of window C, and then according to the position, width, and height information obtained in the previous step, through API settings, the screen rendering of the engine will cover the rendering of the specified page element in the client area of the specified tab page of the browser, achieving the effect of simulating use in the browser.
[0097] Based on the above embodiment, this embodiment will specifically elaborate on S104 in the above embodiment. Among them, the module W corresponding to the browser kernel has off-screen rendering capabilities, that is, it can output the rendering result to the memory. Based on this feature, there are two feasible solutions to achieve the overlay display effect. In order to enable the operator to clearly and intuitively understand how to overlay the UI interface on the C++ engine side screen, in the first specific implementation manner, the engine window and the UI interface are overlaid and displayed to output the target rendering window. When an operation event for the target web page is detected, determining the operation target corresponding to the operation event based on the target rendering window, so that the process of responding to the operation event according to the operation target may include the following steps:
[0098] Step 21: Overlay and display the engine window and the UI interface to output the target rendering window. When an operation event for the target web page is detected, determine the second screen position of the execution subject in the operation event in the engine window based on the target rendering window;
[0099] Step 22: Determine whether the transparency channel value in the RGBA color space at the second screen position is lower than the first preset threshold;
[0100] Step 23: If the transparency channel value is lower than the first preset threshold, determine that the operation target corresponding to the operation event is the engine window and execute the operation event on the engine window;
[0101] Step 24: If the transparency channel value is not lower than the first preset threshold, determine that the operation target corresponding to the operation event is the UI interface and perform function calls on the UI interface according to the operation event.
[0102] In this embodiment, the screen result rendered by module W is stored in the memory, processed by graphical means, and computationally blended with the rendering result of window C, and finally output to the screen as the final rendering result, simulating the effect of overlaying the UI interface and the engine side in the B / S architecture;
[0103] It should be noted that module W has the ability to forward and process window events and peripheral events. In this way, when the user operates on the engine side, the message queue of the engine itself forwards the received window and peripheral events to module W. Taking a mouse operation as an example, when the mouse moves or clicks on window C, based on the screen position of window C where the mouse event occurs, the alpha (transparency) channel value of the RGBA of the off-screen rendering data at this screen position is judged. When it is lower than a certain threshold, that is, the color is semi-transparent or even completely transparent, the mouse event will not be forwarded to module W, but will be normally forwarded to the event queue of window C; when it is higher than a certain threshold, the mouse event will be forwarded to the event queue of module W and will not be forwarded to the event queue of window C. The target object of forwarding is determined by this logic.
[0104] In the second specific embodiment, the engine window and the UI interface are superimposed and displayed to output a target rendering window. When an operation event for the target web page is detected, an operation target corresponding to the operation event is determined based on the target rendering window, so as to respond to the operation event according to the operation target, which may include the following steps:
[0105] Step 31: Construct a topmost window and continuously cover the topmost window on the engine window;
[0106] Step 32: Superimpose and display the topmost window and the UI interface to output a target rendering window. When an operation event for the target web page is detected, determine the third screen position of the execution subject in the operation event in the topmost window based on the target rendering window;
[0107] Step 33: Judge whether the transparency channel value in the RGBA color space at the third screen position is lower than a second preset threshold;
[0108] Step 34: If the transparency channel value is lower than the second preset threshold, determine that the operation target corresponding to the operation event is the topmost window and execute the operation event on the topmost window;
[0109] Step 35: If the transparency channel value is not lower than the second preset threshold, determine that the operation target corresponding to the operation event is the UI interface and perform a function call on the UI interface according to the operation event.
[0110] In this embodiment, a new window S is derived, and this window has the following characteristics: it has the highest display level, that is, TOPMOST topmost, no border, no title bar, layering or transparency characteristics, and supports mouse penetration. Correspondingly, module W will be integrated into window S, that is, using off-screen rendering, the rendered image is output to window S.
[0111] Window S obtains the position and size of window C on the screen through the operating system interface library API, and sets its own position and size at a certain time interval to achieve the purpose of always covering window C in real time. Due to its layering or transparency characteristics and support for mouse penetration, it looks no different from the first specific embodiment in terms of visual effect. At this time, all peripheral event operations are preferentially processed by window S, and according to the same determination principle from step 22 to step 24, correct event forwarding is achieved thereby.
[0112] It can be understood that the implementation effect of the second specific embodiment is the same as that of the first specific embodiment, but the system efficiency and seamlessness are reduced, extremely dependent on each operating system interface library API, and additional processing processes are required.
[0113] Furthermore, based on the second specific embodiment, since window S is at the highest display level, that is, the topmost state. This state will cover the display of all other windows of the operating system. To solve this situation, a targeted window filtering mechanism needs to be introduced. Specifically, the following steps may also be included:
[0114] Step 41: Obtain all other windows except the topmost window and the engine window;
[0115] Step 42: Obtain the handle of the topmost window, the handle of the engine window, and the handles of the target windows among all the other windows that are above the engine window;
[0116] Step 43: Determine the position intersection between the engine window and the target window according to the handle of the engine window and the handle of the target window;
[0117] Step 44: Determine the specified area corresponding to the position intersection within the topmost window according to the handle of the topmost window, and set the specified area to not display or clip and display.
[0118] In the embodiments of the present application, first, all other windows except the topmost window and the engine window are obtained. As Figure 6As shown, the rectangular frame portion corresponding to window C corresponds to the top window and the engine window portion; window 1, window 2 and window 3 correspond to other windows. Further, the handle of window S itself and the handle of window C are obtained, and then the operating system interface library API is used to obtain the handles of all windows located above window C, that is, each window covered on window C (even if covered by window S). Get their position size relative to the screen, calculate their intersection with the rectangular position of window C, and then use the interface library API, such as the interface similar to the window mask or the display area setting interface (which can set what should be displayed in the window and what should not be displayed), to set the specified area of window S to not display or to crop the display, so as to simulate the effect of the top window being covered by the ordinary window.
[0119] It is understandable that this method will consume some computing resources in the window detection process, and depending on the operating system, the detection of the width of the window border is sometimes not accurate. During actual use, the display of some windows will deviate by several pixels, which is more dependent on the accuracy of the interface provided by the interface library API.
[0120] It can be seen that through the overlay display scheme of the above two modules W and the engine, the UI interface is superimposed on the C++ engine screen. Through a series of transformations from the front-end UI interface to the back-end image engine, from JavaScript to C++, from the operating system API to the local network high-performance communication, the processes of different software systems are connected, and a pseudo-B / S architecture software operation system that is indistinguishable from the real thing is simulated, which helps promote the use of high-performance C / S architecture software in the post-browser era. The efficiency of front-end interface development is greatly improved compared to client interface development, the effect is also more outstanding, and it is highly customizable.
[0121] Correspondingly, the embodiment of the present application also discloses a device for implementing a C / S architecture graphics engine, see Figure 7 As shown, applied to the browser side, the device includes:
[0122] The parent window selection module 11 is used to determine the current main window and select a target parent window for the client of the C / S architecture graphics secondary development engine in the main window; the C / S architecture graphics secondary development engine is a graphics engine developed by using the C++ language to develop the C / S architecture graphics engine;
[0123] A parent-child window relationship establishment module 12 is used to establish a parent-child window relationship between the target parent window and the engine window of the C / S architecture graphics secondary development engine through an application program interface provided by an operating system interface framework;
[0124] A display module 13, configured to obtain an opening instruction of a target web page called by a preset JavaScript library, and connect to a background service process according to the opening instruction, so that the background service process opens the engine window through the application programming interface based on the parent-child window relationship; wherein, when the engine window is opened, a browser kernel embedded in the engine window simultaneously loads a UI interface of the target web page;
[0125] An operation module 14, configured to superimpose and display the engine window and the UI interface and output a target rendering window, and when an operation event for the target web page is detected, determine an operation target corresponding to the operation event based on the target rendering window, so as to respond to the operation event according to the operation target.
[0126] Specific working processes of the above various modules can refer to the corresponding content disclosed in the foregoing embodiments, and will not be elaborated herein.
[0127] It can be seen that through the above solution of this embodiment, applied to the browser side, it includes: determining a current main window, and selecting a target parent window for a client of a C / S architecture graphics secondary development engine in the main window; the C / S architecture graphics secondary development engine is a graphics engine developed by using the C++ language to develop a C / S architecture graphics engine; establishing a parent-child window relationship between the target parent window and an engine window of the C / S architecture graphics secondary development engine through an application programming interface provided by an operating system interface framework; obtaining an opening instruction of a target web page called by a preset JavaScript library, and connecting to a background service process according to the opening instruction, so that the background service process opens the engine window through the application programming interface based on the parent-child window relationship; wherein, when the engine window is opened, a browser kernel embedded in the engine window simultaneously loads a UI interface of the target web page; superimposing and displaying the engine window and the UI interface and outputting a target rendering window, and when an operation event for the target web page is detected, determining an operation target corresponding to the operation event based on the target rendering window, so as to respond to the operation event according to the operation target.
[0128] The beneficial technical effects of this application are as follows: first, the client of the C / S architecture graphics secondary development engine is attached to the designated area of a modern browser in a parent-child window relationship, so as to achieve the purpose of seamlessly embedding the rendering screen into the browser, realize seamless docking with modern browsers, and satisfy the actual operation experience of users. In addition, a wider secondary development group is introduced, and the C / S architecture graphics engine is secondary developed using the C++ language, realizing the transformation from JavaScript to C++, so that it has high performance, high response, cross-platform and other characteristics, which is conducive to the promotion and application of product marketing. Secondly, when accessing the target web page on the browser side, it can communicate with the client of the C / S architecture graphics secondary development engine, and display the web page UI interface in the engine screen to achieve the superimposed display effect. Finally, the target rendering window based on the superimposed display determines the operation target corresponding to the operation event for the target web page, responds to the operation event according to the operation target, and ensures that the C / S architecture client can stably support the operation in the browser. In this way, through a series of transformations from the front-end UI interface to the back-end image engine, from JavaScript to C++, from the application program interface provided by the operating system interface framework to the local network high-performance communication, different software system processes are connected, and a pseudo-B / S architecture software operating system that is indistinguishable from the real thing is simulated. A set of codes can meet the needs of cross-platform reuse and avoid repeated development; it has better performance output performance under the same browser environment. It can be seen that through the technical solution of this application, the efficiency of front-end interface development is greatly improved compared with client interface development, the effect is also more outstanding, and it is highly customizable, which helps promote the use of high-performance C / S architecture software in the post-browser era.
[0129] Furthermore, the present application also discloses an electronic device. Figure 8 This is a structural diagram of an electronic device 20 according to an exemplary embodiment, and the content in the diagram cannot be considered as any limitation on the scope of use of the present application.
[0130] Figure 8 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the implementation method of the C / S architecture graphics engine disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be a computer.
[0131] In this embodiment, the power supply 23 is used to provide operating voltages for the various hardware devices on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and specific limitations thereof are not provided herein; the input / output interface 25 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application requirements, and specific limitations thereof are not provided herein.
[0132] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, a random access memory, a magnetic disk, an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, data 223, etc., and the data 223 can include various kinds of data. The storage method can be transient storage or permanent storage.
[0133] Among them, the operating system 221 is used to manage and control the various hardware devices and the computer program 222 on the electronic device 20, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program capable of implementing the implementation method of the C / S architecture graphics engine executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 can further include computer programs capable of performing other specific tasks.
[0134] Furthermore, the embodiment of this application also discloses a computer-readable storage medium. The computer-readable storage medium mentioned here includes a random access memory (RAM), an internal memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a magnetic disk, an optical disk, or any other form of storage medium well-known in the technical field. Among them, when the computer program is executed by a processor, it implements the foregoing implementation method of the C / S architecture graphics engine. For the specific steps of this method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details are not described herein again.
[0135] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts among the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0136] The steps of the implementation method or algorithm of the C / S architecture graphics engine described in combination with the embodiments disclosed in this article can be directly implemented by hardware, software modules executed by a processor, or a combination of both. The software module can be placed in a random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.
[0137] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0138] The above has introduced in detail a method, device, equipment and medium for implementing a C / S architecture graphics engine provided by the present invention. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A method for implementing a C / S architecture graphics engine, characterized in that, Applied to the browser side, including: Determine the current main window, and select a target parent window for the client of the C / S architecture graphics secondary development engine in the main window; the C / S architecture graphics secondary development engine is a graphics engine developed by using the C++ language to develop the C / S architecture graphics engine; Establish a parent-child window relationship between the target parent window and the engine window of the C / S architecture graphics secondary development engine through the application programming interface provided by the operating system interface framework; Obtain the opening instruction of the target web page called by the preset JavaScript library, and connect to the background service process according to the opening instruction, so that the background service process opens the engine window through the application programming interface based on the parent-child window relationship; wherein, when the engine window is opened, the browser kernel embedded in the engine window simultaneously loads the UI interface of the target web page; Overlay and display the engine window and the UI interface and output a target rendering window, and when an operation event for the target web page is detected, determine an operation target corresponding to the operation event based on the target rendering window, so as to respond to the operation event according to the operation target; The determining the current main window and selecting a target parent window for the client of the C / S architecture graphics secondary development engine in the main window includes: Determine the current main window and determine the current browser tab based on the main window; Determine the current operating system type and the modern browser type corresponding to the browser side; Determine the corresponding browser feature identifier according to the modern browser type, and call the corresponding application programming interface based on the current operating system type to capture the handle of the window to which the client area of the browser tab belongs according to the browser feature identifier; Determine the window to which the client area of the browser tab belongs as the target parent window of the client of the C / S architecture graphics secondary development engine according to the handle; In the process of determining the window to which the client area of the browser tab belongs as the target parent window of the client of the C / S architecture graphics secondary development engine according to the handle, it further includes: Detect sibling windows at the same position according to the target parent window, and use the application programming interface to perform a Z-order bottom operation or a demotion operation on the target sibling window that affects the display and interaction of the target parent window among the sibling windows.
2. The implementation method of the C / S architecture graphics engine according to claim 1, characterized in that, It also includes: When the browser tab is initialized and / or the size of the browser tab changes, real-time obtain the first screen position of the engine window relative to the client area, the width information and the height information of the engine window through the preset JavaScript library; Correspondingly, the obtaining the opening instruction of the target web page called by the preset JavaScript library and connecting to the background service process according to the opening instruction, so that the background service process opens the engine window through the application programming interface based on the parent-child window relationship includes: Obtain the opening instruction of the target web page called by the preset JavaScript library, and connect to the background service process according to the opening instruction, so that the background service process performs engine screen rendering based on the parent-child window relationship according to the first screen position, the width information, and the height information, and opens the obtained engine window after rendering through the application programming interface.
3. The implementation method of the C / S architecture graphics engine according to claim 1 or 2, characterized in that Overlay the engine window with the UI interface and output the target rendering window. When an operation event for the target web page is detected, determine the operation target corresponding to the operation event based on the target rendering window, so as to respond to the operation event according to the operation target, including: Overlay the engine window with the UI interface and output the target rendering window. When an operation event for the target web page is detected, determine the second screen position of the execution subject in the operation event in the engine window based on the target rendering window; Judge whether the transparency channel value in the RGBA color space at the second screen position is lower than a first preset threshold; If the transparency channel value is lower than the first preset threshold, determine that the operation target corresponding to the operation event is the engine window and execute the operation event on the engine window; If the transparency channel value is not lower than the first preset threshold, determine that the operation target corresponding to the operation event is the UI interface and perform function calls on the UI interface according to the operation event.
4. The implementation method of the C / S architecture graphics engine according to claim 1 or 2, characterized in that Overlay the engine window with the UI interface and output the target rendering window. When an operation event for the target web page is detected, determine the operation target corresponding to the operation event based on the target rendering window, so as to respond to the operation event according to the operation target, including: Construct a topmost window and continuously cover the topmost window on the engine window; Overlay the topmost window with the UI interface and output the target rendering window. When an operation event for the target web page is detected, determine the third screen position of the execution subject in the operation event in the topmost window based on the target rendering window; Judge whether the transparency channel value in the RGBA color space at the third screen position is lower than a second preset threshold; If the transparency channel value is lower than the second preset threshold, determine that the operation target corresponding to the operation event is the topmost window and execute the operation event on the topmost window; If the transparency channel value is not lower than the second preset threshold, determine that the operation target corresponding to the operation event is the UI interface and perform function calls on the UI interface according to the operation event.
5. The implementation method of the C / S architecture graphics engine according to claim 4, characterized in that, It further includes: Obtain all other windows except the topmost window and the engine window; Obtain the handle of the topmost window, the handle of the engine window, and the handles of the target windows among all the other windows that are above the engine window; Determine the position intersection between the engine window and the target window according to the handle of the engine window and the handle of the target window; Determine a specified area corresponding to the intersection of the position within the topmost window according to the handle of the topmost window, and set the specified area to be not displayed or cropped and displayed.
6. An implementation device of a C / S architecture graphics engine, characterized in that, Applied to the browser side, it includes: A parent window selection module, configured to determine the current main window, and select a target parent window for the client of the C / S architecture graphics secondary development engine in the main window; the C / S architecture graphics secondary development engine is a graphics engine developed by using the C++ language to develop the C / S architecture graphics engine; A parent-child window relationship establishment module, configured to establish a parent-child window relationship between the target parent window and the engine window of the C / S architecture graphics secondary development engine through the application programming interface provided by the operating system interface framework; A display module, configured to obtain an open instruction of a target web page called by a preset JavaScript library, and connect to a background service process according to the open instruction, so that the background service process opens the engine window through the application programming interface based on the parent-child window relationship; wherein, when the engine window is opened, the browser kernel embedded in the engine window simultaneously loads the UI interface of the target web page; An operation module, configured to superimpose and display the engine window and the UI interface and output a target rendering window, and when an operation event for the target web page is detected, determine an operation target corresponding to the operation event based on the target rendering window, so as to respond to the operation event according to the operation target; The parent window selection module is configured to determine the current main window, and determine the current browser tab based on the main window; determine the current operating system type and the modern browser type corresponding to the browser side; determine a corresponding browser feature identifier according to the modern browser type, and call a corresponding application programming interface based on the current operating system type to capture the handle of the window to which the client area of the browser tab belongs according to the browser feature identifier; determine the window to which the client area of the browser tab belongs as the target parent window of the client of the C / S architecture graphics secondary development engine according to the handle; The parent window selection module is further configured to detect sibling windows at the same position according to the target parent window, and perform a Z-order bottom operation or a demotion operation on the target sibling window that affects the display and interaction of the target parent window by using the application programming interface.
7. An electronic device, characterized in that, The electronic device includes a processor and a memory; wherein, the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the implementation method of the C / S architecture graphics engine according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, For storing a computer program; wherein the computer program, when executed by a processor, implements the implementation method of the C / S architecture graphics engine according to any one of claims 1 to 5.
Citation Information
Patent Citations
Embedded browser implementation method and device, electronic equipment and storage medium
CN113867985A
Web advertising protection system
US20160239880A1