Method, apparatus, device, medium, and program product for determining a floating layer display position

文档序号:1968378 发布日期:2021-12-17 浏览:16次 中文

阅读说明:本技术 确定浮层显示位置的方法、装置、设备、介质及程序产品 (Method, apparatus, device, medium, and program product for determining a floating layer display position ) 是由 王依冉 于 2021-09-17 设计创作,主要内容包括:本申请提供一种确定浮层显示位置的方法、装置、设备、介质及程序产品,该方法包括:通过对图形用户界面进行网格化处理,得到多个子网格,获取每个子网格的内容分数,根据在图形用户界面上每次接收到的点击操作的触点位置,获取每个子网格的操作分数,根据每个子网格的内容分数和操作分数确定每个子网格的目标分数,根据每个子网格的目标分数及浮层的尺寸,确定目标网格,并将浮层显示在目标网格中。该技术方案中,通过获取每个子网格的目标分数,并结合浮层的尺寸对该浮层进行显示,有效的提高了确定浮层显示位置的效率和准确性。(The present application provides a method, apparatus, device, medium, and program product for determining a floating layer display position, the method comprising: the method comprises the steps of obtaining a plurality of sub-grids by carrying out gridding processing on a graphical user interface, obtaining a content score of each sub-grid, obtaining an operation score of each sub-grid according to a contact position of a click operation received on the graphical user interface at each time, determining a target score of each sub-grid according to the content score and the operation score of each sub-grid, determining a target grid according to the target score of each sub-grid and the size of a floating layer, and displaying the floating layer in the target grid. According to the technical scheme, the target fraction of each sub-grid is obtained, and the floating layer is displayed in combination with the size of the floating layer, so that the efficiency and the accuracy of determining the display position of the floating layer are effectively improved.)

1. A method for determining a position of a floating layer display, wherein a graphical user interface is provided through a terminal device, the method comprising:

carrying out gridding processing on the graphical user interface to obtain a plurality of sub-grids;

acquiring a content score of each sub-grid, wherein the content score is used for representing the information amount of the display content in the sub-grid;

acquiring an operation score of each sub-grid according to a contact point position of each received click operation on the graphical user interface, wherein the operation score is used for representing the possibility that the sub-grid is clicked;

determining a target score of each submesh according to the content score and the operation score of each submesh;

and determining a target grid according to the target fraction of each sub-grid and the size of the floating layer, and displaying the floating layer in the target grid, wherein the target grid is composed of at least one sub-grid, and the size of the target grid is larger than or equal to that of the floating layer.

2. The method of claim 1, wherein before obtaining the operation score for each subgrid based on the contact location of each received click operation on the graphical user interface, the method further comprises:

determining a score range for the operation score, the score range including a score maximum;

correspondingly, the obtaining an operation score of each sub-grid according to a contact point position of each received click operation on the graphical user interface includes:

for each sub-grid, if the contact point of the currently received click operation is located in the sub-grid, the operation score of the sub-grid is the maximum score;

and if the contact point of the currently received click operation is not located in the sub-grid, acquiring an operation score according to the number of contact points appearing in the sub-grid.

3. The method according to claim 1 or 2, characterized in that the method further comprises:

determining a hot zone region in the graphical user interface;

determining a hotspot score for each submesh based on the hotspot region;

correspondingly, the determining the target score of each submesh according to the content score and the operation score of each submesh comprises:

and according to the preset weight, performing weighted calculation on the content score, the operation score and the hotspot score of each submesh to obtain a target score of each submesh.

4. The method of claim 3, wherein determining the hotspot score for each submesh based on the hotspot regions comprises:

for each submesh, if the submesh is not in the hot zone region, determining that the hot zone score of the submesh is 0;

and if the submesh is in the hot zone area, determining the hot zone fraction of the submesh as a preset hot zone value.

5. The method of claim 4, wherein determining the target mesh based on the target score and the size of the float for each of the sub-meshes comprises:

if the size of the floating layer is smaller than or equal to that of the sub-grids, determining the grid with the minimum target score as the target grid;

if the size of the floating layer is larger than that of the sub-grids, combining at least two sub-grids to obtain a combined sub-grid, wherein the size of the combined sub-grid is larger than or equal to that of the floating layer;

and calculating a target combination score of each combined sub-grid, and determining the combined sub-grid with the minimum target combination score as the target grid.

6. The method of claim 5, further comprising:

updating the target score of each sub-grid according to the click operation received on the graphical user interface to obtain the updated target score;

and aiming at any sub-grid, if the difference value between the updated target score and the target score is greater than or equal to a preset difference value, acquiring the updated target grid according to the updated target score and the size of the floating layer of each sub-grid, and displaying the floating layer in the updated target grid.

7. The method of claim 1, wherein the content score of each sub-grid is determined based on at least one of a text feature, a picture feature, and a control size feature, the text feature including at least one of a text font size, a text color, and a text transparency.

8. An apparatus for determining a position of a floating layer display, wherein a graphical user interface is provided through a terminal device, the apparatus comprising:

the processing module is used for carrying out gridding processing on the graphical user interface to obtain a plurality of sub-grids;

the processing module is further configured to obtain a content score of each sub-grid, where the content score is used to indicate an information amount of content displayed in the sub-grid;

the processing module is further configured to obtain an operation score of each sub-grid according to a contact position of a click operation received on the graphical user interface each time, where the operation score is used to indicate a possibility that the sub-grid is clicked;

the processing module is further used for determining a target score of each submesh according to the content score and the operation score of each submesh;

the processing module is further configured to determine a target grid according to the target score of each sub-grid and the size of the floating layer, and display the floating layer in the target grid, where the target grid is composed of at least one sub-grid, and the size of the target grid is greater than or equal to the size of the floating layer.

9. An electronic device, comprising: a processor, a memory and computer program instructions stored on the memory and executable on the processor, wherein the processor, when executing the computer program instructions, is configured to implement a method of determining a position of a floating layer display as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium having computer-executable instructions stored thereon, which when executed by a processor, implement a method of determining a position of a floating layer display as claimed in any one of claims 1 to 7.

11. A computer program product comprising a computer program for implementing a method of determining a position of a floating layer display according to any one of claims 1 to 7 when the computer program is executed by a processor.

Technical Field

The present application relates to the field of game technologies, and in particular, to a method, an apparatus, a device, a medium, and a program product for determining a floating layer display position.

Background

Because the control occupies a large part of the area of the game interface, all information of game skills, character attributes or other aspects cannot be directly displayed in the game interface, and only part of key information can be displayed. When a user needs to be detailed for one of the key information during the game, the supplementary description information is usually shown in a floating layer form. However, when the floating layer covers the control (i.e., the floating layer is displayed on the upper layer of the control) or covers the key information, the user may lose important information, thereby affecting the operation and game experience of the user. It is therefore critical how to determine the display position of the floating layer.

In the prior art, the display position of the floating layer is determined mainly by obtaining a floating layer coordinate point corresponding to a prestored distribution situation according to the actual distribution situation of controls and keywords on a game interface in the game process, and displaying the floating layer according to the floating layer coordinate point.

However, in the prior art, since the worker needs to manually determine the position where the floating layer should appear according to the distribution conditions of the controls and the keywords in each game interface in advance, and store the coordinate point of the floating layer display position corresponding to each distribution condition, the efficiency and accuracy of determining the floating layer display position are low.

Disclosure of Invention

The application provides a method, a device, equipment, a medium and a program product for determining a floating layer display position, which aim to solve the problem that the efficiency and the accuracy for determining the floating layer display position are lower due to the fact that the position of a floating layer should appear needs to be manually judged in advance in the prior art.

In a first aspect, an embodiment of the present application provides a method for determining a floating layer display position, where a graphical user interface is provided by a terminal device, and the method includes:

carrying out gridding processing on the graphical user interface to obtain a plurality of sub-grids;

acquiring a content score of each sub-grid, wherein the content score is used for representing the information amount of the display content in the sub-grid;

acquiring an operation score of each sub-grid according to a contact point position of each received click operation on the graphical user interface, wherein the operation score is used for representing the possibility that the sub-grid is clicked;

determining a target score of each submesh according to the content score and the operation score of each submesh;

and determining a target grid according to the target fraction of each sub-grid and the size of the floating layer, and displaying the floating layer in the target grid, wherein the target grid is composed of at least one sub-grid, and the size of the target grid is larger than or equal to that of the floating layer.

In a possible design of the first aspect, before the obtaining the operation score of each submesh according to the touch point position of each received click operation on the graphical user interface, the method further includes:

determining a score range for the operation score, the score range including a score maximum;

correspondingly, the obtaining an operation score of each sub-grid according to a contact point position of each received click operation on the graphical user interface includes:

for each sub-grid, if the contact point of the currently received click operation is located in the sub-grid, the operation score of the sub-grid is the maximum score;

and if the contact point of the currently received click operation is not located in the sub-grid, acquiring an operation score according to the number of contact points appearing in the sub-grid.

In another possible design of the first aspect, the method further includes:

determining a hot zone region in the graphical user interface;

determining a hotspot score for each submesh based on the hotspot region;

correspondingly, the determining the target score of each submesh according to the content score and the operation score of each submesh comprises:

and according to the preset weight, performing weighted calculation on the content score, the operation score and the hotspot score of each submesh to obtain a target score of each submesh.

Optionally, the determining the hotspot score of each submesh according to the hotspot region includes:

for each submesh, if the submesh is not in the hot zone region, determining that the hot zone score of the submesh is 0;

and if the submesh is in the hot zone area, determining the hot zone fraction of the submesh as a preset hot zone value.

Optionally, determining the target mesh according to the target score of each sub-mesh and the size of the floating layer, including:

if the size of the floating layer is smaller than or equal to that of the sub-grids, determining the grid with the minimum target score as the target grid;

if the size of the floating layer is larger than that of the sub-grids, combining at least two sub-grids to obtain a combined sub-grid, wherein the size of the combined sub-grid is larger than or equal to that of the floating layer;

and calculating a target combination score of each combined sub-grid, and determining the combined sub-grid with the minimum target combination score as the target grid.

Optionally, the method further includes:

updating the target score of each sub-grid according to the click operation received on the graphical user interface to obtain the updated target score;

and aiming at any sub-grid, if the difference value between the updated target score and the target score is greater than or equal to a preset difference value, acquiring the updated target grid according to the updated target score and the size of the floating layer of each sub-grid, and displaying the floating layer in the updated target grid.

Optionally, the content score of each sub-grid is determined according to at least one of a word feature, a picture feature and a control size feature, wherein the word feature includes at least one of a text font size, a text color and a text transparency.

In a second aspect, an embodiment of the present application provides an apparatus for determining a floating layer display position, where a graphical user interface is provided by a terminal device, the apparatus includes:

the processing module is used for carrying out gridding processing on the graphical user interface to obtain a plurality of sub-grids;

the processing module is further configured to obtain a content score of each sub-grid, where the content score is used to indicate an information amount of content displayed in the sub-grid;

the processing module is further configured to obtain an operation score of each sub-grid according to a contact position of a click operation received on the graphical user interface each time, where the operation score is used to indicate a possibility that the sub-grid is clicked;

the processing module is further used for determining a target score of each submesh according to the content score and the operation score of each submesh;

the processing module is further configured to determine a target grid according to the target score of each sub-grid and the size of the floating layer, and display the floating layer in the target grid, where the target grid is composed of at least one sub-grid, and the size of the target grid is greater than or equal to the size of the floating layer.

In a possible design of the second aspect, before the obtaining the operation score of each submesh according to the touch point position of each received click operation on the graphical user interface, the processing module is further configured to:

determining a score range for the operation score, the score range including a score maximum;

correspondingly, the processing module is specifically configured to:

for each sub-grid, if the contact point of the currently received click operation is located in the sub-grid, the operation score of the sub-grid is the maximum score;

and if the contact point of the currently received click operation is not located in the sub-grid, acquiring an operation score according to the number of contact points appearing in the sub-grid.

In another possible design of the second aspect, the processing module is further configured to:

determining a hot zone region in the graphical user interface;

determining a hotspot score for each submesh based on the hotspot region;

correspondingly, the processing module is specifically configured to:

and according to the preset weight, performing weighted calculation on the content score, the operation score and the hotspot score of each submesh to obtain a target score of each submesh.

Optionally, the processing module is specifically configured to:

for each submesh, if the submesh is not in the hot zone region, determining that the hot zone score of the submesh is 0;

and if the submesh is in the hot zone area, determining the hot zone fraction of the submesh as a preset hot zone value.

Optionally, the processing module is specifically configured to:

if the size of the floating layer is smaller than or equal to that of the sub-grids, determining the grid with the minimum target score as the target grid;

if the size of the floating layer is larger than that of the sub-grids, combining at least two sub-grids to obtain a combined sub-grid, wherein the size of the combined sub-grid is larger than or equal to that of the floating layer;

and calculating a target combination score of each combined sub-grid, and determining the combined sub-grid with the minimum target combination score as the target grid.

Optionally, the processing module is specifically configured to:

updating the target score of each sub-grid according to the click operation received on the graphical user interface to obtain the updated target score;

for any sub-grid, if the difference value between the updated target score and the target score is greater than or equal to a preset difference value, acquiring the updated target grid according to the updated target score and the size of the floating layer of each sub-grid, and displaying the floating layer in the updated target grid

Optionally, the content score of each sub-grid is determined according to at least one of a word feature, a picture feature and a control size feature, wherein the word feature includes at least one of a text font size, a text color and a text transparency.

In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory and computer program instructions stored on the memory and executable on the processor for implementing the method of the first aspect and each possible design when the processor executes the computer program instructions.

In a fourth aspect, embodiments of the present application may provide a computer-readable storage medium having stored therein computer-executable instructions for implementing the method provided by the first aspect and each possible design when executed by a processor.

In a fifth aspect, embodiments of the present application provide a computer program product comprising a computer program that, when executed by a processor, is configured to implement the method provided by the first aspect and each possible design.

According to the method, the device, the equipment, the medium and the program product for determining the floating layer display position, a plurality of sub grids are obtained by carrying out gridding processing on a graphical user interface, the content score of each sub grid is obtained, the operation score of each sub grid is obtained according to the contact position of each received click operation on the graphical user interface, the target score of each sub grid is determined according to the content score and the operation score of each sub grid, the target grid is determined according to the target score of each sub grid and the size of the floating layer, and the floating layer is displayed in the target grid. By acquiring the target score of each sub-grid and combining the size of the floating layer to display the floating layer, the efficiency and the accuracy of determining the display position of the floating layer are effectively improved, and the labor cost is reduced. Under the condition that the content layout in the graphical user interface is the same, the display position of the personalized floating layer can be determined for the user according to the actual operation of the user, so that the game experience of the user is improved.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.

Fig. 1 is a schematic view of an application scenario of a method for determining a floating layer display position according to an embodiment of the present application;

fig. 2 is a schematic flowchart of a first embodiment of a method for determining a floating layer display position according to an embodiment of the present disclosure;

FIG. 3 is a schematic diagram of a graphical user interface after grid processing according to an embodiment of the present application;

FIG. 4 is a schematic diagram of a floating layer display position provided in an embodiment of the present application;

fig. 5 is a schematic flowchart of a second embodiment of a method for determining a floating layer display position according to the present application;

fig. 6 is a schematic flowchart of a third embodiment of a method for determining a floating layer display position according to the present application;

FIG. 7 is a schematic structural diagram of an apparatus for determining a floating layer display position according to an embodiment of the present disclosure;

fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.

With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein.

Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

Before introducing the embodiments of the present application, an application context of the embodiments of the present application is explained first:

in a Massive Multiplayer Online game (MMO), each control has a different function because the game interface contains a large number of controls. To distinguish the functionality of each control, text is typically displayed next to the control to indicate the name of the control or to illustrate the control. However, because the area of the game interface is limited, and the control occupies a large part of the area of the game interface, all information of game skills, character attributes or other aspects cannot be directly displayed in the game interface, and only part of key information can be displayed.

When a user needs to be detailed about one of the key information in the game process, the supplementary description information is usually shown in a floating layer form. For example, a user may long press a control in the game interface, and the terminal device displays a floating layer in the game interface in response to the user's operation, where a detailed description of the control is displayed in the floating layer.

However, when the floating layer covers the control (i.e., the floating layer is displayed on the upper layer of the control) or covers the key information, the user may lose important information, thereby affecting the operation and game experience of the user. It is therefore critical how to determine the display position of the floating layer.

In the prior art, there are two main ways to determine the display position of the floating layer:

1) the fixed display position of the floating layer is preset, and the display position of the floating layer is fixed under the condition that the game interface is changed. However, since the layout of the game interface is changed greatly as the progress of the game progresses, even if a rule is preset, the displayed floating layer may block important information.

2) And acquiring a prestored floating layer coordinate point corresponding to the distribution condition according to the actual distribution condition of the control and the keyword on the game interface in the game process, and displaying the floating layer according to the floating layer coordinate point. However, the staff needs to manually determine the position where the floating layer should appear in advance according to the distribution situation of each control and keyword in the game interface, and store the coordinate point of the display position of the floating layer corresponding to each distribution situation, which results in low efficiency and accuracy in obtaining the display position.

In view of the above problems, the inventive concept of the present application is as follows: in the process of determining the display position of the floating layer, the accuracy of the determined display position of the floating layer cannot be guaranteed in the manual processing process, so that the efficiency and the accuracy of determining the display position are low. Based on this, the inventor finds that if the game interface can be subjected to grid division in real time according to the distribution condition of the controls in the game interface, and the target score of each sub-grid is obtained, the target score is used for indicating the degree of the sub-grid which can be shielded by the floating layer, and the display position of the floating layer is obtained in real time according to the target score of each sub-grid, the problem that the efficiency and the accuracy of obtaining the display position in the prior art are low can be solved, and therefore the labor cost is saved.

The method for determining the floating layer display position in one embodiment of the disclosure can be operated on a local terminal device or a server. When the method for determining the position of the floating layer display runs on the server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system comprises the server and the client device.

In an optional embodiment, various cloud applications may be run under the cloud interaction system, for example: and (5) cloud games. Taking a cloud game as an example, a cloud game refers to a game mode based on cloud computing. In the cloud game operation mode, the game program operation main body and the game picture presentation main body are separated, the storage and the operation of the method for determining the floating layer display position are completed on the cloud game server, and the client device is used for receiving and sending data and presenting the game picture, for example, the client device can be a display device with a data transmission function close to a user side, such as a mobile terminal, a television, a computer, a palm computer and the like; but the cloud game server which performs information processing is a cloud. When a game is played, a player operates the client device to send an operation instruction to the cloud game server, the cloud game server runs the game according to the operation instruction, data such as game pictures and the like are encoded and compressed, the data are returned to the client device through a network, and finally the data are decoded through the client device and the game pictures are output.

In an optional implementation manner, taking a game as an example, the local terminal device stores a game program and is used for presenting a game screen. The local terminal device is used for interacting with the player through a graphical user interface, namely, a game program is downloaded and installed and operated through an electronic device conventionally. The manner in which the local terminal device provides the graphical user interface to the player may include a variety of ways, for example, it may be rendered for display on a display screen of the terminal or provided to the player through holographic projection. For example, the local terminal device may include a display screen for presenting a graphical user interface including a game screen and a processor for running the game, generating the graphical user interface, and controlling display of the graphical user interface on the display screen.

For example, the method for determining the position of the floating layer display provided by the embodiment of the present application may be applied to an application scenario diagram shown in fig. 1. Fig. 1 is a schematic view of an application scenario of a method for determining a floating layer display position according to an embodiment of the present application, so as to solve the above technical problem. As shown in fig. 1, the application scenario may include: at least one terminal device (such as terminal devices 11 and 12 in fig. 1) and a game server 13, wherein the terminal devices 11 and 12 are respectively connected with the game server 13 in a communication way. Each terminal device corresponds to a player, for example, terminal device 11 corresponds to player a, and terminal device 12 corresponds to player B. The player may hold a button on a graphical user interface (i.e., the game interface described above) on the terminal device, and the terminal device may display the floating layer in response to user manipulation by executing program code for a method of determining a display position of the floating layer.

Optionally, the terminal device may be a smart phone, or may also be a desktop computer or a tablet computer. The terminal device stores a game program and is used for presenting a game picture for interacting with a player through a graphical user interface, namely, the game program is downloaded and installed and operated through the terminal device conventionally. The manner in which the local terminal device provides the graphical user interface to the player may include a variety of ways, for example, it may be rendered for display on a display screen of the terminal or provided to the player through holographic projection. For example, the local terminal device may include a display screen for presenting a graphical user interface including a game screen and a processor for running the game, generating the graphical user interface, and controlling display of the graphical user interface on the display screen.

It should be noted that, the method for determining the floating layer display position shown in the following embodiments may be applied to a terminal device or a game server, and the application is not limited in any way. The terminal device may be the aforementioned local terminal device, and may also be the aforementioned cloud game client. The game server may be the aforementioned cloud game server.

The technical solution of the present application will be described in detail below with reference to specific examples.

It should be noted that the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

Fig. 2 is a schematic flowchart of a first embodiment of a method for determining a floating layer display position according to an embodiment of the present application, and a graphical user interface is provided by a terminal device. As shown in fig. 2, the method for determining the position of the floating layer display may include the steps of:

s101: and carrying out gridding processing on the graphical user interface to obtain a plurality of sub-grids.

In this step, in order to determine the display position of the floating layer in the graphical user interface, the graphical user interface may be subjected to gridding processing, so as to subsequently process each sub-grid, and determine whether the content included in the sub-grid can be blocked by the floating layer.

Wherein the grid density of the gridding process of the graphical user interface is related to the content volume of the graphical user interface. The amount of content of the graphical user interface includes: number of controls, control shape, number of words, size of words, color of words, etc. The larger the content amount of the graphical user interface is, the larger the grid density of the gridding processing is, and the larger the number of sub-grids obtained by the gridding processing is.

For example, fig. 3 is a schematic diagram of a graphical user interface after gridding processing according to an embodiment of the present application. As shown in fig. 3, the dotted line in the drawing is a dividing line for performing a gridding process on the graphical user interface, and the graphical user interface is divided into 12 × 7 sub-grids of 100 × 100 pixels in size by performing the gridding process on the graphical user interface.

S102: a content score is obtained for each subgrid.

In this step, after obtaining the plurality of sub-grids, the electronic device may identify a layout of each sub-grid, and obtain a content score of each sub-grid according to an amount of content in each sub-grid.

The content score is used for representing the information quantity of the display content in the sub-grid, and the larger the information quantity of the sub-grid is, the less the sub-grid can not be shielded by the floating layer. In other words, a larger amount of information for a sub-grid indicates that the sub-grid is less available for displaying a floating layer.

Wherein the content score of each sub-grid is determined based on at least one of a text feature, a picture feature, and a control size feature.

Wherein the text characteristics include at least one of a text font size, a text color, and a text transparency.

In a possible implementation manner, the electronic device may respectively obtain a text font score, a text color score, and a text transparency score corresponding to the grid according to a pre-stored mapping relationship between a text font size and a text font score, a pre-stored mapping relationship between a text color and a text color score, and a pre-stored mapping relationship between a text transparency and a text transparency score.

For example, the text font size and the text font size score may be in a direct relationship, and the larger the text font size, the higher the text font size score.

Illustratively, the text color is used to represent the importance of the text. For example, the common legends are black; the characters with higher importance and needing to be emphasized are red; after the game is updated, the newly added characters in the graphical user interface are purple. Therefore, the electronic equipment can preset the mapping relation between the text color and the text color score according to the importance degree of the characters, and the higher the importance degree of the characters is, the higher the character color score is. When each sub-grid is processed, the text color score corresponding to the sub-grid can be obtained according to the text color in the sub-grid.

Illustratively, since text transparency is used to represent the importance of a word, the lower the transparency of a word, the more important it is to represent the content of the word. Therefore, the mapping relation between the text transparency and the text transparency score can be preset, and the text transparency score is higher when the text transparency is lower.

In this implementation, the electronic device may further obtain the picture score and the control score according to the picture feature and the control size feature of the picture in the sub-grid. The electronic equipment can acquire the picture scores of the sub-grids according to the mapping relation between the content volume of the pictures and the picture scores; and acquiring the control score of the sub-grid according to the mapping relation between the control size and the control score.

For example, the picture characteristics in the sub-grid may be whether the picture needs to be replaced, whether the picture has a function, whether the picture needs to be moved, and the like.

Wherein, the content score can be represented by the formula: acquiring a content score which is a text word size score, a text color score, a text transparency score, a picture score and a control score; the content score may also be expressed by the formula: acquiring a content score which is a text font score, a text color score, a text transparency score, a picture score and a control score; the content score may also be expressed by the formula: the content score is obtained by multiplying the text font score by the text color score by the text transparency score by the picture score by the control score, and the content score may also be obtained by using other formulas, and an appropriate formula may be selected according to actual conditions to calculate the content score.

S103: and acquiring the operation score of each sub-grid according to the contact point position of each received click operation on the graphical user interface.

In this step, the user (i.e. the above-mentioned player) needs to continuously click the graphical user interface during the game, so as to obtain the services provided by the game. Therefore, the electronic device can obtain the operation score of each sub-grid according to the click operation received on the graphical user interface each time, so that the floating layer display position is determined through the operation score.

Wherein the operation score is used to represent the likelihood of the child grid being clicked.

In a particular implementation, the electronic device may predetermine a score range of the operation score, the score range including a score maximum. For each sub-grid, if the contact point of the currently received click operation is located in the sub-grid, the operation score of the sub-grid is the maximum score; and if the contact point of the currently received click operation is not positioned in the sub-grid, acquiring an operation score according to the number of contact points appearing in the sub-grid.

For example, the electronic device may obtain the frequency of occurrence of the touch points in the sub-grid, and obtain the operation score corresponding to the frequency of occurrence of the touch points in the grid according to the mapping relationship between the frequency of occurrence of the touch points and the operation score.

S104: a target score for each submesh is determined based on the content score and the operation score for each submesh.

In this step, after obtaining the content score and the operation score of each sub-grid, the electronic device may further process the content score and the operation score, so as to obtain a target score of each sub-grid, so that the target score can be used for displaying a floating layer when the sub-grid is subsequently determined according to the target score.

For example, the electronic device may set preset weights to the content score and the operation score in advance, according to the formula: and obtaining the target score of the sub-grid by taking the target score as the A content score + the B operation score. Wherein, A and B are respectively the preset weight of the content score and the operation score.

S105: and determining a target grid according to the target fraction of each sub-grid and the size of the floating layer, and displaying the floating layer in the target grid.

In this step, after the electronic device obtains the target score of each sub-grid, the position of the floating layer display can be determined according to the size of the floating layer to be displayed, and the floating layer display is displayed, so that the purposes of avoiding the important information being blocked and influencing the game operation of the user to the maximum extent can be achieved.

In one specific implementation, if the size of the floating layer is smaller than or equal to the size of the sub-grid, the grid with the smallest target score is determined as the target grid.

Further, if the size of the floating layer is larger than the size of the sub-grids, combining at least two sub-grids to obtain combined sub-grids, calculating a target combination score of each combined sub-grid, and determining the combined sub-grid with the minimum target combination score as the target grid.

And the size of the combined sub-grid is larger than or equal to that of the floating layer.

The target grid is composed of at least one sub-grid, and the size of the target grid is larger than or equal to that of the floating layer.

For example, fig. 4 is a schematic diagram of a floating layer display position provided in an embodiment of the present application. As shown in fig. 4, the dark square is a floating layer of which the display position is to be determined, and the description will be given by taking the sub-grid size as 100 pixels × 100 pixels and the floating layer size as 150 pixels × 150 pixels as an example. Because the size of the floating layer is larger than that of the sub-grids, the electronic equipment combines the sub-grids without changing the distribution of the original sub-grids to obtain combined sub-grids, and each combined sub-grid comprises 2 multiplied by 2 sub-grids. Further, the target scores of each sub-grid in each combined sub-grid are summed, so that the sum result is used as the target combined score of the combined sub-grid. Then, the electronic device determines the combined sub-grid with the minimum target combination score as a target grid, and displays the floating layer in the target grid.

Optionally, displaying the floating layer also requires avoiding the edge area of the graphical user interface.

According to the method for determining the floating layer display position, the graphical user interface is subjected to gridding processing to obtain a plurality of sub grids, the content score of each sub grid is obtained, the operation score of each sub grid is obtained according to the touch point position of the click operation received on the graphical user interface each time, the target score of each sub grid is determined according to the content score and the operation score of each sub grid, the target grid is determined according to the target score of each sub grid and the size of the floating layer, and the floating layer is displayed in the target grid. By acquiring the target score of each sub-grid and combining the size of the floating layer to display the floating layer, the efficiency and the accuracy of determining the display position of the floating layer are effectively improved, and the labor cost is reduced. Under the condition that the content layout in the graphical user interface is the same, the display position of the personalized floating layer can be determined for the user according to the actual operation of the user, so that the game experience of the user is improved.

On the basis of any of the above embodiments, fig. 5 is a flowchart illustrating a second embodiment of a method for determining a floating layer display position according to the embodiment of the present application. As shown in fig. 5, the method for determining the position of the floating layer display may include the steps of:

s201: hot zone regions are determined in a graphical user interface.

In this step, since some areas exist in the graphical user interface and may be frequently clicked by the user, the electronic device needs to determine the areas so as to further process the areas, thereby improving the accuracy of determining the position of the floating layer display.

For example, for a game running in a smartphone or tablet computer, the lower left corner of the graphical user interface is typically provided with a movement area in which a user can control the movement of the virtual character through a rocker control. The lower right corner of the graphical user interface is generally provided with a skill release area, and a user can click on a plurality of skill controls in the skill release area so as to control the virtual character to perform skill release. The electronic device may determine the movement zone and the skill release zone as hot zone zones.

S202: based on the hotspot regions, a hotspot score is determined for each submesh.

In this step, after determining the hotspot region, the electronic device may determine the hotspot score of each grid, so as to obtain a target score of each grid according to the hotspot score of each grid, and determine the floating layer display position according to the target score.

In one implementation, for each submesh, if the submesh is not in a hot zone region, then the hot zone score for the submesh is determined to be 0. And if the submesh is in the hot zone area, determining the hot zone fraction of the submesh as a preset hot zone value.

In this embodiment, S104 may also be implemented by the following steps: and according to the preset weight, performing weighted calculation on the content score, the operation score and the hotspot score of each submesh to obtain a target score of each submesh.

For example, the electronic device may set preset weights to the content score, the operation score, and the hotspot score in advance, according to the formula: and obtaining the target score of the submesh by taking the target score as A content score, B operation score and C hotspot score. Where A, B and C are preset weights for the content score, the operation score and the hotspot score, respectively.

According to the method for determining the floating layer display position, the hot area is determined in the graphical user interface, and the hot area score of each sub-grid is determined according to the hot area, so that the accuracy of the floating layer display position is further improved, the condition that the floating layer is displayed to influence a user is avoided, and the game experience of the user is further improved.

In the actual game process, with the progress of the game, the layout of the controls and the text content in the graphical user interface changes due to the consideration of the interface aesthetics, the convenience of the user operation and the like, so that the electronic device needs to re-determine the display position of the floating layer according to the real-time layout of the graphical user interface and the actual operation of the user.

On the basis of any of the above embodiments, fig. 6 is a schematic flowchart of a third embodiment of a method for determining a floating layer display position according to the embodiment of the present application. As shown in fig. 6, the method for determining the floating layer display position may include the steps of:

s301: updating the target score of each sub-grid according to the click operation received on the graphical user interface, and acquiring the updated target score;

in this step, the user clicks the graphical user interface in the game process, and the layout of the content in the graphical user interface changes, so that the content scores and the operation scores of the sub-grids can be updated, and the display position of the floating layer is determined again according to the updated content scores and the updated operation scores.

S302: and aiming at any sub-grid, if the difference value between the updated target score and the target score is greater than or equal to a preset difference value, acquiring the updated target grid according to the updated target score and the size of the floating layer of each sub-grid, and displaying the floating layer in the updated target grid.

In this step, after the electronic device obtains the updated target score, the display position of the floating layer may be determined again according to the target score.

The electronic equipment can preset a preset difference value, and can avoid frequent change of the display position of the floating layer on the graphical user interface.

In the method for determining the floating layer display position provided in the embodiment of the application, the target score of each sub-grid is updated through the click operation received on the graphical user interface, the updated target score is obtained, and for any sub-grid, if the difference value between the updated target score and the target score is greater than or equal to the preset difference value, the updated target grid is obtained according to the updated target score and the size of the floating layer of each sub-grid, and the floating layer is displayed in the updated target grid. The method can dynamically adjust the floating layer display position according to the layout condition in the graphical user interface, and further improves the accuracy and efficiency of determining the floating layer display position

The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.

Fig. 7 is a schematic structural diagram of an apparatus for determining a floating layer display position according to an embodiment of the present application. As shown in fig. 7, the apparatus for determining a floating layer display position includes:

the processing module 71 is configured to perform meshing processing on the graphical user interface to obtain a plurality of sub-grids;

the processing module 71 is further configured to obtain a content score of each sub-grid, where the content score is used to indicate an information amount of the content displayed in the sub-grid;

the processing module 71 is further configured to obtain an operation score of each submesh according to a contact position of a click operation received on the graphical user interface each time, where the operation score is used to indicate a possibility that the submesh is clicked;

a processing module 71, further configured to determine a target score for each submesh according to the content score and the operation score of each submesh;

the processing module 71 is further configured to determine a target grid according to the target score of each sub-grid and the size of the floating layer, and display the floating layer in the target grid, where the target grid is composed of at least one sub-grid, and the size of the target grid is greater than or equal to the size of the floating layer.

In a possible design of the embodiment of the present application, before obtaining the operation score of each sub-grid according to the touch point position of each received click operation on the graphical user interface, the processing module 71 is further configured to:

determining a score range of the operation score, the score range including a score maximum;

correspondingly, the processing module 71 is specifically configured to:

for each sub-grid, if the contact point of the currently received click operation is located in the sub-grid, the operation score of the sub-grid is the maximum score;

and if the contact point of the currently received click operation is not positioned in the sub-grid, acquiring an operation score according to the number of contact points appearing in the sub-grid.

In another possible design of the embodiment of the present application, the processing module 71 is further configured to:

determining a hot zone region in a graphical user interface;

determining a hotspot score for each submesh based on the hotspot region;

correspondingly, the processing module 71 is specifically configured to:

according to the preset weight, the content score, the operation score and the hotspot score of each submesh are weighted and calculated to obtain the target score of each submesh

Optionally, the processing module 71 is specifically configured to:

for each submesh, if the submesh is not in the hot zone region, determining that the hot zone score of the submesh is 0;

and if the submesh is in the hot zone area, determining the hot zone fraction of the submesh as a preset hot zone value.

Optionally, the processing module 71 is specifically configured to:

if the size of the floating layer is smaller than or equal to that of the sub-grids, determining the grid with the minimum target score as a target grid;

if the size of the floating layer is larger than that of the sub-grids, combining at least two sub-grids to obtain combined sub-grids, wherein the size of the combined sub-grids is larger than or equal to that of the floating layer;

and calculating the target combination score of each combined sub-grid, and determining the combined sub-grid with the minimum target combination score as the target grid.

Optionally, the processing module 71 is specifically configured to:

updating the target score of each sub-grid according to the click operation received on the graphical user interface, and acquiring the updated target score;

for any sub-grid, if the difference value between the updated target score and the target score is greater than or equal to the preset difference value, the updated target grid is obtained according to the updated target score and the size of the floating layer of each sub-grid, and the floating layer is displayed in the updated target grid

Optionally, the content score of each sub-grid is determined according to at least one of a word feature, a picture feature and a control size feature, the word feature including at least one of a text font size, a text color and a text transparency.

The apparatus for determining a floating layer display position provided in the embodiment of the present application may be configured to execute the method for determining a floating layer display position in any of the embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.

It should be noted that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.

Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 8, the electronic device may include: a processor 81, a memory 82 and computer program instructions stored on the memory 82 and executable on the processor 81, the processor 81 when executing the computer program instructions implementing the method of determining a position of a floating layer display provided by any of the preceding embodiments.

Optionally, the electronic device may further include an interface for interacting with other devices.

Optionally, the above devices of the electronic device may be connected by a system bus.

The memory 82 may be a separate memory unit or a memory unit integrated into the processor. The number of processors is one or more.

It should be understood that the Processor 81 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor, or in a combination of the hardware and software modules in the processor.

The system bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus. The memory may include a Random Access Memory (RAM) and may also include a non-volatile memory (NVM), such as at least one disk memory.

All or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The aforementioned program may be stored in a readable memory. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid state disk, magnetic tape (magnetic tape), floppy disk (optical disc), and any combination thereof.

The electronic device provided in the embodiment of the present application may be configured to execute the method for determining a floating layer display position provided in any one of the above method embodiments, and the implementation principle and the technical effect are similar and are not described herein again.

The embodiment of the application provides a computer-readable storage medium, in which computer instructions are stored, and when the computer instructions are run on a computer, the computer is enabled to execute the method for determining the floating layer display position.

The computer readable storage medium may be any type of volatile or non-volatile storage device or combination thereof, such as static random access memory, electrically erasable programmable read only memory, magnetic storage, flash memory, magnetic or optical disk. Readable storage media can be any available media that can be accessed by a general purpose or special purpose computer.

Alternatively, a readable storage medium may be coupled to the processor such that the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the readable storage medium may also reside as discrete components in the apparatus.

Embodiments of the present application further provide a computer program product, which includes a computer program stored in a computer-readable storage medium, where the computer program can be read by at least one processor, and the at least one processor can implement the method for determining a position of a floating layer display when executing the computer program.

It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

21页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种准星显示方法、装置、终端及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类