Popup display method, device, equipment and storage medium
Patent Information
- Application Number
- CN202610901280.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-22
- Publication Date
- 2026-08-21
AI Technical Summary
[0004]本申请实施例提供了一种弹窗显示方法、装置、设备以及存储介质,解决相关技术中弹窗显示的资源适配性差,无法适应于不同终端设备的特性差异进行显示,容易出现弹窗显示异常,无法准确响应用户的交互需求的问题,能够提升弹窗显示在不同终端设备之间的适配性,按需进行弹窗资源的动态加载,确保弹窗在不同终端设备的正常显示,准确响应用户的交互需求
[0009] In this embodiment, by determining the target interactive component that triggers the pop-up window corresponding to the interactive operation, and determining the target pop-up window resource identifier based on the component identifier of the target interactive component and the device parameter information of the terminal device, the selection of pop-up window resources can be adapted to different terminal devices, ensuring that different terminal devices obtain suitable pop-up window resources. By sending a network request containing the target pop-up window resource identifier to the target node server to obtain pop-up window resource information, pop-up window resources can be dynamically loaded, reducing the initial package size of the application. By adjusting the layout of the pop-up window resource information according to the layout adjustment parameters of the terminal device to obtain the target pop-up window information, it can be ensured that the pop-up window can be displayed normally on different terminal devices, optimizing the display effect. The above solution can improve the adaptability of pop-up window display across different terminal devices, dynamically load pop-up window resources as needed, ensure the normal display of pop-up windows on different terminal devices, and accurately respond to the user's interactive needs.
Smart Images

Figure CN122615166A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a pop-up display method, apparatus, device, and storage medium. Background Technology
[0002] In game development, pop-ups, as a common interactive element, are widely used in various game scenarios, such as event announcements, social information displays, virtual item purchases, system prompts, settings options, and user login modules. Pop-ups can deliver important information to players and provide a convenient entry point for interaction without interrupting the main game flow, making them an important vehicle for game operation and improving user experience.
[0003] In related technologies, pop-up displays use pre-loaded fixed pop-up resources for rendering and display. However, the resource adaptability of pop-up displays is poor, and they cannot adapt to the differences in characteristics of different terminal devices. This can easily lead to pop-up display anomalies and an inability to accurately respond to user interaction needs. Summary of the Invention
[0004] This application provides a pop-up display method, apparatus, device, and storage medium to solve the problems of poor resource adaptability of pop-up displays in related technologies, inability to adapt to the characteristics of different terminal devices, easy occurrence of pop-up display abnormalities, and inability to accurately respond to user interaction needs. It can improve the adaptability of pop-up displays across different terminal devices, dynamically load pop-up resources as needed, ensure normal display of pop-ups on different terminal devices, and accurately respond to user interaction needs.
[0005] In a first aspect, embodiments of this application provide a pop-up window display method, the method comprising: In response to an interactive operation performed on the display interface of the terminal device, determine the target interactive component that triggers the pop-up window corresponding to the interactive operation; The target pop-up resource identifier is determined based on the component identifier of the target interactive component and the device parameter information of the terminal device. A network request containing the target pop-up resource identifier is sent to the target node server so that the target node server returns the pop-up resource information corresponding to the target pop-up resource identifier. Upon receiving the pop-up resource information, the layout of the pop-up resource information is adjusted according to the layout adjustment parameters of the terminal device to obtain the target pop-up information, and the target pop-up information is rendered and displayed.
[0006] Secondly, embodiments of this application also provide a pop-up window display device, including: The first determining module is configured to respond to interactive operations performed on the display interface of the terminal device and determine the target interactive component that triggers the pop-up window corresponding to the interactive operation. The second determining module is configured to determine the target pop-up resource identifier based on the component identifier of the target interactive component and the device parameter information of the terminal device; The sending module is configured to send a network request containing the target pop-up resource identifier to the target node server, so that the target node server returns the pop-up resource information corresponding to the target pop-up resource identifier; The adjustment module is configured to, upon receiving the pop-up resource information, adjust the layout of the pop-up resource information according to the layout adjustment parameters of the terminal device to obtain the target pop-up information. The rendering and display module is configured to render and display the target pop-up information.
[0007] Thirdly, embodiments of this application also provide a pop-up window display device, the device comprising: One or more processors; Storage device, configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the pop-up display method described in the embodiments of this application.
[0008] Fourthly, embodiments of this application also provide a non-volatile storage medium for storing computer-executable instructions, which are configured to execute the pop-up display method described in embodiments of this application when executed by a computer processor.
[0009] In this embodiment, by determining the target interactive component that triggers the pop-up window corresponding to the interactive operation, and determining the target pop-up window resource identifier based on the component identifier of the target interactive component and the device parameter information of the terminal device, the selection of pop-up window resources can be adapted to different terminal devices, ensuring that different terminal devices obtain suitable pop-up window resources. By sending a network request containing the target pop-up window resource identifier to the target node server to obtain pop-up window resource information, pop-up window resources can be dynamically loaded, reducing the initial package size of the application. By adjusting the layout of the pop-up window resource information according to the layout adjustment parameters of the terminal device to obtain the target pop-up window information, it can be ensured that the pop-up window can be displayed normally on different terminal devices, optimizing the display effect. The above solution can improve the adaptability of pop-up window display across different terminal devices, dynamically load pop-up window resources as needed, ensure the normal display of pop-up windows on different terminal devices, and accurately respond to the user's interactive needs. Attached Figure Description
[0010] Figure 1 A flowchart illustrating a pop-up window display method provided in an embodiment of this application; Figure 2A flowchart illustrating a specific implementation process for determining a target pop-up resource identifier, provided in this application embodiment; Figure 3 A flowchart illustrating a specific implementation process for calculating the matching score corresponding to each pop-up resource identifier, provided in this application embodiment; Figure 4 A flowchart illustrating a specific implementation process for adjusting the layout of pop-up resource information to adapt to the terminal device and obtain target pop-up information, as provided in this application embodiment; Figure 5 A flowchart illustrating a specific implementation process for obtaining target position information by adjusting the position information corresponding to each pop-up element based on the current interface orientation parameter, as provided in this application embodiment; Figure 6 A flowchart illustrating a specific implementation process for rendering and displaying target pop-up information, provided in this application embodiment; Figure 7 A flowchart illustrating a specific implementation process for intercepting at least one preset interactive operation acting on a transparent mask layer using an interception component, as provided in this application embodiment; Figure 8 This is a schematic diagram illustrating the pop-up display method provided in the embodiments of this application. Figure 9 A structural block diagram of a pop-up display device provided in an embodiment of this application; Figure 10 This is a schematic diagram of the structure of a pop-up display device provided in an embodiment of this application. Detailed Implementation
[0011] The embodiments of this application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of this application and are not intended to limit the scope of the embodiments. Furthermore, it should be noted that, for ease of description, only the parts relevant to the embodiments of this application are shown in the accompanying drawings, not the entire structure.
[0012] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0013] The pop-up display method provided in this application embodiment can be executed by a terminal device. The terminal device refers to any electronic device with data computing, processing and storage capabilities, such as mobile phones, PCs (Personal Computers), tablet computers, etc. This application embodiment does not limit this.
[0014] Figure 1 A flowchart illustrating a pop-up window display method provided in this application embodiment is shown below. Figure 1 As shown, the pop-up window display method specifically includes the following steps: Step S101: Respond to the interactive operation on the display interface of the terminal device and determine the target interactive component that triggers the pop-up window corresponding to the interactive operation.
[0015] Interactive actions can be user input behaviors on the display interface, specifically including clicks, touch swipes, long presses, etc. Target interactive components can be UI (User Interface) elements in the display interface that are bound to pop-up trigger logic, such as buttons, avatars, icons, etc. Specifically, candidate interactive components can be located on the display interface based on the trigger coordinates of the interactive action. If the event type of the interactive action matches the pre-bound event type of the candidate interactive component, a pop-up is triggered.
[0016] Step S102: Determine the target pop-up resource identifier based on the component identifier of the target interactive component and the device parameter information of the terminal device, and send a network request containing the target pop-up resource identifier to the target node server so that the target node server returns the pop-up resource information corresponding to the target pop-up resource identifier.
[0017] The component identifier can be a unique identifier for the target interactive component. Device parameter information can be the hardware and system information of the terminal device, specifically including screen resolution, screen size, pixel density, operating system version, device model, etc. The target pop-up resource identifier can be a unique identifier for the pop-up resource on the server, used to locate the corresponding resource file. The network request can be an HTTP or HTTPS request sent by the terminal device to the server. The target node server can be a resource server deployed in the cloud, responsible for storing and distributing pop-up resource information. Pop-up resource information can be all related resources of the pop-up, specifically including prefab files, image resources, script files, configuration files, etc.
[0018] In one embodiment, a specific implementation process for determining the target pop-up resource identifier is described. Please refer to [link / reference]. Figure 2 This is a flowchart illustrating a specific implementation process for determining a target pop-up resource identifier, as provided in an embodiment of this application. Figure 2 As shown, the specific implementation steps for determining the target pop-up resource identifier are as follows: Step S201: Based on the component identifier of the target interactive component, determine multiple pop-up resource identifiers and corresponding metadata information from the pre-stored associated business data.
[0019] The associated business data can be business configuration data pre-stored on the terminal device, specifically including the mapping relationship between component identifiers and pop-up resource identifiers. Metadata information can be data describing the attributes of the pop-up resource, specifically including supported screen size ranges, pixel density ranges, operating system versions, etc.
[0020] Step S202: Calculate the matching degree between the device parameter information of the terminal device and the metadata information corresponding to each pop-up resource identifier to obtain the matching score corresponding to each pop-up resource identifier.
[0021] The matching score represents the degree of matching between device parameters and the metadata information corresponding to pop-up resource identifiers; a higher score indicates a better match. This matching degree can be calculated by comparing each device parameter with the metadata information corresponding to each pop-up resource identifier item by item, and then calculating the matching score based on all comparison results. In one embodiment, a precise matching method can be used. For example, if a device parameter fully meets the requirements of the metadata information, its matching score can be a preset fixed value; if the device parameter does not meet the requirements of the metadata information, its matching score is 0. In another embodiment, a fuzzy matching method can be used, determining the matching score of a device parameter based on the degree of deviation between the device parameter and the metadata information. For example, if the deviation is less than or equal to 10%, the matching score is a first preset score; if the deviation is greater than 10% and less than or equal to 50%, the matching score is a second preset score; and if the deviation is greater than 50%, the matching score is a third preset score. The first preset score is greater than the second preset score, and the second preset score is greater than the third preset score. Finally, after obtaining the matching scores of all device parameters, a weighted sum can be performed to obtain the final matching score.
[0022] In one embodiment, a specific implementation process for calculating the matching score corresponding to each pop-up resource identifier is described. Please refer to [reference needed]. Figure 3 This is a flowchart illustrating a specific implementation process for calculating the matching score corresponding to each pop-up resource identifier, as provided in an embodiment of this application. Figure 3 As shown, the specific implementation steps for calculating the matching score corresponding to each pop-up resource identifier are as follows: Step S301: Extract the device parameter information of the terminal device to obtain a set of parameter items, and extract the metadata information corresponding to each pop-up resource identifier to obtain a set of constraint items.
[0023] The parameter set can be a structured array of key-value pairs of device parameters. Each parameter item includes multiple attributes such as parameter name, parameter value, and parameter type, which are used for subsequent matching with constraint items. The constraint set can be an array of constraint conditions that correspond one-to-one with the parameter set. Each constraint item includes multiple attributes such as parameter name, constraint condition, and condition type.
[0024] Step S302: Calculate the single-item matching degree of the parameter item set and the constraint item set corresponding to each pop-up resource identifier to obtain multiple single-item matching scores corresponding to each pop-up resource identifier.
[0025] Each independent parameter can be matched with its corresponding constraint. For example, for numerical parameters (such as screen resolution or screen size), the constraint can be a numerical range. By determining whether the parameter value falls within this range, the matching score can be determined. Specifically, if the parameter value falls within the range, the matching score is 1; if it doesn't, the deviation is calculated, and the matching score is determined based on this deviation. For instance, different deviation ranges can be defined, and if the deviation falls within a range, the corresponding score is set as the matching score. Similarly, for category-based parameters (such as operating system version or device model), the constraint can be an enumerated set of values. By determining whether the parameter value falls within this set, the matching score is determined. For example, if the value falls within the set, the matching score is 1; if it doesn't, the matching score is 0.
[0026] Step S303: Calculate the weighted average of the multiple single-item matching scores corresponding to each pop-up resource identifier to obtain the matching score corresponding to each pop-up resource identifier.
[0027] In this process, different weights are assigned to each parameter based on its importance, and the final matching score is calculated by weighting the weights together.
[0028] As can be seen from steps S301-S303 above, by comprehensively calculating the single-item matching score corresponding to each pop-up resource identifier based on different parameter items, the accuracy and comprehensiveness of the matching can be improved. By weighting the multiple single-item matching scores corresponding to each pop-up resource identifier to obtain the matching score, the degree of matching between the current terminal device and different pop-up resources can be accurately measured.
[0029] Reference Figure 2 It also includes step S203, which determines the pop-up resource identifier with the highest matching score among multiple pop-up resource identifiers as the target pop-up resource identifier.
[0030] Among them, the pop-up resource identifier with the highest matching score can be regarded as having the highest degree of matching with the terminal device, and the pop-up resource identifier with the highest matching score can be determined as the target pop-up resource identifier.
[0031] As can be seen from the above steps S201-S203, by matching and calculating to select the most suitable pop-up resources for the current terminal device, the best pop-up display effect can be ensured, meeting diverse device needs.
[0032] Reference Figure 1 It also includes step S103: upon receiving pop-up resource information, adjusting the layout of the pop-up resource information according to the layout adjustment parameters of the terminal device to obtain target pop-up information, and rendering and displaying the target pop-up information.
[0033] The layout adjustment parameters can be used to adjust the pop-up layout, specifically including screen pixel density parameters, current interface orientation parameters, etc. The target pop-up information can be the pop-up data after layout adjustment, specifically including the adjusted pop-up size, position, element layout, etc. After obtaining the target pop-up information, it can be converted into a pixel image on the screen and displayed on the top layer of the display interface.
[0034] As shown in steps 101-103 above, by identifying the target interactive component that triggers the pop-up window corresponding to the interactive operation, and determining the target pop-up window resource identifier based on the component identifier of the target interactive component and the device parameter information of the terminal device, the selection of pop-up window resources can be adapted to different terminal devices, ensuring that different terminal devices obtain suitable pop-up window resources. By sending a network request containing the target pop-up window resource identifier to the target node server to obtain pop-up window resource information, pop-up window resources can be dynamically loaded, reducing the initial package size of the application. By adjusting the layout of the pop-up window resource information according to the layout adjustment parameters of the terminal device to obtain the target pop-up window information, it can be ensured that the pop-up window can be displayed normally on different terminal devices, optimizing the display effect. The above solution can improve the adaptability of pop-up window display across different terminal devices, dynamically load pop-up window resources as needed, ensure the normal display of pop-up windows on different terminal devices, and accurately respond to the user's interaction needs.
[0035] In one embodiment, a specific implementation process is described for adjusting the layout of pop-up resource information to adapt to the terminal device to obtain the target pop-up information. Please refer to [reference needed]. Figure 4 This is a flowchart illustrating a specific implementation process for adjusting the layout of pop-up resource information to adapt to the terminal device and obtain target pop-up information, as provided in this application embodiment. The layout adjustment parameters include screen pixel density parameters and current interface orientation parameters, such as... Figure 4As shown, the specific implementation steps for adjusting the layout of pop-up resource information to adapt to the terminal device and obtain the target pop-up information are as follows: Step S401: Parse the pop-up resource information to obtain the initial pop-up information.
[0036] The initial pop-up information can be the raw pop-up data parsed from the pop-up resource information. This initial pop-up information includes the size information, position information, and function partition labels for each pop-up element.
[0037] Step S402: Calculate the pixel scaling coefficient corresponding to each functional partition based on the screen pixel density parameters and the preset scaling weight of each functional partition. Based on the pixel scaling coefficient corresponding to each functional partition and the functional partition label corresponding to each pop-up element, scale and adjust the size information corresponding to each pop-up element to obtain the target size information.
[0038] The screen pixel density parameter can be the number of pixels per inch on the screen. The functional area can be the functional region to which the pop-up element belongs. The preset scaling weight can be a scaling ratio coefficient assigned to each functional area, used to control the scaling degree of different functional areas. Optionally, the pixel scaling coefficient for each functional area can be calculated by dividing the screen pixel density parameter by a base pixel density parameter to obtain a base scaling coefficient, and then multiplying the preset scaling weight for each functional area by this base scaling coefficient to obtain the pixel scaling coefficient for that functional area. The functional area label can be a label used to identify the functional area to which the pop-up element belongs, such as a title area, content area, or button area. For pop-up elements with different functional area labels, the pixel scaling coefficient corresponding to the pop-up element can be matched first, and then multiplied by the width and height of the pop-up element to obtain the target size information through scaling adjustment.
[0039] Step S403: Adjust the position information of each pop-up element according to the current interface orientation parameter to obtain the target relative position information.
[0040] The current interface orientation parameter can be the screen orientation of the terminal device, including both portrait and landscape modes. Since the layout of the pop-up elements differs under different screen orientations, failure to adjust this will lead to display errors. Therefore, it is necessary to adjust the position information of the pop-up elements based on the current interface orientation parameter.
[0041] As can be seen from the above steps S401-S403, by adapting the pixel density, it can be ensured that the physical size of the pop-up window is consistent on screens with different pixel densities. By scaling and adjusting according to functional areas, it can be ensured that the display ratio of different functional areas is coordinated, avoiding element deformation or overlap. Furthermore, the pop-up window layout is dynamically adjusted according to the interface orientation to ensure normal display in both portrait and landscape modes.
[0042] In one embodiment, a specific implementation process is described to adjust the position information corresponding to each pop-up element according to the current interface orientation parameter to obtain the target position information. Please refer to [reference needed]. Figure 5 This is a flowchart illustrating a specific implementation process provided in this application embodiment of adjusting the position information corresponding to each pop-up element based on the current interface orientation parameter to obtain the target position information, as shown below. Figure 5 As shown, the specific implementation steps for adjusting the position information of each pop-up element according to the current interface orientation parameter to obtain the target position information are as follows: Step S501: Determine the distribution of interactive hot zones and the boundary of the display area of the terminal device based on the current interface orientation parameters.
[0043] The interactive hotspot can be the area on the terminal device screen that is easily touched by the user, typically located in the lower half and middle of the screen. The display area boundary can be the boundary of the area on the screen where content can be displayed normally, excluding system areas such as the status bar and navigation bar. Different terminal devices can have their interactive hotspot distribution and display area boundaries pre-configured for different screen orientations, and the corresponding interactive hotspot distribution and display area boundaries can be queried based on the current interface orientation parameter.
[0044] Step S502: Calculate the position offset based on the distribution of interactive hot zones, the boundary of the display area, and the overall size of the pop-up window after scaling adjustment.
[0045] The interactive hotspot distribution can be a standardized hotspot rectangle. For example, for a mobile phone, if the screen is portrait orientation, the core hotspot is a rectangle with 70% of the bottom height and 10% of the left and right margins; if the screen is landscape orientation, the core hotspot is a rectangle with 60% of the right width and 10% of the top and bottom margins. Of course, there are other interactive hotspot configurations adapted to specific device types, which are not limited here. The center of the pop-up window is aligned with the center of this core interactive hotspot, and the coordinates of the four corners of the pop-up window under this center are calculated based on the overall size of the pop-up window after scaling. These four corner coordinates are compared with the boundary of the display area. If the corner coordinates exceed the boundary of the display area, the corner coordinates exceeding the boundary of the display area are adjusted to the nearest boundary of the display area to obtain the final corner coordinates. The position offset can be calculated by comparing these corner coordinates with the original corner coordinates of the pop-up window.
[0046] Step S503: Adjust the position information corresponding to each pop-up element according to the position offset to obtain the target position information.
[0047] In this process, based on the position information corresponding to each pop-up element, the position offset can be superimposed to obtain the target position information, so that each pop-up element can be translated to the target position.
[0048] As can be seen from the above steps S501-S503, by combining the distribution of interactive hot zones and the boundary of the display area, the pop-up window can be displayed in an interactive hot zone that is easy for the user to touch and confined within the display area, making it convenient for the user to operate. The position of the pop-up window can be dynamically adjusted to ensure the best display effect in various states.
[0049] In one embodiment, a specific implementation process for rendering and displaying target pop-up information is described. Please refer to [reference needed]. Figure 6 This is a flowchart illustrating a specific implementation process for rendering and displaying target pop-up information, as provided in an embodiment of this application. Figure 6 As shown, the specific implementation steps for rendering and displaying the target pop-up information are as follows: Step S601: Determine the underlying view level corresponding to the target pop-up information, and render a transparent overlay layer of the same size as the display interface at the underlying view level.
[0050] The bottom view hierarchy can be the interface view hierarchy below the pop-up when it is displayed. The transparent overlay can be a transparent node that covers the entire screen, located below the pop-up, and is used to intercept specific interactive events. By rendering a transparent overlay of the same size as the displayed interface in the bottom view hierarchy, it can be ensured that the pop-up is displayed on top of the transparent overlay.
[0051] Step S602: Render the target pop-up window based on the target pop-up window information on the transparent mask layer, and bind the interception component to the transparent mask layer.
[0052] Above the transparent mask layer, a target pop-up instantiated from the target pop-up information can be rendered. This target pop-up can respond to interactive operations applied to it, while the transparent mask layer can intercept the interactive operations and pass them to the lower layer.
[0053] Step S603: Intercept at least one preset interactive operation applied to the transparent mask layer using the interception component.
[0054] The interception component can be used to intercept specific input events, such as specific click events or specific touch events, to prevent preset interactive operations from penetrating to the lower-level interface.
[0055] As can be seen from steps S601-S603 above, by setting a transparent mask layer and an interception component, specific interactive events can be effectively intercepted, preventing users from accidentally operating the lower interface.
[0056] In one embodiment, a specific implementation process is described for intercepting at least one preset interactive operation acting on a transparent mask layer using an interception component. Please refer to [link / reference]. Figure 7 This is a flowchart illustrating a specific implementation process of intercepting at least one preset interactive operation acting on a transparent mask layer using an interception component, as provided in an embodiment of this application. Figure 7 As shown, the specific implementation steps for intercepting at least one preset interactive operation applied to a transparent mask layer using the interception component are as follows: Step S701: Capture at least one input event acting on the transparent mask layer by intercepting the component, and divide the priority according to the event type, trigger source and system state of each input event to obtain the priority corresponding to each input event, wherein the priority includes low priority, medium priority and high priority.
[0057] Input events can be triggered by user interactions with the terminal device, such as touch events and click events. The trigger source can be the input device that generates the input event, such as a touchscreen, mouse, or keyboard. The system state can be the current state of the terminal device, such as whether an animation is playing or a network request is in progress. Different event types, trigger sources, and system states are pre-assigned priorities. This can be achieved by setting a priority lookup table, which is consulted based on the current input event's event type, trigger source, and system state to determine the priority. This priority includes low, medium, and high priorities.
[0058] Step S702: Intercept low-priority input events, and for medium-priority input events, perform layer-by-layer collision detection based on a preset collision detection matrix to obtain the region to which the medium-priority input events belong.
[0059] The different priorities reflect the importance of different input events. Low-priority events can be directly intercepted without further processing. High-priority events can be allowed to proceed to ensure their proper processing. For medium-priority input events, a preset collision detection matrix is used to determine their assigned region. The preset collision detection matrix can be structured data defining the collision relationships between nodes in the pop-up hierarchy, including information such as detection order, collision region type, and edge tolerance range. Layer-by-layer collision detection specifically involves checking whether the coordinates of the input event fall within the collision region of a node in the hierarchical order of the pop-up nodes. If a collision is detected, the detection is immediately terminated, and the assigned region of that node is returned; if no collision is detected at any node, the assigned region is the lower-level interface. The assigned region can be standardized into three types: the actual visible area of the target pop-up, the edge tolerance region, and the lower-level interface region.
[0060] Step S703: If the area of origin is the actual visible area of the target pop-up or the edge tolerance area, intercept the input event with medium priority.
[0061] The actual visible area refers to the area of the pop-up window that is actually displayed on the screen, excluding transparent parts. The edge tolerance area is a certain range around the edge of the pop-up window, used to handle user click deviations. If the belonging area is the actual visible area or edge tolerance area of the target pop-up window, then input events of this priority need to be processed by the target pop-up window and cannot be passed to the lower-level interface; they need to be intercepted.
[0062] As can be seen from steps S701-S703 above, by prioritizing and collision detection, fine-grained control of input events is achieved, avoiding unnecessary event interception. By allowing high-priority events to pass, the normal operation of system functions is guaranteed. Collision detection is performed on medium-priority events, intercepting only the events that actually affect the pop-up window without affecting the interaction of other interfaces. By setting edge tolerance areas, user click deviations are handled, improving the accuracy and usability of the interaction.
[0063] Figure 8 This is a schematic diagram illustrating the pop-up display method provided in the embodiments of this application, as shown below. Figure 8As shown, when a user triggers an interactive operation on the display interface of terminal device 801, terminal device 801 determines the target interactive component 802 that triggers the pop-up window corresponding to the interactive operation, and determines the target pop-up window resource identifier based on the component identifier of the target interactive component 802 and the device parameter information of terminal device 801. It then sends a network request containing the target pop-up window resource identifier to the target node server 803. The target node server returns the pop-up window resource information corresponding to the target pop-up window resource identifier. Upon receiving the pop-up window resource information, terminal device 801 adjusts the layout of the pop-up window resource information according to the layout adjustment parameters to obtain the target pop-up window information, and renders and displays the target pop-up window information to obtain the target pop-up window 804.
[0064] Figure 9 This is a structural block diagram of a pop-up display device provided in an embodiment of this application. The device is configured to execute the pop-up display method provided in the above embodiment, and has corresponding functional modules and beneficial effects for executing the method. For example... Figure 9 As shown, the device specifically includes: The first determining module 901 is configured to respond to interactive operations performed on the display interface of the terminal device and determine the target interactive component that triggers the pop-up window corresponding to the interactive operation. The second determining module 902 is configured to determine the target pop-up resource identifier based on the component identifier of the target interactive component and the device parameter information of the terminal device; The sending module 903 is configured to send a network request containing the target pop-up resource identifier to the target node server, so that the target node server returns the pop-up resource information corresponding to the target pop-up resource identifier. The adjustment module 904 is configured to adjust the layout of the pop-up resource information according to the layout adjustment parameters of the terminal device to obtain the target pop-up information upon receiving pop-up resource information. The rendering and display module 905 is configured to render and display the target pop-up information.
[0065] The above-described approach, by identifying the target interactive component that triggers the pop-up window based on the interactive component's identifier and the terminal device's device parameter information, allows for the selection of pop-up resources adaptable to different terminal devices, ensuring that different terminal devices obtain suitable pop-up resources. By sending a network request containing the target pop-up resource identifier to the target node server to obtain pop-up resource information, pop-up resources can be dynamically loaded, reducing the initial application size. Furthermore, by adjusting the layout of the pop-up resource information according to the terminal device's layout adjustment parameters, the target pop-up information is obtained, ensuring that the pop-up displays correctly on different terminal devices and optimizing the display effect. This solution improves the adaptability of pop-up display across different terminal devices, dynamically loads pop-up resources as needed, ensures the normal display of pop-ups on different terminal devices, and accurately responds to user interaction needs.
[0066] In one possible embodiment, the second determining module 902 is specifically configured as follows: Based on the component identifier of the target interactive component, multiple pop-up resource identifiers and corresponding metadata information are determined from the pre-stored associated business data; The matching degree is calculated by matching the device parameter information of the terminal device with the metadata information corresponding to each pop-up resource identifier, and the matching score corresponding to each pop-up resource identifier is obtained. The pop-up resource identifier with the highest matching score among multiple pop-up resource identifiers is determined as the target pop-up resource identifier.
[0067] In one possible embodiment, the second determining module 902 is further configured as follows: The device parameter information of the terminal device is extracted to obtain a set of parameter items, and the metadata information corresponding to each pop-up resource identifier is extracted to obtain a set of constraint items; The set of parameter items and the set of constraint items corresponding to each pop-up resource identifier are used to calculate the single-item matching degree, and multiple single-item matching scores are obtained for each pop-up resource identifier. The multiple individual matching scores corresponding to each pop-up resource identifier are weighted and calculated to obtain the matching score corresponding to each pop-up resource identifier.
[0068] In one possible embodiment, the adjustment module 904 is specifically configured as follows: The pop-up resource information is parsed to obtain the initial pop-up information, which includes the size information, position information and function partition labels of each pop-up element. The pixel scaling coefficient for each functional area is calculated based on the screen pixel density parameters and the preset scaling weights of each functional area. Then, based on the pixel scaling coefficients of each functional area and the functional area labels of each pop-up element, the size information of each pop-up element is scaled and adjusted to obtain the target size information. The relative position information of the target is obtained by adjusting the position information of each pop-up element according to the current interface orientation parameter.
[0069] In one possible embodiment, the adjustment module 904 is further configured as follows: The distribution of interactive hot zones and the boundary of the display area of the terminal device are determined based on the current interface orientation parameters. The position offset is calculated based on the distribution of interactive hot zones, the boundary of the display area, and the overall size of the pop-up after scaling. The target position information is obtained by adjusting the position information corresponding to each pop-up element according to the position offset.
[0070] In one possible embodiment, the rendering display module 905 is specifically configured as follows: Determine the underlying view level corresponding to the target pop-up information, and render a transparent overlay layer of the same size as the display interface at the underlying view level; The target pop-up is rendered on top of the transparent overlay based on the target pop-up information, and an interception component is bound to the transparent overlay. The interception component intercepts at least one preset interactive operation applied to the transparent mask layer.
[0071] In one possible embodiment, the rendering display module 905 is further configured as follows: The interception component captures at least one input event acting on the transparent mask layer, and prioritizes each input event based on its event type, trigger source, and system state to obtain the priority corresponding to each input event, which includes low priority, medium priority, and high priority. Intercept low-priority input events, and for medium-priority input events, perform layer-by-layer collision detection based on a preset collision detection matrix to obtain the region to which the medium-priority input events belong; When the region of origin is the actual visible area of the target pop-up or the edge tolerance area, intercept input events with medium priority.
[0072] Figure 10 This is a schematic diagram of the structure of a pop-up display device provided in an embodiment of this application, as shown below. Figure 10As shown, the device includes a processor 1001, a memory 1002, an input device 1003, and an output device 1004; the number of processors 1001 in the device can be one or more. Figure 10 Taking a processor 1001 as an example; the processor 1001, memory 1002, input device 1003, and output device 1004 in the device can be connected via a bus or other means. Figure 10 Taking a bus connection as an example, the memory 1002, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the pop-up display method in this embodiment. The processor 1001 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 1002, thereby realizing the aforementioned pop-up display method. The input device 1003 can be configured to receive input digital or character information and generate key signal inputs related to user settings and function control of the device. The output device 1004 may include a display screen or other display device.
[0073] The pop-up display device provided above can be used to execute the pop-up display method provided in any of the above embodiments, and has the corresponding functions and beneficial effects.
[0074] This application also provides a non-volatile storage medium containing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are configured to perform a pop-up display method described in the above embodiments. The method includes: responding to an interactive operation on the display interface of a terminal device; determining a target interactive component that triggers the pop-up corresponding to the interactive operation; determining a target pop-up resource identifier based on the component identifier of the target interactive component and device parameter information of the terminal device; sending a network request containing the target pop-up resource identifier to a target node server, so that the target node server returns pop-up resource information corresponding to the target pop-up resource identifier; and, upon receiving the pop-up resource information, adjusting the layout of the pop-up resource information according to the layout adjustment parameters of the terminal device to obtain target pop-up information, and rendering and displaying the target pop-up information.
[0075] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROMs, floppy disks, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media, optical storage; registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. Furthermore, storage media may reside in a first computer system in which the program is executed, or may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” can include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). Storage media may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.
[0076] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the pop-up display method described above, but can also perform related operations in the pop-up display method provided in any embodiment of this application.
[0077] It should be noted that the numbering of each step in this solution is only used to describe the overall design framework of this solution and does not indicate a necessary sequential relationship between the steps. As long as the overall implementation process conforms to the overall design framework of this solution, it falls within the protection scope of this solution. The literal order in the description is not an exclusive limitation on the specific implementation process of this solution. Those skilled in the art should understand that the embodiments of this application can be provided as methods, systems, or computer program products. In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-persistent memory in computer-readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0078] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0079] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A pop-up display method applied to a terminal device, characterized in that, include: In response to an interactive operation performed on the display interface of the terminal device, determine the target interactive component that triggers the pop-up window corresponding to the interactive operation; The target pop-up resource identifier is determined based on the component identifier of the target interactive component and the device parameter information of the terminal device. A network request containing the target pop-up resource identifier is sent to the target node server so that the target node server returns the pop-up resource information corresponding to the target pop-up resource identifier. Upon receiving the pop-up resource information, the layout of the pop-up resource information is adjusted according to the layout adjustment parameters of the terminal device to obtain the target pop-up information, and the target pop-up information is rendered and displayed.
2. The pop-up display method according to claim 1, wherein Determining the target pop-up resource identifier based on the component identifier of the target interactive component and the device parameter information of the terminal device includes: Based on the component identifier of the target interactive component, multiple pop-up resource identifiers and corresponding metadata information are determined from pre-stored associated business data; The matching degree is calculated by combining the device parameter information of the terminal device with the metadata information corresponding to each pop-up resource identifier to obtain the matching score corresponding to each pop-up resource identifier. The pop-up resource identifier with the highest matching score among the multiple pop-up resource identifiers is determined as the target pop-up resource identifier.
3. The pop-up window display method according to claim 2, characterized in that, The step of calculating the matching degree between the device parameter information of the terminal device and the metadata information corresponding to each pop-up resource identifier to obtain a matching score for each pop-up resource identifier includes: The device parameter information of the terminal device is extracted to obtain a set of parameter items, and the metadata information corresponding to each pop-up resource identifier is extracted to obtain a set of constraint items; The set of parameter items and the set of constraint items corresponding to each pop-up resource identifier are used to calculate the single-item matching degree to obtain multiple single-item matching scores corresponding to each pop-up resource identifier. The multiple individual matching scores corresponding to each pop-up resource identifier are weighted and calculated to obtain the matching score corresponding to each pop-up resource identifier.
4. The pop-up window display method according to claim 1, characterized in that, The layout adjustment parameters include screen pixel density parameters and current interface orientation parameters; the step of adjusting the pop-up resource information to adapt to the terminal device to obtain target pop-up information includes: The pop-up resource information is parsed to obtain initial pop-up information, which includes the size information, position information and function partition labels of each pop-up element. The pixel scaling coefficient for each functional partition is calculated based on the screen pixel density parameters and the preset scaling weights of each functional partition. Then, based on the pixel scaling coefficients for each functional partition and the functional partition labels for each pop-up element, the size information for each pop-up element is scaled and adjusted to obtain the target size information. The target relative position information is obtained by adjusting the position information corresponding to each pop-up element according to the current interface orientation parameter.
5. The pop-up window display method according to claim 4, characterized in that, The step of adjusting the position information corresponding to each of the pop-up elements according to the current interface orientation parameter to obtain the target position information includes: The interactive hot zone distribution and display area boundary of the terminal device are determined based on the current interface orientation parameter. The position offset is calculated based on the distribution of the interactive hotspots, the boundary of the display area, and the overall size of the pop-up after scaling adjustment. The target position information is obtained by adjusting the position information corresponding to each of the pop-up elements according to the position offset.
6. The pop-up window display method according to any one of claims 1-5, characterized in that, The rendering and display of the target pop-up information includes: Determine the underlying view level corresponding to the target pop-up information, and render a transparent overlay layer of the same size as the display interface at the underlying view level; A target pop-up window is rendered on top of the transparent mask layer based on the target pop-up window information, and an interception component is bound to the transparent mask layer; Accordingly, after binding the interception component to the transparent mask layer, the method further includes: The interception component intercepts at least one preset interactive operation applied to the transparent mask layer.
7. The pop-up window display method according to claim 6, characterized in that, The interception of at least one preset interactive operation acting on the transparent mask layer by the interception component includes: The interception component captures at least one input event acting on the transparent mask layer, and prioritizes each input event according to its event type, trigger source, and system state to obtain the priority corresponding to each input event, which includes low priority, medium priority, and high priority. Low-priority input events are intercepted, and for medium-priority input events, a layer-by-layer collision detection is performed on the medium-priority input events based on a preset collision detection matrix to obtain the region to which the medium-priority input events belong. If the area to which the target pop-up belongs is the actual visible area or the edge tolerance area of the target pop-up, the input event of medium priority is intercepted.
8. A pop-up display device, characterized in that, include: The first determining module is configured to respond to interactive operations performed on the display interface of the terminal device and determine the target interactive component that triggers the pop-up window corresponding to the interactive operation. The second determining module is configured to determine the target pop-up resource identifier based on the component identifier of the target interactive component and the device parameter information of the terminal device; The sending module is configured to send a network request containing the target pop-up resource identifier to the target node server, so that the target node server returns the pop-up resource information corresponding to the target pop-up resource identifier; The adjustment module is configured to, upon receiving the pop-up resource information, adjust the layout of the pop-up resource information according to the layout adjustment parameters of the terminal device to obtain the target pop-up information. The rendering and display module is configured to render and display the target pop-up information.
9. A pop-up display device, characterized in that, The device includes: one or more processors; and a storage device configured to store one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the pop-up display method according to any one of claims 1-7.
10. A non-volatile storage medium for storing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are configured to perform the pop-up display method as described in any one of claims 1-7.