Popup window generation method and device, electronic equipment and computer readable storage medium
Patent Information
- Application Number
- CN202380010436.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-01
- Publication Date
- 2025-05-06
AI Technical Summary
Unreal Engine lacks a complete pop-up system, cannot host pages developed by the Web, and is difficult to display content flexibly and change location and size.
By obtaining pop-up instructions, including target model information and pop-up form information, determining the target model based on the target model information, generating a form based on the form information, and loading the display page to the form, generating pop-up windows in the scene to associate it with the target model.
In the scene created by the virtual engine, pop-up windows associated with the target model can be generated. The pop-up window content can be a loaded web page. The pop-up window can flexibly display the content and adapt to different positions and sizes.
Smart Images

Figure CN119948459A_ABST
Abstract
Description
Pop-up window generation method, device, electronic device and computer-readable storage medium Technical Field
[0001] Embodiments of the present disclosure relate to a method, device, electronic device, and computer-readable storage medium for generating a pop-up window. Background Art
[0002] With the advancement of science and technology and the growing demand for virtualization, virtual technology continues to develop and advance. Virtual technology uses computer technology to simulate and create virtual environments, objects, or experiences. For example, virtual reality (VR), augmented reality (AR), virtual simulations, virtual games, and other virtual technologies bring great fun and convenience to life.
[0003] Unreal Engine is widely used in game development, virtual reality, augmented reality, film and television production, and other interactive experience development.
[0004] Summary of the Invention
[0005] At least one embodiment of the present disclosure provides a method for generating a pop-up window, comprising: obtaining a pop-up window instruction, wherein the pop-up window instruction includes target model information and pop-up window form information; determining a target model from a scene created based on a virtual engine according to the target model information; generating a form according to the form information; and loading a display page to the form, generating the pop-up window in the scene, wherein the content of the display page is associated with the target model.
[0006] For example, in the generation method provided in an embodiment of the present disclosure, a page control for displaying a page is embedded in the control component of the virtual engine, and the display page is loaded into the form using the page control.
[0007] For example, in the generation method provided in one embodiment of the present disclosure, the window is generated according to the window information, including: determining the position of the window according to the position information of the target model in the scene; and generating the window according to the window information and the position of the window.
[0008] For example, in the generation method provided in an embodiment of the present disclosure, the window information includes the offset of the window relative to the first reference point of the target model and the size information of the window. According to the position information of the target model in the scene, the position of the window is determined, including: determining the position of the first reference point of the target model; determining the target position of the window based on the offset and the position of the first reference point; generating the window according to the window information and the position of the window, including: generating the window according to the size information of the window and the position of the window.
[0009] For example, in a generation method provided in an embodiment of the present disclosure, the target model includes a three-dimensional model, and the target model is displayed on a display screen. Obtaining the first reference point of the target model includes: generating a three-dimensional box body of the three-dimensional model, and the three-dimensional box body accommodates the three-dimensional model; mapping the three-dimensional box body to the plane where the display screen is located to obtain a two-dimensional box body of the target model; and selecting a key point from multiple key points of the two-dimensional box body as the first reference point.
[0010] For example, in a generation method provided in an embodiment of the present disclosure, the three-dimensional box body is mapped to the plane of the display screen to obtain a two-dimensional box body of the target model, including: using a mapping function in the blueprint of the virtual engine to convert the three-dimensional coordinates of multiple vertices of the three-dimensional box body into multiple plane coordinates of the plane, where the plane where the display screen is located includes the x direction and the y direction; selecting a point corresponding to the minimum value in the x direction and the minimum value in the y direction from the multiple plane coordinates as the upper left vertex of the two-dimensional box body; selecting a point corresponding to the minimum value in the x direction and the maximum value in the y direction from the multiple plane coordinates as the lower left vertex; selecting a point corresponding to the maximum value in the x direction and the minimum value in the y direction from the multiple plane coordinates as the upper right vertex; and selecting a point corresponding to the maximum value in the x direction and the maximum value in the y direction from the multiple plane coordinates as the lower right vertex.
[0011] For example, in the generation method provided in an embodiment of the present disclosure, the three-dimensional box is a box with the smallest volume that accommodates the three-dimensional model.
[0012] For example, in the generation method provided in one embodiment of the present disclosure, it also includes: determining the target position of the window based on the offset and the first reference point, including: determining the position of the second reference point of the window based on the first reference point and the offset; and determining the positions of multiple window key points of the window based on the second reference point and the size information.
[0013] For example, in a generation method provided in an embodiment of the present disclosure, the window information also includes window area restriction information, and the window is generated according to the size information of the window and the position of the window, including: judging whether the window exceeds the restricted area according to the size information of the window and the position of the window; in response to the window exceeding the restricted area, adjusting the size of the window to restrict the window within the restricted area.
[0014] For example, in the generation method provided in one embodiment of the present disclosure, the target model is displayed on a display screen, and the method further includes: in response to obtaining a trigger event for the display screen, redetermining the target position of the window of the target model; in response to a change in the position of the window, updating the position of the pop-up window on the screen.
[0015] For example, in the generation method provided in an embodiment of the present disclosure, the triggering event includes refreshing the display screen.
[0016] For example, in the generation method provided in one embodiment of the present disclosure, the trigger event includes the movement of the target model. In response to obtaining the trigger event for the display screen, the target position of the window of the target model is re-determined, including: in response to the target model moving in the plane where the display screen is located, the target position is moved according to the movement information of the movement.
[0017] For example, in the generation method provided in an embodiment of the present disclosure, in response to obtaining a trigger event for the display screen, the target position of the window of the target model is re-determined, and the method further includes: in response to the rotation of the target model, re-establishing the three-dimensional box body of the target model, and determining the target position based on the rotated three-dimensional box body of the target model; or in response to the rotation of the target model, determining the target position based on the rotation angle.
[0018] For example, in the generation method provided in one embodiment of the present disclosure, obtaining the pop-up instruction includes: receiving a pop-up instruction from a control device, wherein the control device establishes a two-way connection with the display device; or generating the pop-up instruction in response to receiving an input operation on the scene.
[0019] For example, the generation method provided in an embodiment of the present disclosure further includes: generating a connection icon, wherein the connection icon is used to indicate that the target model corresponds to the pop-up window.
[0020] At least one embodiment of the present disclosure provides a pop-up window generation device, including: an acquisition unit, configured to acquire a pop-up window instruction, wherein the pop-up window instruction includes target model information and pop-up window form information; a determination unit, configured to determine a target model from a scene created based on a virtual engine according to the target model information; a generation unit, configured to generate a form according to the form information; and a loading unit, configured to load a display page to the form and generate the pop-up window in the scene, wherein the content of the display page is associated with the target model.
[0021] At least one embodiment of the present disclosure provides an electronic device, comprising the processor and the memory, including one or more computer program instructions, wherein the one or more computer program instructions are stored in the memory and, when executed by the processor, implement instructions of the generation method provided in any embodiment of the present disclosure.
[0022] At least one embodiment of the present disclosure provides a computer-readable storage medium that non-temporarily stores computer-readable instructions, wherein when the computer-readable instructions are executed by a processor, the generation method provided by any embodiment of the present disclosure is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings in the following description only relate to some embodiments of the present disclosure, rather than limiting the present disclosure.
[0024] FIG1A shows a flowchart of a method for generating a pop-up window provided by at least one embodiment of the present disclosure;
[0025] FIG1B shows an application scenario diagram of a method for generating a pop-up window provided by at least one embodiment of the present disclosure;
[0026] FIG2A shows a flowchart of the method of step S30 in FIG1A provided by at least one embodiment of the present disclosure;
[0027] FIG2B shows a schematic diagram of a three-dimensional box enclosing a three-dimensional model according to at least one embodiment of the present disclosure;
[0028] FIG2C shows a schematic diagram of another three-dimensional box enclosing a three-dimensional model provided by at least one embodiment of the present disclosure;
[0029] FIG2D shows a schematic diagram of a two-dimensional box provided by at least one embodiment of the present disclosure;
[0030] FIG3 shows a schematic diagram of step S32 in FIG2A provided by at least one embodiment of the present disclosure;
[0031] FIG4 shows a schematic diagram of restricting a window to a restricted area according to at least one embodiment of the present disclosure;
[0032] FIG5 shows a flowchart of another method for generating a pop-up window provided by at least one embodiment of the present disclosure;
[0033] FIG6A shows a system architecture diagram of a pop-up window generation method provided by at least one embodiment of the present disclosure;
[0034] FIG6B shows an application scenario diagram of generating a pop-up window provided by at least one embodiment of the present disclosure;
[0035] FIG7A is a schematic block diagram of a device for generating a pop-up window provided in some embodiments of the present disclosure;
[0036] FIG7B is a schematic block diagram of an electronic device provided in some embodiments of the present disclosure;
[0037] FIG8 shows a schematic block diagram of another electronic device provided by at least one embodiment of the present disclosure; and
[0038] FIG9 is a schematic diagram of a storage medium provided in some embodiments of the present disclosure. DETAILED DESCRIPTION
[0039] To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0040] Unless otherwise defined, the technical or scientific terms used in this disclosure should have the usual meanings understood by people with ordinary skills in the field to which this disclosure belongs. The words "first", "second" and similar words used in this disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one", "an" or "the" do not indicate a quantity limitation, but rather indicate the existence of at least one. Words such as "include" or "comprise" mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connect" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0041] Pop-ups are small windows that appear during web browsing or application use, such as notifications, confirmations, or other information. In digital twin applications developed with Unreal Engine (such as digital cities and campuses), it's common to see pop-ups near a model and display content within them.
[0042] However, Unreal Engine lacks a complete pop-up window system. Pop-ups developed and drawn using Unreal Engine's built-in UI system have limited functionality and can only display the content entered when setting up the pop-up window. They cannot host pages developed by the Web and are difficult to flexibly display content or change position and size.
[0043] At least one embodiment of the present disclosure provides a method for generating a pop-up window. The pop-up window generation method includes: obtaining a pop-up window instruction, the pop-up window instruction including target model information and pop-up window form information; determining the target model from a scene created based on a virtual engine based on the target model information; generating a form based on the form information and the target model; and loading a display page into the form, generating a pop-up window in the scene, wherein the content of the display page is associated with the target model. The pop-up window generation method can generate a pop-up window associated with the target model in a scene created by a virtual engine, and the content of the pop-up window can be a loaded web page, and the pop-up window can flexibly display content.
[0044] FIG1A shows a flowchart of a method for generating a pop-up window provided by at least one embodiment of the present disclosure.
[0045] As shown in FIG1A , the generating method includes steps S10 to S40 .
[0046] Step S10: Obtain a pop-up window instruction, which includes target model information and pop-up window form information.
[0047] Step S20: determining a target model from a scene created based on a virtual engine according to the target model information.
[0048] Step S30: Generate a form according to the form information.
[0049] Step S40: Load the display page into the form, generate a pop-up window in the scene, and associate the content of the display page with the target model.
[0050] In some embodiments of the present disclosure, the method for generating a pop-up window instruction is applied to, for example, a display device. The display device may be, for example, a display screen for displaying a virtual scene created using Unreal Engine. The display device may include a processor, memory, and the like in addition to the display screen. Components such as the processor and memory may be integrated into the display screen or may be independent of the display screen.
[0051] FIG1B shows an application scenario diagram of a method for generating a pop-up window provided by at least one embodiment of the present disclosure. The generation method shown in FIG1A will be described below in conjunction with FIG1B .
[0052] As shown in FIG1B , the generation method is applied to a display screen 110, which displays a three-dimensional scene created using a virtual engine. For example, the three-dimensional scene is a digital city or campus. For example, the three-dimensional scene includes three-dimensional models such as residential building models and street models. When viewing a digital city or campus, it is often necessary to display specific data or information about the three-dimensional model near the model. For example, information about the number of residents, community services, age data, employment information, and building age can be displayed near the three-dimensional model of a building.
[0053] In some embodiments of the present disclosure, the model referred to herein may refer to a StaticMeshObject within Unreal Engine. For example, a StaticMeshObject, or model, can be obtained by importing an external file in a format such as FBX or .OBJ into Unreal Engine. This makes 3D models easier to generate and is compatible with files in a variety of formats.
[0054] As shown in FIG1B , in some embodiments of the present disclosure, for example, a pop-up window instruction can be provided to display screen 110 by controlling remote control device 120, causing display screen 110 to display pop-up window 112. The display content displayed in pop-up window 112 is associated with 3D model 111. Examples of the content displayed in pop-up window 112, such as the number of residents, average age, field of work, and building age, can be information contained in a loaded webpage. Pop-up window 112 can also load display content such as a video.
[0055] For step S10, the pop-up window instruction includes target model information and pop-up window information. For example, the target model information can be the name or number of the target model.
[0056] In some embodiments of the present disclosure, a pop-up window includes a form and display content within the form. The form information of the pop-up window may include information such as the shape, size, and position of the form. The display content within the form can be obtained by loading a web page through Webview.
[0057] For example, the pop-up window instruction provided by the control device 120 to the display screen 110 includes information such as the name of the three-dimensional model 111 and the shape, size, and position of the pop-up window 112 .
[0058] For example, a pop-up window instruction may include the following information: the name of the target model, the target model's reference point, the window size, the window's offset from the reference point, and the coordinates of the pop-up window's restricted area. For more information about the reference point, the window's offset from the reference point, and the coordinates of the pop-up window's restricted area, please refer to the description below.
[0059] In some embodiments of the present disclosure, for example, the control device 120 establishes a bidirectional connection with the display screen 110, such as a websocket connection, so that the control device 120 provides a pop-up instruction to the display screen 110. Step S10 is receiving a pop-up instruction from the control device 120.
[0060] For example, the control device 120 displays the names or numbers of the 3D models in the 3D scene shown in FIG1B in a list format. The user clicks on the name or number of the selected 3D model, and the control device 120 provides a pop-up window instruction to the display screen 110.
[0061] In some embodiments of the present disclosure, the form information of the pop-up window corresponding to the 3D model can be preset. Those skilled in the art can set the form information in the control device 120 or embed a Webview in the virtual engine to set the form information. In other words, the generated pop-up window instruction itself carries the preset form information.
[0062] Control device 120 can be any electronic device with a communication module. For example, control device 120 can be a mobile phone, tablet computer, computer, or web browser. Control device 120 can establish a connection with Unreal Engine via a network or inter-process communication (IPC) to provide pop-up instructions. For example, the network communication protocol Websocket can be used to enable direct communication between two computer processes on a network, or it can be used as a communication method between two processes on the same machine.
[0063] For example, display screen 110 includes an Unreal Engine program, which includes multiple functional modules. These modules can be written in languages such as Blueprint or C++. The Unreal Engine program receives a pop-up window instruction via the Blueprint or C++ program. The instruction includes a target model name, pop-up window width and height information, pop-up window position reference point type, and the pop-up window position offset from the reference point.
[0064] Unreal Engine (UE) is a 3D creation tool that can produce realistic visual effects and immersive experiences.
[0065] In other embodiments of the present disclosure, step S10 is to generate a pop-up window instruction in response to receiving an input operation on a scene. That is, the user can directly perform an input operation on the display screen 110, so that the display screen 110 generates a pop-up window instruction according to the input operation.
[0066] For example, in response to a user input operation of clicking on the 3D model 111 in the 3D scene, a pop-up window instruction is generated, which includes the name of the 3D model 111 and information such as the shape, size, and position of the pop-up window 112.
[0067] In the above example, the three-dimensional model 111 is an example of a target model.
[0068] In step S20 , for example, the target model 111 is determined from the three-dimensional scene according to the name of the target model.
[0069] Regarding step S30, in some embodiments of the present disclosure, for example, the window information includes the size of the window, and the window can be directly generated at any position based on the size of the window. Alternatively, the window information includes the size of the window and the position of the window, and then the window is generated based on the window information.
[0070] For example, the position of the window is determined according to the position information of the target model in the scene; and the window is generated according to the window information and the position of the window.
[0071] For example, an electronic device executing the method for generating a pop-up window can adaptively generate a window. For example, the window information includes window size information. The electronic device adaptively generates the window based on the scene layout information, the position information of the target model in the scene, and the window size information, so that the pop-up window does not obstruct the three-dimensional model in the scene and does not affect the uniformity of the scene layout.
[0072] For example, first, the scene layout information and the target model's position within the scene are obtained. Then, based on the layout information and the target model's position within the scene, the window's position is determined. Based on the layout information and size information, the window's size is adjusted, and the window is generated based on its position and size. This embodiment can automatically determine the window's position based on the scene layout and the target model's position within the scene, ensuring that the appearance of a pop-up window does not affect the uniformity and aesthetics of the scene.
[0073] In some other embodiments of the present disclosure, the window information includes not only the size information but also the offset of the window relative to the first reference point of the target model, so that the window is generated according to the offset and the size information.
[0074] For example, determining the position of a window based on the position information of a target model in a scene includes: determining the position of a first reference point of the target model; determining the target position of the window based on the offset and the position of the first reference point; and generating the window based on the window information and the window position, including: generating the window based on the size information and the window position. For a detailed description of this embodiment, see FIG2A below.
[0075] For step S40, the display page may be preset, and the preset display page may include fixed display content.
[0076] In other embodiments of the present disclosure, the display page is a web page, a video, etc., and the display content can be loaded according to a website address.
[0077] For example, in a scenario where the display page includes a video, the video may be obtained from a video website. For example, the target model is a building, and the display page in the pop-up window displayed near the target model is a documentary about the building obtained from a video website.
[0078] In some embodiments of the present disclosure, for example, if a user clicks a pause button in a pop-up window during video playback, the video will be paused at a certain frame and a pause screen will be displayed. At this time, the pause screen may display a target model (i.e., the building). If the user clicks the target model in the pause screen, further pop-up information may be displayed. This allows for further display of more information.
[0079] For example, the pop-up information is bound to the video to form a text log of the component; of course, before implementing this display, special processing of the video source may be required in advance, and the text log (the information required to be displayed in the pop-up window) may be stored in the cloud, or it may have been sent to the local computer through the video data when the user's local player plays the video. In this case, the player needs to perform local decoding.
[0080] For example, a page control (e.g., a web browser plug-in WebView) for displaying a page is embedded in a control component (e.g., a UMG Widget) in the Unreal Engine, thereby using WebView to load the display page into the form. For example, a web browser plug-in is embedded in the Unreal Engine program. The web browser plug-in is embedded in the Unreal Engine program as a library file. When connected to the Internet, the browser plug-in can load any web page connection on the Internet. In this embodiment, the web page in the pop-up window is used for display.
[0081] This pop-up window generation method can be applied to various application scenarios, such as game scenarios or map scenarios.
[0082] For example, it can be applied to multiplayer online games to provide more efficient online communication. For example, two players can pass by a supply station (i.e., a target model) in the game scene. The two different players can click on the supply station at different times, which will generate a pop-up window of the supply station in the game scene. This allows the player behind to see the pop-up window information left by the player in front, facilitating player interaction.
[0083] As another example, the pop-up window generation method can be applied to map applications, such as applications that display a 3D map of a shopping mall or a 3D map of a parking lot. For example, a user can generate a pop-up window command by sliding or clicking a mouse, thereby generating a pop-up window for different target models (e.g., a restaurant or parking space in a 3D map scene). The pop-up window displays relevant information, such as text, for the user to further understand. Of course, the present disclosure is not limited to displaying text in pop-ups; images or videos can also be displayed. The pop-up window generation method applied to map applications can conveniently and efficiently assist users in making further decisions. For example, the text displayed in the pop-up window can indicate whether the restaurant requires a wait and the wait time, thereby facilitating restaurant selection. For another example, the text displayed in the pop-up window can indicate whether a parking space is occupied, thereby facilitating users to drive directly to an unoccupied parking space instead of searching for an unoccupied space in a garage. In some embodiments of the present disclosure, the pop-up window hosts a webpage that can play a video. In this case, the player can be on the display device (i.e., the client), but the video content comes from the network (i.e., the cloud). Alternatively, the video content can come from the display device's memory.
[0084] In some embodiments of the present disclosure, the entire Unreal Engine is placed in the cloud, and the entire screen (including the pop-up video content) is streamed to the client through streaming. In other embodiments of the present disclosure, the Unreal Engine can also be applied to the user end.
[0085] For example, the player is located on the user's local terminal, and the Unreal Engine can be located in the cloud or deployed on the user's local terminal.
[0086] FIG. 2A shows a flowchart of the method of step S30 in FIG. 1A provided by at least one embodiment of the present disclosure.
[0087] As shown in FIG. 2A , step S30 includes steps S31 to S33 .
[0088] Step S31: Determine the position of the first reference point of the target model.
[0089] Step S32: Determine the target position of the window based on the offset and the position of the first reference point.
[0090] Step S33: Generate a window according to the window size information and the window position.
[0091] In this example, the window information includes an offset of the window relative to the first reference point of the target model and size information of the window.
[0092] It should be noted that the terms "first" and "second" in the "first reference point" and "second reference point" in the embodiments of the present disclosure do not indicate an order or other meanings, but rather serve to distinguish between the reference points of the target model and the reference points of the window. For example, the reference points of the target model refer to the reference points of a rectangle obtained by mapping the target model onto a two-dimensional plane or display screen. The target model includes multiple key points, such as the four vertices and center point of a rectangle. The reference point of the target model is one of the four vertices and center point of the rectangle.
[0093] For example, the reference point of the target model is indicated in the pop-up window instruction. For example, the pop-up window instruction also includes the pop-up window position reference point type. The pop-up window position reference point types are divided into upper left vertex, lower left vertex, upper right vertex, lower right vertex, and center point. For example, if the pop-up window position reference point type information in the pop-up window instruction is the upper left vertex, then the reference point of the target model is the upper left vertex of the rectangle obtained by mapping the target model to the two-dimensional plane or display screen.
[0094] The offset of the window relative to the first reference point of the target model can be, for example, the distance from the second reference point of the window to the first reference point. The second reference point of the window can be a default, for example, the upper left vertex of the window is the default second reference point.
[0095] The size information of the window may be, for example, the distance between any two adjacent key points.
[0096] For step S31, for example, a three-dimensional box body of the three-dimensional model is generated, and the three-dimensional box body contains the three-dimensional model; the three-dimensional box body is mapped to the plane where the display screen is located to obtain a two-dimensional box body of the target model; and a key point is selected from multiple key points of the two-dimensional box body as the first reference point.
[0097] First, a three-dimensional box of a three-dimensional model is generated, and then the three-dimensional box is mapped into a two-dimensional box. The two-dimensional box and the window are both two-dimensional graphics, which makes it easy to determine the position of the second reference point based on the first reference point and the offset. This method is simple and easy.
[0098] In some embodiments of the present disclosure, the shape of the two-dimensional box is consistent with the shape of the window, so that the first reference point of the two-dimensional box and the second reference point of the window correspond to each other.
[0099] In some embodiments of the present disclosure, a 3D box is the smallest box that can contain a 3D model, i.e., the 3D box encloses the 3D model. Any regular or irregular 3D model can be minimized by a cuboid consisting of six planes (two in the X-axis, two in the Y-axis, and two in the Z-axis). This smallest cuboid essentially encloses the object. By minimizing encapsulation, the approximate extent of the object can be determined, allowing the window reference point to be found.
[0100] FIG2B shows a schematic diagram of a three-dimensional box enclosing a three-dimensional model according to at least one embodiment of the present disclosure; FIG2C shows a schematic diagram of another three-dimensional box enclosing a three-dimensional model according to at least one embodiment of the present disclosure.
[0101] As shown in FIG. 2B , for example, a car model 301 is a three-dimensional model in the scene 110 , and a minimum cuboid enclosing the car model 301 is created as a three-dimensional box 302 of the car model 301 .
[0102] As shown in FIG2C , for example, 3D model 011 (a cube) is a model object within the Unreal Engine model. It should be noted that while FIG2C uses a cube as an example 3D model, this does not limit the present disclosure. For example, the 3D model may also be the irregular car model 301 shown in FIG2B . In other words, in embodiments of the present disclosure, model objects can be of any shape. 012 is the 3D box (dashed line) of 3D model 011.
[0103] In some embodiments of the present disclosure, for example, the GetActorArrayBounds method in Unreal Engine's Blueprint can be used to obtain and then calculate the eight vertices (e.g., vertices 1 to 8) of a three-dimensional box and the coordinates of its center point. Blueprint is Unreal Engine's visual scripting language. When using Blueprint, you are writing code, but it uses a more visual approach. Instead of writing code, you simply connect Blueprint nodes with different functions to achieve the desired functionality. Assume that the coordinates of the eight vertices (vertices 01 to 08) of the three-dimensional box are: (X1, Y1, Z1), (X2, Y2, Z2), (X3, Y3, Z3), (X4, Y4, Z4), (X5, Y5, Z5), (X6, Y6, Z6), (X7, Y7, Z7), (X8, Y8, Z8); and the coordinates of the center point are (X0, Y0, Z0). The coordinate system of the three-dimensional box is customized by Unreal Engine.
[0104] In step S32 , for example, multiple key points of the three-dimensional box are mapped to the plane where the display screen is located, and the mapping points of the multiple key points in the plane form a two-dimensional box.
[0105] In some embodiments of the present disclosure, a mapping function in a blueprint of a virtual engine is used to convert the three-dimensional coordinates of multiple vertices of a three-dimensional box into multiple plane coordinates, and the plane where the display screen is located includes the x direction and the y direction; the point corresponding to the minimum value in the x direction and the minimum value in the y direction is selected from the multiple plane coordinates as the upper left vertex of the two-dimensional box; the point corresponding to the minimum value in the x direction and the maximum value in the y direction is selected from the multiple plane coordinates as the lower left vertex; the point corresponding to the maximum value in the x direction and the minimum value in the y direction is selected from the multiple plane coordinates as the upper right vertex; and the point corresponding to the maximum value in the x direction and the maximum value in the y direction is selected from the multiple plane coordinates as the lower right vertex.
[0106] For example, use ProjectWorldToScreen in the blueprint to convert the 3D coordinates of the 3D model into the corresponding display screen coordinates (that is, the plane coordinates in the plane where the display screen is located). Assume that the 2D coordinates of the display screen coordinates corresponding to the 8 vertex coordinates of the 3D box are (x1, y1), (x2, y2), (x3, y3), (x4, y4), (x5, y5), (x6, y6), (x7, y7), (x8, y8); the center point coordinates are (x0, y0). Further, the coordinates of the 4 vertex positions of the screen box can be calculated. For example, the plane coordinates are calculated with the upper left vertex of the display screen as the origin. The specific calculation method is:
[0107] MIN_X=MIN(x1,x2,x3,x4,x5,x6,x7,x8); MIN(x1,x2,x3,x4,x5,x6,x7,x8) represents the minimum value among x1, x2, x3, x4, x5, x6, x7, and x8.
[0108] MIN_Y=MIN(y1,y2,y 3,y 4,y 5,y 6,y 7,y 8); MIN(y1,y2,y 3,y 4,y 5,y 6,y 7,y 8) represents the minimum value among y1,y2,y 3,y 4,y 5,y 6,y 7,y 8.
[0109] MAX_X=MAX(x1,x2,x3,x4,x5,x6,x7,x8); MAX(x1,x2,x3,x4,x5,x6,x7,x8) represents the maximum value among x1, x2, x3, x4, x5, x6, x7, and x8.
[0110] MAX_Y=MAX(y1,y2,y 3,y 4,y 5,y 6,y 7,y 8); MAX(y1,y2,y 3,y 4,y 5,y 6,y 7,y 8) represents the maximum value among y1,y2,y 3,y 4,y 5,y 6,y 7,y 8.
[0111] Then, the coordinates of the upper left vertex TopLeft of the two-dimensional box are (MIN_X, MIN_Y); the coordinates of the lower left vertex BottomLeft of the two-dimensional box are (MIN_X, MAX_Y); the coordinates of the upper right vertex TopRight of the two-dimensional box are (MAX_X, MIN_Y); the coordinates of the lower right vertex BottomRight of the two-dimensional box are (MAX_X, MAX_Y); the coordinates of the center point of the two-dimensional box are ((MAX_X-MIN_X) / 2, (MAX_Y-MIN_Y) / 2).
[0112] The rectangle formed by four of the five vertices (TopLeft, BottomLeft, TopRight, and BottomRight) is the 2D box. Any of the five vertices can be used as the reference point of the 2D box, meaning the pop-up window can appear based on one of these vertices and the center point.
[0113] FIG2D shows a schematic diagram of a two-dimensional box provided by at least one embodiment of the present disclosure.
[0114] As shown in FIG2D , the two-dimensional box 2 is a boundary mapping of the three-dimensional box 1 on the display screen.
[0115] The five key points of the two-dimensional box body 2 are the upper left vertex 11, the lower left vertex 13, the upper right vertex 10, the lower right vertex 14 and the center point 12. The lower right vertex 14 is the reference point of the two-dimensional box body.
[0116] In some other embodiments of the present disclosure, step S31 may also be to directly determine the center point of the three-dimensional model and use the center point of the three-dimensional model as the reference point of the target model.
[0117] For step S32, for example, based on the first reference point and the offset, the position of the second reference point of the window is determined; and based on the second reference point, the position of the window is determined. For example, in some embodiments of the present disclosure, the second reference point is a key point corresponding to the first reference point. For example, if the first reference point is the lower right vertex of the rectangle, then the second reference point is the lower right vertex of the window. In other embodiments of the present disclosure, the second reference point can be independent of the first reference point, that is, the second reference point can also not correspond to the first reference point. For example, the first reference point is the lower right vertex of the rectangle, and the second reference point is the upper left vertex of the window.
[0118] For example, the coordinates of the second reference point are determined based on the coordinates and offset of the first reference point, and the estimated position of the window is determined based on the second reference point. For example, if the second reference point is the upper left vertex of the window, then after the position of the upper left vertex of the window is determined, the area to the lower right of the upper left vertex is the estimated position of the window.
[0119] For another example, based on the second reference point and the size information, the positions of multiple window key points of the window are determined.
[0120] FIG3 shows a schematic diagram of step S32 in FIG2A provided by at least one embodiment of the present disclosure.
[0121] As shown in FIG3 , for example, the first reference point is the lower right vertex 14 of the two-dimensional box 2 , and the second reference point is the upper left vertex of the window.
[0122] In this embodiment, for example, the offset refers to the displacement between the second reference point and the first reference point in the x-direction and the y-direction, respectively. That is, the displacement between the second reference point and the first reference point in the x-direction is Diff_X; the displacement between the second reference point and the first reference point in the y-direction is Diff_Y. It should be noted that the displacement between the second reference point and the first reference point in the x-direction and the y-direction, respectively, can be positive or negative. For example, in the example of FIG3 , both the displacement Diff_X and the displacement Diff_Y are positive values. In some other embodiments, one or more of the displacement Diff_X and the displacement Diff_Y can be negative values.
[0123] For example, as shown in Figure 3, according to the received pop-up window instruction, it can be known that the first reference point is the lower right vertex 14. Assuming that the coordinates of the lower right vertex 14 are (x0, y0), and based on the offset of the pop-up window (Diff_X, Diff_Y), the position where the upper left vertex of the window should appear on the display screen can be calculated, that is: (at coordinate point A, the coordinates of coordinate point A are (x0+Diff_X, y0+Diff_Y). After determining the position of the second reference point, the second reference point is used as the origin, and the sum of the coordinates of the second reference point and the length of the window is the position of the upper right vertex of the window, and the sum of the coordinates of the second reference point and the width of the window is the position of the lower left vertex of the window, thereby obtaining the positions of the four vertices of the window. For example, the four vertices of the window are the upper left vertex A, the upper right vertex B, the lower right vertex C, and the lower left vertex D.
[0124] In some embodiments of the present disclosure, for example, the offset can be defaulted to 0. If the lower right vertex of the two-dimensional box is used as the first reference point and the upper left vertex of the pop-up window is used as the second reference point, the pop-up window will appear at the position of the lower right vertex, which can avoid blocking the target model; or the upper left vertex of the two-dimensional box is used as the first reference point and the lower right vertex of the pop-up window is used as the second reference point, the pop-up window will appear at the position of the upper left vertex, which can avoid blocking the target model; if the center point of the two-dimensional box is used as the reference point and any vertex of the pop-up window is used as the second reference point, then the pop-up window will block the target model.
[0125] In other embodiments of the present disclosure, if the center point of the two-dimensional box is used as the reference point, it is necessary to set a suitable offset to prevent the pop-up window from blocking the target model.
[0126] Therefore, the first vertex of the 2D box is used as the first reference point, and the second vertex in the pop-up window is used as the second reference point. The position of the second vertex in the pop-up window is symmetrical with the position of the first vertex in the 2D box. This can prevent the pop-up window from obscuring the target model and simplify calculations. For example, the first vertex is the lower right vertex and the second vertex is the upper left vertex; the first vertex is the upper right vertex and the second vertex is the lower left vertex, etc.
[0127] In step S33 , for example, a window is generated according to the length of each side of the window and the target position of the window.
[0128] In some embodiments of the present disclosure, the window information also includes window area restriction information, and step S33 includes: judging whether the window exceeds the restricted area based on the size information of the window and the position of the window; in response to the window exceeding the restricted area, adjusting the size of the window to restrict the window within the restricted area.
[0129] This method can adjust the window size in real time according to actual conditions, confine the window to a restricted area, and prevent the pop-up window from exceeding the display screen or blocking other important models or data.
[0130] FIG4 shows a schematic diagram of restricting a window to a restricted area according to at least one embodiment of the present disclosure.
[0131] As shown in Figure 4, the pop-up window can be restricted to the restricted area 401. The four coordinate points of the restricted area 401 are passed to the model layer of the Unreal Engine by the terminal through the pop-up window command. It is assumed that the coordinates of these four coordinate points are divided into P1 (Region_X_Min, Region_Y_Min), P2 (Region_X_Max, Region_Y_Min), P3 (Region_X_Max, Region_Y_Max) and P4 (Region_X_Min, Region_Y_Max), that is, the minimum value of the x-axis of the restricted area 401 is Region_X_Min, the maximum value of the x-axis is Region_X_Max, the minimum value of the y-axis is Region_Y_Min, and the maximum value of the y-axis is Region_Y_Max.
[0132] By comparing the coordinate values of the four vertices of the window with Region_X_Min, Region_X_Max, Region_Y_Min and Region_Y_Max, it is detected whether the pop-up window exceeds the restricted area 401. If the window exceeds the current area 401, the window position is corrected.
[0133] For example, if the window is located at position A1B1C1D1, and the x-coordinates (x0+Diff_X) of vertices A1 and D1 are less than Region_X_Min, then the x-coordinates of vertices A1 and C1 are reassigned to Region_X_Min. That is, vertex A1 is adjusted to point A1', and the position of vertex D1 is adjusted accordingly.
[0134] If the sum of the x-coordinates (x0 + Diff_X) of vertices A1 and D1 and the x-length of the window (i.e., the pop-up window width) is greater than Region_X_Max, then the x-axis direction of vertices B1 and C1 is assigned the value of Region_X_Max. In other words, vertex B1 is adjusted to point B1', and the position of vertex C1 is adjusted accordingly.
[0135] Similarly, for example, if the ordinates (y0+Diff_Y) of vertex A1 and vertex B1 are less than Region_Y_Min, the ordinate of vertex A1 is assigned to Region_Y_Min, that is, y0+Diff_Y is revised to Region_Y_Min.
[0136] In the example of FIG. 4 , the ordinates (y0+Diff_Y) of the vertex A1 and the vertex B1 are greater than Region_Y_Min, and therefore, the ordinates of the vertex A1 and the vertex B1 do not need to be adjusted.
[0137] If the sum of the vertical coordinate of vertex D1 (y0+Diff_Y) and the length of the window in the Y direction (i.e., the pop-up window height) is greater than Region_Y_Max, the vertical coordinates of vertices C1 and D1 are assigned the value of Region_Y_Max. For example, as shown in Figure 4, the x-coordinate of vertex D1 is adjusted to Region_X_Min, and the y-coordinate is adjusted to Region_Y_Min, and finally vertex D1 is adjusted to position P4. Similarly, vertex C1 is adjusted to position P3.
[0138] As shown in FIG4 , according to the window area restriction information, the window A1B1C1D1 is finally adjusted to the window A1'B1'P3P4.
[0139] As shown in FIG1A , in some embodiments of the present disclosure, the method for generating a pop-up window includes steps S50 and S60 in addition to steps S10 to S40 .
[0140] Step S50: in response to obtaining a trigger event for the display screen, re-determine the target position of the window of the target model.
[0141] Step S60: in response to the change in the position of the window, update the position of the pop-up window on the screen.
[0142] This method can update the target position of the form at any time. For example, when the position of the target model changes, the pop-up window used to display the specific information of the target model also moves with the target model, intuitively and flexibly displaying the relevant content of the target model and improving the user experience.
[0143] Regarding step S50: the triggering event of the display screen includes, for example, refreshing the display screen. For example, each time the display screen is refreshed, the target position of the window of the target model is re-determined using steps S31 and S32 in FIG. 2A .
[0144] In some embodiments of the present disclosure, the triggering event includes the movement of the target model. For example, the movement of the target model includes horizontal movement and rotation. For example, when it is detected that a sliding operation is performed on the display screen so that the target model moves, the target position of the window of the target model is re-determined. For another example, when it is detected that the viewing angle of the target model changes, the target position of the window of the target model is re-determined. For example, the three-dimensional scene displayed on the display screen is a digital twin of a real city. The city includes a park and a camera that collects images of the park. When the position of the camera changes, the visual image of the park changes. Accordingly, the three-dimensional model of the virtual park in the digital twin also displays scenery from different directions. At this time, it is necessary to redetermine the target position of the window of the target model.
[0145] For example, step S50 includes: in response to the target model moving in the plane where the display screen is located, moving the target position according to the movement information.
[0146] The movement information includes, for example, the direction and speed of movement.
[0147] For example, in a 2D map scene or a 3D game scene, if the target model only moves within the frame (i.e., in two dimensions), the target position is changed based on the target model's direction and speed. For example, if the target model moves 5mm along the x-axis of the frame, the target position follows the target model's 5mm movement along the x-axis. This eliminates the need to re-establish the 3D box, and instead directly adjusts the target model's displacement based on the target model's displacement, reducing bandwidth consumption and obtaining uniformly and rationally rich data (the information provided by the window).
[0148] For example, step S50 further includes: in response to the rotation of the target model, re-establishing the three-dimensional box body of the target model, and determining the target position according to the three-dimensional box body of the rotated target model.
[0149] If the target model is rotated, the three-dimensional box of the target model may change. The three-dimensional box can be rebuilt according to the method described above, and the target position is determined based on the rebuilt three-dimensional box.
[0150] In some other embodiments of the present disclosure, in response to the target model rotating, the target position is determined according to the rotation angle.
[0151] For example, a table of correspondences between rotation angles and target position adjustment strategies can be created in advance, so that the target position adjustment strategy for a given rotation angle can be determined by searching the table. This eliminates the need to recreate the 3D box, reducing bandwidth consumption.
[0152] In some embodiments of the present disclosure, the generation method shown in FIG1A further includes: generating a connection icon, where the connection icon is used to indicate that the target model corresponds to the pop-up window.
[0153] For example, the connection icon can be a dashed line or other shape or color that distinguishes it from the target model and pop-up window. For example, the connection icon can be a dashed line with an arrow pointing from the target model to the pop-up window. This connection icon connects the model and the pop-up window, making it clear to the user which model in the scene the pop-up window is targeting, improving the user experience.
[0154] In some embodiments of the present disclosure, a pop-up window can be framed by a line frame, and then an arrow connects the target model and the line frame. The color of the line frame can be automatically selected by an intelligent algorithm. For example, if the target model is dark, the color of the line frame can be light.
[0155] Regarding step S60: if the position of the window changes, the pop-up window position is updated to the target position. For example, the display content is loaded into the window according to the method described above.
[0156] FIG5 shows a flowchart of another pop-up window generation method provided by at least one embodiment of the present disclosure.
[0157] As shown in Figure 5, the method includes steps S501 to S511. The method is applied to a display system comprising a terminal device (e.g., the control device described above) and a display device, wherein the display device includes a scene created based on the Unreal Engine. Step S501 is performed by the terminal device, while steps S502 to S511 are performed by the display device.
[0158] Step S501: The terminal provides a pop-up window instruction to the display device.
[0159] Step S502: The display device receives a pop-up window instruction.
[0160] For example, the data packet of the pop-up window instruction is in JSON format. For example, the data packet is in JSON format, for example:
[0161] {
[0162] "targetName":"floor1",
[0163] "positionType":"LeftTop",
[0164] "windowWidth":0.5,
[0165] "windowHeight":0.2,
[0166] "xDiff":0.1,
[0167] "yDiff":0.2
[0168] }
[0169] The meaning of each tag in the JSON format is shown in the following table.
[0170] Step S503: Searching for a target model in the scene, for example, searching for the target model according to the target model name in the pop-up window instruction.
[0171] Step S504: If the target model is not found, for example, a prompt message indicating that the target model is not found is issued.
[0172] Step S505: Confirm that the target model is found.
[0173] Step S506: construct a three-dimensional box for the target model.
[0174] Step S507: Calculate the mapping coordinates of each vertex of the three-dimensional box on the two-dimensional display screen.
[0175] Step S508: Calculate the mapping coordinates to obtain a two-dimensional box.
[0176] Step S509: Determine the reference point of the two-dimensional box and the position of the window reference point.
[0177] Step S510: Load display content and display a pop-up window.
[0178] Step S511: When the target model moves or the visual changes of the target model are observed (for example, the camera moves to capture the target model), step S509 is re-executed to calculate the position of the window reference point, and step S510 is re-executed.
[0179] In some embodiments of the present disclosure, when the target model moves or the visual changes of the target model are observed, the two-dimensional box determined in steps S506 to S508 can be directly used without recalculating the two-dimensional box. Instead, step S509 can be directly executed. This can save computing resources and improve response speed.
[0180] In other embodiments of the present disclosure, when the target model moves or the visual aspect of the target model changes, steps S506 to S510 are re-executed, so that the precise reference point position can be obtained and the calculation result is more accurate.
[0181] FIG6A shows a system architecture diagram of a pop-up window generation method provided by at least one embodiment of the present disclosure.
[0182] As shown in FIG6A , the system architecture includes a tablet computer 601 as a control terminal and an Unreal Engine program terminal 602 .
[0183] In some embodiments of the present disclosure, the tablet computer end 601 and the Unreal Engine program end 602 are connected via protocols such as http, tcp, udp or websocket, so that the tablet computer end 601 sends a pop-up instruction to the Unreal Engine program end 602. The Unreal Engine program end 602 includes an instruction receiving module 612 for receiving pop-up instructions. For example, the user clicks on the display list of the tablet computer end 601 and selects the target model as model P. The tablet computer end 601 provides a pop-up instruction to the Unreal Engine program end 602 via protocols such as http, tcp, udp or websocket, and the target model name in the pop-up instruction is model P. The instruction receiving module 612 of the Unreal Engine program end 602 receives the pop-up instruction, and the Unreal Engine program end 602 calls Webview to generate a pop-up window associated with model P.
[0184] In other embodiments of the present disclosure, the user may also directly click on the Unreal Engine program terminal 602 to display the model P in the three-dimensional scene. For example, to click on the model P, the Unreal Engine program terminal 602 provides a pop-up window instruction to the instruction receiving module 612, or directly calls the instruction receiving module 612, so that the instruction receiving module 612 analyzes the information of the pop-up window instruction and then uses Webview to generate a pop-up window associated with the model P.
[0185] FIG6B shows an application scenario diagram of generating a pop-up window provided by at least one embodiment of the present disclosure.
[0186] As shown in Figure 6B, the application scenario for generating the pop-up window is the smart operation platform scenario. The smart operation platform deploys the Unreal Engine to display the three-dimensional model, that is, the smart operation platform is similar to the Unreal Engine program terminal in Figure 6A. The smart operation platform can be connected to a terminal (for example, the tablet terminal in Figure 6A) so as to be displayed according to the user's operation on the terminal, that is, the terminal serves as the control end of the smart operation platform scenario. The user's terminal is conveniently used for remote control of the smart operation platform as the control end of the smart operation platform scenario, reducing the burden on the smart operation platform.
[0187] For example, the basic information of a community on the smart operation platform includes basic building information, real-time monitoring data on rental and occupancy, and industry distribution.
[0188] For example, if a user selects "South Tower" on the terminal (i.e., the control terminal), a 3D model 603 of "South Tower" will be displayed on the smart operation platform. Furthermore, if the user further selects "South Tower, Third Floor," a pop-up window 604 will appear around 3D model 603. This pop-up window 604 displays environmental monitoring information for the third floor of the South Tower, such as temperature, humidity, and carbon monoxide and carbon dioxide concentrations.
[0189] It should be noted that, although FIG6B shows a pop-up window displaying numerical values as an example, the embodiments of the present application are not limited thereto, and the pop-up window may display functions that can be realized by Webview, such as videos and images.
[0190] FIG7A is a schematic block diagram of a pop-up window generating device 70 provided in some embodiments of the present disclosure.
[0191] As shown in FIG. 7A , the generating device 70 includes an acquiring unit 701 , a determining unit 702 , a generating unit 703 and a loading unit 704 .
[0192] The acquisition unit 701 is configured to acquire a pop-up window instruction, which includes target model information and pop-up window body information. The acquisition unit 701 executes step S10 in FIG1A , for example.
[0193] The determining unit 702 is configured to determine the target model from the scene created based on the virtual engine according to the target model information. The determining unit 702 executes step S20 in FIG1A , for example.
[0194] The generating unit 703 is configured to generate a form according to the form information and the target model. The generating unit 703 executes step S30 in FIG1A , for example.
[0195] The loading unit 704 is configured to load the display page into the form, generate a pop-up window in the scene, and associate the content of the display page with the target model. The loading unit 704, for example, executes step S40 in FIG1A .
[0196] The generating device 700 can generate a pop-up window associated with the target model in the scene created by the virtual engine, and the content of the pop-up window can be a loaded web page. The pop-up window can flexibly display content.
[0197] In some embodiments of the present disclosure, the generating device 70 further executes updating the position of the pop-up window to the target position if the position of the window changes.
[0198] In some embodiments of the present disclosure, the generating device 70 further generates a connection icon, where the connection icon is used to indicate that the target model corresponds to the pop-up window.
[0199] For example, the connection icon can be a dashed line or other shape or color that distinguishes it from the target model and pop-up window. For example, the connection icon can be a dashed line with an arrow pointing from the target model to the pop-up window. This connection icon connects the model and the pop-up window, making it clear to the user which model in the scene the pop-up window is targeting, improving the user experience.
[0200] For example, the acquisition unit 701, the determination unit 702, the generation unit 703, and the loading unit 704 can be hardware, software, firmware, or any feasible combination thereof. For example, the acquisition unit 701, the determination unit 702, the generation unit 703, and the loading unit 704 can be dedicated or general-purpose circuits, chips, or devices, or can be a combination of a processor and a memory. The embodiments of the present disclosure do not limit the specific implementation of each of the above units.
[0201] It should be noted that in the embodiments of the present disclosure, the various units of the pop-up window generation device 70 correspond to the various steps of the aforementioned pop-up window generation method. For the specific functions of the pop-up window generation device 70, reference can be made to the relevant description of the pop-up window generation method, and no further description is given here. The components and structure of the pop-up window generation device 70 shown in Figure 7A are merely exemplary and non-restrictive. The pop-up window generation device 70 may also include other components and structures as needed.
[0202] At least one embodiment of the present disclosure further provides an electronic device comprising a processor and a memory, wherein the memory comprises one or more computer program modules. The one or more computer program modules are stored in the memory and configured to be executed by the processor, and the one or more computer program modules include instructions for implementing the above-mentioned information processing method. The electronic device is capable of generating a pop-up window associated with a target model in a scene created by a virtual engine, and the content of the pop-up window can be a loaded web page, and the pop-up window can flexibly display content.
[0203] Figure 7B is a schematic block diagram of an electronic device provided in some embodiments of the present disclosure. As shown in Figure 7B, the electronic device 700 includes a processor 710 and a memory 720. The memory 720 is used to store non-transitory computer-readable instructions (e.g., one or more computer program modules). The processor 710 is used to execute non-transitory computer-readable instructions, which can execute one or more steps in the image processing method described above when executed by the processor 710. The memory 720 and the processor 710 can be interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0204] For example, the processor 710 may be a central processing unit (CPU), a graphics processing unit (GPU), or other processing units with data processing capabilities and / or program execution capabilities. For example, the central processing unit (CPU) may be an X86 or ARM architecture. The processor 710 may be a general-purpose processor or a dedicated processor, and may control other components in the electronic device 700 to perform desired functions.
[0205] For example, the memory 720 may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, a flash memory, etc. One or more computer program modules may be stored on the computer-readable storage medium, and the processor 710 may execute one or more computer program modules to implement various functions of the electronic device 700. Various applications and various data, as well as various data used and / or generated by the applications, may also be stored in the computer-readable storage medium.
[0206] It should be noted that, in the embodiment of the present disclosure, the specific functions and technical effects of the electronic device 700 can be referred to the description of the generation method above, and will not be repeated here.
[0207] Figure 8 is a schematic block diagram of another electronic device provided in some embodiments of the present disclosure. This electronic device 800 is, for example, suitable for implementing the generation method provided in the embodiments of the present disclosure. The electronic device 800 may be a terminal device, etc. It should be noted that the electronic device 800 shown in Figure 8 is merely an example and does not impose any limitations on the functionality and scope of use of the embodiments of the present disclosure.
[0208] As shown in FIG8 , the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 810, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 820 or a program loaded from a storage device 880 into a random access memory (RAM) 830. Various programs and data required for the operation of the electronic device 800 are also stored in the RAM 830. The processing device 810, the ROM 820, and the RAM 830 are connected to each other via a bus 840. An input / output (I / O) interface 850 is also connected to the bus 840.
[0209] Typically, the following devices may be connected to the I / O interface 850: an input device 860 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 870 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 880 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 890. The communication device 890 may allow the electronic device 800 to communicate with other electronic devices wirelessly or by wire to exchange data. Although FIG8 shows the electronic device 800 with various devices, it should be understood that it is not required to implement or have all of the devices shown, and the electronic device 800 may alternatively implement or have more or fewer devices.
[0210] For example, according to an embodiment of the present disclosure, the above-mentioned generation method can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the above-mentioned generation method. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 890, or installed from the storage device 880, or installed from the ROM 820. When the computer program is executed by the processing device 810, the functions defined in the generation method provided in the embodiment of the present disclosure can be implemented.
[0211] The electronic device can generate a pop-up window associated with a target model in a scene created by a virtual engine, and the content of the pop-up window can be a loaded web page. The pop-up window can flexibly display content.
[0212] At least one embodiment of the present disclosure further provides a computer-readable storage medium for storing non-transitory computer-readable instructions. When executed by a computer, the non-transitory computer-readable instructions can implement the aforementioned generation method. Using this computer-readable storage medium, a pop-up window associated with a target model can be generated within a scene created by a virtual engine. The content of the pop-up window can be a loaded web page, allowing for flexible content display.
[0213] Figure 9 is a schematic diagram of a storage medium provided by some embodiments of the present disclosure. As shown in Figure 9, storage medium 900 is used to store non-transitory computer-readable instructions 910. For example, when non-transitory computer-readable instructions 910 are executed by a computer, one or more steps of the generation method described above may be performed.
[0214] For example, the storage medium 900 can be applied to the electronic device 700 described above. For example, the storage medium 900 can be the memory 720 in the electronic device 700 shown in FIG7B . For example, the relevant description of the storage medium 900 can refer to the corresponding description of the memory 720 in the electronic device 700 shown in FIG7B , and will not be repeated here.
[0215] There are a few points to note:
[0216] (1) The drawings of the embodiments of the present disclosure only relate to the structures involved in the embodiments of the present disclosure. Other structures may refer to conventional designs.
[0217] (2) In the absence of conflict, the embodiments of the present disclosure and the features therein may be combined with each other to form new embodiments.
[0218] The above description is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. The protection scope of the present disclosure shall be based on the protection scope of the claims.
Claims
1. A method for generating a pop-up window, comprising: Obtain a pop-up window instruction, wherein the pop-up window instruction includes target model information and pop-up window form information; According to the target model information, determining the target model from a scene created based on a virtual engine; Generate a window according to the window information; and A display page is loaded into the form, and the pop-up window is generated in the scene, wherein the content of the display page is associated with the target model.
2. The method according to claim 1, wherein: Loading a display page to the form includes: A page control for displaying a page is embedded in the control component of the virtual engine, and the display page is loaded into the form using the page control.
3. The method according to claim 1 or 2, wherein: Generating the form according to the form information includes: Determining the position of the window according to the position information of the target model in the scene; and The window is generated according to the window information and the position of the window.
4. The method according to claim 3, wherein: The window information includes an offset of the window relative to a first reference point of the target model and size information of the window. Determining the position of the window according to the position information of the target model in the scene includes: determining a position of the first reference point of the target model; determining a target position of the window based on the offset and the position of the first reference point, Generating the window according to the window information and the position of the window includes: The window is generated according to the size information of the window and the position of the window.
5. The method according to claim 4, wherein: The target model includes a three-dimensional model, and the target model is displayed on a display screen. Acquiring the first reference point of the target model includes: generating a three-dimensional box body of the three-dimensional model, wherein the three-dimensional box body accommodates the three-dimensional model; Mapping the three-dimensional box body to the plane where the display screen is located to obtain a two-dimensional box body of the target model; and A key point is selected from a plurality of key points of the two-dimensional box as the first reference point.
6. The method according to claim 5, wherein: Mapping the three-dimensional box body to the plane of the display screen to obtain a two-dimensional box body of the target model includes: Using a mapping function in the blueprint of the virtual engine, the three-dimensional coordinates of the multiple vertices of the three-dimensional box are converted into multiple plane coordinates of the plane, wherein the plane where the display screen is located includes an x direction and a y direction; Selecting a point corresponding to a minimum value in the x direction and a minimum value in the y direction from the multiple plane coordinates as the upper left vertex of the two-dimensional box; Selecting a point corresponding to the minimum value in the x direction and the maximum value in the y direction from the multiple plane coordinates as the lower left vertex; Selecting a point corresponding to the maximum value in the x direction and the minimum value in the y direction from the plurality of plane coordinates as the upper right vertex; and A point corresponding to the maximum value in the x direction and the maximum value in the y direction is selected from the plurality of plane coordinates as the lower right vertex.
7. The method according to claim 5 or 6, wherein: The three-dimensional box is a box with the smallest volume that accommodates the three-dimensional model.
8. The method according to any one of claims 4 to 7, wherein: Determining a target position of the window based on the offset and the first reference point includes: Determining a position of a second reference point of the window based on the first reference point and the offset; and Based on the second reference point, the window target position is determined.
9. The method according to claim 8, wherein: The window information also includes window area restriction information. Generating the window according to the size information of the window and the position of the window includes: Determining whether the window exceeds a restricted area according to the size information of the window and the position of the window; In response to the window exceeding the restricted area, the size of the window is adjusted to confine the window within the restricted area.
10. The method according to any one of claims 1 to 9, wherein: The target model is displayed on a display screen, and the method further comprises: In response to acquiring a trigger event for the display screen, re-determining a target position of the window of the target model; In response to a change in the position of the window, the position of the pop-up window on the screen is updated.
11. The method according to claim 10, wherein: The trigger event includes refreshing the display screen.
12. The method according to claim 10 or 11, wherein: The trigger event includes movement of the target model, In response to acquiring a trigger event for the display screen, re-determining a target position of the window of the target model includes: In response to the target model moving in the plane where the display screen is located, the target position is moved according to movement information of the movement.
13. The method according to claim 12, wherein: In response to acquiring a trigger event for the display screen, re-determining a target position of the window of the target model, further comprising: In response to the target model rotating, re-establishing the three-dimensional box of the target model, and determining the target position according to the three-dimensional box of the target model after the rotation; or In response to the target model rotating, the target position is determined according to the rotation angle.
14. The method according to any one of claims 1 to 13, applied to a display device, wherein obtaining the pop-up window instruction comprises: receiving a pop-up window instruction from a control device, wherein the control device establishes a bidirectional connection with the display device; or In response to receiving an input operation on the scene, the pop-up window instruction is generated.
15. The method according to any one of claims 1 to 14, further comprising: A connection icon is generated, wherein the connection icon is used to indicate that the target model corresponds to the pop-up window.
16. A pop-up window generating device, comprising: An acquisition unit is configured to acquire a pop-up window instruction, wherein the pop-up window instruction includes target model information and a pop-up window form information; A determination unit, configured to determine a target model from a scene created based on a virtual engine according to the target model information; A generating unit, configured to generate a window according to the window information; and A loading unit is configured to load a display page into the form and generate the pop-up window in the scene, wherein the content of the display page is associated with the target model.
17. An electronic device comprising: processor; a memory including one or more computer program instructions; The one or more computer program instructions are stored in the memory and are instructions for implementing the generation method according to any one of claims 1 to 15 when executed by the processor.
18. A computer-readable storage medium non-temporarily storing computer-readable instructions, wherein: When the computer-readable instructions are executed by a processor, the generation method according to any one of claims 1 to 15 is implemented.