Scene rendering method, scene building method, electronic equipment, storage medium and program product

By correlating the rendering effect of the projected graphics with the monitoring data of the entity objects, and using SVG format files to build a scene model, it solves the problems of high network and computing requirements caused by the large 3D model file, and achieves smoother display and interaction of digital twin models.

CN120339456APending Publication Date: 2025-07-18HANGZHOU QIANJIANG ELECTRIC GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510197479.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The existing 3D digital twin model files are large and require large network bandwidth and computing power, resulting in display lag or inability to open, and cannot be effectively applied when network conditions are poor or computing power is insufficient.

Method used

By correlating the rendering effect of the projected graphics with the monitoring data of the solid object, using simplified planar projection graphics to represent the solid scene, reducing the difficulty of rendering, and using text-based SVG format files to build a scene model.

Benefits of technology

It reduces the size of the model file, reduces the requirements for network bandwidth and computing power, improves the fluency and interactivity of the digital twin model, and is suitable for more network conditions and devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339456A_ABST
    Figure CN120339456A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a scene rendering method, a scene building method, electronic equipment, a storage medium and a program product, and relates to the technical field of modeling, the method comprises the following steps: in response to a target instruction indicating to display a first scene model, obtaining a first model file based on a text; acquiring monitoring data of the first entity object according to configuration information of the first model file on a first projection graph in the first scene model; the first scene model is rendered according to the first model file and the monitoring data of the first entity object, and the rendering effect of the first projection graph is determined according to the monitoring data of the first entity object. The entity object in the entity scene is represented through the simplified plane projection graph, and the rendering difficulty can be reduced, so that the scene model can be constructed by using the text, the size of the first model file is reduced, the fluency of displaying the digital twinborn model is improved, and the bandwidth and the computing power required for rendering the digital twinborn model are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of modeling technology, and in particular, to a scene rendering method, a scene building method, an electronic device, a storage medium, and a program product. Background Art

[0002] Digital Twin uses technologies such as physical models, sensor data, and real-time analysis to create a dynamic virtual model of a physical entity in a virtual space and manage the physical entity through real-time data interaction. In related technologies, an implementation method based on a 3D scene model is provided. However, the digital twin model based on 3D has a large file size, requiring users to have a large network bandwidth and high computer processing capabilities. If the user's bandwidth is small or the computer processing power is not high enough, it will cause the digital twin model to display stutteringly or even unable to open the model. Summary of the Invention

[0003] Embodiments of this application provide a scene rendering method, a scene building method, an electronic device, a storage medium, and a program product to alleviate or solve one or more technical problems existing in the prior art.

[0004] In a first aspect, an embodiment of this application provides a scene rendering method, including:

[0005] In response to a target instruction indicating to display a first scene model, obtain a first model file based on text; the first scene model includes at least one projection graphic, and the projection graphic is used to represent the projection of an entity object in a target entity scene;

[0006] According to the configuration information of the first projection graphic in the first scene model in the first model file, obtain the monitoring data of the first entity object; the first entity object corresponds to the first projection graphic in the target entity scene;

[0007] Render the first scene model according to the first model file and the monitoring data of the first entity object, where the rendering effect of the first projection graphic is determined according to the monitoring data of the first entity object.

[0008] In some embodiments, the step of obtaining the monitoring data of the first entity object according to the configuration information of the first projection graphic in the first scene model in the first model file includes:

[0009] Determine the data acquisition interface for the monitoring data of the first entity object according to the configuration information of the first projection graphic;

[0010] Based on the data acquisition interface, obtain the monitoring data of the first entity object.

[0011] In some embodiments, the first projection graphic includes multiple layers. Rendering the first scene model according to the first model file and the monitoring data of the first entity object includes:

[0012] For the first layer in the first projection graphic that is bound to the monitoring data, render according to the monitoring data of the first entity object.

[0013] In some embodiments, after rendering the first scene model according to the first model file and the monitoring data of the first entity object, the method further includes:

[0014] According to the configuration information of the second projection graphic in the first scene model in the first model file, listen for a first interaction operation on the second projection graphic, and / or listen for a target event associated with a second entity object; the second projection graphic is used to represent the projection of the second entity object in the target entity scene;

[0015] In response to the first interaction operation and / or the target event, perform at least one of the following rendering operations:

[0016] Display or hide a second layer in the second projection graphic;

[0017] Change the attribute value of the second projection graphic, and re-render the second projection graphic according to the changed attribute value of the second projection graphic;

[0018] Hide the second projection graphic;

[0019] Obtain and display the monitoring data of the second entity object;

[0020] Pop up a preset icon, which is used to expand and display the monitoring data of the second entity object after being triggered;

[0021] Render a third projection graphic hidden in the first scene model, the third projection graphic is used to represent the projection of a third entity object in the target entity scene, and the third entity object is associated with the second entity object;

[0022] Obtain a second model file based on text and render a second scene model according to the second model file.

[0023] In some embodiments, the target entity scene is a building complex, and the entity objects include: buildings that make up the building complex, floors in the buildings, and equipment in the floors. The projection graphic of the building is formed by stacking the projection graphics of each floor in the building, and the projection graphic of the equipment in the floor is displayed after a second interaction operation on the projection graphic of the floor is monitored.

[0024] In some embodiments, after obtaining the first model file based on text, the method further includes:

[0025] Displaying a tree structure diagram of the first scene model according to the first model file; the tree structure diagram is used to represent the hierarchical relationship of each entity object in the target entity scene;

[0026] In response to a third interaction operation on a fourth entity object in the tree structure diagram, rendering a fourth projection graphic for representing the projection of the fourth entity object.

[0027] In a second aspect, an embodiment of the present application provides a scene construction method, including:

[0028] In response to a drawing operation, creating projection graphics for representing the projections of each entity object in the target entity scene;

[0029] Generating configuration information for obtaining monitoring data of a first entity object for a first projection graphic corresponding to the first entity object in the target entity scene;

[0030] Determining a mapping relationship between the rendering effect of the first projection graphic and the monitoring data of the first entity object;

[0031] Generating a first model file based on text according to the created projection graphics, the configuration information, and the mapping relationship; the first model file is used to render a first scene model representing the target entity scene.

[0032] In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory, and the processor implements the method according to any one of the embodiments of the present application when executing the computer program.

[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program implements the method according to any one of the embodiments of the present application when executed by a processor.

[0034] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, and the computer program implements the method according to any one of the embodiments of the present application when executed by a processor.

[0035] Based on the scene display method provided in the above first aspect, the present application has at least the following beneficial effects or advantages:

[0036] In response to a target instruction indicating to display a first scene model, obtain a text-based first model file; the first scene model includes at least one projection graphic, and the projection graphic is used to represent the projection of an entity object in the target entity scene; according to the configuration information of the first projection graphic in the first scene model in the first model file, obtain the monitoring data of the first entity object; the first entity object corresponds to the first projection graphic in the target entity scene; according to the first model file and the monitoring data of the first entity object, render the first scene model, wherein the rendering effect of the first projection graphic is determined according to the monitoring data of the first entity object. In this way, the rendering effect of the first projection graphic is associated with the monitoring data of the first entity object, supporting the interaction and mapping between the virtual scene and the real entity, thereby realizing the digital twin model. By using a simplified planar projection graphic to represent the entity object in the entity scene, the rendering difficulty can be reduced, so that the scene model can be constructed using text, the size of the first model file can be reduced, the fluency of displaying the digital twin model can be improved, and the bandwidth and computing power required for rendering the digital twin model can be reduced.

[0037] The above description is only an overview of the technical solution of this application. In order to be able to understand the technical means of this application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of this application more obvious and understandable, the specific embodiments of this application are specifically given below. Brief Description of the Drawings

[0038] In the drawings, unless otherwise specified, the same reference numerals throughout the several views denote the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments according to this application and should not be regarded as limiting the scope of this application.

[0039] Figure 1 Shows a flowchart of a scene rendering method provided by an embodiment of this application;

[0040] Figure 2 Shows a model rendering schematic diagram of a scene rendering method provided by an embodiment of this application Figure 1 ;

[0041] Figure 3 Shows a model rendering schematic diagram of a scene rendering method provided by an embodiment of this application Figure 2 ;

[0042] Figure 4 Shows a model rendering schematic diagram of a scene rendering method provided by an embodiment of this application Figure 3 ;

[0043] Figure 5 Shows a model rendering schematic diagram of a scene rendering method provided by an embodiment of this applicationFigure 4 ;

[0044] Figure 6 Shows a tree structure diagram of a scene rendering method provided by an embodiment of the present application;

[0045] Figure 7 Shows multiple layers in a projection graphic in a scene rendering method provided by an embodiment of the present application;

[0046] Figure 8 Shows a flowchart of a scene construction method provided by an embodiment of the present application;

[0047] Figure 9 Shows a schematic diagram of an interface for setting configuration information in a scene construction method provided by an embodiment of the present application;

[0048] Figure 10 Shows a block diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0049] In the following, only some exemplary embodiments are briefly described. As those skilled in the art can recognize, the described embodiments can be modified in various different ways without departing from the concept or scope of the present application. Therefore, the drawings and the description are considered to be exemplary in nature and not restrictive.

[0050] To facilitate the understanding of the technical solutions of the embodiments of the present application, the related technologies of the embodiments of the present application are described below. The following related technologies can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and they all fall within the protection scope of the embodiments of the present application.

[0051] It should be noted that the application scenarios or application examples provided in the present application are for the convenience of understanding, and the embodiments of the present application do not make specific limitations on the application of the technical solutions.

[0052] The technical solutions of the present application and how the technical solutions of the present application solve the foregoing technical problems are described in detail below with specific embodiments. The several specific embodiments listed can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described in detail below with reference to the drawings.

[0053] In the technical field of digital twins, digital twin models are usually built based on 3D models. However, 3D models have many interactive elements and complex operations, usually requiring more complex programming and support from specific 3D engines, resulting in relatively high implementation difficulty. In digital twin scenarios, this interactivity allows users to more intuitively explore and understand twin data, such as clicking on device icons to view detailed information and animating the display of changes in the operating status of devices. 3D models are relatively complex in terms of data-driven dynamic updates, requiring more development work to achieve similar effects. During the development process, it is necessary to associate and bind 3D models with sensor data, and the development implementation process of binding and rendering is complex and difficult. Therefore, the cost of building 3D scene models is relatively high.

[0054] 3D models are usually stored in binary formats, such as common 3D model file formats like.obj and.fbx. The parameter information contained in the file format is complex, and it is necessary to store not only the geometric shape of the object (such as vertex coordinates, patch information, etc.), but also material information (such as texture mapping, reflectivity, etc.), lighting information (such as light source position, light intensity, etc.), and spatial transformation information of the model. Therefore, a simple 3D model may be several hundred KB, while complex and high-precision 3D models, such as building models with fine textures and complex structures or mechanical part models with high-resolution textures, may have file sizes reaching several MB or even dozens of MB. For example, a 3D model file of a car with 4K textures may exceed 100MB. Due to the large size of 3D model files, more storage space is required. If a large number of 3D model scenes need to be stored, it is necessary to equip devices such as large-capacity hard drives and storage servers, and as the data volume increases, the costs of storage management and maintenance will also increase accordingly.

[0055] After deploying 3D models in the cloud or on a server, the user's client needs to have a relatively large network bandwidth and computer processing power to achieve a non-lagging display effect. Due to the large size of 3D model files, the transmission time is relatively long. In the case of limited network bandwidth, it may take several seconds or even dozens of seconds to transmit a 3D model, which will cause users to wait for a long time when accessing digital twin scenarios, affecting the user experience. For some digital twin applications with high real-time requirements, such as remote device monitoring, this long transmission delay may be unacceptable. Therefore, 3D models require a relatively high network bandwidth to ensure the transmission speed. If fast transmission is to be achieved, users need to have a high-speed and stable network connection, such as a fiber optic network or high-speed Wi-Fi, which limits the application of 3D model digital twin scenarios in some areas or devices with poor network conditions and increases the cost of upgrading the network bandwidth to ensure transmission quality. Moreover, 3D model formats and rendering engines may have compatibility issues on different platforms and devices, requiring additional adaptation and processing.

[0056] In view of the problems of difficult modeling, large model files, and high requirements for the bandwidth and computing power of accessing users after cloud deployment, the embodiments of the present application propose a scene rendering method and a scene construction method, which associate the rendering effect of the first projection graphic with the monitoring data of the first entity object, support the interaction and mapping between the virtual scene and the real entity, so as to implement a digital twin model, and represent the entity object in the entity scene through a simplified planar projection graphic, which can reduce the rendering difficulty, so that a scene model can be constructed using text, reduce the size of the first model file, improve the fluency of displaying the digital twin model, and reduce the bandwidth and computing power required for rendering the digital twin model.

[0057] The scene rendering method provided by the embodiments of the present application can be implemented on the client or the server. In some embodiments, the client can be an application installed in the terminal, or a small program in the mobile terminal, etc. For example, a browser on a personal computer, a small program in an instant messaging software on a mobile phone, etc. The server can be a server cluster or a cloud server, etc. It can be understood that the client is the end that directly interacts with the user. The client can receive the interaction operations input by the user and display the rendering result to the user. The server communicates with the client and can provide the client with some data processing capabilities. For example, based on the user interaction operation received by the client, it feeds back the corresponding data and provides the data required for rendering to the client.

[0058] See Figure 1 the flowchart of the scene rendering method shown in the figure. This method specifically includes steps 101 to 103.

[0059] Step 101, in response to a target instruction indicating to display a first scene model, obtain a first model file based on text.

[0060] The target instruction can be generated based on the input operation of the user. For example, when the scene rendering method provided by the embodiments of the present application is applied to a cloud server, when the user clicks the option to display a certain building park on the client, the client sends a target instruction to the cloud server based on the user's click operation, indicating that the server needs to render the first scene model representing the building park on the client.

[0061] The first scene model includes at least one projection graphic, and the projection graphic is used to represent the projection of an entity object in the target entity scene. For example, the target entity scene represented by the first scene model is a building park, and the entity objects in the building park can include: at least one building, the floors in each building, the equipment in several floors, etc. The projection graphic represents the planar graphic of the target entity scene from a perspective. It can be understood that the projection graphic is used to represent the projection and is not limited to being exactly the same as the projection of the entity object, and can be a simplified projection. For example, refer to Figure 2, use three planes to represent a floor diagram, and build a pseudo 3D (2.5D visual effect) floor model scene by creating three simple fixed-angle faces. Each floor is a model built of three faces. Further, refer to Figure 3 , through the stacking of multiple floors, a building / premises can be formed, floors are stacked into a building, and buildings are constructed into a campus. In a floor, multiple rooms can also be created through construction surfaces, and many rooms are constructed into the floor. In the room, the construction surface can also be used to construct the equipment in the room, or other graphic elements can be used to represent the decoration in the room. It can be understood that the composition structure of the room or the equipment and decoration in the room can be hidden when displaying the panoramic view of the building campus, and can be displayed based on some interactive operations or events.

[0062] In some embodiments, the first text-based model file may be in SVG (Scalable Vector Graphics) format, where SVG files describe two-dimensional vector graphics based on XML markup language. SVG files mainly store descriptive information such as the geometric shape, color, and path of graphic elements, which are represented by a series of simple and direct tags and attributes. Tags are used to represent the types of elements, such as vector graphics types (specific types such as points, lines, rectangles, and circles), text, pixel images, animations, and styles, while attributes are used to describe the location, color, and path of elements. SVG files can be easily combined with technologies such as JavaScript and CSS to achieve interactive effects and animations, and combine various sensor data, business data, and the like with graphic elements to achieve visual display of data.

[0063] Step 102: Acquire monitoring data of a first entity object according to configuration information of a first projection graphic in a first scene model in a first model file.

[0064] The first entity object corresponds to the first projection figure in the target entity scene. The configuration information is used to indicate the corresponding relationship between the first projection figure and the first entity object, and the method of acquiring the monitoring data of the first entity object.

[0065] Step 103: Render a first scene model according to the first model file and the monitoring data of the first entity object.

[0066] After acquiring the monitoring data of the first entity object, the rendering effect of the first projection image is determined based on the monitoring data of the first entity object. The above configuration information provides an association between the monitoring data of the first entity object and the rendering effect of the first projection image. Taking the SVG file as an example, the SVG file includes: vector images, paths, texts, images and other elements. Some examples of rendering effects are as follows: Figure 4, the building complex 40 includes two buildings. Among them, building 41 includes two layers, namely layer 401 and layer 402. Layer 402 is always displayed, and layer 401 is displayed when a fire alarm or the like is detected in the building and hidden under the default normal state. For a certain floor 403 in the building, it includes layer 404 and layer 405. Layer 405 is defaultly always displayed, and layer 404 is displayed when the monitoring data of the floor is within a preset range (such as the temperature is higher than 50), and hidden in other states. Or, refer to Figure 5 , an alarm icon 502 is displayed beside the projection graphic 501 of a certain device.

[0067] In response to a target instruction indicating to display a first scene model, obtain a first model file based on text; the first scene model includes at least one projection graphic, and the projection graphic is used to represent the projection of an entity object in the target entity scene; according to the configuration information of the first projection graphic in the first scene model in the first model file, obtain the monitoring data of the first entity object; the first entity object corresponds to the first projection graphic in the target entity scene; according to the first model file and the monitoring data of the first entity object, render the first scene model, wherein the rendering effect of the first projection graphic is determined according to the monitoring data of the first entity object. In this way, the rendering effect of the first projection graphic is associated with the monitoring data of the first entity object, supporting the interaction and mapping between the virtual scene and the real entity, thereby realizing the digital twin model, and representing the entity object in the entity scene through a simplified planar projection graphic, which can reduce the rendering difficulty, so that a scene model can be constructed using text, reduce the size of the first model file, improve the fluency of displaying the digital twin model, and reduce the bandwidth and computing power required for rendering the digital twin model.

[0068] In some embodiments, the above step 102 of obtaining the monitoring data of the first entity object according to the configuration information of the first projection graphic in the first scene model in the first model file may include performing the following steps: according to the configuration information of the first projection graphic, determine the data acquisition interface of the monitoring data of the first entity object, and based on the data acquisition interface, obtain the monitoring data of the first entity object. For example, the first entity object may be a floor, the monitoring data of the first entity object may be the temperature monitored by a temperature sensor set in the floor, and the data acquisition interface is used to obtain the monitored temperature data of the temperature sensor. Providing the data acquisition interface of the monitoring data in the configuration information can improve the rendering efficiency.

[0069] In some embodiments, the first projection graphic includes multiple layers. According to the first model file and the monitoring data of the first entity object, rendering the first scene model may specifically include performing the following steps: for the first layer in the first projection graphic bound to the monitoring data, render according to the monitoring data of the first entity object.

[0070] The first projection graphic may include multiple superimposed layers, each layer including at least one element, and the rendering effect of the first layer is rendered according to the monitoring data of the first entity object. The rendering effect may include displaying or hiding the first layer. For example, some layers may be hidden in some states. Refer to Figure 4 , when the temperature is higher than 50, a red layer 402 is superimposed on the projection graphic 401 of the floor. Otherwise, when the temperature is not higher than 50, the red layer 402 is hidden. The first layer may include text elements, and the text elements are associated and bound with the monitoring data of the device. Refer to Figure 5 , parameter information such as three-phase current is displayed on the projection graphic of the device, and the three-phase current parameters change in real time according to the monitoring data.

[0071] By grouping the elements in the first projection graphic into multiple layers, different types of information or elements can be assigned to different layers, presenting complex scenarios more clearly, and the content of each layer can be updated independently. The system can re-render the layer bound with the monitoring data as needed without re-rendering the entire graphic, reducing unnecessary consumption of computing and rendering resources.

[0072] In some embodiments, after step 103 of rendering the first scene model according to the first model file and the monitoring data of the first entity object, the method may further include performing the following steps: listening for a first interaction operation on the second projection graphic according to the configuration information of the second projection graphic in the first model file, and / or listening for a target event associated with the second entity object. The first interaction operation includes, but is not limited to: clicking, double-clicking, hovering, swiping, dragging, typing a preset key combination, touching, voice input, user gesture operations detected by a camera, etc. The target event includes, but is not limited to: the monitoring data exceeding a preset threshold, detecting a moving object entering a preset area, an alarm event, etc. The second projection graphic is used to represent the projection of the second entity object in the target entity scene.

[0073] In response to the first interaction operation and / or the target event, perform at least one of the following rendering operations:

[0074] Display or hide the second layer in the second projection graphic. For example, when a smoke alarm event is detected on a certain floor, a red layer is superimposed and displayed in the projection graphic of the floor to indicate the smoke alarm.

[0075] Change the attribute value of the second projection graphic and re-render the second projection graphic according to the changed attribute value of the second projection graphic. For example, when it is detected that the mouse hovers over a certain floor, change the outline stroke color (attribute) of the floor from white to black.

[0076] Hide the second projection graphic. For example, perform a mouse gesture operation of dragging a preset trajectory within the projection graphic display area of a certain building to hide the projection graphic of that building.

[0077] Obtain and display the monitoring data of the second entity object. For example, refer to Figure 5 , in the projection graphic 501 of a device on a certain floor, display the monitoring parameter data of three-phase current.

[0078] Pop up a preset icon, which is used to expand and display the monitoring data of the second entity object after being triggered. For example, refer to Figure 5 , pop up an alarm icon 502 next to the device projection graphic 501 when clicked, and after the alarm icon 502 is triggered, a detail page 503 can be expanded to display the monitoring data of the second entity object.

[0079] Render the hidden third projection graphic in the first scene model. The third projection graphic is used to represent the projection of the third entity object in the target entity scene, and the third entity object is associated with the second entity object. It can be understood that some projection graphics can be hidden in the first scene model. For example, for the scene model of a certain building park, only the buildings and the floors in the buildings are displayed by default, as Figure 3 shown. After the user clicks on a certain floor of a certain building, render an aerial view of the room structure of that floor. The third projection graphic can be directly on top of all the layers displayed before receiving the click operation, or, all the content before receiving the click operation can also be hidden, and only the third projection graphic is displayed.

[0080] Obtain a text-based second model file and render a second scene model according to the second model file. For example, the first model file includes aerial views of multiple building parks. After clicking on one of the building parks, obtain the second model file corresponding to that building park and render the second scene model corresponding to that building park.

[0081] Based on the above examples, some application scenarios of the embodiments of the present application are provided. The target entity scene is a building park, and the entity objects include: buildings that make up the building park, floors in the buildings, and devices on the floors. The projection graphic of a building is formed by stacking the projection graphics of each floor in the building. The projection graphic of the device on the floor is displayed after a second interaction operation on the projection graphic of the floor is monitored.

[0082] It can be understood that the above different rendering operation methods can be combined. In a specific implementation, attributes can be added to and the attribute values can be set for a layer in each floor or each building: behavior = alarm, hover, to represent the interaction of alarm and mouse hover selection. After setting the above parameters, when the mouse moves into the area of the floor or building element, or there is an alarm event in the space (entity object) associated with the layer group to which the layer belongs, the layer with the parameter behavior will change its attributes. Specifically, according to the specific setting of the attribute values in the layer, the stroke attribute will change to a yellow stroke after the mouse moves in, and the transparency of the color will change in case of an alarm event, from the default transparent filling to a red semi-transparent filling.

[0083] Through a variety of rendering operation methods and their combination, a rich operation experience can be provided for interactive operations, and different rendering effects can be provided for prompting based on target events, improving the flexibility of the scene model.

[0084] In some embodiments, after obtaining the first model file based on text, a tree structure diagram of the first scene model can also be displayed according to the first model file, referring to Figure 6 , the tree structure diagram is used to represent the hierarchical relationship of each entity object in the target entity scene. In response to the third interaction operation on the fourth entity object in the tree structure diagram, a fourth projection graph representing the projection of the fourth entity object is rendered.

[0085] In a specific implementation based on an SVG file, attributes can be added to and the attribute values can be set in the attributes of the layer group label corresponding to the building or floor: name = space, spaceName = space name, spaceId = space ID. The assignment of the parameters refers to the following table, corresponding to Figure 6 the tree hierarchical structure exported in

[0086] Spatial ID Spatial Name 1735019390207 Park Name 1735019399241 Building 1735019414757 Floor 1 1735019414758 Floor 2 1735019414759 Floor 3

[0087] Furthermore, set the jump of the mouse behavior for the added layer group label. For example, when clicking on a certain level, jump to the scene model of the corresponding level, so as to conveniently and quickly view the details of different levels in the scene.

[0088] In some embodiments, for the SVG format graphics of the device model, parameters are added to the specified layer or layer group therein, and the assignment of the parameters is bound to the device ID of the device in the system. Then the graphics are associated and bound with the devices in the system and certain real-time data display and interaction effects are achieved. Specifically, attributes can be added to the drawn device and attribute values can be set: name = space, assetName = device name, assetId = device ID. Filling in the ID of the corresponding device completes the association and binding between the layer and the device. In the associated device SVG graphics, configuration information is added to the specified layer in the device. For example, Figure 7 As shown, the projection graphic 70 of the air conditioner device includes four layers: layer 701 to layer 704. For the temperature text "--°C" in layer 703, attributes and attribute values are added: class = key, name = Control_Temp. When the air conditioner device is displayed, the temperature text is associated with the temperature data interface Control_Temp of the device, and the current temperature data will be displayed in real time.

[0089] The SVG file is a vector graphics format based on XML, which is drawn by software for drawing SVG graphics and then the SVG format graphics are exported. An ID or specified parameters are set for a certain specified layer or layer group to associate and bind the data interface. Based on the combination of SVG files with technologies such as JavaScript and CSS, dynamic changes to the color, transparency, size, animation, text, and styles of the graphics can be achieved, achieving the rendering effect of real-time status display and being able to intuitively reflect the state changes of physical entities. At the same time, operations on the mouse on the specified layer can also be edited, such as mouse hovering, click events, animation effects, etc., to implement operations such as pop-up windows or bubble tips, with rich user interaction functions.

[0090] The technical solution of the scene rendering method provided by the embodiments of the present application can achieve the following beneficial effects:

[0091] 1. In terms of data storage cost

[0092] 1.1 Simplification of file format:

[0093] Different from the 3D model format that needs to store complex information, the present invention is a vector graphics format based on XML, which describes the graphics in text form. This means that the SVG file mainly stores descriptive information such as the geometric shape, color, and path of the graphics, represented by a series of simple and direct tags and attributes.

[0094] 1.2 Improvement of storage capacity:

[0095] Different from 3D models that can be hundreds of megabytes or even several gigabytes in size, since the present invention is in text format and only focuses on the vector information of graphics, the file size is usually small. For simple scene graphs, such as some basic industrial equipment contour diagrams or architectural floor plans, etc., the SVG file may only be a few kilobytes to dozens of kilobytes. Even for relatively complex SVG scenes that contain multiple graphic elements and interactive elements, the file size can often be controlled within a few hundred kilobytes.

[0096] 1.3 Reduction in storage resource occupancy:

[0097] Different from 3D models that require a large amount of hardware storage, the present invention occupies less storage resources. When storing a large number of digital twin scene graphs, more scene files can be stored on a relatively small storage device. This can effectively reduce the storage cost and the demand for large-capacity storage devices for digital twin systems that need to store a large number of different scene versions or historical scene data.

[0098] 2. In terms of data transmission cost

[0099] 2.1 Improvement in network transmission efficiency:

[0100] Different from 3D models with a long transmission time, the small size of the present invention gives it an obvious advantage in the process of network transmission. In digital twin applications, when it is necessary to transmit the scene graph from the server side to the client (such as a browser or a mobile device), the SVG file can be transmitted more quickly. For example, in a web-based digital twin system, an SVG scene graph may be transmitted within a few hundred milliseconds, and users can quickly see the basic outline of the scene and interact with it.

[0101] 2.2 Reduction in bandwidth requirements:

[0102] Different from 3D models that require a relatively high bandwidth, the present invention has relatively low requirements for network bandwidth. In a low-bandwidth environment, such as accessing a digital twin scene through a mobile network or some old network infrastructure, the SVG scene graph can still be transmitted smoothly because its data volume is small and it will not cause too much burden on the network. This enables digital twin systems to be used under a wider range of network conditions, expanding their application scope.

[0103] 3. In terms of interaction and dynamics

[0104] 3.1 The operability of elements is more direct and simple:

[0105] Different from 3D models that require complex programming interactions and support from specific rendering engines, each graphic element in the SVG of the present invention can be individually selected, modified, and operated on. Developers can easily add interactive effects to SVG graphics, such as mouse hovering, click events, animation effects, etc., through technologies such as JavaScript and CSS, to achieve rich user interaction functions.

[0106] 3.2 More convenient data-driven updates and reduction of development workload through associated binding:

[0107] Different from 3D models with more complex data-driven updates, the present invention can be conveniently bound to data, and the attributes and styles of graphics can be dynamically updated according to real-time data, thereby reflecting the state changes of digital twin objects in real time. For example, according to the temperature data collected by sensors, the color of the graphic representing the device in SVG is dynamically changed to intuitively display the temperature state of the device.

[0108] 4. In terms of cross-platform and compatibility

[0109] 4.1 Better compatibility:

[0110] Different from 3D models with poor compatibility, the SVG of the present invention is an open standard formulated by the W3C and is based on the XML language. It has good cross-platform and compatibility, and can be normally displayed and used on various operating systems, browsers, and devices without worrying about graphic display problems caused by platform differences.

[0111] Corresponding to the scene rendering method provided by the embodiments of the present application, the embodiments of the present application also provide a scene building method. It can be understood that the scene building method provided by the embodiments of the present application is used to build the scene model in the scene rendering method of the embodiments of the present application and generate the corresponding model file. Therefore, the optional implementation manners of the scene building method provided by the embodiments of the present application can refer to the scene rendering method provided by the embodiments of the present application, which will not be elaborated here. It can be understood that the scene building method provided by the embodiments of the present application can be applied to the above-mentioned client or server that implements the scene rendering method. Or, in some implementation manners, the scene rendering method and the scene building method can be implemented by different clients. For example, developers implement scene building through a development terminal, and users open the scene model through clients such as browsers. In some embodiments, the SVG file can be edited to build the model through a text editor (such as Notepad++, Sublime Text, or VSCode, etc.), a professional software, an online tool, etc., and a text editor is used to create and edit the SVG file.

[0112] Reference Figure 8 , the scene building method provided by the embodiments of the present application includes the following steps:

[0113] Step 801, in response to a drawing operation, create a projection graphic for representing the projections of entity objects in the target entity scene;

[0114] Step 802, for the first projection graphic corresponding to the first entity object in the target entity scene, generate configuration information for obtaining monitoring data of the first entity object;

[0115] Step 803, determine the mapping relationship between the rendering effect of the first projection graphic and the monitoring data of the first entity object;

[0116] Step 804, generate a first model file based on text according to the created projection graphic, configuration information, and mapping relationship; the first model file is used to render the first scene model representing the target entity scene.

[0117] In some embodiments, the projection graphic can be drawn by combining simple points, lines, and planes, and a pseudo-3D scene based on the SVG format can be drawn to display the real scene in 2.5D. The configuration information can be used to configure the projection graphic or a certain layer / layer group in the projection graphic. Refer to Figure 9 for a single layer 901 that adds an alarm hover interaction to a certain floor 90. In the configuration page 902 of the layer, configure the name of the layer as behavior, and add attribute values of alarm and hover, indicating the interactions of alarm and mouse hover selection. Refer to Figure 9 the configuration of the configuration information page 903 shown. When the mouse moves into the area of this element, or there is an alarm event in the space associated with the layer group to which this layer belongs, the layer with the name behavior will change its attributes. When the mouse moves in, the stroke attribute will change, showing a yellow stroke. When there is an alarm event, the transparency of the color will change, from the default transparent filling to a red semi-transparent filling.

[0118] Figure 10 is a block diagram of an electronic device for implementing the embodiments of the present application. As Figure 10 shown, the electronic device includes: a memory 1001 and a processor 1002. The memory 1001 stores a computer program that can run on the processor 1002. When the processor 1002 executes this computer program, the methods in the above embodiments are implemented. The number of the memory 1001 and the processor 1002 can be one or more. Specifically, the electronic device may further include a communication interface 1003 for communicating with external devices and performing data interaction and transmission.

[0119] In specific implementation, if the memory 1001, the processor 1002, and the communication interface 1003 are implemented independently, the memory 1001, the processor 1002, and the communication interface 1003 can be interconnected through a bus to complete communication with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 10 only a thick line is used to represent it in Figure 10 , but it does not mean that there is only one bus or one type of bus.

[0120] Optionally, in specific implementation, if the memory 1001, the processor 1002, and the communication interface 1003 are integrated on a chip, the memory 1001, the processor 1002, and the communication interface 1003 can complete communication with each other through an internal interface.

[0121] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the program is executed by a processor, the method provided in the embodiment of the present application is implemented.

[0122] An embodiment of the present application provides a computer program product, including a computer program, and when the program is executed by a processor, the method provided in the embodiment of the present application is implemented.

[0123] An embodiment of the present application further provides a chip, which includes a processor for calling and running instructions stored in a memory from the memory, so that a communication device installed with the chip executes the method provided in the embodiment of the present application.

[0124] An embodiment of the present application further provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is used to execute the code in the memory, and when the code is executed, the processor is used to execute the method provided in the embodiment of the application.

[0125] It should be understood that the above-mentioned processor can be a CPU (Central Processing Unit), or it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. It is worth noting that the processor can be a processor that supports the Advanced RISC Machines (ARM) architecture.

[0126] Furthermore, optionally, the above-mentioned memory can include a read-only memory and a random access memory. The memory can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), sync link dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM).

[0127] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0128] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0129] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" can explicitly or implicitly include at least one of the features. In the description of the present application, "a plurality of" means two or more, unless otherwise specifically defined.

[0130] Any process or method described in the flowchart or otherwise described herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process. And the scope of the preferred embodiments of the present application includes additional implementations, where the functions can be executed in a substantially simultaneous manner or in a reverse order according to the involved functions, rather than in the order shown or discussed.

[0131] The logic and / or steps described in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing a logical function, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in conjunction with these instruction execution systems, apparatuses, or devices.

[0132] It should be understood that each part of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the method in the above embodiments can be completed by instructing relevant hardware through a program, and this program can be stored in a computer-readable storage medium. When this program is executed, it includes one or a combination of the steps of the method embodiment.

[0133] In addition, in each embodiment of the present application, each functional unit can be integrated in a processing module, or each unit can exist physically alone, or two or more units can be integrated in one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. This storage medium can be a read-only memory, a magnetic disk, an optical disk, or the like.

[0134] As described above, only the exemplary embodiments of the present application are provided, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope recorded in the present application can easily think of various changes or substitutions, and these should all be covered within 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 scene rendering method, characterized in that, Including: In response to a target instruction indicating to display a first scene model, obtaining a text-based first model file; The first scene model includes at least one projection graphic, and the projection graphic is used to represent the projection of an entity object in a target entity scene; According to the configuration information of the first projection graphic in the first scene model in the first model file, obtaining monitoring data of a first entity object; the first entity object corresponds to the first projection graphic in the target entity scene; Rendering the first scene model according to the first model file and the monitoring data of the first entity object, wherein the rendering effect of the first projection graphic is determined according to the monitoring data of the first entity object.

2. The method according to claim 1, wherein The obtaining the monitoring data of the first entity object according to the configuration information of the first projection graphic in the first scene model in the first model file includes: Determining a data acquisition interface for the monitoring data of the first entity object according to the configuration information of the first projection graphic; Based on the data acquisition interface, obtaining the monitoring data of the first entity object.

3. The method according to claim 1, wherein The first projection graphic includes multiple layers, and the rendering the first scene model according to the first model file and the monitoring data of the first entity object includes: For a first layer in the first projection graphic bound to the monitoring data, rendering according to the monitoring data of the first entity object.

4. The method according to claim 1, wherein After rendering the first scene model according to the first model file and the monitoring data of the first entity object, the method further includes: According to the configuration information of a second projection graphic in the first scene model in the first model file, listening for a first interaction operation on the second projection graphic, and / or listening for a target event associated with a second entity object; the second projection graphic is used to represent the projection of the second entity object in the target entity scene; In response to the first interaction operation and / or the target event, performing at least one of the following rendering operations: Displaying or hiding a second layer in the second projection graphic; Changing an attribute value of the second projection graphic, and re-rendering the second projection graphic according to the changed attribute value of the second projection graphic; Hiding the second projection graphic; Obtaining and displaying the monitoring data of the second entity object; Popping up a preset icon, and the preset icon is used to expand and display the monitoring data of the second entity object after being triggered; Rendering a third projection graphic hidden in the first scene model, the third projection graphic is used to represent the projection of a third entity object in the target entity scene, and the third entity object is associated with the second entity object; Obtaining a text-based second model file and rendering a second scene model according to the second model file.

5. The method according to claim 1, wherein The target entity scene is a building park, and the entity objects include: buildings that make up the building park, floors in the buildings, and devices in the floors. The projection graphic of the building is formed by stacking the projection graphics of each floor in the building, and the projection graphic of the device in the floor is displayed after a second interaction operation on the projection graphic of the floor is detected.

6. The method according to claim 1, characterized in that, After obtaining the first model file based on text, the method further includes: Displaying a tree structure diagram of the first scene model according to the first model file; the tree structure diagram is used to represent the hierarchical relationship of each entity object in the target entity scene; In response to a third interaction operation on a fourth entity object in the tree structure diagram, rendering a fourth projection graphic for representing the projection of the fourth entity object.

7. A method for scene construction, characterized in that, Including: In response to a drawing operation, creating projection graphics for representing the projections of the entity objects in the target entity scene; Generating configuration information for obtaining monitoring data of a first entity object for the first projection graphic corresponding to the first entity object in the target entity scene; Determining a mapping relationship between the rendering effect of the first projection graphic and the monitoring data of the first entity object; Generating a first model file based on text according to the created projection graphics, the configuration information, and the mapping relationship; the first model file is used to render a first scene model representing the target entity scene.

8. An electronic device, including a memory, a processor, and a computer program stored on the memory, where the processor implements the method according to any one of claims 1-7 when executing the computer program.

9. A computer-readable storage medium, having a computer program stored therein, where the computer program implements the method according to any one of claims 1-7 when executed by a processor.

10. A computer program product, including a computer program, where the computer program implements the method according to any one of claims 1-7 when executed by a processor.