Popup window position determination method and device, electronic equipment and storage medium
The positioning of the pop -up window is determined by the visual interface area and the position relationship of the target node area, solving the problem of high algorithm complexity in existing technology, and improving the efficiency and user experience of the pop -up position.
Patent Information
- Application Number
- CN202411457994.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-01-28
AI Technical Summary
In the prior art, the pop-up position selection algorithm has a high complexity, which affects the efficiency of pop-up position determination.
Determine the position of the pop -up window by examining the relative position relationship between the interface area and the target node area, and simplify the algorithm calculation process.
Improved the efficiency of the pop -up window position and improved the user experience.
Smart Images

Figure CN119376581A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a method, device, electronic device and storage medium for determining a pop-up window position. Background Art
[0002] Currently, there are various pop-up windows in various applications.
[0003] In the related art, the position selection algorithm of the pop-up window usually examines the relationship between the center point of the screen and the click button to determine the position of the pop-up window. However, in actual applications, it is found that the algorithm complexity of this pop-up window position selection algorithm is relatively high, which easily affects the efficiency of determining the pop-up window position.
[0004] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the invention
[0005] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a method, device, electronic device and storage medium for determining a pop-up window position, which can simplify the algorithm calculation process, improve the efficiency of determining the pop-up window position, and help improve the user experience.
[0006] In a first aspect, an embodiment of the present invention provides a method for determining a pop-up window position, the method comprising the following steps:
[0007] In response to a pop-up window position selection instruction at a target node, a first area and a second area are determined; wherein the first area is a visible area of the interface; and the second area is a target node area;
[0008] The position of the pop-up window is determined according to the positional relationship between the first area and the second area.
[0009] According to some embodiments of the present invention, determining the position of the pop-up window according to the positional relationship between the first area and the second area includes:
[0010] Determining a first center point of the first area and a second center point of the second area;
[0011] The position of the pop-up window is determined according to the positional relationship between the first center point and the second center point.
[0012] According to some embodiments of the present invention, determining the position of the pop-up window according to the positional relationship between the first center point and the second center point includes:
[0013] Determine a positional relationship between the first center point and the second center point in a vertical direction;
[0014] When the second center point is located above the first center point in the vertical direction, it is determined that the position of the pop-up window is located below the second area.
[0015] When the second center point is located below the first center point in the vertical direction, it is determined that the position of the pop-up window is located above the second area.
[0016] According to some embodiments of the present invention, determining the position of the pop-up window according to the positional relationship between the first center point and the second center point includes:
[0017] Determine a positional relationship between the first center point and the second center point in a horizontal direction;
[0018] When the second center point is located to the left of the first center point in the horizontal direction, it is determined that the position of the pop-up window is located to the right of the second area.
[0019] When the second center point is located to the right of the first center point in the horizontal direction, it is determined that the position of the pop-up window is located to the left of the second area.
[0020] According to some embodiments of the present invention, the interface visible area includes a screen interface visible area and an application visible area;
[0021] When the ratio of the area size of the application visible area to the area size of the screen interface visible area is greater than a first threshold, the first area is determined to be the application visible area.
[0022] According to some embodiments of the present invention, when the ratio of the area size of the application visible area to the area size of the screen interface visible area is less than or equal to a first threshold, the first area is determined to be the screen interface visible area.
[0023] According to some embodiments of the present invention, after determining the position of the pop-up window according to the positional relationship between the first area and the second area, the method further includes:
[0024] Obtaining a preset area size of the pop-up window;
[0025] A pop-up window is loaded at the position of the pop-up window; wherein the distance between the boundary of the pop-up window and the boundary of the first area is greater than a second threshold.
[0026] According to some embodiments of the present invention, after determining the position of the pop-up window according to the positional relationship between the first area and the second area, the method further includes:
[0027] Obtaining a preset area size of the pop-up window;
[0028] A pop-up window is loaded at the position of the pop-up window; wherein at least one boundary of the pop-up window is colinear with a boundary of the second area.
[0029] According to some embodiments of the present invention, the method further comprises:
[0030] In the case where it is determined that the first area is the visible area of the application, determining a maximum display area in the visible area of the application;
[0031] Load the pop-up window in the maximum display area.
[0032] In a second aspect, an embodiment of the present invention provides a pop-up window position determination device, the device comprising:
[0033] An area determination module, configured to determine a first area and a second area in response to a pop-up window position selection instruction at a target node; wherein the first area is a visible area of the interface; and the second area is a target node area;
[0034] The position determination module is used to determine the position of the pop-up window according to the positional relationship between the first area and the second area.
[0035] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the pop-up window position determination method as described above when executing the computer program.
[0036] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the pop-up window position determination method as described above is implemented.
[0037] According to the method of the embodiment of the present invention, in response to the pop-up window position selection instruction at the target node, the first area and the second area are determined; wherein the first area is the visible area of the interface; the second area is the target node area; the position of the pop-up window is determined according to the positional relationship between the first area and the second area. According to the technical solution of this embodiment, the position of the pop-up window is determined by examining the relative positional relationship between the visible area of the interface and the target node area, which can simplify the algorithm calculation process, improve the efficiency of determining the pop-up window position, and help improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 Schematic diagram of an implementation environment of a method for determining a pop-up window position provided by an embodiment of the present invention;
[0039] Figure 2 It is a flowchart of a method for determining a pop-up window position provided by an embodiment of the present invention;
[0040] Figure 3 This is a schematic diagram of an interface with a visible area and a target node area provided by an embodiment of the present invention;
[0041] Figure 4 This is another interface schematic diagram of an interface visual area and a target node area provided by an embodiment of the present invention;
[0042] Figure 5 It is a schematic diagram of a process for determining the position of a pop-up window according to the position relationship of a center point in a vertical direction provided by an embodiment of the present invention;
[0043] Figure 6 It is a schematic diagram of a process for determining the position of a pop-up window according to the position relationship of a center point in the horizontal direction provided by an embodiment of the present invention;
[0044] Figure 7 It is a schematic diagram of a process of loading a pop-up window provided by an embodiment of the present invention;
[0045] Figure 8 It is a schematic diagram of another process of loading a pop-up window provided by an embodiment of the present invention;
[0046] Fig. 9 is a structural schematic diagram of a pop-up window position determination device provided by an embodiment of the present invention;
[0047] Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present invention. They are only examples of devices and methods consistent with some aspects of the embodiments of the present invention as detailed in the attached claims.
[0049] It is understood that the terms "first", "second", etc. used in the present invention may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0050] The terms "at least one", "multiple", "each", "any", etc. used in the present invention, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.
[0052] Currently, there are various pop-up windows in various applications.
[0053] In the related art, the position selection algorithm of the pop-up window usually examines the relationship between the center point of the screen and the click button to determine the position of the pop-up window. For example, when the user moves the mouse and clicks the pop-up window button at the target node, the pop-up window position selection will be triggered. The algorithm will capture the center point of the screen and the four border positions of the click button, and determine the position of the pop-up window by examining the relative position relationship between the two.
[0054] However, in actual applications, it is found that the algorithm complexity of this pop-up window position selection algorithm is relatively high, which easily affects the efficiency of determining the pop-up window position.
[0055] In view of this, an embodiment of the present invention provides a pop-up window position determination method, device, electronic device and storage medium, which determines the position of the pop-up window by examining the relative position relationship between the visible area of the interface and the target node area, can simplify the algorithm calculation process, improve the efficiency of pop-up window position determination, and help improve the user experience.
[0056] It should be noted that in each specific implementation of the present invention, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present invention needs to obtain the user's sensitive personal information, it will obtain the user's separate permission or consent through a pop-up window or jump to a confirmation page, and after clearly obtaining the user's separate permission or consent, it will obtain the necessary user-related data for the normal operation of the embodiment of the present invention.
[0057] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. First, a method for determining a pop-up window position provided in an embodiment of the present invention is described in conjunction with the accompanying drawings.
[0058] Please refer to Figure 1 , Figure 1 The schematic diagram of the implementation environment of a method for determining a pop-up window position provided by an embodiment of the present invention is shown. In the implementation environment, the main hardware and software entities involved include a terminal and a server.
[0059] Specifically, a control program of a related pop-up window position determination method may be installed in the terminal, and the server is a background server of the control program. The terminal and the server are connected in communication. The pop-up window position determination method provided in the embodiment of the present invention can be executed on the terminal side, and the server can search for a pop-up window matching the pop-up window position selection instruction responded by the terminal side, and send the pop-up window information to the terminal, so that the terminal can load the pop-up window according to the pop-up window information at the determined pop-up window position.
[0060] In some embodiments, the terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a car terminal, etc., but is not limited thereto.
[0061] The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0062] In addition, the server can also be a node server in the blockchain network.
[0063] A communication connection can be established between the terminal and the server through a wireless network. The wireless network uses standard communication technology and / or protocols. The network can be set to the Internet or any other network, such as but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, or any combination of a wireless network, a private network or a virtual private network. Moreover, the above-mentioned software and hardware entities can use the same communication connection mode or different communication connection modes, and the present invention does not make specific restrictions on this.
[0064] Of course, it is understandable that Figure 1 The implementation environment in the embodiment of the present invention is only some optional application scenarios of the method for determining the position of the pop-up window provided in the embodiment of the present invention. The actual application is not fixed to Figure 1 The software and hardware environment shown is not specifically limited in the present invention.
[0065] like Figure 2 As shown, Figure 2 It is a flowchart of a method for determining a pop-up window position provided by an embodiment of the present invention, specifically including but not limited to steps S100 to S200.
[0066] Step S100, in response to a pop-up window position selection instruction at a target node, determine a first area and a second area; wherein the first area is a visible area of the interface; and the second area is a target node area.
[0067] Specifically, the pop-up window position selection instruction at the target node can be triggered by the user who is using the terminal. For example, when the terminal is a desktop computer, the user moves the mouse to the target node on the application interface to trigger the pop-up window generation operation of clicking the button, and then a pop-up window position selection instruction is generated, and the processor of the desktop computer responds to the pop-up window position selection instruction generated at the target node. The target node can be a clickable button or a text prompt box.
[0068] In actual applications, the pop-up window position selection instruction at the target node may include the position information of the target node and the pop-up window type information, and the terminal sends the pop-up window type information to the background server so that the background server can search for matching pop-up window information according to the pop-up window type information.
[0069] Among them, the types of pop-up windows may include an Alert Dialog for displaying urgent or important information, a Confirmation Dialog for asking the user to confirm or cancel an operation, a Selection Dialog allowing the user to select one or more from multiple options, an Input Dialog for obtaining input from the user, such as text, passwords or numbers, a Loading Dialog for displaying a loading status when the application performs a long operation to inform the user that the program is being processed, a Date and Time Picker Dialog that allows the user to select a date and time, usually used for calendar events, appointments or other time-related inputs, a Permission Request Dialog that the system displays when the application needs to access specific permissions (such as camera, location, storage, etc.), and a Custom Dialog that is customized by the developer according to actual needs, and many other pop-up windows.
[0070] For example, taking the example of a user using a smartphone to quickly purchase movie tickets, when the user clicks the ticket purchase button of the application on the smartphone terminal, the ticket purchase button will be identified as a target node, and a selection box pop-up window will be generated for the user to select the movie showtime and location.
[0071] Further, when the terminal responds to the pop-up window position selection instruction, a first area and a second area are determined, wherein the first area is the visible area of the interface and the second area is the target node area.
[0072] For details, please refer to Figure 3 , Figure 3 is a schematic diagram of an interface visual area and a target node area provided by an embodiment of the present invention. Figure 3 The first area surrounded by the four vertices A, B, C, and D is the visible area of the interface, and the second area surrounded by the four vertices E, F, G, and H is the target node area.
[0073] Understandably, Figure 3The visible area of the interface surrounded by the four vertices A, B, C, and D can be the main interface of the application or the terminal screen display interface; and the target node area surrounded by the four vertices E, F, G, and H can correspond to a clickable button or a text prompt box with text reminder information. Exemplarily, the target node area can be a font selection prompt box with a drop-down click button. When the terminal user chooses to click the drop-down click button, the processor will respond to the pop-up window position selection instruction and determine the drop-down click button as the target node area.
[0074] In actual applications, visualization applications often provide an interface interface. When the terminal receiver responds to the pop-up window position selection instruction at the target node, the interface interface can be called to capture the current visible area of the interface and the specific area at the target node, thereby determining the first area and the second area.
[0075] Specifically, as an optional implementation, the interface visible area includes a screen interface visible area and an application visible area;
[0076] When the ratio of the area size of the application visible area to the area size of the screen interface visible area is greater than a first threshold, the first area is determined to be the application visible area.
[0077] In the embodiment of the present invention, the interface visible area includes the screen interface visible area and the application visible area, wherein the screen interface visible area refers to all areas visible to the user on the entire display screen. In simple terms, it is the entire content displayed on the display, including all windows, toolbars, status bars, etc. The screen interface visible area usually depends on the physical size and resolution setting of the display; the application visible area refers to the part of the application window that the user can see. This area is usually limited by the window border, title bar, menu bar and status bar. For example, the user can change the application visible area by enlarging or reducing the size of the application interface window.
[0078] Furthermore, the size of the visible area of the application and the size of the visible area of the screen interface are obtained, and the ratio of the size of the visible area of the application to the size of the visible area of the screen interface is determined.
[0079] For example, the area of the visible area of the screen interface can be calculated by the resolution of the display, that is, the width and height, with pixels (px) as the unit. For a display with a resolution of 1920x1080, the area of the visible area of the screen interface is 1920×1080=2073600; the area of the visible area of the application depends on the actual display size of the application window, also in pixels. A document window has a width of 800 pixels and a height of 600 pixels, and the area of the visible area of the application is 800×600=480000. The ratio of the area of the visible area of the application to the area of the visible area of the screen interface is 480000 / 2073600×100%≈23.1%.
[0080] Furthermore, when the ratio of the area size of the visible area of the application to the area size of the visible area of the screen interface is greater than a first threshold, the first area is determined to be the visible area of the application. That is to say, the first threshold can be set in advance and the first area can be determined based on the comparison result of the ratio of the area size of the visible area of the application to the area size of the visible area of the screen interface and the first threshold.
[0081] For example, the first threshold can be set to 75%. Then, when the ratio of the area size of the visible area of the application to the area size of the visible area of the screen interface is greater than 75%, the first area can be determined to be the visible area of the application. Since at this time it can be considered that the application window occupies a large part of the screen, it can be considered that the application is in full-screen state or close to full-screen state. Therefore, the visible area of the application is taken as the first area and used to subsequently determine the center point, which can better adapt to the position of the pop-up window generation and meet the user's usage needs.
[0082] Of course, it should be noted that the above setting of the first threshold is only used for exemplary purposes and does not mean to limit the actual setting of the first threshold, which can be independently defined according to actual usage scenario requirements.
[0083] Specifically, as an optional implementation, when the ratio of the area size of the application visible area to the area size of the screen interface visible area is less than or equal to a first threshold, the first area is determined to be the screen interface visible area.
[0084] In an embodiment of the present invention, when the ratio of the area size of the visible area of the application to the area size of the visible area of the screen interface is less than or equal to a first threshold, the first area is determined to be the visible area of the screen interface. That is to say, when the application window is small, if the visible area of the application is used as the first area, it is easy to affect the subsequent determination of the pop-up window position, which may cause the user to feel dissatisfied with the pop-up window position.
[0085] For example, the first threshold can be set to 60%. Then, when the ratio of the area size of the application's visible area to the area size of the screen interface's visible area is less than or equal to 60%, the first area can be determined as the screen interface's visible area, which means that the application window is relatively small relative to the entire screen area, and the application window is only a part of the many contents on the screen. The user can also see other screen elements (such as desktop icons, other windows, etc.). Therefore, it is not suitable to use the application's visible area as the first area at this time. Correspondingly, the screen interface's visible area can be used as the first area and used to subsequently determine the center point, which can better adapt to the location where the pop-up window is generated and meet the user's usage needs.
[0086] In actual applications, based on the description of the above embodiments, by real-time judging the ratio of the area size of the visible area of the application to the area size of the visible area of the screen interface and comparing it with the set first threshold, it is possible to more accurately capture the more important visible area of the interface and use it as the first area for subsequent determination of the position of the pop-up window. This not only allows the first area to be flexibly adjusted, but also improves the rationality of the pop-up window position determination and improves the user experience.
[0087] It is understandable that the shape of the target node includes but is not limited to different shapes such as rectangle, circle, star, etc. For example, if it is set as a circular click button, the second area can also refer to the circular area.
[0088] Step S200: determine the position of the pop-up window according to the positional relationship between the first area and the second area.
[0089] In the embodiment of the present invention, after the first area and the second area are determined, the position of the pop-up window can be determined according to the relative position relationship between the first area and the second area. For example, Figure 3 As shown, at this time, the second area is located at the upper left of the first area. Correspondingly, it can be determined that within the first area, more space will be reserved at the lower right of the second area for pop-up window loading and display.
[0090] As an optional implementation manner, determining the position of the pop-up window according to the positional relationship between the first area and the second area includes:
[0091] Determining a first center point of the first area and a second center point of the second area;
[0092] The position of the pop-up window is determined according to the positional relationship between the first center point and the second center point.
[0093] In the embodiment of the present invention, when the first center point of the first area and the second center point of the second area can be further determined, such as Figure 3 As shown, taking the first area and the second area as rectangles as an example, the center point of the first area can be determined by obtaining the horizontal coordinates and vertical coordinates of the four vertices A, B, C, and D of the first area.
[0094] For example, the coordinates of point A are (x a ,y a ), the coordinates of point B are (x b ,y b ), the coordinates of point C are (x c ,y c ), the coordinates of point D are (x d ,y d ), the coordinates of the first center point O of the first area can be determined by taking the average value:
[0095] Correspondingly, the center point of the second area may also be determined by acquiring the horizontal coordinates and the vertical coordinates of the four vertices E, F, G, and H of the second area.
[0096] For example, the coordinates of point E are (x E ,y E ), the coordinates of point F are (x F ,y F ), the coordinates of point G are (x G ,y G ), the coordinates of point H are (x H ,y H ), the coordinates of the second center point M of the second area can be determined by taking the average value:
[0097] Of course, it is understandable that if the second area is not a rectangle, other methods may be used to determine the first center point of the first area and the second center point of the second area.
[0098] In practical applications, taking the second area as a circular area as an example, you can select any diameter of the circular area, and determine the horizontal and vertical coordinates of the two endpoints of the diameter, and then determine the center point of these two points by taking the average, as the second center point of the second area; you can also select three points on the circle, and then determine the second center point of the second area by finding the intersection of the perpendicular bisectors of the three points.
[0099] Exemplarily, the center point of the circular area may also be determined by image processing technology, for example, edge processing and Hough circle transformation methods may be used to detect the coordinates of the center of the circle.
[0100] Please refer to Figure 4 , Figure 4 is another interface schematic diagram of an interface visual area and a target node area provided by an embodiment of the present invention, Figure 4 The first area surrounded by the four vertices A, B, C, and D is the visible area of the interface, with point O as its center. The second area surrounded by the four points E, F, G, and H is the target node area, with point M as its center.
[0101] In the embodiment of the present invention, the position of the pop-up window is determined by judging the relative position relationship between the first center point and the second center point, that is, the final algorithm process is to judge the relationship between "points" to determine the final position of the pop-up window. The pop-up window matches the pop-up window position selection instruction, such as Figure 1 As shown, the background server can query the matching pop-up window information according to the pop-up window position selection instruction and send it to the terminal processor.
[0102] In related technologies, the position of a pop-up window is often determined by examining the relationship between a "point" and a "rectangle". Even after the position of the pop-up window is determined, it is necessary to examine the relationship between the pop-up window area and the target node area. This involves the relationship between the two rectangles, which further increases the complexity of the problem. It is necessary to use an algorithm to determine the intersection, which increases the complexity of the algorithm and makes the algorithm process more complicated.
[0103] Specifically, as an optional implementation, Figure 5 As shown, Figure 5 1 is a flow chart of determining a pop-up window position according to a positional relationship of center points in a vertical direction provided by an embodiment of the present invention, wherein determining the position of the pop-up window according to the positional relationship between the first center point and the second center point includes:
[0104] Step S310, determining the positional relationship between the first center point and the second center point in the vertical direction;
[0105] Step S320: When the second center point is located above the first center point in the vertical direction, determine that the position of the pop-up window is located below the second area.
[0106] In the embodiment of the present invention, the position of the pop-up window is determined by comparing the positional relationship between the first center point and the second center point in the vertical direction. It can be understood that the first center point of the first area is the center point of the entire visible area of the interface, so by comparing the positional relationship between the first center point and the second center point in the vertical direction, it can be determined whether the second area is closer to the upper boundary or the lower boundary of the first area, thereby determining whether the area above the second area where the pop-up window can be generated is larger or the area below the second area where the pop-up window can be generated is larger.
[0107] For example, when it is determined that the second center point is above the first center point in the vertical direction, it can be determined that the second area is closer to the upper boundary of the first area. Therefore, the position of the pop-up window can be determined to be below the second area. This can provide more sufficient space for subsequent pop-up window generation and loading, thereby improving the rationality of pop-up window generation and reducing the occurrence of user discomfort caused by pop-up windows appearing in inappropriate locations.
[0108] In practical applications, the vertical positional relationship between the first center point and the second center point can be determined by obtaining the horizontal and vertical coordinates of the first center point and the second center point and comparing the vertical coordinates. Figure 3 As shown, the coordinates of the first center point O are obtained as (-1, 0) and the coordinates of the second center point M are obtained as (-3, 2). Then, by comparing the vertical coordinates of the first center point O and the second center point M, that is, the vertical coordinate of the second center point M is greater than the vertical coordinate of the first center point O, it can be determined that the second center point M is above the first center point O in the vertical direction, and then it can be determined that the position of the pop-up window is below the second area, that is, the position of the pop-up window is below the GH boundary.
[0109] For example, when a user clicks a button near the top of the screen, it can be determined that the second center point is above the first center point in the vertical direction, then the pop-up window is located below the button near the top of the screen, and the drop-down menu will expand downward, which can optimize the layout of the user interface and user experience, and ensure that the pop-up window appears natural and intuitive without blocking the main content.
[0110] Specifically, as an optional implementation, Figure 5 As shown, the method also includes:
[0111] Step S330: When the second center point is located below the first center point in the vertical direction, determine that the position of the pop-up window is located above the second area.
[0112] In an embodiment of the present invention, for example, when it is determined that the second center point is below the first center point in the vertical direction, it can be determined that the second area is closer to the lower boundary of the first area. Therefore, when the position of the pop-up window is determined to be above the second area, more sufficient space can be provided for subsequent pop-up window generation and loading, which can improve the rationality of pop-up window generation and reduce the occurrence of user discomfort caused by pop-up windows appearing in inappropriate positions.
[0113] In practical applications, the positional relationship between the first center point and the second center point in the vertical direction can be determined by obtaining the horizontal and vertical coordinates of the first center point and the second center point and comparing the size of the vertical coordinates. For example, if the coordinates of the first center point O are (-1, 0) and the coordinates of the second center point M are (-3, -2), then by comparing the vertical coordinates of the first center point O and the second center point M, that is, the vertical coordinate of the second center point M is smaller than the vertical coordinate of the first center point O, it can be determined that the second center point M is below the first center point O in the vertical direction, and then it can be determined that the position of the pop-up window is above the second area, that is, the position of the pop-up window is above the EF boundary.
[0114] Exemplarily, when a user clicks a button near the bottom of the screen, it can be determined that the second center point is below the first center point in the vertical direction, then the position of the pop-up window is determined to be above the button near the bottom of the screen, and the pull-up menu will expand upward, which can optimize the layout of the user interface and user experience, and ensure that the pop-up window appears natural and intuitive without blocking the main content.
[0115] Specifically, as an optional implementation, Figure 6 As shown, Figure 6 1 is a flow chart of determining a pop-up window position according to a positional relationship of center points in a horizontal direction provided by an embodiment of the present invention, wherein determining the position of the pop-up window according to the positional relationship between the first center point and the second center point includes:
[0116] Step S340, determining the positional relationship between the first center point and the second center point in the horizontal direction;
[0117] Step S350: When the second center point is located to the left of the first center point in the horizontal direction, determine that the position of the pop-up window is located to the right of the second area.
[0118] In the embodiment of the present invention, the position of the pop-up window is determined by comparing the horizontal positional relationship between the first center point and the second center point. It can be understood that the first center point of the first area is the center point of the entire visible area of the interface, so by comparing the horizontal positional relationship between the first center point and the second center point, it can be determined whether the second area is closer to the left boundary or the right boundary of the first area, thereby determining whether the area available for pop-up window generation on the left side of the second area is larger or the area available for pop-up window generation on the right side of the second area is larger.
[0119] For example, when it is determined that the second center point is located to the left of the first center point in the horizontal direction, it can be determined that the second area is closer to the left border of the first area. Therefore, the position of the pop-up window can be determined to be located to the right of the second area. This can provide more sufficient space for subsequent pop-up window generation and loading, thereby improving the rationality of pop-up window generation and reducing the occurrence of user discomfort caused by pop-up windows appearing in inappropriate locations.
[0120] In practical applications, the horizontal positional relationship between the first center point and the second center point can be determined by obtaining the horizontal and vertical coordinates of the first center point and the second center point and comparing the horizontal coordinates. Figure 3 As shown, the coordinates of the first center point O are obtained as (-1, 0) and the coordinates of the second center point M are obtained as (-3, 2). By comparing the horizontal coordinates of the first center point O and the second center point M, that is, the horizontal coordinate of the second center point M is smaller than the horizontal coordinate of the first center point O, it can be determined that the second center point M is located to the left of the first center point O in the horizontal direction, and then it can be determined that the position of the pop-up window is located to the right of the second area, that is, the position of the pop-up window is located to the right of the FG boundary.
[0121] For example, when the user clicks a button near the left side of the screen, it can be determined that the second center point is horizontally located to the left of the first center point, and the position of the pop-up window is determined to be to the right of the button near the left side of the screen. The menu will expand to the right, which can optimize the layout of the user interface and user experience, and ensure that the pop-up window appears natural and intuitive without blocking the main content.
[0122] Specifically, as an optional implementation, Figure 6 As shown, the method also includes:
[0123] Step S360: When the second center point is located to the right of the first center point in the horizontal direction, determine that the position of the pop-up window is located to the left of the second area.
[0124] In an embodiment of the present invention, for example, when it is determined that the second center point is located to the right of the first center point in the horizontal direction, it can be determined that the second area is closer to the right border of the first area. Therefore, the position of the pop-up window can be determined to be located to the left of the second area. This can provide more sufficient space for subsequent pop-up window generation and loading, thereby improving the rationality of pop-up window generation and reducing the occurrence of user discomfort caused by pop-up windows appearing in inappropriate positions.
[0125] In practical applications, the horizontal positional relationship between the first center point and the second center point can be determined by obtaining the horizontal and vertical coordinates of the first center point and the second center point and comparing the horizontal coordinates. For example, if the coordinates of the first center point O are (-1, 0) and the coordinates of the second center point M are (2, -2), then by comparing the horizontal coordinates of the first center point O and the second center point M, that is, the horizontal coordinate of the second center point M is greater than the horizontal coordinate of the first center point O, it can be determined that the second center point M is located to the right of the first center point O in the horizontal direction, and then the position of the pop-up window can be determined to be located to the left of the second area, that is, the position of the pop-up window is located to the left of the EH boundary.
[0126] For example, when the user clicks a button near the right side of the screen, it can be determined that the second center point is horizontally located to the right of the first center point, and the position of the pop-up window is determined to be to the left of the button near the right side of the screen. The menu will expand to the left, which can optimize the layout of the user interface and user experience, and ensure that the pop-up window appears natural and intuitive without blocking the main content.
[0127] Of course, it is understandable that in practical applications, the relative positional relationship between the first center point and the second center point in the vertical and horizontal directions can be combined at the same time. For example, after obtaining the horizontal and vertical coordinates of the first center point and the second center point, the horizontal and vertical coordinates are compared to determine the horizontal and vertical positional relationship between the first center point and the second center point. For example, Figure 3 As shown, the coordinates of the first center point O are obtained as (-1, 0) and the coordinates of the second center point M are obtained as (-3, 2). By comparing the horizontal coordinates of the first center point O with the horizontal coordinates of the second center point M, that is, the horizontal coordinate of the second center point M is smaller than the horizontal coordinate of the first center point O, it can be determined that the second center point M is located to the left of the first center point O in the horizontal direction, and by comparing the vertical coordinates of the first center point O with the vertical coordinates of the second center point M, that is, the vertical coordinate of the second center point M is larger than the vertical coordinate of the first center point O, it can be determined that the second center point M is located above the first center point O in the vertical direction, that is, the second center point M is located to the upper left of the first center point O, and then it can be further determined that the position of the pop-up window is located at the lower right of the second area.
[0128] Furthermore, as an optional implementation, in response to a pop-up window position selection instruction at the target node, after determining the first area and the second area, an interface image including the current first area identifier and the second area identifier is generated, and the pop-up window position determination result output by the image recognition model is obtained by inputting the interface image into a pre-trained image recognition model.
[0129] The image recognition model is obtained after training using historical interface image samples and pop-up window positions corresponding to the interface image samples to determine result labels.
[0130] For example, a historical interface image sample and the pop-up window position determination result label corresponding to the interface image sample can be used as a training sample. By obtaining multiple training samples as a training data set, the training data set is input into the image recognition model. The model parameters in the image recognition model are adjusted according to each output result of the image recognition model, and finally the pre-training process of the image recognition model is completed.
[0131] The pre-training process of the image recognition model may be considered completed after reaching a preset number of pre-training times; or the pre-training process of the image recognition model may be considered completed when the training output results of the image recognition model converge.
[0132] Of course, it is understandable that there is also a situation where the first center point and the second center point are on the same straight line in the vertical direction or the horizontal direction, for example, the horizontal coordinates of the first center point and the second center point are both -1, that is, at this time, the left or right of the second area can be determined as the position of the pop-up window. Exemplarily, the user's position preference for the pop-up window can also be obtained. For example, the user prefers the pop-up window to expand to the right. When the left or right of the second area can be determined as the position of the pop-up window, the terminal processor can read the user's position preference for the pop-up window, and use this as a basis for judgment to determine that the position of the pop-up window is located on the right of the second area, so as to better meet the user's usage needs.
[0133] Specifically, as an optional implementation, Figure 7 As shown, Figure 7 is a flow chart of loading a pop-up window provided by an embodiment of the present invention, after determining the position of the pop-up window according to the positional relationship between the first area and the second area, it also includes:
[0134] Step S400, obtaining a preset area size of the pop-up window;
[0135] Step S500: loading a pop-up window at the location of the pop-up window; wherein the distance between the boundary of the pop-up window and the boundary of the first area is greater than a second threshold.
[0136] In an embodiment of the present invention, after determining the position of the pop-up window, pop-up window information such as the preset area size and pop-up window style of the pop-up window can be further obtained, and the pop-up window can be loaded at the position of the pop-up window for display to the user.
[0137] For example, Figure 1As shown, the pop-up window information can be sent by the terminal through a pop-up window position selection instruction to the server, and the server queries the matching pop-up window in the background according to the pop-up window position selection instruction, and determines the pop-up window information such as the pop-up window preset area size and pop-up window style, and then packages the pop-up window information and sends it back to the terminal, which is uniformly allocated and processed by the terminal.
[0138] Of course, it should be noted that the above-mentioned method of obtaining pop-up information is only used for illustrative purposes and does not mean that the actual method of obtaining pop-up information is limited. It can be independently defined according to the actual usage scenario requirements. For example, the developer can pre-configure the preset pop-up template types and the pop-up information corresponding to the pop-up template types, and store them in the terminal at the same time. When the terminal responds to the pop-up position selection instruction at the target node, the terminal can also match it internally. If no matching pop-up template type is found, a query request is further initiated to the server, which can effectively shorten the time required to obtain the pop-up information and speed up the pop-up loading efficiency.
[0139] Further, a pop-up window is loaded at the position of the pop-up window, and the distance between the boundary of the pop-up window and the boundary of the first area is greater than the second threshold.
[0140] That is to say, there can be a certain pixel distance between the boundary of the pop-up area and the boundary of the first area, which can not only prevent the pop-up window from being too close to the edge of the screen or other UI elements, making the pop-up window content more clearly visible and not causing discomfort or reading difficulties due to sticking to the edge, but also reduce the possibility of users accidentally clicking outside the pop-up window or other irrelevant UI elements, and enhance visual comfort, effectively improve the display beauty of the pop-up window, and thus improve the user experience.
[0141] The pixel distance between the boundary of the pop-up window and the boundary of the first area is determined by the specific size of the second threshold and can be independently defined according to the actual usage scenario requirements.
[0142] For example, the second threshold may be set to 8 pixels. Then, after the pop-up window is loaded at the position of the pop-up window, the distance between any boundary of the pop-up window and the boundary of the first area is greater than 8 pixels.
[0143] Specifically, as an optional implementation, Figure 8 As shown, Figure 8 is another flowchart of loading a pop-up window provided by an embodiment of the present invention, after determining the position of the pop-up window according to the positional relationship between the first area and the second area, it also includes:
[0144] Step S600, obtaining a preset area size of the pop-up window;
[0145] Step S700: loading a pop-up window at the location of the pop-up window; wherein at least one boundary of the pop-up window is collinear with a boundary of the second area.
[0146] In an embodiment of the present invention, when a user triggers a pop-up window by clicking a button, at least one border in the loaded pop-up window will be collinear with the border of the clicked button, which can achieve visual symmetry and neatness, and also make it easier for users to trace the source of the triggering method of the pop-up window.
[0147] Exemplarily, the user triggers click button P1 and click button P2 in sequence, and the terminal responds to the pop-up window position selection instructions at the two target nodes, and finally determines the positions of pop-up window P1 and pop-up window P2 and loads them. After loading is complete, the left border of pop-up window P1 is collinear with the border of click button P1, and the right border of pop-up window P2 is collinear with the border of click button P2. The user can intuitively obtain that pop-up window P1 is generated by triggering click button P1, and pop-up window P2 is generated by triggering click button P2.
[0148] Specifically, as an optional implementation, the method further includes:
[0149] In the case where it is determined that the first area is the visible area of the application, determining a maximum display area in the visible area of the application;
[0150] Load the pop-up window in the maximum display area.
[0151] In the embodiment of the present invention, after determining that the main interface of the application is the first area, when determining the position of the pop-up window to load the pop-up window, the maximum display area can be further determined from the visible area of the application.
[0152] Exemplarily, in combination with the above embodiment, after further determining that the pop-up window is located at the lower right of the second area, the area to the right of the second area and the area below the second area may be further analyzed to select the area that maximizes the display of the pop-up window.
[0153] In actual applications, there are currently a variety of terminal devices available for users to choose from. Among them, terminal devices such as tablets and smart phones have small screens. In the case of small screens, if the screen space cannot be fully utilized, the display content after the pop-up window is loaded may need to be scrolled using a scroll bar. However, for example, when using a tablet computer, users usually use touch screen operations. If they use their fingers or a stylus to drag the scroll bar, there are often certain problems, which can easily bring a bad user experience.
[0154] Therefore, in combination with the above embodiments, not only can the pop-up window content be fully displayed, but also the design of the scroll bar can be reduced, the operability of the pop-up window can be improved, and the user experience can be improved.
[0155] Next, in conjunction with a specific application implementation process, the method for determining the position of a pop-up window provided in the present invention is described and explained in detail:
[0156] In an embodiment of the present invention, a method for determining a pop-up window position is provided. The method can be applied to various pop-up window position determination scenarios. The position of the pop-up window is determined by examining the relative position relationship between the center point of the interface and the center point of the target node. This method can simplify the algorithm calculation process, improve the efficiency of determining the pop-up window position, and help improve the user experience.
[0157] Specifically, when using various types of applications, the user will actively trigger the pop-up display function at the target node (such as various click buttons), and the terminal will respond to the pop-up position selection instruction at the target node to determine the current first area and second area. Among them, the first area is the visible area of the interface, and the second area is the target node area.
[0158] Furthermore, the interface visible area includes the screen interface visible area and the application visible area. The terminal can obtain the area size of the application visible area and the area size of the screen interface visible area, and compare the ratio of the area size of the application visible area to the area size of the screen interface visible area with a pre-set first threshold.
[0159] Among them, if the ratio is greater than the first threshold, it can be considered that the application occupies a larger proportion of the screen area, and the first area can be determined as the visible area of the application; if the ratio is less than or equal to the first threshold, it can be considered that the application is not the main window on the current screen, and the first area can be determined as the visible area of the screen interface.
[0160] Furthermore, the first center point of the first area and the second center point of the second area are confirmed. For example, when the first area is a rectangle, the horizontal and vertical coordinates of the four vertices of the rectangle can be confirmed and the horizontal and vertical coordinates of the first center point can be determined by taking the average.
[0161] For example, taking the second area as a circular area, you can select any diameter of the circular area, and determine the horizontal and vertical coordinates of the two endpoints of the diameter, and then determine the center point of these two points by taking the average, as the second center point of the second area; you can also select three points on the circle, and then determine the second center point of the second area by finding the intersection of the perpendicular bisectors of the three points.
[0162] Further, the position of the pop-up window is determined according to the positional relationship between the first center point and the second center point. The pop-up window matches the pop-up window position selection instruction. When the position of the pop-up window is determined according to the positional relationship between the first center point and the second center point, it can be based on the relative positional relationship between the first center point and the second center point in the vertical and horizontal directions. For example, if the second center point is determined to be located at the upper left of the first center point, it can be further confirmed that the second area is closer to the left and top of the first area, so it can be determined that the position of the pop-up window is located at the lower right of the second area. At this time, more space can be provided for subsequent pop-up window loading, and the size of the space on the right and bottom can be further screened, and the position that can maximize the display of the pop-up window can be selected as much as possible to improve the user experience of small-screen terminal users.
[0163] Therefore, the position of the pop-up window is determined by examining the relative position relationship between the two center points. In the algorithm process, this is reflected in judging the relative position relationship between "points" and "points". There is no need to examine the relative position relationship between the "points" and the four sides of the "rectangle" in related technologies, and the complexity of the problem will not be increased to the point where an operation of judging intersection is required. This can greatly simplify the algorithm process, improve the efficiency of determining the pop-up window position, and enhance the user experience.
[0164] Furthermore, after determining the position of the pop-up window, the pop-up window information such as the preset area size of the pop-up window can also be obtained. The terminal can send the pop-up window position selection instruction to the server, and the server queries the matching pop-up window according to the pop-up window position selection instruction in the background, and determines the pop-up window preset area size and pop-up window style and other pop-up window information, and then packages the pop-up window information and sends it back to the terminal. The developer can also pre-configure the preset pop-up window template type and the pop-up window information corresponding to the pop-up window template type, and store them in the terminal. When the terminal responds to the pop-up window position selection instruction at the target node, the terminal can also match it internally. If no matching pop-up window template type is found, a query request is further initiated to the server, which can effectively shorten the time required to obtain the pop-up window information and speed up the pop-up window loading efficiency.
[0165] Finally, a pop-up window is loaded at the location of the pop-up window, and the distance between the border of the pop-up window and the border of the first area can be set to be greater than the second threshold and at least one border of the pop-up window is in the same line as the border of the second area. Among them, the border of the pop-up window area and the border of the first area can be separated by a certain pixel distance, which can not only prevent the pop-up window from being too close to the edge of the screen or other UI elements, making the pop-up window content clearer and more visible, and will not cause discomfort or reading difficulties due to the edge, but also reduce the possibility of users accidentally clicking on the outside of the pop-up window or other irrelevant UI elements, and enhance visual comfort, effectively improve the display beauty of the pop-up window, and thus improve the user experience. In addition, it is understandable that at least one border in the loaded pop-up window will be in the same line as the border of the click button, which can achieve visual symmetry and neatness, and can also facilitate users to trace the source of the triggering method of the pop-up window.
[0166] See also Fig. 9 The embodiment of the present invention further provides a pop-up window position determination device 900, which can implement the above pop-up window position determination method, and the device includes:
[0167] The area determination module 910 is used to determine a first area and a second area in response to a pop-up window position selection instruction at a target node; wherein the first area is a visible area of the interface; and the second area is a target node area;
[0168] The position determination module 920 is used to determine the position of the pop-up window according to the positional relationship between the first center point and the second center point.
[0169] In an implementation of the embodiment of the present invention, the location determination module 920 is further configured to:
[0170] A vertical position relationship module, configured to determine a position relationship between the first center point and the second center point in a vertical direction;
[0171] A first vertical position determining module is configured to determine that the position of the pop-up window is below the second area when the second center point is above the first center point in the vertical direction;
[0172] The second vertical position determination module is configured to determine that the position of the pop-up window is above the second area when the second center point is below the first center point in the vertical direction.
[0173] In an implementation of the embodiment of the present invention, the location determination module 920 is further configured to:
[0174] a horizontal position relationship module, configured to determine a position relationship between the first center point and the second center point in a horizontal direction;
[0175] A first horizontal position determining module is configured to determine that the position of the pop-up window is located to the right of the second area when the second center point is located to the left of the first center point in the horizontal direction;
[0176] The second horizontal position determining module is configured to determine that the position of the pop-up window is located to the left of the second area when the second center point is located to the right of the first center point in the horizontal direction.
[0177] In an implementation of the embodiment of the present invention, the interface visible area includes a screen interface visible area and an application visible area, and the area determination module 910 is further configured to:
[0178] A first determination module is configured to determine that the first area is the application visible area when the ratio of the area size of the application visible area to the area size of the screen interface visible area is greater than a first threshold;
[0179] The second determination module is configured to determine that the first area is the visible area of the screen interface when the ratio of the area size of the visible area of the application to the area size of the visible area of the screen interface is less than or equal to a first threshold.
[0180] In an implementation manner of the embodiment of the present invention, the pop-up window position determination device further includes:
[0181] An area acquisition module is configured to acquire a preset area size of the pop-up window;
[0182] A pop-up window loading module is configured to load a pop-up window at the position of the pop-up window; wherein the distance between the boundary of the pop-up window and the boundary of the first area is greater than a second threshold.
[0183] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0184] Please refer to Fig.10 , Fig.10 The hardware structure of an electronic device provided by an embodiment of the present invention is illustrated, and the electronic device includes:
[0185] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention;
[0186] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other applications. When the technical solution provided in the embodiments of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the pop-up window position determination method of the embodiment of the present invention;
[0187] Input / output interface 1003, used to implement information input and output;
[0188] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0189] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );
[0190] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0191] The electronic device may be any type of stationary or mobile electronic device, including a mobile computer or mobile electronic device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable electronic device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary electronic device such as a desktop computer or a PC. The electronic device may also be a mobile or stationary server.
[0192] An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned pop-up window position determination method is implemented.
[0193] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0194] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0195] The embodiments of the present invention provide a method, device, electronic device and storage medium for determining the position of a pop-up window, which determines the position of the pop-up window by examining the relative position relationship between the visible area of the interface and the target node area. This can simplify the algorithm calculation process, improve the efficiency of determining the position of the pop-up window, and help improve the user experience.
[0196] The embodiments described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Those skilled in the art can appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.
[0197] Those skilled in the art will appreciate that the technical solutions shown in the figures do not limit the embodiments of the present invention and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0198] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0199] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0200] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0201] It should be understood that in the present invention, "at least one (item)" refers to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can represent: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0202] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0203] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0204] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0205] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including multiple instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store programs.
[0206] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the embodiments of the present invention is not limited thereby. Any modification, equivalent substitution and improvement made by those skilled in the art without departing from the scope and essence of the embodiments of the present invention shall be within the scope of the rights of the embodiments of the present invention.
Claims
1. A method for determining a pop-up window position, characterized in that: The method comprises the following steps: In response to a pop-up window position selection instruction at a target node, a first area and a second area are determined; wherein the first area is a visible area of the interface; and the second area is a target node area; The position of the pop-up window is determined according to the positional relationship between the first area and the second area.
2. The method for determining the position of a pop-up window according to claim 1, characterized in that: The determining the position of the pop-up window according to the positional relationship between the first area and the second area includes: Determining a first center point of the first area and a second center point of the second area; The position of the pop-up window is determined according to the positional relationship between the first center point and the second center point.
3. The method for determining the position of a pop-up window according to claim 2, characterized in that: The determining the position of the pop-up window according to the positional relationship between the first center point and the second center point includes: Determine a positional relationship between the first center point and the second center point in a vertical direction; When the second center point is located above the first center point in the vertical direction, it is determined that the position of the pop-up window is located below the second area. When the second center point is located below the first center point in the vertical direction, it is determined that the position of the pop-up window is located above the second area.
4. The method for determining the position of a pop-up window according to claim 2, characterized in that: The determining the position of the pop-up window according to the positional relationship between the first center point and the second center point includes: Determine a positional relationship between the first center point and the second center point in a horizontal direction; When the second center point is located to the left of the first center point in the horizontal direction, it is determined that the position of the pop-up window is located to the right of the second area. When the second center point is located to the right of the first center point in the horizontal direction, it is determined that the position of the pop-up window is located to the left of the second area.
5. The method for determining the position of a pop-up window according to claim 1, characterized in that: The interface visible area includes a screen interface visible area and an application visible area; When the ratio of the area size of the application visible area to the area size of the screen interface visible area is greater than a first threshold, the first area is determined to be the application visible area.
6. The method for determining the position of a pop-up window according to claim 5, characterized in that: When the ratio of the area size of the application visible area to the area size of the screen interface visible area is less than or equal to a first threshold, the first area is determined to be the screen interface visible area.
7. The method for determining the position of a pop-up window according to claim 1, characterized in that: After determining the position of the pop-up window according to the positional relationship between the first area and the second area, the method further includes: Obtaining a preset area size of the pop-up window; A pop-up window is loaded at the position of the pop-up window; wherein the distance between the boundary of the pop-up window and the boundary of the first area is greater than a second threshold.
8. The method for determining the position of a pop-up window according to claim 1, characterized in that: After determining the position of the pop-up window according to the positional relationship between the first area and the second area, the method further includes: Obtaining a preset area size of the pop-up window; A pop-up window is loaded at the position of the pop-up window; wherein at least one boundary of the pop-up window is colinear with a boundary of the second area.
9. The method for determining the position of a pop-up window according to claim 5, characterized in that: The method further comprises: In the case where it is determined that the first area is the visible area of the application, determining a maximum display area in the visible area of the application; Load the pop-up window in the maximum display area.
10. A pop-up window position determination device, characterized in that: The device comprises: An area determination module, configured to determine a first area and a second area in response to a pop-up window position selection instruction at a target node; wherein the first area is a visible area of the interface; and the second area is a target node area; The position determination module is used to determine the position of the pop-up window according to the positional relationship between the first area and the second area.
11. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the pop-up window position determination method according to any one of claims 1 to 9 when executing the computer program.
12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the pop-up window position determination method described in any one of claims 1 to 9 is implemented.