Cross-process window embedding method and system, electronic equipment, storage medium and product

CN119311438APending Publication Date: 2025-01-14CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411432401.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

[0003]然而,当前的跨进程窗体嵌入机制主要依赖于操作系统底层的api,这导致机制无法实现跨系统的调用,开发者必须为不同的操作系统编写特定的代码,限制了程序的跨系统兼容性,也增加了开发成本和维护难度,同时,在某些情况下,嵌入的子窗体可能会被父窗体遮挡,导致用户无法看到子窗体的内容,影响用户体验

Benefits of technology

[0034] This application proposes a cross-process form embedding method, which establishes a socket connection between the parent process and the child process as a channel for data transmission between the parent process and the child process. Then, in the parent form created by the parent process Set a transparent area, and the location information of the transparent area is sent to the child process in real time and accurately through the established socket connection. After the child process receives the location information of the transparent area, it accurately embeds the subform created by it according to the location information. Within the transparent area of ​​the parent form, thereby achieving cross-process form embedding effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311438A_ABST
    Figure CN119311438A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-process window embedding method and system, electronic equipment, a storage medium and a product, and relates to the technical field of computers.The cross-process window embedding method comprises the steps that socket connection is established between a parent process and a child process; setting a transparent area in a parent window created by the parent process, and sending the position information of the transparent area to the child process based on the socket connection, so that the child process embeds the created child window into the transparent area according to the position information. According to the method and the device, the cross-system compatibility and the window display effect of the cross-process window embedding can be improved, so that the operation performance of the cross-process window embedding is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a cross-process window embedding method, system, electronic device, storage medium and product. Background Art

[0002] With the development of computer technology, the demand for cross-process window embedding is growing. In the application development of multiple technology stacks, developers need to embed windows between different processes to provide a more flexible and rich user interface.

[0003] However, the current cross-process window embedding mechanism mainly relies on the underlying API of the operating system, which makes it impossible to implement cross-system calls. Developers must write specific code for different operating systems, which limits the cross-system compatibility of the program and increases development costs and maintenance difficulties. At the same time, in some cases, the embedded child window may be blocked by the parent window, causing the user to be unable to see the content of the child window, affecting the user experience.

[0004] In summary, how to optimize the operational performance of cross-process window embedding has become a technical problem that needs to be solved urgently in this field. Summary of the invention

[0005] The main purpose of this application is to provide a cross-process window embedding method, system, electronic device, storage medium and product, aiming to optimize the operational performance of cross-process window embedding by improving the cross-system compatibility and window display effect of cross-process window embedding.

[0006] To achieve the above purpose, the present application proposes a cross-process form embedding method, the method comprising:

[0007] Establish a socket connection between the parent process and the child process;

[0008] A transparent area is set in the parent window created by the parent process, and the position information of the transparent area is sent to the child process based on the socket connection, so that the child process can embed the created child window into the transparent area according to the position information.

[0009] In one embodiment, the step of establishing a socket connection between the parent process and the child process includes:

[0010] When the parent process is detected to be started, the socket listening service is started;

[0011] When it is detected that the child process is started, the listening port used by the socket listening service is transmitted to the child process, so that the child process can establish a socket connection with the parent process through the listening port.

[0012] In one embodiment, after the step of establishing a socket connection between the parent process and the child process, the process further includes:

[0013] Monitor whether the display effect of the parent window created by the parent process changes;

[0014] When detecting that the display effect of the parent window changes, generating change information;

[0015] The change information is sent to the child process based on the socket connection, so that the child process can adjust the display effect of the created child window according to the change information.

[0016] In one embodiment, the step of generating change information when detecting that the display effect of the parent window changes includes:

[0017] When a change in the display effect of the parent window is detected, initial change information is generated, where the initial change information includes a change in size and / or position of the parent window;

[0018] The initial change information is encapsulated as change information in a standardized data format.

[0019] In one embodiment, the step of setting a transparent area in the parent window created by the parent process includes:

[0020] Get the current layout information of the parent window created by the parent process;

[0021] According to a preset embedding rule, the size and position of the transparent area are calculated based on the current layout information;

[0022] The transparent area is dynamically set in the parent window.

[0023] In addition, to achieve the above purpose, the present application also proposes a cross-process window embedding system, the cross-process window embedding system includes: a parent process, a child process and a socket operation subsystem, the parent process and the child process perform message transmission through the socket operation subsystem;

[0024] The parent process is used to send the change information of the parent window to the socket operation subsystem;

[0025] The socket operation subsystem is used to send the received change information to the subprocess;

[0026] The sub-process is used to adjust the display effect of the sub-window according to the change information.

[0027] In one embodiment, the socket operation subsystem further includes a middle layer, a socket server, and a socket client constructed using .Net Framework (a framework for building, deploying, and running network services and other applications) and an open source framework mono (a cross-platform open source framework);

[0028] The parent process is used to call a socket api (Sockets Application Programming Interface) to send the change information to the middle layer, and the middle layer calls an operation subsystem api (Application Programming Interface) to send the change information to the socket server;

[0029] The socket server is used to send the received change information to the socket client;

[0030] The socket client is used to send the change information to the middle layer, and call the socket API through the middle layer to send the change information to the child process.

[0031] In addition, to achieve the above-mentioned purpose, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the cross-process window embedding method as described above.

[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the cross-process window embedding method as described above are implemented.

[0033] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the cross-process window embedding method described above are implemented.

[0034] The present application proposes a cross-process window embedding method, which establishes a socket connection between a parent process and a child process as a channel for data transmission between the parent process and the child process. Then, a transparent area is set in the parent window created by the parent process, and the position information of the transparent area is sent to the child process in real time and accurately through the established socket connection. After the child process receives the position information of the transparent area, it accurately embeds the child window it creates into the transparent area of ​​the parent window according to the position information, thereby achieving a cross-process window embedding effect.

[0035] In summary, compared with the traditional cross-process window embedding mechanism which often relies on the underlying API of a specific operating system, resulting in the non-portability of the mechanism between different systems, the present application realizes cross-process communication through socket connection. This method is cross-platform and does not rely on specific operating system APIs, thereby improving the cross-system compatibility of the program. Developers no longer need to write specific code for different operating systems, thereby reducing development costs and maintenance difficulties. In previous cross-process window embedding mechanisms, child windows are sometimes obscured by parent windows, resulting in users being unable to see the contents of the child windows. The present application ensures the visibility of the child window contents by setting a transparent area in the parent window and embedding the child window into the transparent area, thereby ensuring that users can clearly see the contents of the child window without being interfered with by the parent window, thereby improving the user experience and optimizing the operational performance of cross-process window embedding. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

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

[0038] Figure 1 A flowchart diagram of the first embodiment of the cross-process form embedding method of the present application;

[0039] Figure 2 A schematic diagram of the window display provided for the first embodiment of the cross-process window embedding method of the present application;

[0040] Figure 3 This is a schematic diagram of the module structure of the cross-process window embedding system of the embodiment of the present application;

[0041] Figure 4 This is a schematic diagram of the module structure of the cross-process window embedding device according to an embodiment of the present application;

[0042] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the cross-process window embedding method in the embodiment of the present application.

[0043] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0044] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0045] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0046] The main solution of the embodiment of the present application is: to establish a socket connection between the parent process and the child process; to set a transparent area in the parent window created by the parent process, and to send the position information of the transparent area to the child process based on the socket connection, so that the child process can embed the created child window into the transparent area according to the position information.

[0047] Since the current cross-process window embedding mechanism mainly relies on the underlying API of the operating system, the mechanism cannot implement cross-system calls. Developers must write specific code for different operating systems, which limits the cross-system compatibility of the program and increases development costs and maintenance difficulties. At the same time, in some cases, the embedded child window may be blocked by the parent window, causing the user to be unable to see the content of the child window, affecting the user experience.

[0048] Specifically, the current cross-process window embedding mechanism is basically implemented based on the window handle and the underlying API of the operating system. There are generally two ways to implement it: one is to set the parent-child relationship of the two windows through the system-level API to achieve linkage; the other is to send windows (window) messages. When the parent window moves or scales, it sends its own message to the child window, and the child window adjusts its position and size according to the message of the parent window. Both methods rely on the API provided by the operating system to set the parent-child relationship of the two windows to achieve linkage. They are heavily dependent on specific operating systems, cannot implement cross-system calls, and there is a risk of the child window being blocked.

[0049] An embodiment of the present application provides a solution, which establishes a socket connection between a parent process and a child process as a channel for data transmission between the parent process and the child process. Then, a transparent area is set in a parent window created by the parent process, and the position information of the transparent area is sent to the child process in real time and accurately through the established socket connection. After the child process receives the position information of the transparent area, the child window it creates is accurately embedded in the transparent area of ​​the parent window according to the position information, thereby achieving a cross-process window embedding effect.

[0050] Compared with the traditional cross-process window embedding mechanism which often relies on the underlying API of a specific operating system, resulting in the non-portability of the mechanism between different systems, the present application realizes cross-process communication through socket connection. This method is cross-platform and does not rely on specific operating system APIs, thereby improving the cross-system compatibility of the program. Developers no longer need to write specific code for different operating systems, thereby reducing development costs and maintenance difficulties. In previous cross-process window embedding mechanisms, the child window is sometimes blocked by the parent window, resulting in the user being unable to see the contents of the child window. The present application ensures the visibility of the child window contents by setting a transparent area in the parent window and embedding the child window into the transparent area, thereby ensuring that the user can clearly see the contents of the child window without being interfered with by the parent window, thereby improving the user experience and optimizing the operational performance of cross-process window embedding.

[0051] It should be noted that the execution subject of this embodiment can be an electronic device with data processing, network communication and program running functions, such as a computer, a mobile phone, a tablet, etc., or an electronic device capable of realizing the above functions, etc. The following takes the form embedded terminal as an example to illustrate this embodiment and the following embodiments.

[0052] Based on this, the embodiment of the present application provides a cross-process form embedding method, referring to Figure 2 , Figure 2 This is a flowchart of the first embodiment of the cross-process window embedding method of the present application.

[0053] In this embodiment, the cross-process form embedding method includes steps S10 to S20:

[0054] Step S10, establishing a socket connection between the parent process and the child process;

[0055] Cross-process window embedding means allowing a window created by another process (i.e., a child window created by a child process) to be embedded in a window of one process (i.e., a parent window created by a parent process). It can be applied to a variety of scenarios, such as remote desktops, embedded systems, or situations that require cross-application interface integration.

[0056] A socket connection is established between the parent process and the child process to ensure that data and information can be transmitted between the parent process and the child process. It should be noted that a socket connection is a network communication method that provides a reliable data transmission channel between processes or computers. Through a socket connection, different processes or computers can communicate with each other and exchange data and information.

[0057] Step S20, setting a transparent area in the parent window created by the parent process, and sending the position information of the transparent area to the child process based on the socket connection, so that the child process can embed the created child window into the transparent area according to the position information.

[0058] Create a parent form in the parent process, and set a transparent area in the parent form. The transparent area is the location where the child form will be embedded. Then, based on the established socket connection, the parent process sends the location information of the transparent area to the child process. The location information may include the coordinates, size, and shape of the transparent area. After the child process receives the location information of the transparent area, it creates a child form according to the location information and embeds the child form into the transparent area of ​​the parent form. In this way, the child form can be displayed in the parent form, realizing cross-process form embedding.

[0059] In addition, in a feasible implementation, when there are multiple child processes, a socket connection is established between the parent process and each child process; multiple transparent areas are set in the parent window created by the parent process, and the number of transparent areas is the same as the number of child processes to which the socket connection is established; based on each of the socket connections, the position information of each of the transparent areas is sent to each of the child processes, so that each of the child processes can embed the child windows they create into the transparent area according to the position information.

[0060] Specifically, when the parent process creates the parent form, it dynamically sets the same number of transparent areas according to the number of connected child processes. The transparent areas can be stored in the form of an array or a list, and the storage content includes the coordinates of the transparent areas (such as the coordinates of the upper left corner and the lower right corner), size (width and height) and other information. For ease of management, each transparent area is assigned a unique index; in the parent process, a data structure (such as a dictionary or a hash table) is maintained to associate the identifier of the child process, the identifier of the socket connection and the index of the transparent area. When the child process is started, the parent process finds the transparent area corresponding to the child process according to the associated information, and sends the location information of the transparent area to the child process through the corresponding socket connection. After receiving the location information of the transparent area, the child process embeds the child form created by itself into the corresponding transparent area of ​​the parent form.

[0061] In summary, compared with the traditional cross-process window embedding mechanism which often relies on the underlying API of a specific operating system, resulting in the non-portability of the mechanism between different systems, the embodiment of the present application realizes cross-process communication through a socket connection. This method is cross-platform and does not rely on a specific operating system API, thereby improving the cross-system compatibility of the program. Developers no longer need to write specific code for different operating systems, thereby reducing development costs and maintenance difficulties. In previous cross-process window embedding mechanisms, the child window is sometimes blocked by the parent window, resulting in the user being unable to see the contents of the child window. The present application ensures the visibility of the child window contents by setting a transparent area in the parent window and embedding the child window into the transparent area, thereby ensuring that the user can clearly see the contents of the child window without being interfered with by the parent window, thereby improving the user experience and optimizing the operational performance of cross-process window embedding.

[0062] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction and will not be repeated later. On this basis, step S10 can include steps S101 to S102:

[0063] Step S101, when detecting that the parent process is started, start the socket listening service;

[0064] After detecting that the parent process is started, the socket listening service is started. The socket listening service is used to continuously listen on the specified network address (such as IP address) and port, waiting for the connection request from the child process. The start of the socket listening service indicates that the parent process is ready to accept the connection of the child process.

[0065] Step S102, when it is detected that the child process is started, the listening port used by the socket listening service is transmitted to the child process, so that the child process can establish a socket connection with the parent process through the listening port.

[0066] After the parent process starts the socket listening service, when the child process is detected to be started, the information of the listening port used by the socket listening service is passed to the child process, which can be completed through inter-process communication (such as environment variables, command line parameters or special communication protocols). After receiving the information of the listening port, the child process initiates a socket connection request to the parent process through the listening port to establish a socket connection between the child process and the parent process.

[0067] In a feasible embodiment, step S10 may further include steps A10 to A30:

[0068] Step A10, monitoring whether the display effect of the parent window created by the parent process changes;

[0069] Step A20, when it is detected that the display effect of the parent window changes, generating change information;

[0070] Monitor in real time whether the display effect of the parent window created by the parent process has changed, such as whether the position and size of the parent window have changed. After detecting that the position or size of the parent window has changed, record the specific content of the display effect change, including the position coordinates and size before and after the change, and integrate the recorded content into complete change information.

[0071] Step A30: sending the change information to the child process based on the socket connection, so that the child process can adjust the display effect of the created child window according to the change information.

[0072] Based on the established socket connection, the generated change information is transmitted to the child process. After receiving the change information, the child process immediately adjusts the position and size of the child window created by the child process according to the specific content in the change information.

[0073] Through this process, the child form can keep pace with the changes of the parent form in real time, thereby ensuring that the layout and display effects of the entire user interface remain consistent, improving the interactive experience and overall effect of the user interface.

[0074] In a feasible embodiment, step A20 may include steps A201 to A202:

[0075] Step A201, when it is detected that the display effect of the parent window changes, initial change information is generated, and the initial change information includes a size change and / or a position change of the parent window;

[0076] When the display effect of the parent window changes, for example, its size or position changes, an initial change message is immediately generated, which records in detail the specific content of the parent window change, including but not limited to its size adjustment (such as increase or decrease in width and height) and position movement (such as change in screen coordinates).

[0077] Step A202: encapsulate the initial change information into change information in a standardized data format.

[0078] The generated initial change information is encapsulated to ensure that it is transmitted in a standardized data format to improve the readability and compatibility of the data and facilitate reception and parsing by the child process.

[0079] In a feasible embodiment, the step of "setting a transparent area in the parent window created by the parent process" in step S20 includes:

[0080] Step S201, obtaining the current layout information of the parent window created by the parent process;

[0081] Get the current layout information of the parent window created by the parent process, including but not limited to the size, position, border style and distribution of internal controls of the parent window.

[0082] Step S202, calculating the size and position of the transparent area based on the current layout information according to a preset embedding rule;

[0083] It should be noted that the embedding rules preset the size ratio between the transparent area and the parent window, the position preference (such as centering, edge, etc.), and the spacing with other controls. The settings of the embedding rules can be adjusted based on the actual application scenario.

[0084] According to the preset embedding rules, the size and position of the transparent area are calculated based on the current layout information of the parent window. Through the calculation, a transparent area that meets the aesthetic requirements and does not affect the functional implementation can be determined.

[0085] Step S203: dynamically setting the transparent area in the parent window.

[0086] After determining the size and position of the transparent area, the transparent area is dynamically set in the parent window, and the graphic interface of the parent window is updated to ensure that the transparent area can be correctly displayed and accept the embedding of the child window.

[0087] For example, after obtaining the current layout information of the parent window, the embedding rule is determined to set the size ratio between the transparent area and the parent window to be 1:2, and the position preference is left. According to the embedding rule, the position and size of the transparent area are set in the parent window, and then the display effect of the child window is adjusted to embed it into the transparent area. The display effect of the embedded screen is as follows: Figure 2 As shown, as the display effect of the parent window changes, the display effect of the child window also changes accordingly, ensuring that the parent window does not block the display of the child window, thereby improving the user experience.

[0088] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the cross-process window embedding method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0089] The present application also provides a cross-process window embedding system. Figure 3 The cross-process form embedding system includes: a parent process 100, a child process 200 and a socket operation subsystem 300, wherein the parent process 100 and the child process 200 perform message transmission through the socket operation subsystem 300;

[0090] The parent process 100 is used to send the change information of the parent window to the socket operation subsystem 300;

[0091] The socket operation subsystem 300 is used to send the received change information to the subprocess 200;

[0092] The sub-process 200 is used to adjust the display effect of the sub-window according to the change information.

[0093] In this embodiment, a cross-process window embedding system is proposed. The cross-process window embedding system includes: a parent process 100, a child process 200 and a socket operation subsystem 300. The parent process 100 and the child process 200 transmit messages through the socket operation subsystem 300.

[0094] Among them, the parent process 100 will pay real-time attention to the dynamic changes of the parent window it created, including but not limited to the resizing and position movement of the parent window. Once these changes are detected, the parent process 100 will immediately encapsulate the change information into a specific data format, that is, the change information containing the window processing logic, and send it to the socket operation subsystem 300.

[0095] The socket operation subsystem 300 serves as a communication bridge between the parent process 100 and the child process 200 , and is used to receive change information from the parent process 100 and send the change information to the child process 200 accurately.

[0096] In addition, the socket operation subsystem 300 can perform data format conversion processing and / or error checking on the change information sent by the parent process 100 according to application requirements to improve the efficiency and security of information transmission between the parent process 100 and the child process 200.

[0097] The child process 200 adjusts the display effect of the child window created by itself according to the change information about the parent window received from the socket operation subsystem 300, that is, adjusts the window processing logic of the child window according to the received change information, for example, changes the size, position, transparency and other attributes of the child window to ensure that the child window can keep pace with the changes of the parent window.

[0098] In this way, the cross-process window embedding system proposed in this embodiment realizes the seamless embedding and synchronous updating of windows between different processes through the collaborative work of the parent process 100, the child process 200 and the socket operation subsystem 300, improves the consistency and smoothness of the display interface, and brings users a better user experience.

[0099] In a feasible embodiment, the socket operation subsystem 300 further includes an intermediate layer 301, a socket server 302 and a socket client 303 constructed using .Net Framework and the open source framework mono;

[0100] The parent process 100 is used to call the socket API to send the change information to the middle layer 301, and call the operation subsystem API through the middle layer 301 to send the change information to the socket server;

[0101] The socket server is used to send the received change information to the socket client 303;

[0102] The socket client 303 is used to send the change information to the middle layer 301 , and to call the socket API through the middle layer 301 to send the change information to the child process 200 .

[0103] In this embodiment, the socket operation subsystem 300 also includes an intermediate layer 301, a socket server 302 and a socket client 303 built using .Net Framework and the open source framework mono. When the parent process 100 needs to send change information about the parent window, it first calls the socket API to pass the change information to the intermediate layer 301.

[0104] After receiving the change information sent by the parent process 100 , the middle layer 301 calls the API of the operating subsystem to accurately forward the change information to the socket server 302 .

[0105] The socket server 302 receives the change information sent from the middle layer 301 and sends the change information to the socket client 303 .

[0106] After receiving the change information from the socket server 302, the socket client 303 sends the change information to the middle layer 301, and the middle layer 301 calls the socket API to finally send the change information to the child process 200, which adjusts the display effect of the child window according to the received change information.

[0107] For example, to facilitate understanding of the difference between the above embodiment and the traditional cross-process window embedding mechanism, window movement is used as an example for explanation:

[0108] The traditional cross-process form embedding process needs to go through the stages shown in Table 1:

[0109] Table 1

[0110]

[0111]

[0112] It can be seen that the traditional cross-process form embedding process is heavily dependent on the underlying API of the operating system and cannot realize cross-system calls. Specific code must be written for specific systems. Moreover, although traditional development methods also use some open source frameworks to encapsulate the operating system API, the source code of the program must be recompiled under different operating systems before it can be used. When it involves changes in business logic, repeated compilation, testing, and release are required, resulting in low development efficiency.

[0113] This embodiment is based on .Net framework and its open source version mono as the middle layer, all operating system APIs are isolated, and the source code only needs to be compiled once to run everywhere. The cross-process form embedding process in this embodiment includes the stages shown in Table 2:

[0114] Table 2

[0115]

[0116]

[0117] It can be seen that in this embodiment, the communication between the parent process and the child process is based on socket, which does not rely on the message mechanism of the specific operating system and gets rid of the dependence on the operating system, thereby optimizing the operating performance of cross-process window embedding.

[0118] The cross-process window embedding system provided in the embodiment of the present application adopts the cross-process window embedding method in the above embodiment, and can optimize the operating performance of the cross-process window embedding by improving the cross-system compatibility and window display effect of the cross-process window embedding. Compared with the prior art, the beneficial effects of the cross-process window embedding system provided in the embodiment of the present application are the same as the beneficial effects of the cross-process window embedding method provided in the above embodiment, and other technical features of the cross-process window embedding system are the same as the features disclosed in the cross-process window embedding method in the above embodiment, which will not be described in detail here.

[0119] The present application also provides a cross-process window embedding device. Figure 4 , the cross-process form embedding device includes:

[0120] A connection module 10 is used to establish a socket connection between the parent process and the child process;

[0121] The embedding module 20 is used to set a transparent area in the parent window created by the parent process, and send the position information of the transparent area to the child process based on the socket connection, so that the child process can embed the created child window into the transparent area according to the position information.

[0122] Optionally, the connection module 10 is further used for:

[0123] When the parent process is detected to be started, the socket listening service is started;

[0124] When it is detected that the child process is started, the listening port used by the socket listening service is transmitted to the child process, so that the child process can establish a socket connection with the parent process through the listening port.

[0125] Optionally, the cross-process window embedding device further includes a window adjustment module (not shown), and the window adjustment module is used to:

[0126] Monitor whether the display effect of the parent window created by the parent process changes;

[0127] When detecting that the display effect of the parent window changes, generating change information;

[0128] The change information is sent to the child process based on the socket connection, so that the child process can adjust the display effect of the created child window according to the change information.

[0129] Optionally, the form adjustment module is further used to:

[0130] When a change in the display effect of the parent window is detected, initial change information is generated, where the initial change information includes a change in size and / or position of the parent window;

[0131] The initial change information is encapsulated as change information in a standardized data format.

[0132] Optionally, the embedded module 10 is further used to: obtain current layout information of the parent window created by the parent process;

[0133] According to a preset embedding rule, the size and position of the transparent area are calculated based on the current layout information;

[0134] The transparent area is dynamically set in the parent window.

[0135] The cross-process window embedding device provided in the embodiment of the present application adopts the cross-process window embedding method in the above embodiment, and can optimize the operating performance of the cross-process window embedding by improving the cross-system compatibility and window display effect of the cross-process window embedding. Compared with the prior art, the beneficial effects of the cross-process window embedding device provided in the embodiment of the present application are the same as the beneficial effects of the cross-process window embedding method provided in the above embodiment, and other technical features in the cross-process window embedding device are the same as the features disclosed in the cross-process window embedding method in the above embodiment, which will not be described in detail here.

[0136] An embodiment of the present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the cross-process window embedding method in the above-mentioned embodiment one.

[0137] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic device in the embodiments of the present application may include but is not limited to mobile terminals such as laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0138] like Figure 5As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0139] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0140] The electronic device provided in the embodiment of the present application adopts the cross-process window embedding method in the above embodiment, and can optimize the operating performance of the cross-process window embedding by improving the cross-system compatibility and window display effect of the cross-process window embedding. Compared with the prior art, the beneficial effects of the electronic device provided in the embodiment of the present application are the same as the beneficial effects of the cross-process window embedding method provided in the above embodiment, and other technical features in the electronic device are the same as the features disclosed in the cross-process window embedding method in the previous embodiment, which will not be repeated here.

[0141] It should be understood that the various parts disclosed in the embodiments of the present application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0142] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0143] An embodiment of the present application provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, wherein the computer-readable program instructions are used to execute the cross-process window embedding method in the above-mentioned embodiment.

[0144] The computer-readable storage medium provided in the embodiment of the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0145] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0146] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device: establishes a socket connection between a parent process and a child process; sets a transparent area in a parent window created by the parent process, and sends the position information of the transparent area to the child process based on the socket connection, so that the child process can embed the created child window into the transparent area according to the position information.

[0147] The computer program code for performing the operation of the embodiment of the present application can be written in one or more programming languages ​​or a combination thereof, and the above-mentioned programming languages ​​include object-oriented programming languages, such as Java, Smalltalk, C++, and also include conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).

[0148] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0149] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0150] The readable storage medium provided in the embodiment of the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned cross-process window embedding method, and can optimize the operating performance of the cross-process window embedding by improving the cross-system compatibility and window display effect of the cross-process window embedding. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the embodiment of the present application are the same as the beneficial effects of the cross-process window embedding method provided in the above-mentioned embodiment, and will not be repeated here.

[0151] The present application also provides a computer program product, including a computer program, which implements the steps of the cross-process window embedding method as described above when executed by a processor.

[0152] The computer program product provided by this application can solve the technical problem of cross-process window embedding. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the cross-process window embedding method provided by the above embodiment, which will not be repeated here.

[0153] The above are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A cross-process form embedding method, characterized in that: The method comprises: Establish a socket connection between the parent process and the child process; A transparent area is set in the parent window created by the parent process, and the position information of the transparent area is sent to the child process based on the socket connection, so that the child process can embed the created child window into the transparent area according to the position information.

2. The cross-process form embedding method according to claim 1, characterized in that: The step of establishing a socket connection between the parent process and the child process includes: When the parent process is detected to be started, the socket listening service is started; When it is detected that the child process is started, the listening port used by the socket listening service is transmitted to the child process, so that the child process can establish a socket connection with the parent process through the listening port.

3. The cross-process form embedding method according to claim 1, characterized in that: After the step of establishing a socket connection between the parent process and the child process, the method further includes: Monitor whether the display effect of the parent window created by the parent process changes; When detecting that the display effect of the parent window changes, generating change information; The change information is sent to the child process based on the socket connection, so that the child process can adjust the display effect of the created child window according to the change information.

4. The cross-process form embedding method according to claim 3, characterized in that: The step of generating change information when detecting that the display effect of the parent window changes comprises: When a change in the display effect of the parent window is detected, initial change information is generated, where the initial change information includes a change in size and / or position of the parent window; The initial change information is encapsulated as change information in a standardized data format.

5. The cross-process form embedding method according to claim 1, characterized in that: The step of setting a transparent area in the parent window created by the parent process comprises: Get the current layout information of the parent window created by the parent process; According to a preset embedding rule, the size and position of the transparent area are calculated based on the current layout information; The transparent area is dynamically set in the parent window.

6. A cross-process window embedding system, characterized in that: The system comprises: a parent process, a child process and a socket operation subsystem, wherein the parent process and the child process perform message transmission via the socket operation subsystem; The parent process is used to send the change information of the parent window to the socket operation subsystem; The socket operation subsystem is used to send the received change information to the subprocess; The sub-process is used to adjust the display effect of the sub-window according to the change information.

7. The cross-process window embedding system according to claim 6, characterized in that: The socket operation subsystem also includes a middle layer, a socket server and a socket client constructed using .Net Framework and the open source framework mono; The parent process is used to call the socket API to send the change information to the middle layer, and the middle layer calls the operation subsystem API to send the change information to the socket server; The socket server is used to send the received change information to the socket client; The socket client is used to send the change information to the middle layer, and call the socket API through the middle layer to send the change information to the child process.

8. An electronic device, characterized in that: The electronic device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the cross-process window embedding method as described in any one of claims 1 to 5.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the cross-process window embedding method according to any one of claims 1 to 5 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the cross-process window embedding method according to any one of claims 1 to 5 are implemented.