A method and apparatus for displaying a pop-up
By collecting the user's touch point location to determine the operation area and adjusting the pop-up window display position, the problem of the pop-up window display in smart products not adapting to the screen size and user palm size is solved, thereby improving the user operation experience.
Patent Information
- Application Number
- CN201911294787.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-16
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2039-12-16
AI Technical Summary
When displaying pop-up windows, existing smart products are unable to adaptively adjust the display position according to the screen size and the size of the user's palm, causing inconvenience to the user's operation and affecting the user experience.
By collecting the location of the user's touch point on the screen, the area suitable for user operation is determined, and the display position of the pop-up box is adjusted according to the area.
Improves user convenience and experience, ensuring that pop-up windows are displayed in areas that are easy for users to reach and avoid covering important operation areas.
Smart Images

Figure CN112987988B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for displaying a pop-up window. Background Art
[0002] Existing smart products, such as mobile phones, tablets, and iPads, all require touchscreen operation. However, screen sizes vary across different types and specifications, and users' hands vary in size, resulting in varying areas of interest. In particular, existing smart product applications often display pop-up notifications or reminders, often containing confirm or cancel buttons that require touchscreen operation. Therefore, the placement of these pop-up notifications significantly impacts the user experience.
[0003] Most applications in existing smart products use a default display position to display application pop-up windows, such as displaying them in the center of the screen or at the bottom of the screen. They cannot be adaptively adjusted according to the screen size of the smart product and the user's palm, which is inconvenient for user operation and poor user experience. Summary of the Invention
[0004] In view of this, the present invention provides a method and device for displaying a pop-up window, which can determine the operation area suitable for user operation or the operation frequently performed by the user by collecting the touch points on the screen of the smart product where the user uses the smart product, and then determine the pop-up window display position that is convenient for the user based on the operation area to improve the user experience.
[0005] To achieve the above object, according to a first aspect of the present invention, a method for displaying a pop-up window is provided, which is applied to a terminal and includes:
[0006] Get the position coordinates of one or more touch points when the user operates on the screen;
[0007] Determining an operation area suitable for the user to perform operations on the screen according to the position coordinates of the touch point;
[0008] The display position of the pop-up box is determined according to the operation area, so that the user can operate the displayed pop-up box.
[0009] Optionally, determining an operation area suitable for the user to perform an operation on the screen according to the position coordinates of the touch point includes:
[0010] Sending the acquired position coordinates of the one or more touch points to a server, so that the server determines an operation area suitable for the user to perform an operation on the screen according to the position coordinates of the touch points;
[0011] The operation area returned by the server according to the position coordinates of the touch point is received.
[0012] Optionally, it also includes:
[0013] Calculating the number of touch points corresponding to the same position coordinates, and determining a center point based on the position coordinates and the number of touch points;
[0014] According to the center point and the preset length, a circular operation area with the center point as the center and the preset length as the radius is obtained;
[0015] Determining whether a ratio of the number of the touch points covered by the circular operation area to the total number of the touch points is greater than a preset ratio;
[0016] If not, increasing the radius until the ratio of the number of touch points covered by the acquired circular operation area to the total number of touch points is greater than a preset ratio;
[0017] The display position of the pop-up window is determined according to the circular operation area.
[0018] Optionally, it also includes:
[0019] After obtaining a circular operating area with the center point as the center and the preset length as the radius according to the center point and the preset length, obtaining a rectangular operating area circumscribed to the circular operating area or inscribed in the center operating area;
[0020] Determining whether a ratio of the number of the touch points covered by the rectangular operation area to the total number of the touch points is greater than a preset ratio;
[0021] If not, increasing the radius until the ratio of the number of touch points covered by the acquired rectangular operation area to the total number of touch points is greater than a preset ratio;
[0022] A display position of the pop-up window is determined according to the rectangular operation area.
[0023] Optionally, it also includes:
[0024] Before obtaining the circular operating area, determining, based on the size of the screen, whether the distance from the center point to one or more boundaries of the screen is less than the radius;
[0025] If it is less than, then translate the center point until the distance from the translated center point to one or more boundaries of the screen is not less than the radius;
[0026] Obtain a circular operation area with the translated center point as the center and the radius as the radius.
[0027] Optionally, the display position of the pop-up window is determined based on the operation area and one or more of the following: the size of the screen, and the way the user uses the screen.
[0028] Optionally, the operation area is determined by the server according to the position coordinates of the touch points sent by one or more clients of the same model.
[0029] Optionally, the operation area is determined by the server according to the position coordinates of the touch points sent by one or more clients having the same screen size.
[0030] To achieve the above object, according to a second aspect of the present invention, a device for displaying a pop-up window is provided, which is applied to a client and includes: a position coordinate acquisition module, an operation area determination module, and a display position determination module; wherein,
[0031] The position coordinate acquisition module is used to acquire the position coordinates of one or more touch points when the user performs an operation on the screen;
[0032] The operation area determination module is used to determine an operation area suitable for the user to perform operations on the screen according to the position coordinates of the touch point;
[0033] The display position determination module is used to determine the display position of the pop-up box according to the operation area, so that the user can operate the displayed pop-up box.
[0034] Optionally, determining an operation area suitable for the user to perform an operation on the screen according to the position coordinates of the touch point includes:
[0035] Sending the acquired position coordinates of the one or more touch points to a server, so that the server determines an operation area suitable for the user to perform an operation on the screen according to the position coordinates of the touch points;
[0036] The operation area returned by the server according to the position coordinates of the touch point is received.
[0037] Optionally, the operation area determination module is further configured to calculate the number of touch points corresponding to the same position coordinates, and determine the center point according to the position coordinates and the number of touch points;
[0038] According to the center point and the preset length, a circular operation area with the center point as the center and the preset length as the radius is obtained;
[0039] Determining whether a ratio of the number of the touch points covered by the circular operation area to the total number of the touch points is greater than a preset ratio;
[0040] If not, increasing the radius until the ratio of the number of touch points covered by the acquired circular operation area to the total number of touch points is greater than a preset ratio;
[0041] The display position determination module is further configured to determine the display position of the pop-up window according to the circular operation area.
[0042] Optionally, the operation area determination module is further configured to, after obtaining a circular operation area with the center point as the center and the preset length as the radius based on the center point and the preset length, obtain a rectangular operation area circumscribed to the circular operation area or inscribed to the center operation area;
[0043] Determining whether a ratio of the number of the touch points covered by the rectangular operation area to the total number of the touch points is greater than a preset ratio;
[0044] If not, increasing the radius until the ratio of the number of touch points covered by the acquired rectangular operation area to the total number of touch points is greater than a preset ratio;
[0045] The display position determination module is further configured to determine the display position of the pop-up window according to the rectangular operation area.
[0046] Optionally, the operation area determination module is further configured to:
[0047] Before obtaining the circular operating area, determining, based on the size of the screen, whether the distance from the center point to one or more boundaries of the screen is less than the radius;
[0048] If it is less than, then translate the center point until the distance from the translated center point to one or more boundaries of the screen is not less than the radius;
[0049] Obtain a circular operation area with the translated center point as the center and the radius as the radius.
[0050] Optionally, the display position determination module is further configured to:
[0051] The display position of the pop-up window is determined according to the operation area and one or more of the following: the size of the screen, and the way the user uses the screen.
[0052] Optionally, the operation area is determined by the server according to the position coordinates of the touch points sent by one or more clients of the same model.
[0053] Optionally, the operation area is determined by the server according to the position coordinates of the touch points sent by one or more clients having the same screen size.
[0054] To achieve the above object, according to a third aspect of the present invention, a method for displaying a pop-up window is provided, which is applied to a server and includes:
[0055] Receive the position coordinates of one or more touch points of a user performing an operation on the screen sent by a client; determine an operation area suitable for the user to perform an operation on the screen according to the position coordinates of the touch points; and send the operation area to the client.
[0056] Optionally, the operation area is determined by the server according to the position coordinates of the touch points sent by one or more clients of the same model.
[0057] Optionally, the operation area is determined by the server according to the position coordinates of the touch points sent by one or more clients having the same screen size.
[0058] To achieve the above-mentioned purpose, according to the fourth aspect of the present invention, a server for displaying a pop-up box is provided, comprising: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods described in the above-mentioned method for displaying a pop-up box.
[0059] To achieve the above-mentioned purpose, according to a fifth aspect of the present invention, a computer-readable medium is provided, on which a computer program is stored, characterized in that when the program is executed by a processor, any of the methods described in the above-mentioned method of displaying a pop-up window is implemented.
[0060] The above invention has the following advantages or beneficial effects: by collecting the touch points where users frequently perform touch operations on the screen of smart products when using smart products, a personalized operation area suitable for user operations or where users frequently perform operations can be determined, and then the position of the pop-up window can be determined based on the user's own characteristics, that is, the operation area, so that the user can operate the pop-up window, thereby improving the user's operating experience.
[0061] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The accompanying drawings are provided for a better understanding of the present invention and are not intended to limit the present invention.
[0063] Figure 1 is a schematic diagram of the main process of the method for displaying a pop-up window according to the first embodiment of the present invention;
[0064] Figure 2is a schematic diagram of the main process of the method for displaying a pop-up window according to the second embodiment of the present invention;
[0065] Figure 3 is a schematic diagram of the main process of a method for displaying a pop-up window according to a third embodiment of the present invention;
[0066] Figure 4a This is a schematic diagram of the bullet box display position in the prior art;
[0067] Figure 4b is a schematic diagram of a circular operating area according to an embodiment of the present invention;
[0068] Figure 4c is a schematic diagram of a bullet box display position determined based on a circular operation area according to an embodiment of the present invention;
[0069] Figure 5 is a schematic diagram of the main process of a method for displaying a pop-up window according to a fourth embodiment of the present invention;
[0070] Figure 6a is a schematic diagram of a rectangular operating area according to an embodiment of the present invention;
[0071] Figure 6b is a schematic diagram of another rectangular operating area according to an embodiment of the present invention;
[0072] Figure 6c is a schematic diagram of determining a bullet box display position based on a rectangular operation area according to an embodiment of the present invention;
[0073] Figure 6d is a schematic diagram of a bullet box display position determined based on another rectangular operation area according to an embodiment of the present invention;
[0074] Figure 7 is a schematic diagram of main modules of a device for displaying a pop-up window according to an embodiment of the present invention;
[0075] Figure 8 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
[0076] Figure 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0077] The following description of exemplary embodiments of the present invention is made in conjunction with the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding. These details should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0078] Figure 1 FIG. 1 is a schematic diagram of the main process of the method for displaying a pop-up window according to the first embodiment of the present invention. Figure 1 As shown, the method for displaying a pop-up window may specifically include the following steps:
[0079] Step S101: Acquire the coordinates of one or more touch points when the user performs an operation on the screen. Specifically, the position on the screen when the user performs an operation such as clicking or sliding on the touch screen is acquired. Specifically, the coordinate origin may be the upper left corner of the screen, or the lower right corner, upper right corner, lower left corner, etc., and any vertically intersecting boundaries of the screen may be used as coordinate axes. The relative position coordinates (x, y) of the touch points are acquired, such as (200, 200).
[0080] Step S102, based on the position coordinates of the touch point, determines an operation area suitable for the user to operate on the screen. The determined operation area is the area on the screen that covers the touch point. This ensures that the determined operation area is an area frequently used by the user when operating on the screen or an area that is convenient for the user to use, so that the area suitable for the user to operate the pop-up box on the screen can be further determined based on the operation area. In addition, it is worth noting that the shape of the determined operation area can be determined according to actual needs or the method of determining the operation area, including but not limited to: rectangle, circle, triangle, polygon, irregular shape, etc.
[0081] In an optional embodiment, determining an operation area suitable for the user to perform operations on the screen based on the position coordinates of the touch points includes: sending the acquired position coordinates of one or more touch points to a server, so that the server determines an operation area suitable for the user to perform operations on the screen based on the position coordinates of the touch points; and receiving the operation area returned by the server based on the position coordinates of the touch points. In other words, the operation area can be calculated locally or calculated by uploading the position coordinates of the touch points to the server. It is understood that when the operation area is calculated by the server, the server can generate a customized operation area for each client user based on the position coordinates of the touch points uploaded by each client, or it can calculate the operation area suitable for the client in different dimensions based on the position coordinates of the touch points received from one or more clients and further taking into account the client type (e.g., mobile phone, iPad, etc.), the client model (e.g., mobile phone brand, etc.), and the screen size (e.g., 5.5 inches, 6.5 inches, etc.).
[0082] In an optional embodiment, the operation area is determined by the server based on the position coordinates of the touch points sent by one or more clients with the same screen size. Specifically, taking the client screen sizes of 5.5 inches and 6.5 inches as an example, after the server receives the position coordinates of the touch points sent by one or more clients with screen sizes of 5.5 inches or 6.5 inches, it classifies the position coordinates of the touch points according to the screen size of the sending client, and obtains two groups of position coordinates of touch points with screen sizes of 5.5 inches and 6.5 inches. On this basis, the operation area suitable for 5.5 inches and the operation area suitable for 6.5 inches are calculated respectively according to the position coordinates of the touch points. In this way, the touch point position coordinates sent by multiple clients can be used to enrich the data source, and the obtained operation area has a certain degree of scalability.
[0083] In an optional embodiment, the operation area is determined by the server based on the position coordinates of the touch points sent by one or more clients of the same model. Specifically, taking the client models of HW and XM as an example, after the server receives the position coordinates of the touch points sent by one or more clients of HW or XM model, it classifies the position coordinates of the touch points according to the client models sent, and obtains two groups of position coordinates of touch points of client models HW and XM. On this basis, the operation area applicable to HW and the operation area applicable to XM are calculated respectively according to the position coordinates of the touch points. In this way, the touch point position coordinates sent by multiple clients can be used to enrich the data source, and the obtained operation area has a certain degree of scalability.
[0084] In an optional embodiment, the number of touch points corresponding to the same position coordinates is calculated, and the center point is determined based on the position coordinates and the number of touch points; based on the center point and the preset length, a circular operation area with the center point as the center and the preset length as the radius is obtained; it is determined whether the ratio of the number of touch points covered by the circular operation area to the total number of touch points is greater than the preset ratio; if not, the radius is increased until the ratio of the number of touch points covered by the obtained circular operation area to the total number of touch points is greater than the preset ratio; based on the circular operation area, the display position of the pop-up box is determined.
[0085] Specifically, there are multiple ways to determine the center point based on the position coordinates and the number of touch points, such as directly selecting the position coordinates of the largest number of touch points as the position coordinates of the center point; or calculating the center point of all touch points based on the position coordinates of the touch points, such as if the position coordinates of the two touch points obtained are A(X1, Y1) and B(X2, Y2), then the calculated center point coordinates are C((X1+X2) / 2, (Y1+Y2) / 2); or calculating the weights of the touch points based on the number of touch points corresponding to the position coordinates, and obtaining the center point based on the weights, such as taking the position coordinates of the three touch points obtained as A(X1, Y1), B(X2, Y2), and B(X2, Y2) as an example, the weights corresponding to the position coordinates A(X1, Y1) and B(X2, Y2) are 1 / 3 and 2 / 3, respectively, then the calculated center point coordinates are C((X1 / 3+2X2 / 3), (Y1 / 3+2Y2 / 3)). The preset length can be any length set according to the actual screen size or the actual client model, such as 10px, 5px, 15px, 20px, 1mm, etc. The preset ratio can be any value within 0-100% set according to actual needs, such as 90%, 95%, etc. When the ratio of the number of touch points covered by the circular operation area to the total number of touch points is not greater than the preset ratio, when the radius needs to be increased, the radius length can be increased at equal intervals or at unequal intervals, such as increasing the radius from 10px to 20px, 30px, etc., or increasing the radius from 10px to 10px, 15px, 17px, etc. In addition, when determining the display position of the pop-up box based on the circular operation area, the pop-up box can be displayed in the middle of the circular operation area or in a position that partially overlaps or is distant from the circular operation area, depending on the actual situation.
[0086] Furthermore, after obtaining a circular operation area with the center point as the center and the preset length as the radius based on the center point and the preset length, obtain a rectangular operation area circumscribed to the circular operation area or inscribed in the center operation area; determine whether the ratio of the number of touch points covered by the rectangular operation area to the total number of touch points is greater than the preset ratio; if not, increase the radius until the ratio of the number of touch points covered by the obtained rectangular operation area to the total number of touch points is greater than the preset ratio; determine the display position of the pop-up box based on the rectangular operation area. Similarly, when determining the display position of the pop-up box based on the circular operation area, the pop-up box can be displayed in the middle of the circular operation area or at a position that partially overlaps or is distant from the circular operation area according to actual conditions.
[0087] On this basis, it also includes: before obtaining the circular operation area, judging whether the distance from the center point to one or more boundaries of the screen is less than the radius according to the size of the screen; if it is less, translating the center point until the distance from the translated center point to one or more boundaries of the screen is not less than the radius; obtaining a circular operation area with the translated center point as the center and the radius as the radius.
[0088] It is understandable that due to the limited size of the client screen and the uncertain position of the center point determined based on the collected touch point position on the screen, there may be a situation where the distance from the center point to the screen boundary is less than the radius, that is, the circular operation area obtained based on the current center point and radius cannot be fully displayed on the screen and is too close to the edge of the screen. In this case, the current center point can be translated left or right or up and down on the screen size according to actual conditions to obtain a new center point, so that the distance between the new center point and the screen boundary is not less than the radius, so that the obtained circular operation area can be fully displayed on the screen.
[0089] Step S103: determining a display position of the pop-up box according to the operation area, so that the user can operate the displayed pop-up box.
[0090] In an optional embodiment, the display position of the pop-up box is determined based on the operation area and one or more of the following: the size of the screen, the way the user uses the screen. That is to say, when determining the display position of the pop-up box based on a circular operation area, a rectangular operation area, etc., the pop-up box can be displayed in the middle of the operation area, or in a position that partially overlaps or is distant from the operation area, depending on the actual situation. In this way, the distance between the display position of the pop-up box and the operation area can be adjusted according to the user's habits and the way the screen is used, such as horizontal screen, vertical screen, etc., so that the user can conveniently operate the pop-up box and at the same time facilitate the user to perform other operations.
[0091] See also Figure 2 Based on the above embodiment, an embodiment of the present invention provides a method for displaying a pop-up window. The method may specifically include the following steps:
[0092] Step S201 : obtaining the position coordinates of one or more touch points when the user performs an operation on the screen.
[0093] In step S202, the position coordinates of the one or more touch points obtained are sent to the server, so that the server determines an operation area suitable for the user to perform operations on the screen based on the position coordinates of the touch points. It is understandable that when the operation area is calculated by the server, the server can generate a customized operation area for each client user based on the position coordinates of the touch points uploaded by each client, that is, a dedicated operation area for each client user, or it can calculate the operation area suitable for the client in different dimensions based on the position of the touch points uploaded by one or more clients, and further based on the client type (such as mobile phone, iPad, etc.), client model (such as mobile phone brand, etc.), screen size (such as 5.5 inches, 6.5 inches, etc.).
[0094] Step S203: Receive the operation area returned by the server based on the position coordinates of the touch point. The shape of the operation area can be determined according to actual needs or the method of determining the operation area, including but not limited to: rectangle, circle, triangle, polygon, irregular shape, etc.
[0095] Step S204, based on the operation area, determines the display position of the pop-up box so that the user can operate the displayed pop-up box. When determining the display position of the pop-up box based on the operation area, the pop-up box can be displayed in the middle of the operation area, or in a position that partially overlaps or is distant from the circular operation area, depending on the actual situation. In this way, the distance between the display position of the pop-up box and the operation area can be adjusted according to the user's habits and the way the screen is used, such as horizontal screen, vertical screen, etc., so that the user can conveniently operate the pop-up box and at the same time facilitate the user to perform other operations.
[0096] See also Figure 3 and Figure 4a 、 4b 4c. Based on the above embodiment, an embodiment of the present invention provides a method for displaying a pop-up window. The method may specifically include the following steps:
[0097] Step S301 : obtaining the position coordinates of one or more touch points when the user performs an operation on the screen.
[0098] Specifically, see Figure 4a In the prior art, the position at the top center of the screen is often used (such as Figure 4a 1), or in the center of the bottom of the screen (such as Figure 4a 2) Displaying a pop-up box. When a pop-up box is displayed in the center of the top of the screen, if the user is holding the phone with one hand, the center of the top of the screen is not within the reach of the user's finger, making it inconvenient for the user to operate, affecting the user experience. When a pop-up box is displayed in the center of the bottom of the screen, when the position where the user originally needed to operate is covered by the pop-up box, the user has to interrupt the original operation and process the pop-up box before continuing with the subsequent operation, which also affects the user experience. Therefore, it is considered to determine the operation area that is convenient for the user to operate by collecting the user's touch points, so that the display position of the pop-up box can be determined according to user needs to improve the user experience.
[0099] Step S302, calculate the number of touch points corresponding to the same position coordinates, and determine the center point based on the position coordinates and the number of touch points. It is understandable that the center point and the following operation area can be obtained by local calculation, or by uploading the position coordinates of the touch points to the server and calculating them through the server. It is understandable that in the case of calculating the operation area through the server, the server can generate a customized operation area for the client user based on the position coordinates of the touch points uploaded by each client, that is, for a dedicated person, or it can calculate the operation area suitable for the client in different dimensions based on the position of the touch points uploaded by one or more clients, and further based on the client type (such as mobile phone, iPad, etc.), client model (such as mobile phone brand, etc.), screen size specifications (such as 5.5 inches, 6.5 inches, etc.). Specifically, see Figure 4b , the center point position coordinates determined according to the touch point position coordinates and the maximum number of touch points are O(a,b).
[0100] Step S303: Based on the center point and the preset length, a circular operation area is obtained with the center point as the center and the preset length as the radius. It is worth noting that before obtaining the circular operation area, a determination is made based on the screen size to determine whether the distance from the center point to one or more screen boundaries is less than the radius. If so, the center point is translated until the distance from the translated center point to one or more screen boundaries is no less than the radius, and a circular operation area is obtained with the translated center point as the center and the radius as the radius.
[0101] Step S304 , determining whether the ratio of the number of the touch points covered by the circular operation area to the total number of the touch points is greater than a preset ratio.
[0102] Step S305: If not, increase the radius until the ratio of the number of touch points covered by the acquired circular operation area to the total number of touch points is greater than a preset ratio.
[0103] Step S306: Determine the display position of the pop-up window based on the circular operation area. When determining the display position of the pop-up window based on the circular operation area, the pop-up window can be displayed in the middle of the circular operation area or at a position partially overlapping or distant from the circular operation area.
[0104] Specifically, see Figure 4b , the center point determined according to the touch point position coordinates and the number of touch points is O(a, b), and the radius of the circular operation area whose ratio of the number of touch points covered to the total number of touch points is greater than the preset ratio is R. On this basis, see Figure 4c The display position of the pop-up box 3 determined according to the circular operation area makes the operation button (confirm or cancel) of the pop-up box 3 located in the area where the user frequently performs touch screen operations or close to the user's frequently used operation area, so that the user can easily confirm or cancel the pop-up box, avoiding the problem of being unreachable when displayed in the center of the upper part of the screen or affecting other operations when displayed in the center of the lower part of the screen, thereby improving the user experience.
[0105] See also Figure 5 and Figure 6a 、 6b , 6c, 6d. Based on the above embodiment, an embodiment of the present invention provides a method for displaying a pop-up window. The method may specifically include the following steps:
[0106] Step S501 : obtaining the position coordinates of one or more touch points when the user performs an operation on the screen.
[0107] Step S502: Calculate the number of touch points corresponding to the same position coordinates, and determine the center point based on the position coordinates and the number of touch points. Figure 6a or Figure 6b, the center point position coordinates determined based on the touch point position coordinates and the maximum number of touch points are O(a,b). It is understandable that the center point and the following operation area can be obtained by local calculation or by uploading the touch point position coordinates to the server and calculating them by the server. In the case of calculating the operation area by the server, the server can generate a customized operation area for the client user based on the position coordinates of the touch points uploaded by each client, that is, for a dedicated person, or it can calculate the operation area suitable for the client in different dimensions based on the position of the touch points uploaded by one or more clients, and further based on the client type (such as mobile phone, iPad, etc.), client model (such as mobile phone brand, etc.), screen size specifications (such as 5.5 inches, 6.5 inches, etc.).
[0108] Step S503: Based on the center point and the preset length, a circular operation area with the center point as the center and the preset length as the radius is obtained. Figure 6a or Figure 6b , the circular operating area determined by the center point position coordinates O(a, b) and the radius R is circle O. Thus, the rectangular operating area can be obtained by inscribing a rectangle or circumscribing a rectangle. It is understood that operating areas of other shapes can also be obtained by inscribing a polygon or circumscribing a polygon.
[0109] Step S504: Obtain a rectangular operation area that is circumscribed to the circular operation area or inscribed to the center operation area. Figure 6a The circumscribed rectangular operation area obtained based on the circular operation area is rectangle ABCD. This rectangular operation area is the area where users frequently operate on the screen; see Figure 6b The inscribed rectangular operation area obtained according to the circular operation area is rectangle EFGH, and the rectangular operation area is the area where the user frequently operates on the screen.
[0110] Step S505 , determining whether the ratio of the number of the touch points covered by the rectangular operation area to the total number of the touch points is greater than a preset ratio.
[0111] Step S506: If not, increase the radius until the ratio of the number of touch points covered by the acquired rectangular operation area to the total number of touch points is greater than a preset ratio.
[0112] Step S507, determining the display position of the pop-up box according to the rectangular operation area. Similarly, when determining the display position of the pop-up box according to the circular operation area, the pop-up box can be displayed in the middle of the circular operation area or at a position that partially overlaps or is distant from the circular operation area according to actual conditions. Figure 6cThe final determined circumscribed rectangular operation area is rectangle ABCD. The display position of the pop-up box 4 determined according to the rectangle ABCD is located in the area where the user frequently performs touch screen operations, making it easy for the user to confirm or cancel the pop-up box. This avoids the problem of being unreachable when displayed in the center of the upper part of the screen or affecting other operations when displayed in the center of the lower part of the screen, thereby improving the user experience. Figure 6d , taking the finally determined inscribed rectangular operation area as rectangle EFGH as an example for explanation, the display position of the pop-up box 5 determined according to the rectangle EFGH is located at the lower boundary of the area EFGH where the user frequently performs touch screen operations, so that the user can easily confirm or cancel the pop-up box, while avoiding affecting the user's other operations in the frequently used operation area, thereby improving the user experience.
[0113] See also Figure 7 Based on the above embodiment, a device 700 for displaying a pop-up window is provided, which is applied to a client and includes: a position coordinate acquisition module 701, an operation area determination module 702, and a display position determination module 703; wherein,
[0114] The position coordinate acquisition module 701 is used to acquire the position coordinates of one or more touch points when the user performs an operation on the screen;
[0115] The operation area determination module 702 is configured to determine an operation area suitable for the user to perform operations on the screen according to the position coordinates of the touch point;
[0116] The display position determination module 703 is configured to determine the display position of the pop-up box according to the operation area, so that the user can operate the displayed pop-up box.
[0117] In an optional implementation, determining, based on the position coordinates of the touch point, an operation area suitable for the user to perform an operation on the screen includes:
[0118] Sending the acquired position coordinates of the one or more touch points to a server, so that the server determines an operation area suitable for the user to perform an operation on the screen according to the position coordinates of the touch points;
[0119] The operation area returned by the server according to the position coordinates of the touch point is received.
[0120] In an optional implementation, the operation area determination module 702 is further configured to calculate the number of touch points corresponding to the same position coordinates, and determine the center point according to the position coordinates and the number of touch points;
[0121] According to the center point and the preset length, a circular operation area with the center point as the center and the preset length as the radius is obtained;
[0122] Determining whether a ratio of the number of the touch points covered by the circular operation area to the total number of the touch points is greater than a preset ratio;
[0123] If not, increasing the radius until the ratio of the number of touch points covered by the acquired circular operation area to the total number of touch points is greater than a preset ratio;
[0124] The display position determination module 703 is further configured to determine the display position of the pop-up window according to the circular operation area.
[0125] In an optional embodiment, the operation area determination module 702 is further configured to, after obtaining a circular operation area with the center point as the center and the preset length as the radius based on the center point and the preset length, obtain a rectangular operation area circumscribed in the circular operation area or inscribed in the center operation area;
[0126] Determining whether a ratio of the number of the touch points covered by the rectangular operation area to the total number of the touch points is greater than a preset ratio;
[0127] If not, increasing the radius until the ratio of the number of touch points covered by the acquired rectangular operation area to the total number of touch points is greater than a preset ratio;
[0128] The display position determination module 703 is further configured to determine the display position of the pop-up window according to the rectangular operation area.
[0129] In an optional implementation, the operation area determination module 702 is further configured to:
[0130] Before obtaining the circular operating area, determining, based on the size of the screen, whether the distance from the center point to one or more boundaries of the screen is less than the radius;
[0131] If it is less than, then translate the center point until the distance from the translated center point to one or more boundaries of the screen is not less than the radius;
[0132] Obtain a circular operation area with the translated center point as the center and the radius as the radius.
[0133] In an optional implementation, the display position determination module 703 is further configured to:
[0134] The display position of the pop-up window is determined according to the operation area and one or more of the following: the size of the screen, and the way the user uses the screen.
[0135] In an optional implementation, the operation area is determined by the server according to the position coordinates of the touch points sent by one or more clients of the same model.
[0136] In an optional implementation, the operation area is determined by the server according to the position coordinates of the touch points sent by one or more clients having the same screen size.
[0137] Based on the above embodiment, an embodiment of the present invention also provides another method for displaying a pop-up window, which is applied to a server, including: receiving the position coordinates of one or more touch points sent by a client when a user performs an operation on the screen; determining an operation area suitable for the user to perform an operation on the screen based on the position coordinates of the touch points; and sending the operation area to the client.
[0138] In an optional implementation, the operation area is determined by the server according to the position coordinates of the touch points sent by one or more clients of the same model.
[0139] In an optional implementation, the operation area is determined by the server according to the position coordinates of the touch points sent by one or more clients having the same screen size.
[0140] Figure 8 An exemplary system architecture 800 is shown to which the method or device for displaying a pop-up window according to an embodiment of the present invention may be applied.
[0141] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0142] Users can use terminal devices 801, 802, and 803 to interact with server 805 via network 804 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0143] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0144] Server 805 may be a server that provides various services, such as a backend management server that supports shopping websites browsed by users using terminal devices 801, 802, and 803. The backend management server may analyze and process received data such as product information query requests, and feed back the processing results to the terminal devices.
[0145] It should be noted that the method for displaying a pop-up window provided in the embodiment of the present invention is generally executed by the server 805 , and accordingly, the device for displaying a pop-up window is generally provided in the server 805 .
[0146] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0147] Reference below Figure 9 , which shows a schematic structural diagram of a computer system 900 of a terminal device suitable for implementing an embodiment of the present invention. Figure 9 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0148] like Figure 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage unit 908 into a random access memory (RAM) 903. Various programs and data required for the operation of the system 900 are also stored in the RAM 903. The CPU 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0149] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, and the like; an output section 907 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card or a modem. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 910 as needed, so that computer programs read therefrom can be installed into the storage section 908 as needed.
[0150] In particular, according to the embodiments disclosed in the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from a removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are performed.
[0151] It should be noted that the computer-readable medium described in the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.
[0152] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0153] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be provided in a processor. For example, they may be described as follows: a processor includes a position coordinate acquisition module, an operation area determination module, and a display position determination module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the position coordinate acquisition module is a module for acquiring the position coordinates of one or more touch points when a user operates on a screen.
[0154] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment, or may exist independently and not be incorporated into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to: obtain the position coordinates of one or more touch points when a user performs an operation on a screen; determine, based on the position coordinates of the touch points, an operation area suitable for the user to perform an operation on the screen; and determine, based on the operation area, a display position of the pop-up window, so that the user can operate the displayed pop-up window.
[0155] According to the technical solution of the embodiment of the present invention, by collecting the touch points where users frequently perform touch operations on the screen of smart products when using smart products, a personalized operation area suitable for user operations or where users frequently perform operations can be determined. Then, based on the user's own characteristics, that is, the operation area, the position of the pop-up window can be determined to facilitate the user to operate the pop-up window, thereby improving the user's operating experience.
[0156] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for displaying a pop-up window, characterized in that: Applied to terminals, including: Get the position coordinates of one or more touch points when the user operates on the screen; Determining, based on the position coordinates of the touch points, an operation area suitable for the user to perform operations on the screen; specifically, the steps include: calculating the number of touch points corresponding to the same position coordinates, and determining a center point based on the position coordinates and the number of touch points; obtaining, based on the center point and a preset length, a circular operation area with the center point as the center and the preset length as the radius; determining whether a ratio of the number of touch points covered by the circular operation area to the total number of touch points is greater than a preset ratio; if not, increasing the radius until the ratio of the number of touch points covered by the obtained circular operation area to the total number of touch points is greater than the preset ratio; Determining a display position of the pop-up box according to the circular operation area, so that the user can operate the displayed pop-up box; Among them, determining the center point based on the position coordinates and the number of touch points includes: directly selecting the position coordinates with the largest number of touch points as the position coordinates of the center point; or, calculating the center point of all touch points based on the position coordinates of the touch points; or, calculating the weight of the touch point based on the number of touch points corresponding to the position coordinates, and obtaining the center point based on the weight calculation.
2. The method for displaying a pop-up window according to claim 1, wherein: The determining, based on the position coordinates of the touch point, an operation area suitable for the user to perform an operation on the screen includes: Sending the acquired position coordinates of the one or more touch points to a server, so that the server determines an operation area suitable for the user to perform an operation on the screen according to the position coordinates of the touch points; The operation area returned by the server according to the position coordinates of the touch point is received.
3. The method for displaying a pop-up window according to claim 1, wherein: Also includes: After obtaining a circular operating area with the center point as the center and the preset length as the radius according to the center point and the preset length, obtaining a rectangular operating area circumscribed to the circular operating area or inscribed in the center operating area; Determining whether a ratio of the number of the touch points covered by the rectangular operation area to the total number of the touch points is greater than a preset ratio; If not, increasing the radius until the ratio of the number of touch points covered by the acquired rectangular operation area to the total number of touch points is greater than a preset ratio; A display position of the pop-up window is determined according to the rectangular operation area.
4. The method for displaying a pop-up window according to claim 1, wherein: Also includes: Before obtaining the circular operating area, determining, based on the size of the screen, whether the distance from the center point to one or more boundaries of the screen is less than the radius; If it is less than, then translate the center point until the distance from the translated center point to one or more boundaries of the screen is not less than the radius; Obtain a circular operation area with the translated center point as the center and the radius as the radius.
5. The method for displaying a pop-up window according to claim 1 or 2, wherein: The display position of the pop-up window is determined according to the operation area and one or more of the following: the size of the screen, and the way the user uses the screen.
6. The method for displaying a pop-up window according to claim 2, wherein: The operation area is determined by the server according to the position coordinates of the touch points sent by one or more clients of the same model.
7. The method for displaying a pop-up window according to claim 2, wherein: The operation area is determined by the server according to the position coordinates of the touch points sent by one or more clients having the same screen size.
8. A device for displaying a pop-up window, characterized in that: Applied to the client, including: location coordinate acquisition module, operation area determination module, display position determination module; among which, The position coordinate acquisition module is used to acquire the position coordinates of one or more touch points when the user performs an operation on the screen; The operation area determination module is configured to determine an operation area suitable for the user to perform operations on the screen based on the position coordinates of the touch points; specifically, to calculate the number of touch points corresponding to the same position coordinates, and determine a center point based on the position coordinates and the number of touch points; obtain, based on the center point and a preset length, a circular operation area with the center point as the center and the preset length as the radius; determine whether a ratio of the number of touch points covered by the circular operation area to the total number of touch points is greater than a preset ratio; if not, increase the radius until the ratio of the number of touch points covered by the obtained circular operation area to the total number of touch points is greater than the preset ratio; The display position determination module is used to determine the display position of the bullet box according to the circular operation area, so that the user can operate the displayed bullet box; Among them, the operation area determination module is also used to: directly select the position coordinates of the largest number of touch points as the position coordinates of the center point; or, calculate the center point of all touch points based on the position coordinates of the touch points; or, calculate the weight of the touch point based on the number of touch points corresponding to the position coordinates, and obtain the center point based on the weight calculation.
9. A method for displaying a pop-up window, characterized in that: Applicable to servers, including: Receive the position coordinates of one or more touch points sent by the client when the user performs an operation on the screen; Determining, based on the position coordinates of the touch points, an operation area suitable for the user to perform operations on the screen; specifically, the steps include: calculating the number of touch points corresponding to the same position coordinates, and determining a center point based on the position coordinates and the number of touch points; obtaining, based on the center point and a preset length, a circular operation area with the center point as the center and the preset length as the radius; determining whether a ratio of the number of touch points covered by the circular operation area to the total number of touch points is greater than a preset ratio; if not, increasing the radius until the ratio of the number of touch points covered by the obtained circular operation area to the total number of touch points is greater than the preset ratio; Sending the circular operation area to the client; Among them, determining the center point based on the position coordinates and the number of touch points includes: directly selecting the position coordinates with the largest number of touch points as the position coordinates of the center point; or, calculating the center point of all touch points based on the position coordinates of the touch points; or, calculating the weight of the touch point based on the number of touch points corresponding to the position coordinates, and obtaining the center point based on the weight calculation.
10. The method for displaying a pop-up window according to claim 9, wherein: The operation area is determined by the server according to the position coordinates of the touch points sent by one or more clients of the same model.
11. The method for displaying a pop-up window according to claim 9, wherein: The operation area is determined by the server according to the position coordinates of the touch points sent by one or more clients having the same screen size.
12. A server for displaying a pop-up window, characterized in that: include: one or more processors; a storage device for storing 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 method according to any one of claims 1 to 7.
13. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Terminal and centralized control area display method
CN103049210A
Display method of terminal function control key, terminal, and computer readable storage medium
CN107621914A
Recommended method, apparatus, equipment, and storage medium
CN109213413A
Information acquisition method and operating method for operating mobile terminal with one hand, and mobile terminal
WO2016090773A1