Display picture switching method and device, computer equipment and storage medium

By monitoring trigger conditions and updating the projection matrix and vertex data in augmented reality devices, the problem of unsmooth switching between 2D and 3D scenes in augmented reality glasses was solved, and smooth switching of scenes was achieved in the same rendering process.

CN120832050APending Publication Date: 2025-10-24ZHUHAI MOJIE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410460798.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-16
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

Existing technologies require interrupting the rendering process when switching between 2D and 3D images in augmented reality glasses, leading to increased resource consumption and problems such as rendering interruption and untimely image rendering, making it impossible to achieve smooth switching.

Method used

By monitoring preset trigger conditions, the projection matrix and vertex data of the target display screen are obtained, and the projection matrix and vertex data of the current screen are updated to the target projection matrix and vertex data. Based on this data, the screen is switched to avoid reloading rendering resources and setting rendering status.

Benefits of technology

This eliminates the need to reload resources and set states within the same rendering process, avoiding rendering interruptions and untimely resource loading, and improving the smoothness of screen transitions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120832050A_ABST
    Figure CN120832050A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and particularly discloses a display picture switching method and device, computer equipment and a storage medium. According to the method and the device, when the event meeting the preset triggering condition is monitored, the projection matrix and the vertex data corresponding to the current display picture are updated to the target projection matrix and the target vertex data corresponding to the target display picture; and switching between the 2D and 3D pictures is realized according to the target projection matrix and the target vertex data. The rendering resources do not need to be reloaded for each target display picture, and the rendering state does not need to be reset. The problems that the rendering process is interrupted, the resources are not loaded in time and picture rendering lags behind when the rendering resources are reloaded and the rendering state is reset are avoided, smooth switching of pictures is achieved, and the picture switching fluency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and in particular to a display picture switching method and device, a computer device and a storage medium. BACKGROUND

[0002] In augmented reality (such as AR (Augmented Reality)) glasses applications, smooth switching between 2D and 3D pictures is essential to provide a more rich and intuitive user experience. Currently, existing technologies mainly achieve switching by rendering 2D and 3D elements onto the screen separately. This technology needs to interrupt the picture rendering process when switching between 2D and 3D pictures, reload the rendering resources for the picture to be switched, and reset the rendering state. Then the picture is rendered according to the projection matrix and vertex data to achieve switching between 2D and 3D pictures. This increases resource consumption and can cause the rendering process to be interrupted and the picture to be rendered in a timely manner due to problems such as resource loading not being timely or resource limitations, so smooth switching of pictures cannot be achieved. Therefore, how to improve the smoothness of picture switching has become a problem to be solved. SUMMARY

[0003] The present application provides a display picture switching method and device, a computer device and a storage medium to improve the smoothness of picture switching.

[0004] In a first aspect, the present application provides a display picture switching method, which comprises:

[0005] When an event meeting a preset triggering condition is monitored, a switched display picture is obtained as a target display picture;

[0006] Target projection matrix and target vertex data corresponding to the target display picture are obtained;

[0007] The projection matrix and vertex data corresponding to the current display picture are updated to the target projection matrix and the target vertex data, respectively;

[0008] Based on the target projection matrix and the target vertex data, the current display picture is switched to display the target display picture.

[0009] In a second aspect, the present application also provides a display picture switching device, which comprises:

[0010] A display picture obtaining module is configured to obtain a switched display picture as a target display picture when an event meeting a preset triggering condition is monitored;

[0011] A target information obtaining module is configured to obtain target projection matrix and target vertex data corresponding to the target display picture;

[0012] a target information updating module, configured to update a projection matrix and vertex data corresponding to a current display picture to a target projection matrix and target vertex data respectively;

[0013] a display picture switching module, configured to switch the current display picture based on the target projection matrix and the target vertex data, to display the target display picture.

[0014] In a third aspect, the present application provides a computer device, which comprises a memory and a processor; the memory is configured to store a computer program; the processor is configured to execute the computer program and realize the display picture switching method as described above when executing the computer program.

[0015] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program; the computer program, when executed by a processor, causes the processor to realize the display picture switching method as described above.

[0016] The present application discloses a display picture switching method and device, a computer device and a storage medium. When an event meeting a preset trigger condition is monitored, a switched display picture is obtained as a target display picture. A target projection matrix and target vertex data corresponding to the target display picture are obtained. A projection matrix and vertex data corresponding to a current display picture are updated to the target projection matrix and the target vertex data respectively. The current display picture is switched based on the target projection matrix and the target vertex data, to display the target display picture. In this way, when an event meeting a preset trigger condition is monitored, the projection matrix and vertex data corresponding to the current display picture are updated to the target projection matrix and the target vertex data corresponding to the target display picture. The switching between display pictures can be realized according to the target projection matrix and the target vertex data in the same rendering process. It is not necessary to reload rendering resources and reset rendering states for each target display picture. The problems of interruption of the rendering process, untimely loading of resources and lagging of picture rendering caused by reloading of rendering resources and resetting of rendering states are avoided. Smooth switching of pictures is realized, and the picture switching fluency is improved. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0018] Figure 1is a first embodiment of a display screen switching method provided by an embodiment of the present application.

[0019] Figure 2 is a second embodiment of a display screen switching method provided by an embodiment of the present application.

[0020] Figure 3 is a third embodiment of a display screen switching method provided by an embodiment of the present application.

[0021] Figure 4 is a schematic block diagram of a display screen switching device provided by an embodiment of the present application.

[0022] Figure 5 is a structural schematic block diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0023] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.

[0024] The flowchart shown in the drawings is only an example and does not necessarily include all the contents and operations / steps, nor does it necessarily execute in the order described. For example, some operations / steps can be further divided, combined or partially merged, so the actual execution order may be changed according to the actual situation.

[0025] It should be understood that the terms used in the present application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, unless otherwise clear from the context, the singular forms "a", "an" and "the" are intended to include the plural forms.

[0026] It should also be understood that the term "and / or" used in the present application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0027] Embodiments of the present application provide a display screen switching method, device, computer device and storage medium. The display screen switching method can be applied to a server or an augmented reality device, and the smooth switching of the display screen is realized by updating the projection matrix and the vertex data. The server can be an independent server or a server cluster.

[0028] Some embodiments of the present application will be described in detail with reference to the drawings. The following embodiments and features can be combined with each other in the case of no conflict.

[0029] Please refer to Figure 1 , Figure 1 is a schematic flowchart of a display screen switching method provided by an embodiment of the present application. The display screen switching method can be applied to a server or an augmented reality device, and is used to update a projection matrix and vertex data when an event meeting a preset triggering condition is monitored, so as to realize smooth switching between 2D and 3D screens and improve screen switching fluency.

[0030] As shown in Figure 1 , the display screen switching method specifically includes steps S101 to S104.

[0031] S101, when an event meeting a preset triggering condition is monitored, a switched display screen is obtained as a target display screen;

[0032] In an embodiment, the preset triggering condition is a preset condition capable of triggering screen switching. It can be that a user operation meets a preset screen switching triggering operation. For example, if a user wants to convert a 3D screen in a display interface corresponding to an augmented reality device into a 2D screen, a gesture operation can be used to trigger the conversion. It can also be that when an application is switched, the screen type of the switched application display screen is different from that of a current display screen. For example, when a user opens a camera, the display screen of the camera is a 2D screen, while the current display screen is a 3D screen, so the screen needs to be switched. At this time, the application switching event is an event meeting a preset triggering condition. It can be understood that the preset triggering condition and the screen switching triggering operation can be freely set by a user according to actual needs.

[0033] In an embodiment, whether there is an event meeting a preset triggering condition can be monitored by an event monitoring module corresponding to an augmented reality device. For example, it is monitored that a user is about to open a camera application, the display screen in the camera is a 2D screen, while the current display screen of the augmented reality device is a 3D screen. At this time, the current 3D screen needs to be converted into the 2D screen in the camera, that is, the current application switching event meets a preset triggering condition. It can be understood that the event monitoring module is a program component used to monitor user operations and application switching events in real time, and can be deployed in the augmented reality device or be an external module in communication connection with the augmented reality device.

[0034] In an embodiment, the target display screen is a display screen after switching, for example, a screen after a camera application is opened. The screen type of the target display screen is one of a 2D screen or a 3D screen. The screen type of the target display screen can be obtained according to application logic, for example, the application logic of the camera application is to display a screen captured by the camera when the camera is opened, and the screen captured by the camera is a 2D screen, so the screen type of the target display screen is a 2D screen at this time. The screen type of the target display screen can also be freely set by the user as needed.

[0035] In an embodiment, the target display screen can be captured by a camera module or obtained from a UI (User Interface) interface corresponding to each application. For example, when the user opens a camera application in the augmented reality device, the screen captured by the camera module is taken as the target display screen. The camera module can be a module deployed in the augmented reality device or an external module in communication connection with the augmented reality device. When the user opens other applications in the augmented reality device, all UI interfaces corresponding to the application are taken as display pages. Then, the target display screen is determined from the display pages according to the relevant operation of the user on the application. The UI interface corresponding to the application is designed by the application developer in advance.

[0036] S102, obtaining a target projection matrix and target vertex data corresponding to the target display screen;

[0037] In an embodiment, the target projection matrix is determined according to the screen type of the target display screen. The screen type includes a 2D screen and a 3D screen, and the 2D screen and the 3D screen correspond to different projection matrices respectively. The projection matrix corresponding to the screen type of the target display screen is taken as the target projection matrix.

[0038] In an embodiment, the target vertex data is obtained by processing the initial vertex data through a vertex shader. The target vertex data can also be obtained by querying a vertex buffer. When the initial vertex data exists in the vertex buffer, the vertex data corresponding to the initial vertex data in the vertex buffer is obtained as the target vertex data; when the initial vertex data does not exist in the vertex buffer, the initial vertex data is processed through the vertex shader to obtain the target vertex data. The vertex buffer is a memory area for storing graphics data, and the vertex buffer stores the initial vertex data and the target vertex data corresponding to the initial vertex data. The vertex buffer can be installed in an augmented reality device or in a cloud end in communication connection with the augmented reality device. The vertex shader is a programmable rendering unit that allows developers to write custom shader code to replace fixed rendering pipeline functions, thereby achieving more flexible and efficient graphics rendering. The vertex shader can be deployed in an augmented reality device or in a cloud end or an external processor end in communication connection with the augmented reality device.

[0039] Further, the target projection matrix corresponding to the target display picture is obtained by obtaining a picture type corresponding to the target display picture and obtaining a projection matrix corresponding to the picture type in a preset projection matrix database as the target projection matrix, wherein the picture type includes a 2D picture and a 3D picture.

[0040] In an embodiment, the picture type includes a 2D picture and a 3D picture, and the 2D picture and the 3D picture correspond to different projection matrices respectively. The projection matrix of the 2D picture is an orthogonal projection matrix, and the projection matrix of the 3D picture is a perspective projection matrix. It can be understood that the projection matrices corresponding to the 2D picture and the 3D picture can be freely set by a user, which is not limited herein. The projection matrix corresponding to the picture type of the target display picture is taken as the target projection matrix. For example, when the target display picture is a 2D picture, an orthogonal projection matrix is taken as the target projection matrix.

[0041] In an embodiment, the picture type and the projection matrix corresponding to each picture type can be stored in a projection matrix database. After obtaining the picture type, the projection matrix corresponding to the picture type is queried in the projection matrix database as the target projection matrix. The projection matrix database can be set in an augmented reality device or in a cloud end in communication connection with the augmented reality device.

[0042] S103, the projection matrix corresponding to the current display picture and the vertex data are updated to the target projection matrix and the target vertex data respectively;

[0043] In one embodiment, the projection matrix of the current display picture is updated to the projection matrix corresponding to the picture type of the target display picture (i.e., the target projection matrix). The vertex data of the current display picture is updated to the vertex data corresponding to the target display picture (i.e., the target vertex data).

[0044] In one embodiment, the updating of the projection matrix and the vertex data can be performed by a preset switching instruction. The switching instruction can be preset in the augmented reality device by a user or a developer. The triggering condition of the switching instruction can be that the target projection matrix and the target vertex data are both obtained. Specifically, when the target projection matrix and the target vertex data are both obtained, the augmented reality device invokes the switching instruction to switch the projection matrix and the vertex data corresponding to the current display picture to the target projection matrix and the target vertex data, respectively.

[0045] S104, switching the current display picture based on the target projection matrix and the target vertex data to display the target display picture.

[0046] Further, the switching of the current display picture based on the target projection matrix and the target vertex data to display the target display picture includes: obtaining the geometric primitives corresponding to the 2D or 3D elements in the target display picture based on the target vertex data; and processing the geometric primitives based on a preset graphics processor and the target projection matrix to obtain and display the target display picture.

[0047] In one embodiment, the geometric primitives are constructed according to the target vertex data. Specifically, the target vertex data is passed to a preset graphics API (Application Programming Interface), and a corresponding function is invoked through the graphics API to define the shape and size of the geometric primitives according to the target vertex data. The graphics API is an application programming interface for rendering 2D and 3D vector graphics, and can be OpenGL (Open Graphics Library, a cross-language and cross-platform programming graphics program interface), DirectX (Direct Extension, a multimedia programming interface), etc.

[0048] In one embodiment, when all the geometric primitives are defined, the augmented reality device invokes a rendering function of the graphics API to start rendering the scene. Specifically, the geometric information of the geometric primitives is passed to a renderer, and the renderer calculates the color value of each pixel according to a transformation matrix, camera parameters and the target projection matrix to finally generate a complete picture, i.e., the target display picture. The target display picture is displayed in the display interface of the augmented reality device to realize picture switching.

[0049] Further, before the switching the current display picture to display the target display picture based on the target projection matrix and the target vertex data, the method further includes: obtaining a user operation and an application switching event; determining a switching time of the current display picture and the target display picture based on a preset picture switching effect, the user operation and the application switching event, so as to switch the current display picture to the target display picture at the switching time.

[0050] In one embodiment, the picture switching effect includes an animation effect, an element display effect and the like preset by the user. One animation effect can be used for multiple page switching or element display, or different animation effects can be used for each picture switching or element display process, which is freely set by the user according to needs, and is not limited herein.

[0051] In one embodiment, the user operation and the application switching event can be used to determine a final time of picture switching and displaying the target display picture, that is, the target display picture needs to be displayed to the user at a certain time. According to the animation playing time, playing speed and the like of the animation effect, the switching time of the target display picture is determined, and the picture is switched at the switching time, so as to ensure that the picture switching is completed at the final time and the target display picture is displayed to the user, thereby realizing natural and smooth picture switching.

[0052] In one embodiment, the user operation and the application switching event are obtained by an event monitoring module corresponding to the augmented reality device.

[0053] Further, the switching the current display picture to display the target display picture includes: obtaining a preset picture switching effect, wherein the picture switching effect includes an exit animation of the current display picture and a display animation of the target display picture; removing the current display picture based on the exit animation, and displaying the target display picture based on the display animation.

[0054] In one embodiment, the picture switching effect includes an animation effect, an element display effect and the like preset by the user. The animation effect includes an exit animation of the current display picture and a display animation of the target display picture. The user can freely set according to needs, and is not limited herein.

[0055] In an embodiment, an exit animation of a current display picture is played when a picture switching time comes, and the current display picture is removed. The playing time of the display animation can be at the end of the playing of the exit animation, that is, when the current display picture is completely removed, the target display picture is displayed according to the display animation. The playing time of the display animation can also be at a time during the playing of the exit animation. For example, when the exit animation and the display animation are both leftward translation, the target display picture can appear with the effect of leftward translation while the current display picture is moving leftward. The switching of the display pictures according to the animation effect avoids the lag phenomenon caused by the direct switching of the current display picture and the target display picture, and makes the picture switching more coherent.

[0056] In the above embodiment, when an event meeting the preset triggering condition is monitored, the projection matrix and the vertex data corresponding to the current display picture are updated to the target projection matrix and the target vertex data corresponding to the target display picture, so that the switching between the 2D and 3D pictures can be realized according to the target projection matrix and the target vertex data in the same rendering process. The rendering resources do not need to be reloaded and the rendering state does not need to be re-set for each target display picture. The problems such as interruption of the rendering process, untimely loading of resources and lag of picture rendering caused by reloading of the rendering resources and re-setting of the rendering state are avoided, the smooth switching of the pictures is realized, and the picture switching fluency is improved.

[0057] Please refer to Figure 2 , Figure 2 is a schematic flowchart of a display picture switching method provided by an embodiment of the present application. The display picture switching method can be applied to a server or an augmented reality device, and is used to buffer initial vertex data and vertex data corresponding to the initial vertex data through a vertex buffer, reduce frequent data transmission and loading operations, avoid repeated calculation, and improve the efficiency of obtaining target vertex data.

[0058] As shown in Figure 2 , the step S102 of the display picture switching method specifically includes steps S201 to S202.

[0059] S201, obtaining initial vertex data corresponding to an element in the target display picture;

[0060] In an embodiment, the initial vertex data can be obtained in the following ways: imported from a model file, for complex 3D models, the vertex data can be imported from the model file. The model file contains the geometric information, materials and textures of the elements in the target display picture, from which the initial vertex data can be extracted; generated from an image, such as using edge detection, contour extraction and other techniques to extract the initial vertex data from the image; generated by a program, using algorithms or programs to dynamically generate the initial vertex data of the picture. For example, when creating a target display picture, code needs to be written to generate or update vertex data; user input, in some interactive applications, the initial vertex data can be directly created or modified by drawing tools or gesture input. The initial vertex data can also be obtained in other ways specified by the user, which is not limited here.

[0061] In an embodiment, the initial vertex data mainly includes vertex position coordinates, which represent the spatial coordinates of each vertex in the graph. The spatial coordinates of the elements in the display picture of different picture types are different. In a 2D graph, it is the coordinate in a plane coordinate system, i.e. (x, y) coordinate, and in a 3D graph, it is the coordinate in a space coordinate system, i.e. (x, y, z) coordinate. The initial vertex data can also include vertex color, each vertex can be associated with a color value, which is usually used for smooth color rendering, such as interpolation according to vertex color in a vertex shader; vertex normal, which is used to describe the surface direction at the vertex and is commonly used for lighting calculation to determine how the surface interacts with the light source; texture coordinates, if the graph uses texture mapping, each vertex will have one or more texture coordinates to determine how to apply the texture at the vertex; and other custom vertex attributes, such as tangent vectors, etc.

[0062] S202, coordinate transformation and attribute information calculation are performed on the initial vertex data to obtain the target vertex data.

[0063] In an embodiment, the vertex buffer is used to store the initial vertex data and the target vertex data corresponding to the initial vertex data.

[0064] In an embodiment, when the target vertex data corresponding to the initial vertex data exists in the vertex buffer, the initial vertex data does not need to be processed, and the target vertex data corresponding to the initial vertex data in the vertex buffer can be directly obtained. This avoids repeated calculation, reduces frequent data transmission and loading operations, improves picture rendering efficiency, and thus improves picture switching smoothness.

[0065] In an embodiment, when the vertex data corresponding to the initial vertex data does not exist in the vertex buffer, the initial vertex data needs to be processed by a vertex shader to obtain the target vertex data.

[0066] In one embodiment, the target vertex data is obtained by processing the initial vertex data through a vertex shader. Specifically, the vertex shader first performs coordinate transformation on the initial vertex data. This includes model transformation (converting the vertex from model space to world space), view transformation (converting the vertex from world space to view space), and projection transformation (converting the vertex from view space to clip space). This converts the vertex data from the local coordinate system of the model to the global coordinate system suitable for rendering. Secondly, the vertex shader also calculates the attribute information of each vertex. This includes the angle between the normal vector of the vertex and the light source direction, the distance from the vertex to the light source, etc.

[0067] The vertex shader is a programmable rendering unit that allows developers to write custom shader code to replace fixed rendering pipeline functions, thereby achieving more flexible and efficient graphics rendering. The vertex shader can be deployed in an augmented reality device, or in a cloud or external processor connected to the augmented reality device.

[0068] In the above embodiment, the initial vertex data and the vertex data corresponding to the initial vertex data are cached through the vertex buffer. When the initial vertex data corresponding to the target display screen exists in the vertex buffer, the vertex data corresponding to the initial vertex data can be directly obtained as the target vertex data; if not, the initial vertex data is processed to obtain the target vertex data and stored in the vertex buffer, which can be directly obtained in the next use. This reduces frequent data transmission and loading operations, avoids repeated calculations, improves the efficiency of obtaining the target vertex data, and further improves the efficiency of screen rendering, so that the target display screen can be smoothly switched.

[0069] Please refer to Figure 3 , Figure 3 is a schematic flowchart of a display screen switching method provided by an embodiment of the present application. The display screen switching method can be applied in a server or an augmented reality device, and is used to monitor whether an event meeting a preset triggering condition exists through an event monitoring module, so as to perform related operations for screen switching in time, avoid screen lag and delay caused by untimely operation, and improve the smoothness of screen switching.

[0070] As Figure 3 shown, before the step S101 of the display screen switching method, the method specifically further includes steps S301 to S303.

[0071] S301, monitoring an application switching event and a user operation;

[0072] S302, when the type of the screen applied in the application switching event is different from the type of the current screen, determining that the application switching event is an event meeting the preset triggering condition;

[0073] S303、In the case that the user operation is the same as the preset switching trigger operation, the user operation is determined as the event meeting the preset trigger condition.

[0074] In one embodiment, the event monitoring module compares the obtained user operation with the preset switching trigger operation. If they are the same, the user operation is determined as the event meeting the preset trigger condition. For example, the user wants to convert the 3D picture in the display interface corresponding to the augmented reality device into a 2D picture, which can be triggered by a gesture operation. When the gesture operation is the same as the switching trigger operation, the picture switching is triggered. It can be understood that the switching trigger operation can be freely set by the user according to actual needs.

[0075] In one embodiment, the event monitoring module monitors the obtained application switching event for application logic analysis. For example, it is monitored that the user is about to open the camera application, and the application logic of the camera application is to display the picture taken by the camera when the camera is opened. The picture taken by the camera is a 2D picture, so the picture type of the target display picture at this time is a 2D picture. The display picture in the camera is a 2D picture, and the current display picture of the augmented reality device is a 3D picture. At this time, the currently displayed 3D picture needs to be converted into the 2D picture in the camera, that is, the current application switching event meets the preset trigger condition.

[0076] In the above embodiment, the event detection module monitors whether the picture switching is triggered, which can timely obtain the picture switching demand and perform the related operation of picture switching, avoids the picture lag and delay caused by untimely operation, and improves the fluency of picture switching.

[0077] Please refer to Figure 4 , Figure 4 An embodiment of the present application provides a schematic block diagram of a display picture switching device for executing the display picture switching method described above. The display picture switching device can be configured in a server or an augmented reality device.

[0078] As shown in Figure 4 , the display picture switching device 400 comprises:

[0079] A display picture acquisition module 401 is configured to acquire a display picture after switching as a target display picture when an event meeting a preset trigger condition is monitored.

[0080] A target information acquisition module 402 is configured to acquire a target projection matrix and target vertex data corresponding to the target display picture.

[0081] A target information updating module 402 is configured to update a projection matrix and vertex data corresponding to a current display picture into the target projection matrix and the target vertex data, respectively.

[0082] The display picture switching module 403 is configured to switch the current display picture based on the target projection matrix and the target vertex data, so as to display the target display picture.

[0083] Further, the target information acquisition module 402 comprises:

[0084] An initial vertex data acquisition unit is configured to acquire initial vertex data corresponding to an element in the target display picture.

[0085] A target vertex data obtaining unit is configured to perform coordinate transformation and attribute information calculation on the initial vertex data, so as to obtain the target vertex data.

[0086] Further, the target information acquisition module 402 further comprises:

[0087] A target projection matrix determination unit is configured to acquire a picture type corresponding to the target display picture, and acquire a projection matrix corresponding to the picture type from a preset projection matrix as the target projection matrix, wherein the picture type comprises a 2D picture and a 3D picture.

[0088] Further, the display picture switching module 403 comprises:

[0089] A switching effect obtaining unit is configured to acquire a preset picture switching effect, wherein the picture switching effect comprises an exit animation of the current display picture and a display animation of the target display picture.

[0090] A picture display unit is configured to remove the current display picture based on the exit animation, and display the target display picture based on the display animation.

[0091] Further, the display picture switching device 400 further comprises a switching trigger event determination module, and the switching trigger event determination module comprises:

[0092] An event monitoring unit is configured to monitor an application switching event and a user operation.

[0093] A trigger event determination unit is configured to determine that the application switching event is an event meeting the preset trigger condition when a picture type in the application switching event is different from a current picture type, and determine that the user operation is an event meeting the preset trigger condition when the user operation is the same as a preset switching trigger operation.

[0094] Further, the display picture switching device 400 further comprises:

[0095] A user operation and event acquisition module is configured to acquire a user operation and an application switching event.

[0096] a picture switching time obtaining module, configured to determine a picture switching time of the current display picture and the target display picture based on a preset picture switching effect, the user operation and the application switching event, so as to switch the current display picture to the target display picture at the picture switching time.

[0097] Further, the display picture switching module 404 comprises:

[0098] a geometry primitive obtaining unit, configured to obtain a geometry primitive corresponding to a 2D or 3D element in the target display picture based on the target vertex data;

[0099] a geometry primitive processing unit, configured to process the geometry primitive based on a preset graphics processing unit and the target projection matrix, so as to obtain and display the target display picture.

[0100] It should be noted that, for the convenience and brevity of description, the specific working process of the above-described apparatus and each module can refer to the corresponding process in the foregoing method embodiments, which will not be described herein.

[0101] The apparatus described above can be implemented in the form of a computer program, which can run on a computer device as shown in Figure 5 .

[0102] Please refer to Figure 5 , Figure 5 is a structural schematic block diagram of a computer device provided by an embodiment of the present application. The computer device can be a server or an augmented reality device.

[0103] Please refer to Figure 5 , the computer device comprises a processor, a memory and a network interface connected through a system bus, wherein the memory can comprise a non-volatile storage medium and an internal memory.

[0104] The non-volatile storage medium can store an operating system and a computer program. The computer program comprises program instructions which, when executed, can cause the processor to execute any one of the display picture switching methods.

[0105] The processor is configured to provide computing and control capabilities to support the operation of the entire computer device.

[0106] The internal memory provides an environment for the execution of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any one of the display picture switching methods.

[0107] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that Figure 5 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0108] It should be understood that the processor can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0109] In one embodiment, the processor is configured to run a computer program stored in the memory to implement the following steps:

[0110] When an event meeting a preset triggering condition is monitored, a display screen after switching is acquired as a target display screen;

[0111] The target projection matrix corresponding to the target display screen and target vertex data are acquired;

[0112] The projection matrix and vertex data corresponding to the current display screen are updated to the target projection matrix and the target vertex data, respectively;

[0113] Based on the target projection matrix and the target vertex data, the current display screen is switched to display the target display screen.

[0114] In one embodiment, when the processor implements acquiring the target vertex data corresponding to the target display screen, the processor is configured to implement:

[0115] Initial vertex data corresponding to an element in the target display screen is acquired;

[0116] The initial vertex data is subjected to coordinate transformation and attribute information calculation to obtain the target vertex data.

[0117] In one embodiment, the processor, when implementing the obtaining of the target projection matrix corresponding to the target display picture, is configured to:

[0118] obtain a picture type corresponding to the target display picture, and obtain a projection matrix corresponding to the picture type from the preset projection matrices as the target projection matrix, wherein the picture type comprises a 2D picture and a 3D picture.

[0119] In one embodiment, the processor, when implementing the switching of the current display picture to display the target display picture, is configured to:

[0120] obtain a preset picture switching effect, wherein the picture switching effect comprises an exit animation of the current display picture and a display animation of the target display picture;

[0121] remove the current display picture based on the exit animation, and display the target display picture based on the display animation.

[0122] In one embodiment, the processor, before implementing the obtaining of the switched display picture as the target display picture when the event meeting the preset triggering condition is monitored, is further configured to:

[0123] monitor an application switching event and a user operation;

[0124] when a picture type applied in the application switching event is different from a current picture type, determine that the application switching event is the event meeting the preset triggering condition;

[0125] when the user operation is the same as a preset switching triggering operation, determine that the user operation is the event meeting the preset triggering condition.

[0126] In one embodiment, the processor, before implementing the switching of the current display picture to display the target display picture based on the target projection matrix and the target vertex data, is further configured to:

[0127] obtain a user operation and an application switching event;

[0128] determine a switching time of the current display picture and the target display picture based on a preset picture switching effect, the user operation and the application switching event, so as to switch the current display picture to the target display picture at the picture switching time.

[0129] In one embodiment, the processor, when implementing the switching of the current display picture to display the target display picture based on the target projection matrix and the target vertex data, is configured to:

[0130] obtain, based on the target vertex data, a geometric primitive corresponding to a 2D or 3D element in the target display picture;

[0131] perform processing on the geometric primitive based on a preset graphics processor and the target projection matrix, and obtain and display the target display picture.

[0132] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program comprises program instructions. The processor executes the program instructions to implement any one of the display picture switching methods provided in the embodiments of the present application.

[0133] The computer readable storage medium can be an internal storage unit of the computer device, for example, a hard disk or a memory of the computer device. The computer readable storage medium can also be an external storage device of the computer device, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc.

[0134] The above merely illustrates the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed in the present application, and these modifications or replacements should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A display screen switching method characterized by comprising: The method comprises the steps of: acquiring a target display screen after switching as a target display screen when an event meeting a preset triggering condition is monitored; acquiring a target projection matrix and target vertex data corresponding to the target display screen; updating a projection matrix and vertex data corresponding to a current display screen to the target projection matrix and the target vertex data respectively; switching the current display screen based on the target projection matrix and the target vertex data to display the target display screen.

2. The display screen switching method according to claim 1, characterized by, The acquiring of the target vertex data corresponding to the target display screen comprises the steps of: acquiring initial vertex data corresponding to an element in the target display screen; performing coordinate transformation and attribute information calculation on the initial vertex data to obtain the target vertex data.

3. The display screen switching method according to claim 1, characterized by, The acquiring of the target projection matrix corresponding to the target display screen comprises the steps of: acquiring a screen type corresponding to the target display screen, and acquiring a projection matrix corresponding to the screen type from a preset projection matrix as the target projection matrix, wherein the screen type comprises a 2D screen and a 3D screen.

4. The display screen switching method of claim 1, wherein The switching of the current display screen to display the target display screen comprises the steps of: acquiring a preset screen switching effect, wherein the screen switching effect comprises an exit animation of the current display screen and a display animation of the target display screen; removing the current display screen based on the exit animation, and displaying the target display screen based on the display animation.

5. The display screen switching method of claim 1, wherein Before the acquiring of the target display screen after switching as a target display screen when an event meeting a preset triggering condition is monitored, the method further comprises the steps of: monitoring an application switching event and a user operation; determining that the application switching event is the event meeting the preset triggering condition when a screen type applied in the application switching event is different from a current screen type; determining that the user operation is the event meeting the preset triggering condition when the user operation is the same as a preset switching triggering operation.

6. The display screen switching method of claim 1, wherein Before the switching of the current display screen based on the target projection matrix and the target vertex data to display the target display screen, the method further comprises the steps of: acquiring a user operation and an application switching event; determining a switching time of the current display screen and the target display screen based on a preset screen switching effect, the user operation and the application switching event, so as to switch the current display screen to the target display screen at the screen switching time.

7. The display screen switching method according to any one of claims 1 to 6, characterized by, The switching of the current display screen based on the target projection matrix and the target vertex data to display the target display screen comprises the steps of: obtaining a geometric primitive corresponding to a 2D or 3D element in the target display screen based on the target vertex data; processing the geometric primitive based on a preset graphics processor and the target projection matrix to obtain and display the target display screen.

8. A display screen switching apparatus characterized by comprising: The method comprises the steps of: a display screen acquiring module, configured to acquire a target display screen after switching as a target display screen when an event meeting a preset triggering condition is monitored; a target information acquiring module, configured to acquire a target projection matrix and target vertex data corresponding to the target display screen; The target information updating module is configured to update the projection matrix and the vertex data corresponding to the current display picture into the target projection matrix and the target vertex data, respectively. The display picture switching module is configured to switch the current display picture based on the target projection matrix and the target vertex data, so as to display the target display picture.

9. A computer device, comprising: The computer device comprises a memory and a processor; The memory is configured to store a computer program; The processor is configured to execute the computer program and implement the display picture switching method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program causes the processor to implement the display picture switching method according to any one of claims 1 to 7 when the computer program is executed by the processor.

Citation Information

Patent Citations

  • Integrated indoor and outdoor three-dimensional visualization method of mobile terminal and device

    CN106127850A

  • Graph rendering method and device, and computer readable storage medium

    CN111754381A

  • Scene switching display method and device, equipment and storage medium

    CN117369912A