Window processing method and device, computer device and storage medium
By generating a mask layer in the browser to freeze the current window, a simulated modal window function is provided for browsers that do not have modal window functionality. This solves the problem of inaccurate data transfer between parent and child windows in non-IE browsers, and achieves accurate data transfer and prevents duplicate operations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2023-04-24
- Publication Date
- 2026-05-12
AI Technical Summary
Non-IE browsers do not support multi-level modal windows, which leads to inaccurate transfer of business data between parent and child windows, affecting the availability of the web system.
When a child window is created in a browser, a mask layer is generated to freeze the current window. By standardizing the parameters of the child window, a simulated modal window function is provided for browsers that do not have modal window functionality, preventing users from repeatedly operating on the current window.
This ensures the accuracy of business data transfer between the current window and its child windows, prevents duplicate operations, and improves the applicability of browser window processing.
Smart Images

Figure CN116484138B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a window processing method, apparatus, computer equipment, and storage medium. Background Technology
[0002] A modal window is a window that allows users to operate only in the new window while retaining the main window and displaying it as the background. Users can only return to the main window after completing or canceling their operation.
[0003] Currently, non-IE browsers (Internet Explorer, Microsoft's browser) do not support multi-level modal windows. However, Web (World Wide Web) systems often contain numerous nested parent and child windows. This means that when accessing a Web system using a non-IE browser, even after opening a child window from a parent window, the parent window remains operational, thus disrupting the inheritance relationship between parent and child windows. When the child window closes, the parent window may have already been modified or even closed. Therefore, current non-IE browsers cannot determine whether business data received by a child window from the parent window is outdated, nor can they verify the accuracy of business data passed from the child window to the parent window, severely impacting the usability of Web systems. Summary of the Invention
[0004] Therefore, it is necessary to provide a window processing method, apparatus, computer device, and storage medium that can accurately transmit business data between browser windows to address the aforementioned technical problems.
[0005] Firstly, this application provides a window processing method, which includes:
[0006] In response to a business request for the current window, obtain the child window parameters of the child window to be created corresponding to the current window, as well as the client information of the browser where the current window is located;
[0007] Based on the client information, if the browser is identified as a specific browser, the parameters of the sub-window are standardized to obtain the standardized parameters of the sub-window; the specific browser is a browser that does not have the function of creating modal windows.
[0008] Create a child window on top of the current window based on standardized parameters;
[0009] Based on the current window parameters, generate a mask layer and use the mask layer to freeze the current window.
[0010] In one embodiment, a mask layer is generated based on the current window parameters, and the current window is frozen using the mask layer, including:
[0011] Generate a mask layer based on the size parameters in the current window's current window parameters; wherein the size parameters of the mask layer are the same as the size parameters of the current window.
[0012] Place the mask layer between the current window and the child windows to freeze the current window.
[0013] In one embodiment, generating a mask layer based on the size parameter in the current window parameters of the current window includes:
[0014] Create identification information for the child window and add the child window's identification information to the current window's property information;
[0015] If the properties of the current window contain the identifier of a child window, a mask layer is generated based on the size parameter in the current window parameters.
[0016] In one embodiment, the method further includes:
[0017] Based on the business operations performed on the child window, generate the business data corresponding to the business request;
[0018] If a window close event is detected, the business data will be updated in the current window.
[0019] In one embodiment, if a window closing event is detected, the business data is updated to the current window, including:
[0020] If a child window closes, the business data is updated to the current window, the current window is unfrozen, and the child window's identifier information is deleted from the current window's attribute information.
[0021] In one embodiment, if a window closing event is detected, the business data is updated to the current window, including:
[0022] If a window close event is detected, determine whether the current window's property information contains identification information for a child window;
[0023] If it exists, close the child window and update the business data to the current window;
[0024] If business data has been detected to be updated in the current window, close the current window.
[0025] Secondly, this application also provides a window processing apparatus, which includes:
[0026] The acquisition module is used to respond to business requests to the current window, obtain the sub-window parameters of the sub-window to be created corresponding to the current window, and the client information of the browser where the current window is located;
[0027] The standardization module is used to standardize the parameters of the child window when the browser is identified as a specific browser based on the client information, so as to obtain the standardized parameters of the child window; the specific browser is a browser that does not have the function of creating modal windows;
[0028] Create a module to create a child window on top of the current window based on standardized parameters;
[0029] The freeze module is used to generate a mask layer based on the current window parameters, and then use the mask layer to freeze the current window.
[0030] Thirdly, this application also provides a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0031] In response to a business request for the current window, obtain the child window parameters of the child window to be created corresponding to the current window, as well as the client information of the browser where the current window is located;
[0032] Based on the client information, if the browser is identified as a specific browser, the parameters of the sub-window are standardized to obtain the standardized parameters of the sub-window; the specific browser is a browser that does not have the function of creating modal windows.
[0033] Create a child window on top of the current window based on standardized parameters;
[0034] Based on the current window parameters, generate a mask layer and use the mask layer to freeze the current window.
[0035] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0036] In response to a business request for the current window, obtain the child window parameters of the child window to be created corresponding to the current window, as well as the client information of the browser where the current window is located;
[0037] Based on the client information, if the browser is identified as a specific browser, the parameters of the sub-window are standardized to obtain the standardized parameters of the sub-window; the specific browser is a browser that does not have the function of creating modal windows.
[0038] Create a child window on top of the current window based on standardized parameters;
[0039] Based on the current window parameters, generate a mask layer and use the mask layer to freeze the current window.
[0040] Fifthly, this application also provides a computer program product, which includes a computer program that, when executed by a processor, performs the following steps:
[0041] In response to a business request for the current window, obtain the child window parameters of the child window to be created corresponding to the current window, as well as the client information of the browser where the current window is located;
[0042] Based on the client information, if the browser is identified as a specific browser, the parameters of the sub-window are standardized to obtain the standardized parameters of the sub-window; the specific browser is a browser that does not have the function of creating modal windows.
[0043] Create a child window on top of the current window based on standardized parameters;
[0044] Based on the current window parameters, generate a mask layer and use the mask layer to freeze the current window.
[0045] The aforementioned window processing method, apparatus, computer device, and storage medium, in response to a business request for the current window, obtain the sub-window parameters of the sub-window to be created corresponding to the current window, as well as the client information of the browser where the current window resides; then, based on the client information and identifying that the browser is a specific browser, standardize the sub-window parameters to obtain standardized parameters for the sub-window; subsequently, based on the standardized parameters, create a sub-window on top of the current window; furthermore, based on the current window parameters, generate a mask layer, and use the mask layer to freeze the current window. Compared to existing technologies, this application generates a mask layer to freeze the current window when creating a sub-window corresponding to the current window in the browser, providing a simulated modal window function for browsers that do not have modal window functionality, thereby preventing users from repeatedly operating the current window and ensuring the accuracy of business data transmitted between the current window and the sub-window. Attached Figure Description
[0046] Figure 1 This is a flowchart illustrating a window handling method in one embodiment;
[0047] Figure 2 This is a schematic diagram of the process for freezing the current window in one embodiment;
[0048] Figure 3 This is a schematic diagram of the process for generating a mask layer in one embodiment;
[0049] Figure 4 This is a schematic diagram illustrating the process of updating business data to the current window in one embodiment;
[0050] Figure 5 This is a flowchart illustrating another embodiment of the window processing method;
[0051] Figure 6 This is a structural block diagram of a window processing device in one embodiment;
[0052] Figure 7 This is a structural block diagram of a window processing device in another embodiment;
[0053] Figure 8 This is a structural block diagram of the window processing device in yet another embodiment;
[0054] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0056] The window handling method provided in this application is applicable to various situations involving the processing of windows on a browser page (such as creation and closure). This method can be executed by a computer device, which may be a terminal or a server. Furthermore, this method can be executed by a browser window handling tool configured on the computer device.
[0057] Understandably, non-IE browsers currently do not support multi-level modal windows. This means that when accessing a web system using a non-IE browser, after a child window is opened from the parent window, the parent window can still be operated on, or when the child window is closed, the parent window may have already been modified or even closed. Consequently, this affects the accuracy of business data transmitted between the current window and its child windows.
[0058] To provide a feasible simulated modal window functionality for browsers that do not support modal windows, in one embodiment, such as Figure 1 As shown, a window handling method is provided, which can be implemented using a browser window handling tool pre-installed on a computer device. It includes the following steps:
[0059] S101, in response to a business request for the current window, obtains the sub-window parameters of the sub-window to be created corresponding to the current window, as well as the client information of the browser where the current window is located.
[0060] When a user accesses a web system using a browser, they can initiate a business request for the current window by clicking a button or performing other actions. In response, the server executes the step of creating a child window corresponding to the current window. The business request is the request that requires creating a child window on top of the current window.
[0061] For example, if there is a settings button for selecting personnel in the current window, the user clicks the settings button to initiate a business request to the current window, causing the server to execute the step of creating a sub-window for selecting personnel. Then, the user can edit the personnel they want to select in the created sub-window to realize business processing.
[0062] Specifically, the current window and the created child windows can reside in the same browser page, and each child window can serve as the new current window, continuing to create its corresponding next-level child windows, thereby achieving nesting of parent and child windows in the browser.
[0063] In this embodiment, the server executes the step of creating a child window corresponding to the current window, including obtaining the child window parameters of the child window to be created corresponding to the current window, and the client information of the browser where the current window is located. The child window parameters are necessary parameters for creating the child window, such as the child window's class name, size, and style. Specifically, the child window parameters can be preset parameters on the Web system or determined in real-time based on the current window parameters. The browser client information includes browser kernel information and user agent information. The browser kernel information is used to interpret the web page syntax and render it onto the web page, determining how the browser displays the web page content. The user agent information allows the server to identify the user's operating system and version, browser version, browser compatibility attributes, browser rendering engine, browser language, browser plugins, and other information.
[0064] S102, based on the client information, if the browser is identified as a specific browser, the parameters of the sub-window are standardized to obtain the standardized parameters of the sub-window.
[0065] Among them, the specific browser is one that does not have the function of creating modal windows.
[0066] It is understandable that different users may use different browsers to access the Web system. Therefore, by identifying the browser type based on the above client information and determining the corresponding standardized parameters for creating child windows based on the browser type, a way to create child windows and freeze the current window can be provided that can be implemented in different browser pages.
[0067] Specifically, based on client information, including browser kernel information and user agent information, the system comprehensively determines the type of browser the user is using. If the browser is determined to be capable of creating modal windows, then that browser's modal window functionality is directly used to create the child window corresponding to the current window. If the browser is determined to be a browser that does not have modal window creation functionality (i.e., a specific browser), then the child window parameters are first standardized, and then the window is rendered based on the standardized parameters obtained from the standardization process. In other words, a simulated modal window functionality is used to create the child window corresponding to the current window.
[0068] Generally, Internet Explorer (IE) is a browser capable of creating modal windows, while browsers that lack this capability are non-IE browsers. For specific browsers, the parameters required for creating child windows are standardized and converted into a feasible standardized format so that the browser can correctly read and render them. For example, the initial width parameter in the child window parameters is represented as `dialogWidth`, which is standardized to `width`. Furthermore, the specific browser must read the processed width parameter to render the width of the child window.
[0069] S103, create a child window on top of the current window based on standardized parameters.
[0070] Standardized parameters can include the width and height of the child window, the distance of the child window from the top and left edges of the screen, and the URL (Universal Resource Locator) address used to specify the document displayed in the child window. Specifically, creating a child window on top of the current window involves rendering the child window's page according to the standardized parameters and notifying the current window upon successful rendering so that business data can begin to be transferred between the current window and the child window.
[0071] S104. Generate a mask layer based on the current window parameters, and use the mask layer to freeze the current window.
[0072] A mask layer is essentially a layer that achieves an isolation effect, covering images in connected graphics. It is generally used to highlight specific areas on a page to showcase various display effects. In this embodiment, the mask layer can be a semi-transparent mask layer. Based on the window parameters of the current window, such as the width and height parameters of the current window, and the distance parameters of the current window from the top and left edges of the screen, the size and position of the current window can be determined. Thus, a mask layer of appropriate size and position can be generated based on the size and position of the current window.
[0073] By covering the current window with a mask layer, any operations performed on the current window by the user after opening a child window will be isolated by the mask layer, rendering the operations invalid and thus preventing the user from performing repeated operations on the current window.
[0074] Compared to existing technologies, the above solution, in response to a business request for the current window, obtains the sub-window parameters of the sub-window to be created corresponding to the current window, as well as the client information of the browser where the current window resides. Then, based on the client information, if the browser is identified as a specific browser, the sub-window parameters are standardized to obtain standardized parameters for the sub-window. Subsequently, a sub-window is created on top of the current window based on the standardized parameters. Furthermore, based on the current window parameters, a mask layer is generated and used to freeze the current window. This achieves the goal of generating a mask layer to freeze the current window when creating a sub-window corresponding to the current window in the browser, providing a simulated modal window function for browsers that do not have modal window functionality. This aims to prevent users from repeatedly operating on the current window, thereby ensuring the accuracy of business data transmitted between the current window and the sub-window.
[0075] To freeze each current window in a browser page using a suitable masking layer, based on the above embodiments, in one embodiment, a corresponding masking layer can be generated according to the window parameters of different current windows, thus refining the method in S104. For example... Figure 2 As shown, the specific steps may include:
[0076] S201, Generate a mask layer based on the size parameter in the current window parameters of the current window.
[0077] The size parameters of the mask layer are the same as those of the current window.
[0078] To completely cover the current window with a mask layer and freeze it, the size of the mask layer should be no smaller than the size of the current window. In this embodiment, the mask layer can be implemented using CSS (Cascading Style Sheets) technology and the div (division) tag, with size parameters including width and height.
[0079] A mask layer of the same size as the current window is used to cover the current window. Specifically, the size parameters of the current window are first obtained, and then used as the size parameters of the mask layer to generate the corresponding mask layer. The mask layer can be set to a semi-transparent effect, so that after opening the created child window, all or part of the information in the current window can still be seen, achieving a better display effect.
[0080] S202, place the mask layer between the current window and the child window to freeze the current window.
[0081] After creating and opening a child window, the child window is positioned above the current window. Placing a mask layer between the current window and the child window effectively covers the current window. Operations performed on the current window will then be intercepted by the mask layer placed above it. By placing the mask layer between the current window and the child window, a modal window function is simulated, effectively freezing the current window.
[0082] It is understood that this embodiment generates a mask layer based on the size of the current window and uses the mask layer to cover the current window, which satisfies the need to freeze the current window and can effectively improve the applicability of window processing.
[0083] To ensure that the normal use of child windows is not affected when the current window is frozen, in one embodiment, based on the above embodiments, after creating the child window corresponding to the current window, it can be determined whether to generate a mask layer based on the identification information of whether a child window exists, such as... Figure 3 As shown, the above S201 specifically includes the following steps:
[0084] S301, create identification information for the child window and add the child window's identification information to the current window's property information.
[0085] The identification information of the child window is used to identify the existence status of the child window. If the child window is successfully created, the identification information of the child window is created and returned to the current window. The identification information of the child window is added to the property information of the current window to indicate the creation of a mask layer to cover the current window.
[0086] S302, if the identification information of a child window is detected in the attribute information of the current window, a mask layer is generated according to the size parameter in the current window parameter of the current window.
[0087] If the identification information of a child window is detected in the attribute information of the current window, it is determined that the child window has been created successfully. Before transmitting business data between the current window and the child window, a mask layer is generated according to the size parameter in the current window parameters to freeze the user's operation on the current window, and the child window is set as the topmost editable window.
[0088] This ensures that no business data is missed when transferring data between the current window and its child windows. It also prevents situations where a mask layer is not generated to freeze the current window even after a child window has been successfully created, or where a mask layer is generated and the current window is frozen before a child window has been successfully created.
[0089] To ensure the accuracy of business data transmission, in one embodiment, window closing events can be detected in real time after the child window is successfully created, and business data can be transmitted upon detection of the window closing event. This refines the window processing method and provides a window processing method for transmitting business data between windows. Figure 4 As shown, the specific steps may include:
[0090] S401 generates business data corresponding to the business request based on the business operation applied to the child window.
[0091] A business request is initiated by clicking a button or performing other actions within the current window. The business action is the actual operation performed in the generated child window, and the business data is generated based on this action. Specifically, after successfully creating the child window corresponding to the current window and generating a mask layer to freeze the current window, corresponding business data is generated based on the user's business actions performed in the child window.
[0092] S402: If a window close event is detected, the business data will be updated to the current window.
[0093] Window close events include the current window close event and the child window close event. A timer is set to continuously scan the current window and child windows. If a current window close event and / or a child window close event are detected, the business data generated based on the user's business operations on the child window is passed back to the current window, updating the current window with the new business data.
[0094] Understandably, in practical applications, detected window close events may be either normal or abnormal. For example, if a child window is detected within the current window, and a child window close event is detected, this is a normal window close event. However, if the current window is detected as closed, and the corresponding business data for that child window has not yet been transmitted to the current window, closing the current window directly would result in data loss. Therefore, this current window close event is considered abnormal. Conversely, if a current window close event is detected without any child windows, this is a normal window close event.
[0095] Based on the aforementioned child window closing events that may occur in practical applications, in an optional embodiment, if a child window closing event is detected, the business data is updated to the current window, the current window is unfrozen, and the child window identification information is deleted from the attribute information of the current window.
[0096] If the window close event is a child window close event, and the business operation on the child window is valid and business data has been generated, the business data is updated to the current window, and the current window is unfrozen. If the business operation on the child window is invalid, or the user has not performed any business operation, the current window is directly unfrozen. Furthermore, the child window identifier information is removed from the current window's attribute information, so that if the current window is subsequently detected as closed, it can be closed directly.
[0097] Based on the aforementioned potential window closing events in practical applications, in another optional embodiment, if a window closing event is detected, it is determined whether the current window's attribute information contains identification information for a child window; if it does, the child window is closed, and the business data is updated to the current window; if the business data has been detected to have been updated to the current window, the current window is closed.
[0098] If the window close event is the current window close event, first determine whether there is a corresponding open child window based on whether there is child window identification information in the current window's attribute information. Then, based on the determination result, adopt different current window close methods to avoid the situation where the current window has been closed but the business data of the child window cannot be passed to the current window, resulting in the omission of business data.
[0099] Specifically, the system determines whether a corresponding open child window exists based on the presence of a child window identifier in the current window's attribute information. If a child window exists, the business data is updated to the current window when the child window closes, and the current window is closed upon detecting that the business data has been updated to the current window; otherwise, the current window is closed directly.
[0100] In one embodiment, such as Figure 5 As shown, a preferred example of a window handling method is provided, and the specific process is as follows:
[0101] S501, in response to a business request for the current window, obtains the sub-window parameters of the sub-window to be created corresponding to the current window, as well as the client information of the browser where the current window is located.
[0102] S502, based on client information and identifying a specific browser, standardizes the parameters of the child window to obtain standardized parameters for the child window.
[0103] Among them, the specific browser is one that does not have the function of creating modal windows.
[0104] S503 creates a child window on top of the current window based on standardized parameters.
[0105] S504 creates identification information for the child window and adds the child window's identification information to the current window's property information.
[0106] S505, if the identification information of a child window is detected in the attribute information of the current window, a mask layer is generated according to the size parameter in the current window parameters of the current window.
[0107] The size parameters of the mask layer are the same as those of the current window.
[0108] S506, place the mask layer between the current window and the child window to freeze the current window.
[0109] S507 generates business data corresponding to the business request based on the business operation applied to the child window.
[0110] S508: If a window close event is detected, the business data will be updated to the current window.
[0111] Specifically, if a child window close event is detected, the business data is updated to the current window, the current window is unfrozen, and the child window's identifier information is deleted from the current window's attribute information. If a current window close event is detected, it is determined whether the child window's identifier information exists in the current window's attribute information; if it exists, the child window is closed, and the business data is updated to the current window; if it is detected that the business data has already been updated to the current window, the current window is closed.
[0112] The specific processes of S501-S508 described above can be found in the description of the above method embodiments. Their implementation principles and technical effects are similar, and will not be repeated here.
[0113] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0114] Based on the same inventive concept, this application also provides a window processing apparatus for implementing the window processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more window processing apparatus embodiments provided below can be found in the limitations of the window processing method described above, and will not be repeated here.
[0115] In one embodiment, such as Figure 6 As shown, a window processing device 1 is provided, including: an acquisition module 10, a normalization module 20, a creation module 30, and a freeze module 40, wherein:
[0116] The acquisition module 10 is used to respond to business requests to the current window, acquire the sub-window parameters of the sub-window to be created corresponding to the current window, and the client information of the browser where the current window is located.
[0117] The standardization module 20 is used to standardize the parameters of the sub-window when the browser is identified as a specific browser based on the client information, so as to obtain the standardized parameters of the sub-window.
[0118] Among them, the specific browser is one that does not have the function of creating modal windows.
[0119] Create module 30 to create a child window on top of the current window based on standardized parameters.
[0120] The freeze module 40 is used to generate a mask layer based on the current window parameters and then use the mask layer to freeze the current window.
[0121] In one embodiment, in Figure 6 On the basis of, such as Figure 7 As shown, the above-mentioned freezing module 40 includes:
[0122] The generation unit 41 is used to generate a mask layer based on the size parameter in the current window parameters of the current window.
[0123] The size parameters of the mask layer are the same as those of the current window.
[0124] Freeze unit 42 is used to place the mask layer between the current window and the child window to freeze the current window.
[0125] In one embodiment, the generation unit 41 includes:
[0126] Add a sub-unit to create identification information for the child window and add the child window's identification information to the current window's property information;
[0127] The sub-unit is used to generate a mask layer based on the size parameters in the current window parameters when the identification information of a child window is detected in the attribute information of the current window.
[0128] In one embodiment, in Figure 6 On the basis of, such as Figure 8 As shown, the device 1 also includes:
[0129] The business operation module 50 is used to generate business data corresponding to the business request based on the business operation performed on the child window.
[0130] The update module 60 is used to update the business data to the current window if a window closing event is detected.
[0131] In one embodiment, the update module 60 is specifically used for:
[0132] If a child window closes, the business data is updated to the current window, the current window is unfrozen, and the child window's identifier information is deleted from the current window's attribute information.
[0133] In another embodiment, the update module 60 is further configured to:
[0134] If a window close event is detected, determine whether the current window's attribute information contains the identifier information of the child window; if it does, close the child window and update the business data to the current window; if the business data has been updated to the current window, close the current window.
[0135] Each module in the aforementioned window processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0136] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data such as the data type and sensitivity of the data to be processed. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a window processing method.
[0137] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0138] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0139] In response to a business request for the current window, the system obtains the sub-window parameters of the child window to be created corresponding to the current window, as well as the client information of the browser in which the current window resides. If the browser is identified as a specific browser based on the client information, the sub-window parameters are standardized to obtain standardized parameters for the sub-window. The specific browser is one that does not have the function of creating modal windows. Based on the standardized parameters, a child window is created on top of the current window. Based on the current window parameters, a mask layer is generated and applied to freeze the current window.
[0140] In one embodiment, when the processor executes the logic of generating a mask layer based on the current window parameters and freezing the current window using the mask layer, it also implements the following steps:
[0141] A mask layer is generated based on the size parameters of the current window; the size parameters of the mask layer are the same as the size parameters of the current window; the mask layer is placed between the current window and the child window to freeze the current window.
[0142] In one embodiment, when the processor executes the logic to generate a mask layer based on the size parameter in the current window parameters of the current window, it also implements the following steps:
[0143] Create identification information for the child window and add the child window's identification information to the current window's property information; if the child window's identification information is detected in the current window's property information, generate a mask layer based on the size parameter in the current window's current window parameters.
[0144] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0145] Based on the business operations performed on the child window, generate business data corresponding to the business request; if a window close event is detected, update the business data to the current window.
[0146] In one embodiment, when the processor executes the logic to update the business data to the current window if a window close event is detected, it also implements the following steps:
[0147] If a child window closes, the business data is updated to the current window, the current window is unfrozen, and the child window's identifier information is deleted from the current window's attribute information.
[0148] In one embodiment, if a window close event is detected, the processor updates the business data to the current window and also performs the following steps:
[0149] If a window close event is detected, determine whether the current window's attribute information contains the identifier information of the child window; if it does, close the child window and update the business data to the current window; if the business data has been updated to the current window, close the current window.
[0150] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0151] In response to a business request for the current window, the system obtains the sub-window parameters of the child window to be created corresponding to the current window, as well as the client information of the browser in which the current window resides. If the browser is identified as a specific browser based on the client information, the sub-window parameters are standardized to obtain standardized parameters for the sub-window. The specific browser is one that does not have the function of creating modal windows. Based on the standardized parameters, a child window is created on top of the current window. Based on the current window parameters, a mask layer is generated and applied to freeze the current window.
[0152] In one embodiment, when the logic of a computer program generating a mask layer based on the current window parameters and using the mask layer to freeze the current window is executed by the processor, the following steps are also implemented:
[0153] A mask layer is generated based on the size parameters of the current window; the size parameters of the mask layer are the same as the size parameters of the current window; the mask layer is placed between the current window and the child window to freeze the current window.
[0154] In one embodiment, when the logic for generating a mask layer based on the size parameter in the current window parameters of the current window is executed by the processor, the following steps are also implemented:
[0155] Create identification information for the child window and add the child window's identification information to the current window's property information; if the child window's identification information is detected in the current window's property information, generate a mask layer based on the size parameter in the current window's current window parameters.
[0156] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0157] Based on the business operations performed on the child window, generate business data corresponding to the business request; if a window close event is detected, update the business data to the current window.
[0158] In one embodiment, when the logic for updating business data to the current window is executed by the processor after the computer program detects a window closing event, the following steps are also implemented:
[0159] If a child window closes, the business data is updated to the current window, the current window is unfrozen, and the child window's identifier information is deleted from the current window's attribute information.
[0160] In one embodiment, when the logic for updating business data to the current window is executed by the processor after the computer program detects a window closing event, the following steps are also implemented:
[0161] If a window close event is detected, determine whether the current window's attribute information contains the identifier information of the child window; if it does, close the child window and update the business data to the current window; if the business data has been updated to the current window, close the current window.
[0162] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0163] In response to a business request for the current window, the system obtains the sub-window parameters of the child window to be created corresponding to the current window, as well as the client information of the browser in which the current window resides. If the browser is identified as a specific browser based on the client information, the sub-window parameters are standardized to obtain standardized parameters for the sub-window. The specific browser is one that does not have the function of creating modal windows. Based on the standardized parameters, a child window is created on top of the current window. Based on the current window parameters, a mask layer is generated and applied to freeze the current window.
[0164] In one embodiment, when the logic of a computer program generating a mask layer based on the current window parameters and using the mask layer to freeze the current window is executed by the processor, the following steps are also implemented:
[0165] A mask layer is generated based on the size parameters of the current window; the size parameters of the mask layer are the same as the size parameters of the current window; the mask layer is placed between the current window and the child window to freeze the current window.
[0166] In one embodiment, when the logic for generating a mask layer based on the size parameter in the current window parameters of the current window is executed by the processor, the following steps are also implemented:
[0167] Create identification information for the child window and add the child window's identification information to the current window's property information; if the child window's identification information is detected in the current window's property information, generate a mask layer based on the size parameter in the current window's current window parameters.
[0168] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0169] Based on the business operations performed on the child window, generate business data corresponding to the business request; if a window close event is detected, update the business data to the current window.
[0170] In one embodiment, when the logic for updating business data to the current window is executed by the processor after the computer program detects a window closing event, the following steps are also implemented:
[0171] If a child window closes, the business data is updated to the current window, the current window is unfrozen, and the child window's identifier information is deleted from the current window's attribute information.
[0172] In one embodiment, when the logic for updating business data to the current window is executed by the processor after the computer program detects a window closing event, the following steps are also implemented:
[0173] If a window close event is detected, determine whether the current window's attribute information contains the identifier information of the child window; if it does, close the child window and update the business data to the current window; if the business data has been updated to the current window, close the current window.
[0174] It should be noted that the user information (including but not limited to browser kernel information and user agent information in client information) and data (including but not limited to data used for analysis, data stored, data displayed) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0175] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0176] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0177] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A window processing method, characterized in that, The method includes: In response to a business request for the current window, obtain the sub-window parameters of the sub-window to be created corresponding to the current window, as well as the client information of the browser where the current window is located; If the browser is identified as a specific browser based on the client information, the parameters of the sub-window are standardized to obtain the standardized parameters of the sub-window; wherein, the specific browser is a browser that does not have the function of creating modal windows; Based on the standardized parameters, create the child window on top of the current window; Create identification information for the child window, and add the identification information of the child window to the attribute information of the current window; If the identification information of the child window is detected in the attribute information of the current window, a mask layer is generated according to the size parameter in the current window parameters of the current window; wherein the size parameter of the mask layer is the same as the size parameter of the current window. The mask layer is placed between the current window and the child window to freeze the current window.
2. The method according to claim 1, characterized in that, The method further includes: Based on the business operation applied to the sub-window, generate the business data corresponding to the business request; If a window close event is detected, the business data is updated in the current window.
3. The method according to claim 2, characterized in that, The step of updating the business data to the current window if a window closing event is detected includes: If a child window closure event is detected, the business data is updated to the current window, the current window is unfrozen, and the child window's identifier information is deleted from the current window's attribute information.
4. The method according to claim 2, characterized in that, The step of updating the business data to the current window if a window closing event is detected includes: If a current window close event is detected, determine whether the current window's attribute information contains identification information for a child window; If it exists, close the sub-window and update the business data to the current window; If the business data has been updated to the current window, close the current window.
5. A window processing device, characterized in that, The device includes: The acquisition module is used to respond to a business request for the current window, acquire the sub-window parameters of the sub-window to be created corresponding to the current window, and the client information of the browser where the current window is located; The standardization module is used to standardize the parameters of the sub-window when the browser is identified as a specific browser based on the client information, thereby obtaining the standardized parameters of the sub-window; wherein the specific browser is a browser that does not have the function of creating modal windows; A module is created to create the child window on top of the current window based on the standardized parameters. The freeze module is used to create identification information for the child window and add the identification information of the child window to the attribute information of the current window; when the identification information of the child window is detected in the attribute information of the current window, a mask layer is generated according to the size parameter in the current window parameters of the current window; wherein the size parameter of the mask layer is the same as the size parameter of the current window; the mask layer is placed between the current window and the child window to achieve the freezing process of the current window.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.