CN117130716A - Interface display method and device - Google Patents

Interface display method and device Download PDF

Info

Publication number
CN117130716A
CN117130716A CN202311179659.3A CN202311179659A CN117130716A CN 117130716 A CN117130716 A CN 117130716A CN 202311179659 A CN202311179659 A CN 202311179659A CN 117130716 A CN117130716 A CN 117130716A
Authority
CN
China
Prior art keywords
user interface
image
interface
target
image blocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311179659.3A
Other languages
Chinese (zh)
Inventor
刘延兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Creative Beautiful Technology Co ltd
Original Assignee
Beijing Creative Beautiful Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Creative Beautiful Technology Co ltd filed Critical Beijing Creative Beautiful Technology Co ltd
Priority to CN202311179659.3A priority Critical patent/CN117130716A/en
Publication of CN117130716A publication Critical patent/CN117130716A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides an interface display method and device, wherein the method comprises the following steps: detecting a display instruction of a first user interface, and determining at least one target coordinate area in the first user interface, which has content change relative to a second user interface currently displayed by a display screen; determining a plurality of first image blocks corresponding to the cached second user interface and coordinate areas corresponding to the first image blocks; determining at least one target image block with overlapping coordinate areas and target coordinate areas in the first image blocks, and deleting each target image block; for each target image block, performing image rendering on a coordinate area corresponding to the target image block by utilizing a scene tree of the first user interface to obtain a rendered updated image block; and displaying an image of the first user interface to a display screen based on the remaining first image blocks of the plurality of first image blocks and each updated image block. The scheme of the application can reduce the resources consumed by rendering and displaying the user interface designed by the user.

Description

Interface display method and device
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an interface display method and apparatus.
Background
In the process of designing a software user interface by a user using an interface, the user interface designed by the user needs to be frequently adjusted. In order to timely understand the effect of the currently designed user interface, after the user adjusts the user interface, the user interface needs to be re-rendered so as to present the user interface after the user adjustment.
However, the layers in the user interface and the relationships between the elements in the layers are complex, so that each re-rendering of the user interface necessarily requires more resources.
Disclosure of Invention
The application provides an interface display method and device, which are used for reducing resources required to be consumed for rendering and displaying a user interface designed by a user in the process of the user interface.
In one aspect, the present application further provides an interface display method, including:
detecting a display instruction of a first user interface, and determining at least one target coordinate area in the first user interface, wherein the at least one target coordinate area has content change relative to a second user interface currently displayed by a display screen;
determining a plurality of first image blocks corresponding to the second user interface and coordinate areas corresponding to the first image blocks, wherein the first image blocks are a plurality of image blocks which are distinguished by interface images in a display screen in the second user interface;
Determining at least one target image block with overlapping coordinate areas and target coordinate areas in the plurality of first image blocks, and deleting each target image block;
for each target image block, performing image rendering on a coordinate area corresponding to the target image block by utilizing a scene tree of the first user interface to obtain a rendered updated image block;
and displaying the image of the first user interface to the display screen based on the remaining first image blocks and each updated image block in the plurality of first image blocks.
In yet another possible implementation manner, after detecting the display instruction of the first user interface, the method further includes:
and if the display screen does not present the second user interface currently, rendering an interface image of the first user interface by utilizing the scene tree of the first user interface, and displaying the interface image of the first user interface on the display screen.
In yet another possible implementation manner, after the display screen displays the interface image of the first user interface, the method further includes:
dividing the rendered interface image of the first user interface into a plurality of second image blocks, and determining a coordinate area of each second image block in the first user interface;
And caching the information of the plurality of second image blocks corresponding to the first user interface and the coordinate area corresponding to each second image block.
In yet another possible implementation, after displaying the image of the first user interface to the display screen, the method further includes:
and caching the remaining first image blocks and each updated image block in the plurality of first image blocks into a plurality of second image blocks corresponding to the first user interface, so as to obtain a plurality of second image blocks corresponding to the first user interface and a coordinate area corresponding to each second image block.
In yet another possible implementation manner, after displaying the image of the first user interface to the display screen or displaying the interface image of the first user interface on the display screen, the method further includes:
detecting a zoom indication of the first user interface, determining a scale of the first user interface;
rendering a target interface image to be presented by a first user interface by utilizing a scene tree of the first user interface based on the scaling;
displaying a target interface image of the first user interface on a display screen;
deleting the information of a plurality of second image blocks corresponding to the cached first user interface and coordinate areas corresponding to the second image blocks;
Dividing a target interface image of the first user interface into a plurality of third image blocks, and determining a coordinate area of the third image blocks in the first user interface;
and caching the information of the plurality of third image blocks corresponding to the first user interface and the coordinate area corresponding to each third image block.
In yet another possible implementation, dividing the target interface image of the first user interface into a plurality of third image tiles includes:
determining the target size of the image block according to the scaling;
a target interface image of the first user interface is divided into a plurality of third image tiles of the target size.
In yet another possible implementation manner, the image rendering, using the scene tree of the first user interface, the coordinate area corresponding to the target image block includes:
and utilizing a scene tree of the first user interface, and carrying out image rendering on a coordinate area corresponding to the target image block by combining a super sampling antialiasing algorithm and an inter-frame antialiasing algorithm.
In still another aspect, the present application also provides an interface display device, including:
the change determining unit is used for detecting a display instruction of a first user interface and determining at least one target coordinate area with content change in a second user interface which is currently displayed relative to a display screen in the first user interface;
The block determining unit is used for determining a plurality of first image blocks corresponding to the second user interface and coordinate areas corresponding to the first image blocks, wherein the first image blocks are a plurality of image blocks which are distinguished by interface images in a display screen in the second user interface;
a block processing unit, configured to determine at least one target image block in which there is an overlap between a coordinate area and the target coordinate area in the plurality of first image blocks, and delete each target image block;
the block rendering unit is used for performing image rendering on the coordinate area corresponding to each target image block by utilizing the scene tree of the first user interface to obtain a rendered updated image block;
and the interface display unit is used for displaying the image of the first user interface to the display screen based on the remaining first image blocks and each updated image block in the plurality of first image blocks.
In yet another possible implementation manner, the method further includes:
and the integral rendering unit is used for rendering the interface image of the first user interface by utilizing the scene tree of the first user interface and displaying the interface image of the first user interface on the display screen after detecting the display instruction of the first user interface if the display screen does not display the second user interface currently.
In yet another possible implementation, the apparatus further includes:
the block dividing unit is used for dividing the rendered interface image of the first user interface into a plurality of second image blocks after the interface display unit displays the interface image of the first user interface on the display screen, and determining a coordinate area of each second image block in the first user interface;
and the block caching unit is used for caching the plurality of second image blocks corresponding to the first user interface and the information of the coordinate area corresponding to each second image block.
As can be seen from the above, in the embodiment of the present application, the plurality of image blocks and the coordinate areas corresponding to the image blocks, which are defined by the interface images of the user interface displayed on the display screen, are cached. Based on the above, when the first user interface newly designed by the user needs to be displayed, the application determines at least one target coordinate area where the first user interface is different from the second user interface currently displayed by the display screen. Because the plurality of image blocks corresponding to the second user interface have each target image block with the coordinate area overlapped with the target coordinate area, namely, the image block with the image content change, the application only needs to combine the scene pair of the first user interface to carry out image rendering again on the coordinate areas corresponding to the target image blocks, and does not need to render all the first user interface, thereby realizing the image display of the first user interface, reducing the data volume required to display the first user interface and naturally reducing the resources required to render and display the first user interface.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only embodiments of the present application, and other drawings may be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of an interface display method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of another method for displaying an interface according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of an interface display method according to an embodiment of the present application for performing a zooming process on a displayed first user interface;
FIG. 4 is a schematic flow chart of another method for displaying an interface according to an embodiment of the present application;
FIGS. 5 and 6 are respectively diagrams illustrating different examples of an interface image region in a display screen presented by a user interface in accordance with an embodiment of the present application;
fig. 7 and 8 are exemplary diagrams showing two different cases of divided image blocks in the embodiment of the present application, respectively;
fig. 9 is a schematic diagram showing a composition structure of an interface display device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without any inventive effort, are intended to be within the scope of the application.
Fig. 1 is a schematic flow chart of an interface display method according to an embodiment of the present application, where the embodiment may be applied to a computer device, and interface design software for implementing user interface design may be run on the computer device, and through the interface design software, design, adjustment and display of a user interface may be implemented.
The method of the embodiment can comprise the following steps:
s101, detecting a display instruction of a first user interface, and determining at least one target coordinate area with content change in the first user interface relative to a second user interface currently displayed by a display screen.
The display instruction is used for indicating to display a first user interface in the display screen.
The first user interface is a user interface designed by a user based on interface design software. Any user interface mentioned in the present application may be any interface available for man-machine interaction, for example, the user interface may be a web page designed by a user, an application interface or other forms of user interfaces, which are not limited.
It will be appreciated that in the process of designing a user interface by a user using a computer device, the user may obtain a new user interface by designing a new user interface or performing interface adjustment based on the designed user interface. To view the interface display effect of the new user interface, the user may implement input of a display instruction by clicking a designated key or by a specific operation to trigger the user interface to be presented in the display interface by the display instruction.
In this embodiment, for convenience of distinction, the user interface to be displayed is referred to as a first user interface, and the user interface currently displayed by the display screen when the display instruction is received is referred to as a second user interface.
It will be appreciated that if a second user interface is already displayed on the display screen before a first user interface, it is explained that the first user interface is a user interface that has been adjusted on the basis of the second user interface.
The target coordinate area is a coordinate area corresponding to an interface area where the content of the first user interface changes relative to the content of the second user interface.
By means of which a location area in the first user interface, in which there is a content change relative to the second user interface, can be characterized. The coordinate systems used in the first user interface and the second user interface may be different, and accordingly, the coordinate systems corresponding to the target coordinate areas may be different. For example, when considering the image rendering process and calibrating the coordinate system of the image, the world coordinate system is generally used as a reference, so the target coordinate area is a target coordinate area under the world coordinate system, that is, in the step 101, it is required to determine that there is a content change of the first user interface relative to the second user interface.
There are many possibilities for determining the specific implementation of the target coordinate area where the content of the first user interface changes relative to the second user interface in the present application, and this is not limited.
For example, prior to this step S101, the computer device may detect a design adjustment operation by the user on the second user interface, and may determine and store information of the layers and controls for which there is a change in the second user interface.
On the basis, when the first user interface is designed on the basis of the second user interface, information such as a control, a layer and the like which are associated with the first user interface and have changes can be obtained. On the basis, when the display instruction is detected, at least one target coordinate area where the content of the first user interface changes relative to the content of the second user interface can be determined based on the control of the first user interface and the information of the layers. For example, for each control with a change, the coordinate area corresponding to the control is determined as a coordinate area with a content change.
Of course, there may be other ways of determining the target coordinate region, as the application is not limited in this regard.
S102, determining a plurality of first image blocks corresponding to the cached second user interface and coordinate areas corresponding to the first image blocks.
The first image blocks are image blocks which are distinguished by interface images in the display screen in the second user interface. For convenience of distinction in the present application, the image block distinguished from the interface image of the second user interface is referred to as a first image block.
It will be appreciated that the interface image area within the display screen in the second user interface is the image area in the second user interface that is rendered into the display screen, and thus each first image tile is also a rendered image tile.
The coordinate area of the first image block is used to indicate the coordinate area of the first image block in the second user interface, for example, in the case of calibrating each pixel point in the second user interface by using the world coordinate system, the coordinate area of the first image block may be the coordinate area of the first image block in the world coordinate system.
In the application, the first image block refers to an image block which is divided from an interface image rendered by the image processor on the second user interface, and correspondingly, a plurality of first image blocks can be cached in a video memory space of the image processor.
It will be appreciated that a number of possibilities are possible for determining the specific manner in which the plurality of first image tiles are distinguished from the interface image of the second user interface. For example, when the second user interface is rendered and presented, the interface image area of the rendered second user interface may be divided, and the divided first image blocks may be cached. For another example, if the second user interface is designed and adjusted based on the third user interface, the second user interface corresponding to the plurality of first image tiles may also be obtained in combination with image tiles of the third user interface that are divided by the interface image area in the display screen. The application is not limited to the specific implementation manner of obtaining the plurality of image blocks corresponding to the second user interface.
S103, determining at least one target image block with overlapping coordinate areas and target coordinate areas in the first image blocks, and deleting each target image block.
It will be appreciated that the target coordinate area refers to an area where the first user interface has a content change relative to the second user interface, and thus, there is an image block where the coordinate area overlaps with the target coordinate area, that is, an image block in the second user interface where there is a content difference from the first user interface. Based on this, in order to be able to re-render the image blocks having differences when the first user interface is displayed, the image blocks having differences may be deleted here.
In the present application, for convenience of distinction, a first image block in which a coordinate area overlaps with a target coordinate area is referred to as a target image block.
And S104, for each target image block, performing image rendering on the coordinate area corresponding to the target image block by utilizing a scene tree of the first user interface to obtain a rendered updated image block.
It will be appreciated that the scene tree of the first user interface is one data structure for managing all elements in the first user interface. When the first user interface is designed, a scene tree of the first user interface is correspondingly determined and stored in the computer device through interface design software. Correspondingly, when the interface design software detects a display instruction of the first user interface, the interface design software can obtain a scene tree of the first user interface.
In the application, since the other coordinate areas except the coordinate areas corresponding to the target image blocks in the interface image area of the second user interface are completely the same as the corresponding coordinate areas of the first user interface, the application only needs to re-render the coordinate areas corresponding to the target image blocks, and does not need to render the coordinate areas corresponding to the first image blocks except the target image blocks.
The coordinate area corresponding to the rendering target image block based on the scene tree of the first user interface can adopt any current image rendering mode, and the application is not limited to the method.
In the present application, an image block obtained by rendering a coordinate area corresponding to a target image block is referred to as an update image block.
S105, displaying the image of the first user interface on a display screen based on the remaining first image blocks and each updated image block.
For example, the coordinate areas corresponding to the remaining first image blocks and the coordinate areas corresponding to the updated image blocks may be combined, and the remaining first image blocks and the updated image blocks may be spliced to obtain the rendered interface image corresponding to the spliced first user interface. Correspondingly, displaying the interface image of the first user interface to a display screen.
As can be seen from the above, in the embodiment of the present application, the plurality of image blocks and the coordinate areas corresponding to the image blocks, which are defined by the interface images of the user interface displayed on the display screen, are cached. Based on the above, when the first user interface newly designed by the user needs to be displayed, the application determines at least one target coordinate area where the first user interface is different from the second user interface currently displayed by the display screen. Because the plurality of image blocks corresponding to the second user interface have each target image block with the coordinate area overlapped with the target coordinate area, namely, the image block with the image content change, the application only needs to combine the scene pair of the first user interface to carry out image rendering again on the coordinate areas corresponding to the target image blocks, and does not need to render all the first user interface, thereby realizing the image display of the first user interface, reducing the data volume required to display the first user interface and naturally reducing the resources required to render and display the first user interface.
In addition, when the image of the first user interface is displayed, only part of the coordinate area is needed to be re-rendered, so that the rendering data volume is smaller, the time consumption required by rendering can be reduced, and the efficiency of rendering and presenting the first user interface is improved.
It will be appreciated that if the first user interface is not preceded by other user interfaces associated with the first user interface, that is, the first user interface is not designed or adjusted based on other user interfaces, then it is possible that the display screen is not currently presented with any other user interfaces upon detection of a display instruction for the first user interface. On the basis, the scene tree of the first user interface can be directly utilized to render the interface image of the first user interface, and the interface image of the first user interface is displayed on a display screen.
Furthermore, in order to reduce resources required for rendering and displaying other user interfaces when other user interfaces are obtained based on the first user interface design or adjustment, the application can also segment the interface image of the first user interface. The following is a description with reference to fig. 2.
Fig. 2 is a schematic flow chart of another interface display method of the present application, and the method of the present embodiment may be applied to a computer device. The method of the embodiment can comprise the following steps:
s201, a display instruction for triggering display of the first user interface is obtained.
S202, detecting whether a second user interface is currently displayed in the display screen, and if so, executing step S203; if not, step S208 is performed.
The second user interface is other than the first user interface.
S203, determining at least one target coordinate area with content change relative to the second user interface in the first user interface.
S204, determining at least one target image block with overlapping coordinate areas and target coordinate areas in the first image blocks, and deleting each target image block.
S205, for each target image block, performing image rendering on a coordinate area corresponding to the target image block by using a scene tree of the first user interface to obtain a rendered updated image block.
S206, displaying the image of the first user interface on the display screen based on the remaining first image blocks and each updated image block.
The above steps may be referred to the relevant description of the previous embodiments, and will not be repeated here.
And S207, caching the remaining first image blocks and the updated image blocks in the plurality of first image blocks into a plurality of second image blocks corresponding to the first user interface, so as to obtain a plurality of second image blocks corresponding to the first user interface and coordinate areas corresponding to each second image block.
It will be appreciated that, in order to display the image of the first user interface, the target image block in the second user interface, which is different from the first user interface, is deleted and the updated image blocks are re-rendered during the rendering process, so that the remaining first image blocks and updated image blocks in the plurality of first image blocks actually form the first user interface, and the remaining first image blocks and updated image blocks in the plurality of first image blocks are essentially the plurality of image blocks that the first user interface can divide in the interface image area in the display screen.
On the basis, in order to enable a user to generate a third user interface on the basis of the first user interface in a subsequent mode of adjusting the first user interface and the like, rendering and display of the third user interface can be achieved more efficiently and with less consumption of resources.
Accordingly, since the coordinate areas of the remaining first image blocks and the coordinate areas corresponding to the updated image blocks are known, after the image blocks are taken as the second image blocks, the coordinate areas corresponding to the second image blocks are also known and are also continuously cached.
It will be appreciated that in order to increase the efficiency of querying and obtaining the first image blocks and the second image blocks, an R-tree may be employed in the present application to store the aforementioned information of the first image blocks or the second image blocks and the associated coordinate areas. The R-tree refers to a storage mode of quick index, is a tree-shaped storage structure, is divided into a plurality of areas in space, and can improve the data query efficiency.
And S208, rendering an interface image of the first user interface by using the scene tree of the first user interface, and displaying the interface image of the first user interface on a display screen.
It can be understood that on the premise that the second user interface is not displayed on the display screen, the first user interface is possibly the first designed user interface for the user, and the image blocks divided after other user interfaces are rendered are not cached in the display card cache.
S209, dividing the rendered interface image of the first user interface into a plurality of second image blocks, and determining a coordinate area of each second image block in the first user interface.
For example, a target size of the image block to be divided may be set in advance, and then the interface image displayed in the display screen by the first user interface is divided into a plurality of image blocks, that is, the second image block. For example, the target size of each image block may be set to 256×256 pixels in advance, and then each divided second image block is an image block containing 256×256 pixels.
In an alternative manner, the application can also preset the sizes of the image blocks corresponding to different scaling ratios, correspondingly, determine the target size of dividing the image blocks in combination with the scaling ratio of the first user interface, and then divide the interface image of the first user interface into a plurality of second image blocks with the target size.
The purpose of the different scaling is to set the sizes of the different image blocks so that the sizes of the screen coordinate areas corresponding to the display screen of each image block are the same. For example, when the scaling is 100% (i.e. the interface is not scaled), then the size of the divided image block is 256×256 pixels; on the other hand, if the scaling is 200%, i.e. the size of the divided image blocks is 128×128 pixels when the interface is enlarged by 2 times, the size of the screen coordinate area of one image block corresponding to the display screen is fixed regardless of the scaling of the user interface.
It will be appreciated that the area of the image of the first user interface that can be presented on the display screen is related to the scale of the first user interface and the size of the image of the first user interface, and that the present application does not show how the portion of the image of the interface of the first user interface that needs to be presented on the display screen is determined.
Since no other user interface is displayed in the display when the first user interface is required to be displayed, the scaling of the first user interface is 100% by default.
S210, caching a plurality of second image blocks corresponding to the first user interface and information of a coordinate area corresponding to each second image block.
For example, the coordinate information of the plurality of second image blocks and the coordinate area associated with each image block is cached in the graphics card space.
It can be appreciated that in any of the above embodiments of the present application, after the first user interface is displayed, the user may zoom the first user interface as required, and since the interface image of the first user interface displayed in the display screen changes after zooming the first user interface, it is necessary to re-determine and render the interface image of the first user interface in combination with the zoom scale.
Referring to fig. 3, as shown in fig. 3, which shows a flow chart of zooming a displayed first user interface in the interface display method of the present application, the embodiment may include:
s301, detecting a scaling instruction of the first user interface, and determining a scaling ratio of the first user interface.
The zoom instruction may be generated based on a user's zoom operation trigger of the first user interface displayed in the display screen, or may be generated based on a user's selection operation of the zoom scale, which is not limited.
S302, rendering a target interface image to be presented by the first user interface by utilizing a scene tree of the first user interface based on the scaling.
It can be understood that after the first user interface displayed on the display screen is zoomed, the display content presented by each pixel point in the display screen is changed, based on this, after the zoom scale is detected, the interface area capable of being presented in the display screen in the first user interface needs to be redetermined, and all the interface areas to be displayed need to be rendered.
In the application, an interface image area which can be presented in a display screen in a first user interface is taken as a target interface image. Accordingly, the target interface image may be determined in conjunction with the scale and the entire target interface image rendered.
S303, displaying a target interface image of the first user interface on a display screen.
S304, deleting the cached information of the plurality of second image blocks corresponding to the first user interface and the coordinate areas corresponding to the second image blocks.
It can be understood that after the first user interface is zoomed, the cached second image blocks and the coordinate areas of the second image blocks cannot restore the interface image of the zoomed first user interface in the display screen, so that the application deletes the information of the second image blocks and the corresponding coordinate areas cached in the history.
S305, dividing the target interface image of the first user interface into a plurality of third image blocks, and determining a coordinate area of the third image blocks in the first user interface.
It will be appreciated that the target interface image is an interface image area presented after zooming the first user interface, and that the image block divided by the target interface image is referred to as a third image block in order to distinguish from the second image block obtained by dividing the interface image of the first user interface before zooming.
Similarly, the dividing the target interface image of the first user interface refers to dividing the rendered target interface image in the graphics card buffer space, where the specific dividing manner is as described above.
For example, in one possible implementation, the target size of the image block is determined in accordance with the scale indicated by the scale indication. Then, the target interface image of the first user interface is divided into a plurality of third image tiles of the target size.
And S306, caching the information of a plurality of third image blocks corresponding to the first user interface and the coordinate areas corresponding to the third image blocks.
It can be appreciated that, in order to load other user interfaces more efficiently later, after the first user interface is scaled, the present application also saves the information of the third image block and the corresponding coordinate area corresponding to the target interface image of the first user interface.
As can be seen from the foregoing embodiments, when a user interface is to be displayed, a plurality of image blocks divided from the historical user screen displayed on the current display screen can be obtained in a variety of ways.
For ease of understanding, an application scenario will be described below by taking as an example a scenario in which a computer device renders an interface image of a second user interface after rendering the entire second user interface. As shown in fig. 4, which is a schematic flow chart of an interface display method provided by an embodiment of the present application in an application scenario, the embodiment may include:
S401, displaying a second user interface on a display screen.
It will be appreciated that during the interface design process, the user may need to adjust the designed user interface and render the display multiple times, and thus, multiple user interface displays may be involved during the interface design process. The second user interface may be the first user interface designed and displayed by the user based on the interface design software, or may be any user interface designed and displayed by the user in the interface design process, which is not limited.
However, in this embodiment, the rendering and displaying of the second user interface are based on the scene tree of the second user interface, and are illustrated by rendering in a conventional manner.
If the second user interface is the first user interface designed by the user, a plurality of image blocks corresponding to other user interfaces do not necessarily exist in the cache, and at this time, the scaling of the displayed user interface may be 100%, so after determining that the interface image area to be presented in the display screen in the second user interface, the interface image area of the second user interface is rendered and displayed.
For another example, displaying the second user interface may be re-rendering and displaying the second user interface after detecting the zoom instruction of the second user interface, which may be similar to the specific processing procedure in the foregoing embodiment of fig. 3, and will not be described again.
S402, determining the scaling of the second user interface and an interface image area presented in the display screen in the second user interface.
The scale may characterize a multiple by which the second user interface is enlarged or reduced. For example, the second user interface has a scale of 100% indicating that the second user interface is not zoomed in or out; and the second user interface is scaled by 200%, this means that the second user interface is enlarged twice.
It will be appreciated that the size of the image area that the second user interface can present depends on the size of the display area of the display screen of the computer device and the set scale, so after the second user interface is displayed, there may be three situations in the second user interface in which the image area of the interface is within the display screen:
the first case is: the second user interface is the same as the display area of the display screen in size, so that the interface image area of the second user interface is a complete second user interface;
the second case is: the second user interface is smaller than the display area of the display screen, and then the interface image area of the second user interface is also the second user interface. As shown in fig. 5, the grid area is an interface image area of the second user interface, and it can be seen that the display screen can present the complete second user interface, and the interface image area of the second user interface does not completely cover the display area of the display screen.
The third case is: the second user interface is larger than the display area of the display screen, and then the interface image area of the second user interface is a partial area of the second user interface. As shown in fig. 6, the second user interface includes a complete triangle, but only a partial triangle is displayed in the display interface of fig. 6, so that the interface image area of the second user interface is an image presented by all display areas in the display screen, and the interface image area belongs to a partial area of the second user interface.
S403, dividing an interface image area in the second user interface cached by the display card into a plurality of image blocks, and caching the plurality of image blocks and world coordinate areas corresponding to the plurality of image blocks in combination with the scaling of the second user interface.
For example, different sizes of the segmented image blocks corresponding to different scales may be preconfigured, and the image segmentation sizes corresponding to the different scales are different, that is, the target sizes of the image blocks are different. As shown in fig. 7, the target size of the image block is 256×256 when the scaling ratio is 100%, and 128×128 when the scaling ratio is 200%, as shown in fig. 8. Correspondingly, dividing the interface image area of the second user interface according to the target size corresponding to the scaling of the second user interface to obtain a plurality of divided image blocks.
For example, the plurality of tiles may be stored in the form of an R-tree to increase the efficiency of subsequent acquisition of tiles.
S404, determining and storing at least one target world coordinate area with content change in the second user interface based on the interface adjustment operation of the second user interface by the user.
It should be understood that, here, when the user adjusts the second user interface, the determining and storing the target world coordinate area where the content changes is illustrated as an example, and in practical application, the changing control and the identifier of the layer may also be stored, so that the target world coordinate area where the content changes exists in the second user interface is determined based on the changing control and the layer.
It can be understood that, during the process of adjusting the second user interface, the information of the coordinate area where the content changes is continuously recorded, and when the first user interface is finally adjusted, at least one target world coordinate area where the content changes in the first user interface relative to the second user interface can be obtained.
S405, obtaining a first user interface obtained by adjusting a second user interface, and obtaining a scene tree corresponding to the first user interface.
And S406, when a display instruction for displaying the first user interface is detected, determining at least one target image block with the corresponding world coordinate area overlapping with the at least one target world coordinate area from the cached multiple image blocks, and deleting the cached at least one target image block.
It can be understood that, in the case where the second user interface is displayed on the display screen, if the user needs to display the first user interface that is obtained by adjusting the user based on the second user interface, the scaling of the default first user interface is the scaling that is currently corresponding to the second user interface, so that the world coordinate area that can be presented in the display screen in the first user interface is the same as the world coordinate area that is corresponding to the interface image area that is currently presented in the display screen by the second user interface.
S407, for each deleted target image block, performing image rendering on the world coordinate area corresponding to the target image block based on the scene tree of the first user interface to obtain a rendered updated image block.
And S408, based on the world coordinate area corresponding to each updated image block and the coordinate area of each image block remained in the cached plurality of image blocks, splicing each updated image block with each image block remained in the cache, and outputting the spliced interface image of the second user interface to the display screen.
It can be understood that in the above embodiment of the present application, after the image rendering is performed on the coordinate area corresponding to the target image block, there may be a situation that the updated image block is jagged, so as to reduce a situation that the edge of the updated image block is jagged.
For example, for each target image block, a scene tree of the first user interface may be utilized, a coordinate region corresponding to the target image block may be rendered in combination with a supersampling antialiasing algorithm, and then a TAA algorithm may be utilized to draw the coordinate region corresponding to the target image block multiple times, so as to reduce aliasing.
Taking 256×256 pixels per image block as an example, the image block 256×256 may be enlarged 2 times and drawn onto a canvas 512×512, and then the image block 512×512 is reduced by half and buffered to complete SSAA antialiasing. However, there may still be significant aliasing after the 512×512 image block is reduced by half, and then multiple 512×512 image blocks may be drawn by cycling the previous operation, and then the reduced image blocks obtained by multiple times are combined after reducing the 512×512 image block by half to obtain the final rendered updated image block, so as to reduce the aliasing.
The application also provides an interface display device corresponding to the interface display method.
As shown in fig. 9, which is a schematic diagram illustrating a composition structure of an interface display device according to an embodiment of the present application, the device of this embodiment may include:
the change determining unit 901 is configured to detect a display instruction of a first user interface, and determine at least one target coordinate area in the first user interface, where content changes relative to a second user interface currently displayed on a display screen;
a block determining unit 902, configured to determine a plurality of first image blocks corresponding to the second user interface and coordinate areas corresponding to the first image blocks, where the plurality of first image blocks are a plurality of image blocks that are distinguished from interface images in the second user interface and are located in a display screen;
a block processing unit 903, configured to determine at least one target image block in which there is an overlap between a coordinate area and the target coordinate area in the plurality of first image blocks, and delete each target image block;
a block rendering unit 904, configured to perform image rendering on a coordinate area corresponding to each target image block by using a scene tree of the first user interface, so as to obtain a rendered updated image block;
An interface display unit 905 is configured to display an image of the first user interface on the display screen based on the remaining first image blocks and each updated image block in the plurality of first image blocks.
In one possible implementation, the apparatus further includes:
and the integral rendering unit is used for rendering the interface image of the first user interface by utilizing the scene tree of the first user interface and displaying the interface image of the first user interface on the display screen after detecting the display instruction of the first user interface if the display screen does not display the second user interface currently.
In yet another possible implementation, the apparatus further includes:
the block dividing unit is used for dividing the rendered interface image of the first user interface into a plurality of second image blocks after the interface display unit displays the interface image of the first user interface on the display screen, and determining a coordinate area of each second image block in the first user interface;
and the block caching unit is used for caching the plurality of second image blocks corresponding to the first user interface and the information of the coordinate area corresponding to each second image block.
In yet another possible implementation, the apparatus further includes:
And the cache updating unit is used for caching the remaining first image blocks and each updated image block in the plurality of first image blocks into a plurality of second image blocks corresponding to the first user interface after the interface display unit displays the image of the first user interface to the display screen, so as to obtain a plurality of second image blocks corresponding to the first user interface and coordinate areas corresponding to each second image block.
In yet another possible implementation, the present application further includes:
a scale determining unit, configured to determine a scale of the first user interface after the interface display unit displays an image of the first user interface on the display screen or after the overall rendering unit displays an interface image of the first user interface on the display screen, by detecting a scale instruction of the first user interface;
a rendering processing unit, configured to render, based on the scaling, a target interface image to be presented by a first user interface using a scene tree of the first user interface;
the display processing unit is used for displaying a target interface image of the first user interface on a display screen;
the information deleting unit is used for deleting the cached information of the plurality of second image blocks corresponding to the first user interface and the coordinate areas corresponding to the second image blocks;
An image dividing unit, configured to divide a target interface image of the first user interface into a plurality of third image blocks, and determine a coordinate area of the third image blocks in the first user interface;
and the information caching unit is used for caching the information of the plurality of third image blocks corresponding to the first user interface and the coordinate area corresponding to each third image block.
It is to be understood that, in the present application, the terms "first," "second," "third," "fourth," and the like in the description and in the claims and the above figures, 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 may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in other sequences than those illustrated herein.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other. Meanwhile, the features described in the embodiments in the present specification may be replaced with or combined with each other to enable those skilled in the art to make or use the present application. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (10)

1. An interface display method, comprising:
detecting a display instruction of a first user interface, and determining at least one target coordinate area in the first user interface, wherein the at least one target coordinate area has content change relative to a second user interface currently displayed by a display screen;
determining a plurality of first image blocks corresponding to the second user interface and coordinate areas corresponding to the first image blocks, wherein the first image blocks are a plurality of image blocks which are distinguished by interface images in a display screen in the second user interface;
determining at least one target image block with overlapping coordinate areas and target coordinate areas in the plurality of first image blocks, and deleting each target image block;
for each target image block, performing image rendering on a coordinate area corresponding to the target image block by utilizing a scene tree of the first user interface to obtain a rendered updated image block;
And displaying the image of the first user interface to the display screen based on the remaining first image blocks and each updated image block in the plurality of first image blocks.
2. The method of claim 1, further comprising, upon detecting a display instruction of the first user interface:
and if the display screen does not present the second user interface currently, rendering an interface image of the first user interface by utilizing the scene tree of the first user interface, and displaying the interface image of the first user interface on the display screen.
3. The method of claim 2, further comprising, after displaying the interface image of the first user interface on a display screen:
dividing the rendered interface image of the first user interface into a plurality of second image blocks, and determining a coordinate area of each second image block in the first user interface;
and caching the information of the plurality of second image blocks corresponding to the first user interface and the coordinate area corresponding to each second image block.
4. The method of claim 1, further comprising, after displaying the image of the first user interface to the display screen:
And caching the remaining first image blocks and each updated image block in the plurality of first image blocks into a plurality of second image blocks corresponding to the first user interface, so as to obtain a plurality of second image blocks corresponding to the first user interface and a coordinate area corresponding to each second image block.
5. The method of claim 3 or 4, further comprising, after displaying the image of the first user interface to the display screen or displaying the interface image of the first user interface on the display screen:
detecting a zoom indication of the first user interface, determining a scale of the first user interface;
rendering a target interface image to be presented by a first user interface by utilizing a scene tree of the first user interface based on the scaling;
displaying a target interface image of the first user interface on a display screen;
deleting the information of a plurality of second image blocks corresponding to the cached first user interface and coordinate areas corresponding to the second image blocks;
dividing a target interface image of the first user interface into a plurality of third image blocks, and determining a coordinate area of the third image blocks in the first user interface;
And caching the information of the plurality of third image blocks corresponding to the first user interface and the coordinate area corresponding to each third image block.
6. The method of claim 5, wherein dividing the target interface image of the first user interface into a plurality of third image tiles comprises:
determining the target size of the image block according to the scaling;
a target interface image of the first user interface is divided into a plurality of third image tiles of the target size.
7. The method of claim 1, wherein the image rendering the coordinate area corresponding to the target image block using the scene tree of the first user interface comprises:
and utilizing a scene tree of the first user interface, and carrying out image rendering on a coordinate area corresponding to the target image block by combining a super sampling antialiasing algorithm and an inter-frame antialiasing algorithm.
8. An interface display device, comprising:
the change determining unit is used for detecting a display instruction of a first user interface and determining at least one target coordinate area with content change in a second user interface which is currently displayed relative to a display screen in the first user interface;
The block determining unit is used for determining a plurality of first image blocks corresponding to the second user interface and coordinate areas corresponding to the first image blocks, wherein the first image blocks are a plurality of image blocks which are distinguished by interface images in a display screen in the second user interface;
a block processing unit, configured to determine at least one target image block in which there is an overlap between a coordinate area and the target coordinate area in the plurality of first image blocks, and delete each target image block;
the block rendering unit is used for performing image rendering on the coordinate area corresponding to each target image block by utilizing the scene tree of the first user interface to obtain a rendered updated image block;
and the interface display unit is used for displaying the image of the first user interface to the display screen based on the remaining first image blocks and each updated image block in the plurality of first image blocks.
9. The apparatus as recited in claim 8, further comprising:
and the integral rendering unit is used for rendering the interface image of the first user interface by utilizing the scene tree of the first user interface and displaying the interface image of the first user interface on the display screen after detecting the display instruction of the first user interface if the display screen does not display the second user interface currently.
10. The apparatus as recited in claim 9, further comprising:
the block dividing unit is used for dividing the rendered interface image of the first user interface into a plurality of second image blocks after the interface display unit displays the interface image of the first user interface on the display screen, and determining a coordinate area of each second image block in the first user interface;
and the block caching unit is used for caching the plurality of second image blocks corresponding to the first user interface and the information of the coordinate area corresponding to each second image block.
CN202311179659.3A 2023-09-13 2023-09-13 Interface display method and device Pending CN117130716A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311179659.3A CN117130716A (en) 2023-09-13 2023-09-13 Interface display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311179659.3A CN117130716A (en) 2023-09-13 2023-09-13 Interface display method and device

Publications (1)

Publication Number Publication Date
CN117130716A true CN117130716A (en) 2023-11-28

Family

ID=88859947

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311179659.3A Pending CN117130716A (en) 2023-09-13 2023-09-13 Interface display method and device

Country Status (1)

Country Link
CN (1) CN117130716A (en)

Similar Documents

Publication Publication Date Title
JP3484096B2 (en) Logical zoom method in logical zoom device for directed graph
US20160267880A1 (en) Representation of overlapping visual entities
US9235925B2 (en) Virtual surface rendering
EP2859447B1 (en) Virtual surface allocation
US10043489B2 (en) Virtual surface blending and BLT operations
US9959668B2 (en) Virtual surface compaction
US9063630B2 (en) Single axis zoom
KR101953133B1 (en) Apparatus and method for rendering
US12073070B2 (en) Dynamic element control method, electronic device, and computer readable storage medium
JPH03266086A (en) Display method for graphic
JP3706740B2 (en) Apparatus and method for image display and data reading
CN117130716A (en) Interface display method and device
CN114612584B (en) Image processing method, device, equipment and storage medium
CN114710618A (en) Method and device for previewing spliced image and electronic equipment
CN114491309A (en) Picture processing method and device
CN113672831A (en) Hierarchical cutting and automatic index construction method based on raster image
JPH0981107A (en) Window display and control device
JPH11338456A (en) Map display system and image scroll processing method in it
JPH08123936A (en) Map graphic display processing method
CN116451420A (en) Immersive pipeline resource dynamic display method and system and electronic equipment
CN117971368A (en) Dynamic scaling display method for subway rail transit station map
CN116992175A (en) Page rendering method
JP3835287B2 (en) Bitmap data processing method, bitmap data processing method, and bitmap data processing program
CN113485623A (en) Image display method and device capable of realizing multi-dimensional comparison and terminal
CN117710404A (en) Image processing method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination