Construction method and device of digital twin application, equipment and storage medium
Through the browser-based blueprint editor, the interactive behavior nodes are constructed, and the problem of 2D and 3D nodes cannot be bound under the B/S architecture is solved, and the richness of digital twin applications and the development efficiency are improved. Through identification information and visual operations, the richness of digital twin applications are achieved. Accurate binding of nodes is realized.
Patent Information
- Application Number
- CN202310798713.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2025-01-07
AI Technical Summary
The existing Blueprint Editor cannot establish a binding relationship between 2D and 3D nodes under the B/S architecture, which limits the richness and development efficiency of digital twin applications.
By obtaining a blueprint editor built based on the browser, building interactive behavior nodes, and binding 2D nodes and 3D nodes in digital twin applications based on these nodes, using identification information, visual operation components and initial component identification to achieve the accuracy of nodes Binding improves binding efficiency and accuracy.
The binding of 2D and 3D nodes under the B/S architecture is realized, which improves the richness and development efficiency of digital twin application scenarios, and enhances the flexibility of component management and binding.
Smart Images

Figure CN119272458A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of building digital twin applications, and specifically to a method, device, equipment and storage medium for building a digital twin application. Background Art
[0002] Digital twin architectures are divided into B / S architectures and C / S architectures. The digital twin applications built by the blueprint editors provided by game engines such as Unity and UE are C / S architectures, that is, client application levels. Mainstream digital twin applications are mainly based on B / S architectures and rendered on the browser side.
[0003] Digital twin scenes often contain 2D rendering nodes and 3D rendering nodes. For 2D rendering nodes, the client represented by Unity and UE has a built-in GUI / UI component layer, while the GUI / UI components in the browser are composed of HTML tags. For 3D rendering nodes, the client engine is mainly based on the OpenGL standard, while the browser rendering engine is mainly based on WebGL / WebGPU. The existing blueprint editor cannot establish a binding relationship between 2D and 3D nodes under the B / S architecture. Summary of the invention
[0004] In view of the above problems, the present application provides a method, device, equipment and storage medium for constructing a digital twin application, aiming to solve the existing problem of being unable to establish binding relationships between 2D and 3D nodes under the B / S architecture through a blueprint editor.
[0005] In a first aspect, the present application provides a method for constructing a digital twin application, comprising:
[0006] Get the browser-based Blueprint Editor;
[0007] Binding 2D nodes and 3D nodes having an interactive relationship according to the interactive behavior nodes in the blueprint editor, wherein the 2D nodes and 3D nodes are constituent components of the digital twin application;
[0008] A digital twin application is constructed according to the binding relationship between the 2D node and the 3D node.
[0009] In the technical solution of the embodiment of the present application, a blueprint editor built based on a browser is obtained, so that the blueprint editor can be applied to the B / S architecture, and each interactive behavior node is constructed according to the blueprint editor, and the 2D nodes and 3D nodes in the digital twin application are bound based on the interactive behavior nodes. The digital twin application is constructed according to the binding relationship between the 2D nodes and the 3D nodes, thereby realizing the binding of 2D nodes and 3D nodes based on the B / S architecture through the blueprint editor, thereby improving the richness of digital twin application scenarios.
[0010] In some embodiments, before binding the 2D nodes and 3D nodes having an interactive relationship according to the interactive behavior node in the blueprint editor, the method further includes:
[0011] Get the user interface component;
[0012] Construct each component in the 2D node according to the user interface component;
[0013] Obtain the 3D model carrier of the digital twin;
[0014] Each component in the 3D node is constructed according to the 3D model carrier of the digital twin.
[0015] In the technical solution of the embodiment of the present application, 2D components are established through user interface components and digital twins, and a 3D model library is constructed through digital twins, which provides rich materials for the generation of digital twin applications and realizes the construction of digital twin application scenarios in multiple scenarios.
[0016] In some embodiments, before binding the 2D nodes and 3D nodes having an interactive relationship according to the interactive behavior node in the blueprint editor, the method further includes:
[0017] Classify the components in the 2D node and the 3D node according to the component type to obtain label information;
[0018] The behavior dictionary table is queried according to the tag information to obtain the behavior events corresponding to each tag information, wherein the dictionary table reflects the corresponding relationship between each tag and the corresponding behavior event.
[0019] In the technical solution of the embodiment of the present application, label information and behavior events are set for each type of component, so that the label information and behavior events fully reflect the behavior characteristics of the current type of label, thereby effectively distinguishing each type of component and achieving accuracy in component binding.
[0020] In some embodiments, before querying the behavior dictionary table according to the tag information to obtain the behavior events corresponding to each tag information, the method further includes:
[0021] Count each component type and the corresponding behavior events;
[0022] Assigning label information to each component type;
[0023] A behavior dictionary table is established according to the tag information and the behavior identifier of the corresponding behavior event.
[0024] In the technical solution of the embodiment of the present application, label information and corresponding behavior events of different types of components are defined, and a dictionary table is established based on the label information and corresponding behavior events of different types of components. The dictionary table is used to facilitate the search for behavior events corresponding to the label information of different types of components, thereby preparing for the subsequent generation of a unique component identifier hash key. The method of using a dictionary table to search for behavior events is more efficient than defining each one individually, greatly reducing development time and improving the efficiency of building digital twin applications.
[0025] In some embodiments, the step of binding the 2D nodes and 3D nodes having an interactive relationship according to the interactive behavior node in the blueprint editor includes:
[0026] Acquire identification information of the 2D node and the 3D node according to the interactive behavior node in the blueprint editor;
[0027] The 2D nodes and 3D nodes having an interactive relationship are bound according to the identification information.
[0028] In the technical solution of the embodiment of the present application, the binding of 2D nodes and 3D nodes is achieved by means of identification information. Since the identification information is unique, the accuracy of the binding of 2D nodes and 3D nodes is improved.
[0029] In some embodiments, the step of binding the 2D nodes and 3D nodes having an interactive relationship according to the interactive behavior node in the blueprint editor includes:
[0030] Obtaining a visual operation component according to the interactive behavior node in the blueprint editor;
[0031] The interactive 2D nodes and 3D nodes are bound according to the visualization operation component.
[0032] In the technical solution of the embodiment of the present application, in order to provide a more convenient binding method, a visual operation component is provided through the interactive behavior node in the blueprint editor, and the 2D nodes and 3D nodes are bound more intuitively through the visual operation component, thereby improving the efficiency of binding 2D nodes and 3D nodes.
[0033] In some embodiments, the step of binding the 2D nodes and 3D nodes having an interactive relationship according to the interactive behavior node in the blueprint editor includes:
[0034] Obtaining an initial component identifier of each component in a 2D node and a 3D node according to an interactive behavior node in the blueprint editor, wherein the initial component identifier includes a binding state;
[0035] The 2D node and the 3D node are bound according to the initial component identifier.
[0036] In the technical solution of the embodiment of the present application, since the initial component identification includes the binding status of each component, the initial component identification can be used to identify whether the current identification is a bound component, an unbound component, or a component that needs to be bound. Therefore, the component that needs to be bound can be determined based on the initial component identification, thereby realizing the binding of the 2D node and the component to be bound in the 3D node.
[0037] In some embodiments, the method for constructing the digital twin application further includes:
[0038] Obtaining node information of the 2D node and the 3D node;
[0039] An initial component identifier of each component is constructed according to the node information.
[0040] In the technical solution of the embodiment of the present application, the initial component identifier is constructed through the node information of the 2D node and the 3D node, that is, the component identifier is obtained through the attribute information of the node, which can better reflect the uniqueness of the node and improve the accuracy of the binding of the 2D node and the 3D node.
[0041] In some embodiments, the method for constructing the digital twin application further includes:
[0042] The initial component identification of each component is constructed according to each component type of the 2D node and the 3D node, the label information corresponding to each component type, the behavior identification of the behavior event corresponding to each label information, and the initial relationship identification.
[0043] In the technical solution of the embodiment of the present application, by defining the components of the component identification of each component and filling in the components according to the detailed description information of each component, a unique component identification of each component is generated. When operating each component, the information of each component can be obtained according to the component identification, thereby improving the effective management of the components.
[0044] In some embodiments, the binding the 2D node and the 3D node according to the initial component identifier includes:
[0045] Supplementing the initial relationship identifier with information based on the binding operation to obtain a component identifier;
[0046] The 2D node and the 3D node are bound according to the component identifier.
[0047] In the technical solution of the embodiment of the present application, the initial relationship identifier is supplemented with information through a binding operation to obtain a component identifier with binding information. Since the initial identification information of each component includes an initial relationship identifier before the components are bound, the binding status of the current component can be identified through the initial relationship identifier, and then the initial relationship identifier is supplemented according to the binding information obtained by the binding operation to obtain the component identifier of the binding relationship, thereby realizing the binding of the 2D node and the 3D node.
[0048] In some embodiments, the binding the 2D node and the 3D node according to the initial component identifier includes:
[0049] Obtaining the binding relationship between the components to be bound in the 2D node and the 3D node;
[0050] The initial relationship identifier is supplemented with information according to the binding relationship to obtain a component identifier.
[0051] In the technical solution of the embodiment of the present application, the binding of the 2D node and the 3D node can be achieved by obtaining the binding relationship of the components to be bound in the 2D node and the 3D node, determining the binding information of the components to be bound through the binding relationship, and supplementing the initial relationship identifier through the binding information.
[0052] In some embodiments, obtaining the binding relationship between the components to be bound in the 2D node and the 3D node includes:
[0053] Responding to the binding operation of the components to be bound in the 2D node and the 3D node;
[0054] The binding relationship between the components to be bound in the 2D node and the 3D node is determined according to the binding operation.
[0055] In the technical solution of the embodiment of the present application, in addition to obtaining the component identification through a pre-set binding relationship to realize the binding of 2D nodes and 3D nodes, the binding relationship can also be determined by obtaining the user's binding operation and the user's actual binding operation, so that the binding relationship can be directly determined according to the user's binding operation, thereby improving the accuracy of the binding of 2D nodes and 3D nodes.
[0056] In some embodiments, determining the binding relationship between the components to be bound in the 2D node and the 3D node according to the binding operation includes:
[0057] Triggering the corresponding interactive behavior node in the blueprint editor in a preset manner;
[0058] The binding operation is monitored by the interaction behavior node to obtain an initial component identifier of the component to be bound;
[0059] The binding relationship between the components to be bound in the 2D node and the 3D node is determined according to the initial component identifier.
[0060] In the technical solution of the embodiment of the present application, the binding operation of 3D components and 2D components is implemented through the corresponding interactive behavior nodes in the low-code blueprint editor, thereby improving the efficiency of component development.
[0061] In some embodiments, the step of monitoring the binding operation through the interactive behavior node to obtain the initial component identifier of the component to be bound includes:
[0062] Determine the listening function in the interactive behavior node according to the type of the component to be bound;
[0063] Monitoring the binding operation according to the monitoring function to obtain the initial component identifier of the component to be bound;
[0064] In the technical solution of the embodiment of the present application, the listening function in the interactive behavior node is used to obtain the initial component identifier of the component to be bound, without the need to design a separate listening program, thereby improving development efficiency.
[0065] In some embodiments, the step of monitoring the binding operation according to the monitoring function to obtain the initial component identifier of the component to be bound includes:
[0066] In the case where the type of the component to be bound is a 2D component to be bound, monitoring the binding operation of the 2D component to be bound in the 2D node through the monitoring function in the interactive behavior node;
[0067] When it is detected that the binding operation of the 2D component to be bound is a preset behavior event, the initial component identifier of the 2D component to be bound is obtained through the event callback function in the interactive behavior node.
[0068] In the technical solution of the embodiment of the present application, the initial component identifier of the 2D component to be bound is obtained through a monitoring function, and the binding of the 2D component is implemented according to the obtained initial component identifier.
[0069] In some embodiments, the step of monitoring the binding operation through the interactive behavior node to obtain the initial component identifier of the component to be bound includes:
[0070] In the case where the type of the component to be bound is a 3D component to be bound, obtaining a binding operation of the 3D component to be bound in the 3D node through a detection function in the interaction behavior node;
[0071] Determine the position information of the 3D component to be bound based on the binding operation of the 3D component to be bound;
[0072] According to the position information of the 3D component to be bound, an initial component identifier of the 3D component to be bound is obtained.
[0073] In the technical solution of the embodiment of the present application, the initial component identifier of the 3D component to be bound is obtained through the detection module, and the binding of the 3D component is implemented according to the obtained initial component identifier.
[0074] In some embodiments, the method for constructing the digital twin application further includes:
[0075] Parsing the initial component identifiers of the components in the binding relationship between the 2D node and the 3D node to obtain the behavior identifiers of the components;
[0076] Establishing a behavior binding node in the blueprint editor according to the behavior identifier, wherein the behavior binding node includes a behavior editing component corresponding to the behavior identifier;
[0077] In response to the parameter configuration of the behavior editing component, the drawing of each component is realized.
[0078] In the technical solution of the embodiment of the present application, the corresponding quantity is determined by the type of behavior identifier, thereby realizing the behavior binding operation in the component, and the drawing of the component is realized through the blueprint editor, thereby improving the efficiency of component development under the condition of visual operation.
[0079] In some embodiments, the method for constructing the digital twin application further includes:
[0080] Parsing the component identifiers of the components in the binding relationship between the 2D node and the 3D node to obtain the relationship identifiers of the components;
[0081] Obtaining a binding relationship between the 2D node and the 3D node according to the relationship identifier;
[0082] In response to the editing operation of the components corresponding to the 2D node and the 3D node, establishing an interactive behavior node in the blueprint editor;
[0083] In response to an editing operation of the interactive behavior node, a binding relationship between the 2D node and the 3D node is adjusted according to the editing operation.
[0084] In the technical solution of the embodiment of the present application, a new binding component is set according to the interactive behavior node in the triggering blueprint editor to adjust the binding relationship between the original 2D node and the 3D node, so that the binding relationship can be readjusted according to actual needs to improve the flexibility of component binding.
[0085] In some embodiments, the method for constructing the digital twin application further includes:
[0086] Rendering the 3D node based on the browser in the digital twin application to generate a 3D rendering node;
[0087] Rendering the 2D node based on the browser in the digital twin application to generate a 2D rendering node;
[0088] Based on the binding relationship between the 3D node and the 2D node, a digital twin scene is generated that simultaneously displays the 3D rendering node and the 2D rendering node.
[0089] In the technical solution of the embodiment of the present application, 3D nodes are rendered through the rendering engine WebGL / WebGPU in the browser, and 2D nodes are rendered through the GUI / UI components in the browser, thereby realizing browser-based node rendering and building a digital twin application scenario based on the B / S architecture.
[0090] In a second aspect, the present application provides a device for constructing a digital twin application, the device for constructing a digital twin application comprising:
[0091] Get module, used to get the blueprint editor built on the browser;
[0092] A construction module, used to construct each interactive behavior node according to the blueprint editor;
[0093] A binding module, used to bind 2D nodes and 3D nodes with interactive relationships according to the interactive behavior nodes in the blueprint editor;
[0094] An application generation module is used to build a digital twin application based on the binding relationship between the 2D node and the 3D node.
[0095] In a third aspect, the present application provides a device for building a digital twin application, the device for building a digital twin application comprising: a memory, a processor, and a building program for the digital twin application stored in the memory and runnable on the processor, the building program for the digital twin application being configured to implement the method for building a digital twin application as described above.
[0096] In a fourth aspect, the present application provides a storage medium, on which a construction program for a digital twin application is stored. When the construction program for the digital twin application is executed by a processor, the construction method for the digital twin application as described above is implemented.
[0097] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0098] Figure 1 A flowchart of a method for constructing a digital twin application proposed in some embodiments of the present application;
[0099] Figure 2 A schematic diagram of the structure of the digital twin system architecture where the blueprint editor of the digital twin application construction method proposed in some embodiments of the present application is located;
[0100] Figure 3 A schematic diagram of the structure of a hash key for a method for constructing a digital twin application proposed in some embodiments of the present application;
[0101] Figure 4 A behavior binding diagram of a method for constructing a digital twin application proposed in some embodiments of the present application;
[0102] Figure 5 A schematic diagram of the structure of a device for building a digital twin application proposed in some embodiments of the present application. DETAILED DESCRIPTION
[0103] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0104] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0105] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0106] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0107] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0108] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0109] In the description of the embodiments of the present application, the technical terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the embodiments of the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the embodiments of the present application.
[0110] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral one; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0111] At present, digital twin architectures are divided into B / S architectures and C / S architectures. Among them, digital twin applications built by blueprint editors provided by game engines such as Unity and UE are C / S architectures, that is, client application level. Mainstream digital twin applications are mainly based on B / S architecture and rendered on the browser side.
[0112] Digital twin scenes often contain 2D rendering nodes and 3D rendering nodes. For 2D rendering nodes, the client represented by Unity and UE has a built-in GUI / UI component layer, while the GUI / UI components in the browser are composed of HTML tags. For 3D rendering nodes, the client engine is mainly based on the OpenGL standard, while the browser rendering engine is mainly based on WebGL / WebGPU. The existing blueprint editor cannot establish a binding relationship between 2D and 3D nodes under the B / S architecture.
[0113] In order to solve the existing technical problem that it is impossible to establish a binding relationship between 2D and 3D nodes under the B / S architecture through the blueprint editor, the embodiment of the present application obtains a blueprint editor built based on a browser, so that the blueprint editor can be applied to the B / S architecture, and constructs various interactive behavior nodes according to the blueprint editor, binds the 2D nodes and 3D nodes in the digital twin application based on the interactive behavior nodes, and builds the digital twin application according to the binding relationship between the 2D nodes and the 3D nodes, so as to realize the binding of 2D and 3D nodes through the low-code tool blueprint node, and completes the construction of digital twin applications under the B / S architecture, and can perform interactive behaviors of 2D and 3D nodes at the same time for digital twin application scenarios, thereby improving the richness of digital twin application scenarios.
[0114] This application proposes a method for building a digital twin application to solve the problem that the existing blueprint editor cannot establish a binding relationship between 2D and 3D nodes under the B / S architecture. Please refer to Figure 1 In this example, the method for constructing the digital twin application includes:
[0115] Step S10, obtaining a blueprint editor built based on a browser.
[0116] It should be noted that the execution subject of this embodiment can be a controller in the digital twin application construction platform, or it can be a browser of the digital twin application. The browser of the digital twin application is taken as an example for explanation.
[0117] Digital twins make full use of data such as physical models, sensor updates, and operation history, integrate multi-disciplinary, multi-physical, multi-scale, and multi-probability simulation processes, and complete mapping in virtual space to reflect the entire life cycle of the corresponding physical equipment. Digital twins are a concept that transcends reality and can be viewed as a digital mapping system of one or more important, interdependent equipment systems, such as a power system based on digital twins.
[0118] Blueprint editors are also called editors or level blueprints, including map editors or scene editors. They are generally used as software for creating and designing video game levels. Common blueprint editors are commonly found in game engines such as Unity and UE. With the continuous improvement of hardware performance, game engines such as Unity or UE have also appeared in the digital twin industry. Through the rendering engine capabilities provided by Unity or UE, the blueprint editor system that comes with the engine can complete the construction of digital twin applications.
[0119] In general, digital twin applications are built through the blueprint editor combined with the Unity or UE game engine, but the construction of digital twin applications based on the B / S architecture is not supported. Therefore, in order to be compatible with the construction of digital twin applications based on the B / S architecture, a blueprint editor is built based on the browser. The blueprint editor can be used based on the browser, and a low-code blueprint editor can be used to build digital twin applications on the B / S architecture, thereby improving the development efficiency of building digital twin applications.
[0120] Step S20, constructing each interactive behavior node according to the blueprint editor.
[0121] like Figure 2 The structural diagram of the digital twin system architecture where the blueprint editor is shown includes an engine layer, a rendering layer, a tool layer and an application layer, wherein the engine layer includes a WebGL / WebGPU browser-side rendering engine, the rendering layer includes 3D nodes composed of digital twins and 2D nodes composed of GUI / UI components, and the tool layer includes a blueprint editor, wherein the main functions of the blueprint editor are through state listening nodes, object binding nodes, data processing nodes, event binding nodes, relationship binding nodes and behavior execution nodes. This embodiment mainly implements the binding of 2D nodes and 3D nodes through relationship binding nodes, and implements the monitoring of binding operations through state listening nodes, thereby realizing the construction of digital twin applications on the B / S architecture through a low-code blueprint editor based on the B / S architecture.
[0122] It should be noted that the interactive behavior nodes are nodes used for binding 2D nodes and 3D nodes in the blueprint editor, mainly state monitoring nodes and relationship binding nodes in the blueprint editor, and may also include other nodes used for binding 2D nodes and 3D nodes. This embodiment does not limit this. The binding operation is performed through the visual interactive behavior nodes in the blueprint editor to achieve the binding of 2D nodes and 3D nodes.
[0123] Step S30: Bind the 2D nodes and 3D nodes in the digital twin application based on the interactive behavior nodes.
[0124] In this embodiment, 2D nodes are obtained through GUI / UI rendering, and 3D nodes are obtained through digital twin rendering. The binding of 2D nodes and 3D nodes in the digital twin application is achieved through the interactive behavior nodes in the low-code blueprint editor.
[0125] In a specific implementation, binding operations can be performed on components in 2D nodes and 3D nodes based on interactive behavior nodes, and components in 2D nodes and 3D nodes can be bound according to the binding operations. For example, based on the relationship binding nodes in the blueprint editor and the binding operations on components in 2D nodes and 3D nodes, the components in the operated 2D nodes and 3D nodes are bound, thereby realizing visual relationship binding and improving the efficiency of digital twin application scenario development.
[0126] Step S40, building a digital twin application based on the binding relationship between the 2D nodes and the 3D nodes.
[0127] The embodiment of the present application obtains a blueprint editor built based on a browser, so that the blueprint editor can be applied to the B / S architecture, and constructs various interactive behavior nodes according to the blueprint editor, binds 2D nodes and 3D nodes in the digital twin application based on the interactive behavior nodes, and builds the digital twin application according to the binding relationship between the 2D nodes and the 3D nodes, thereby realizing the binding of 2D nodes and 3D nodes based on the B / S architecture through the blueprint editor, thereby improving the richness of digital twin application scenarios.
[0128] According to some embodiments of the present application, optionally, the method for constructing a digital twin application further includes:
[0129] Obtain user interface components; construct various components in 2D nodes based on the user interface components; obtain a 3D model carrier of the digital twin; and construct various components in the 3D node based on the 3D model carrier of the digital twin.
[0130] In this embodiment, the user interface component is a UI component, including a basic document object model (DOM) component and a canvas chart component. A 2D component is established through the basic DOM component and the canvas chart component, and a 3D model library is established as a 3D model carrier of the digital twin, thereby realizing the construction of each component in the 3D node.
[0131] In the specific implementation, each component in the 2D node and each component in the 3D node can also be edited according to actual needs, such as adding new 2D components or 3D components, or adjusting the properties of the components of the 2D node and each component in the 3D node, thereby improving the flexibility of component use.
[0132] In the technical solution of the embodiment of the present application, 2D components are established through basic DOM components and canvas chart components, and a 3D model library is constructed through digital twins, which provides rich materials for the generation of digital twin applications and realizes the construction of digital twin application scenarios in multiple scenarios.
[0133] According to some embodiments of the present application, optionally, the method for constructing a digital twin application further includes:
[0134] Each component in the 2D node and the 3D node is labeled and classified according to the component type to obtain label information; the behavior dictionary table is queried according to the label information to obtain the behavior events corresponding to each label information, wherein the dictionary table reflects the correspondence between each label and the corresponding behavior event.
[0135] It should be noted that the component type is the category to which the component belongs. After the components are classified according to the component categories, corresponding labels are set for each category to achieve effective identification of the categories. 2D UI / GUI components are labeled and classified, such as tables, charts, heat maps, etc., and 3D models are also labeled and classified, such as buildings, rooms, equipment and other information.
[0136] In a specific implementation, the label information is unique, and the category to which the current component belongs can be quickly determined through the label information. For example, label information 001 represents a table, label information 002 represents a chart, and so on. Through the correspondence between predefined categories and label information, the correspondence is queried according to the category of the current component, thereby obtaining the label information corresponding to each category, thereby realizing effective identification of the component category. The correspondence between the predefined categories and label information can be flexibly adjusted according to actual needs, thereby realizing real-time updating of label information.
[0137] In general, each component type has a corresponding behavior event. A behavior event refers to an action that can be performed interactively on the current type of component. For example, for a table-type component, editing operations can be performed with the mouse or editing operations can be performed on a table-type component. Behavioral events are behavioral characteristics of each type of component. By distinguishing behavioral events and setting corresponding behavior identifiers, effective identification of different types of components can be achieved.
[0138] In this embodiment, in order to assign behavior identifiers to components of different types, a dictionary table is established for the behavior characteristics of different tags, such as mouse interaction behavior, event triggering behavior, etc., and the behavior identifier corresponding to each type is determined through the dictionary table.
[0139] In the technical solution of the embodiment of the present application, label information and behavior events are set for each type of component, so that the label information and behavior events fully reflect the behavior characteristics of the current type of label, thereby effectively distinguishing each type of component and achieving accuracy in component binding.
[0140] According to some embodiments of the present application, optionally, before querying the behavior dictionary table according to the tag information to obtain the behavior event corresponding to each tag information, the method further includes:
[0141] Count each component type and the corresponding behavior event; assign label information to each component type; and establish a behavior dictionary table based on the label information and the behavior identifier of the corresponding behavior event.
[0142] In this embodiment, label information and corresponding behavior events of different types of components are defined, and a dictionary table is established based on the label information and corresponding behavior events of different types of components. The dictionary table is used to facilitate the search for behavior events corresponding to the label information of different types of components, so as to prepare for the subsequent generation of the unique identification hash key of the component. The method of using the dictionary table to search for behavior events is more efficient than defining each one separately, which greatly reduces the development time and improves the efficiency of building digital twin applications.
[0143] According to some embodiments of the present application, optionally, step S10 includes:
[0144] The identification information of the 2D node and the 3D node is obtained according to the interactive behavior node in the blueprint editor; the 2D node and the 3D node having an interactive relationship are bound according to the identification information.
[0145] In this embodiment, the identification information may be identification information in a coded manner or in other forms. Since the identification information is unique, the 2D node and the 3D node may be more accurately bound through the identification information.
[0146] This embodiment implements binding of 2D nodes and 3D nodes by means of identification information. Since the identification information is unique, the accuracy of binding of 2D nodes and 3D nodes is improved.
[0147] According to some embodiments of the present application, optionally, binding 2D nodes and 3D nodes having an interactive relationship according to an interactive behavior node in a blueprint editor includes:
[0148] Obtain a visual operation component according to the interactive behavior node in the blueprint editor; bind 2D nodes and 3D nodes with interactive relationships according to the visual operation component.
[0149] In this embodiment, in addition to binding the 2D node and the 3D node through identification information, the binding of the 2D node and the 3D node can also be achieved through a visual operation component.
[0150] In order to provide a more convenient binding method, this embodiment provides a visual operation component through the interactive behavior node in the blueprint editor, and uses the visual operation component to more intuitively bind 2D nodes and 3D nodes, thereby improving the efficiency of binding 2D nodes and 3D nodes.
[0151] According to some embodiments of the present application, optionally, binding 2D nodes and 3D nodes having an interactive relationship according to an interactive behavior node in a blueprint editor includes:
[0152] The initial component identification of each component in the 2D node and the 3D node is obtained according to the interactive behavior node in the blueprint editor, wherein the initial component identification includes a binding state; and the 2D node and the 3D node are bound according to the initial component identification.
[0153] In this embodiment, the initial component identifier may include a binding state. The binding state is carried on the basis of unique identification information. The binding of 2D nodes and 3D nodes may be achieved through the initial component identifier carrying the binding state.
[0154] Since the initial component identification includes the binding status of each component, the initial component identification can be used to identify whether the current identification is a bound component, an unbound component, or a component that needs to be bound. Therefore, the component that needs to be bound can be determined based on the initial component identification, thereby realizing the binding of the components to be bound in 2D nodes and 3D nodes.
[0155] According to some embodiments of the present application, optionally, the method for constructing a digital twin application further includes:
[0156] Obtain node information of 2D nodes and 3D nodes; construct initial component identifiers of various components according to the node information.
[0157] In this embodiment, the node information may be the type of node or attribute information, etc., wherein the type of node may be a 2D node or a 3D node, and the attribute information may be the operation mode of the node, etc. The initial component identification of the component is constructed through the node information belonging to the node, so that the components of each node are unique, which facilitates the identification of the components.
[0158] This embodiment constructs an initial component identifier through the node information of the 2D node and the 3D node, that is, obtains the component identifier through the attribute information of the node, which can better reflect the uniqueness of the node and improve the accuracy of binding the 2D node and the 3D node.
[0159] According to some embodiments of the present application, optionally, the method for constructing a digital twin application further includes:
[0160] The initial component identification of each component is constructed according to each component type of the 2D node and the 3D node, the label information corresponding to each component type, the behavior identification of the behavior event corresponding to each label information, and the initial relationship identification.
[0161] This embodiment defines the components of the component identification of each component, and fills in the components according to the detailed description information of each component, thereby generating a unique component identification for each component. When operating each component, the information of each component can be obtained according to the component identification, thereby improving the effective management of the components.
[0162] According to some embodiments of the present application, optionally, step S10 further includes:
[0163] The initial component identification of each component is constructed according to the component types of 2D nodes and 3D nodes, the label information corresponding to each component type, the behavior identification of the behavior event corresponding to each label information, and the initial relationship identification; the initial relationship identification is supplemented with information based on the binding operation to obtain the component identification; and the 2D nodes and 3D nodes are bound according to the component identification.
[0164] It should be noted that the initial relationship identifier is a binding placeholder. The binding placeholder can be used to determine whether the current component is a component that needs to be bound or a component with fixed characteristics. Therefore, the component identifier can be used to identify whether the current component is a component that needs to be bound. When it is identified that the current component contains a binding placeholder, when the binding operation is performed on the current component, the binding of the current component can be achieved through the interactive behavior node in the blueprint editor.
[0165] In a specific implementation, when constructing a component identifier, a binding placeholder is first set. The binding placeholder can be used to preliminarily determine whether the current component needs to be bound or not. For example, if a placeholder A- is set in the component identifier of component A, it can be determined that component A needs to be bound. If there is no binding placeholder in the component identifier of component A, it can be determined that component A does not need to be bound, thereby achieving effective identification of component characteristics through component identification.
[0166] In this embodiment, unique identification is designed for two types of components, and the unique identification is called hash key, where hash key contains the type information, classification label information, behavior information, relationship information, and other information fields of GUI / UI components or 3D twins. Hash key obtains detailed description information by reading each piece of information to obtain the component identification of each component, so that the relevant information of each component can be obtained through the component identification.
[0167] like Figure 3 The structural diagram of the hash key shown in the figure, the component identifier includes a type identifier, label information, a behavior identifier, a relationship identifier and other information, wherein the type identifier indicates the component type, such as a 2D component or a 3D component, the label information indicates the form of the component, such as a table, an icon or a heat map, etc., the behavior information is the behavior event, indicating the supportable behavior events corresponding to each label, the relationship identifier indicates the binding relationship with other components, and the other information is a reserved information field indicating other characteristics.
[0168] This embodiment defines the components of the component identification of each component, and fills in the components according to the detailed description information of each component, thereby generating a unique component identification for each component. When operating each component, the information of each component can be obtained according to the component identification, thereby improving the effective management of the components.
[0169] According to some embodiments of the present application, optionally, binding the 2D node and the 3D node according to the initial component identifier includes:
[0170] Based on the binding operation, the initial relationship identifier is supplemented with information to obtain the component identifier; and the 2D node and the 3D node are bound according to the component identifier.
[0171] In this embodiment, since the initial relationship identifier is a placeholder, it can be determined through the initial relationship identifier whether the current component needs to be bound, and then the components that need to be bound can be bound more directly to avoid repeated binding of components that have already been bound. In order to obtain a more accurate component identification, the user's binding operation can be used to determine the information that needs to be bound to the component to be bound according to the binding operation, and the placeholder can be supplemented according to the binding information, thereby realizing the binding of 2D nodes and 3D nodes.
[0172] This embodiment supplements the initial relationship identifier through a binding operation to obtain a component identifier with binding information. Since the initial identification information of each component includes an initial relationship identifier before the components are bound, the binding status of the current component can be identified through the initial relationship identifier, and then the initial relationship identifier is supplemented according to the binding information obtained by the binding operation to obtain the component identifier of the binding relationship, thereby realizing the binding of 2D nodes and 3D nodes.
[0173] According to some embodiments of the present application, optionally, binding the 2D node and the 3D node according to the initial component identifier includes:
[0174] The binding relationship between the components to be bound in the 2D node and the 3D node is obtained; and the initial relationship identifier is supplemented with information according to the binding relationship to obtain the component identifier.
[0175] In this embodiment, the binding relationship can also be obtained to achieve binding of 2D nodes and 3D nodes according to the binding relationship. The binding relationship can be predetermined, for example, component A is bound to component B to obtain the binding relationship of the components to be bound. The binding relationship can be obtained by writing data through the binding interface, and can also be obtained through other input interfaces. This embodiment does not impose any restrictions on this.
[0176] This embodiment can also achieve binding of 2D nodes and 3D nodes by obtaining the binding relationship of the components to be bound in the 2D nodes and 3D nodes, determining the binding information of the components to be bound through the binding relationship, and supplementing the initial relationship identifier through the binding information.
[0177] According to some embodiments of the present application, optionally, the initial relationship identifier is supplemented with information based on the binding operation to obtain a component identifier, including:
[0178] Responding to the binding operation of the components to be bound in the 2D node and the 3D node; determining the binding relationship between the components to be bound in the 2D node and the 3D node according to the binding operation; supplementing the initial relationship identifier according to the binding relationship to obtain the component identifier.
[0179] In this embodiment, first, each component is provided with a corresponding initial component identifier. In this case, the relationship information in the initial component identifier is only defined by a binding placeholder. The binding placeholder can be used to determine that the current component can be bound, but there is no binding relationship with any component. Therefore, the initial component identifier is only filled with a binding placeholder. After the binding relationship of the current component is determined, the binding placeholder is supplemented by the binding relationship to obtain complete relationship information, thereby generating a component identifier.
[0180] In a specific implementation, in response to the binding operation of the components to be bound in the 2D node and the 3D node, the binding relationship of the components to be bound in the 2D node and the 3D node is determined according to the binding operation. For example, an operation is performed on the 3D component A in the 2D node. During the operation, the interactive behavior node in the blueprint editor is triggered, and the binding operation is listened to by the interactive behavior node to obtain the operation of the 2D component B to be bound thereto. According to the binding operation, the interactive behavior node obtains the component identification of the 3D component A and the 2D component B, and the binding of the 3D component A and the 2D component B is implemented according to the component identification. Similarly, the binding of 3D components and 3D components, 2D components and 2D components, and 2D components and 3D components can also be implemented. The binding is not limited to the binding between 2D components and 3D components, and may also involve the binding of other forms of components. This embodiment does not impose any restrictions on this.
[0181] This embodiment implements the binding relationship between the components to be bound in the 2D node and the 3D node through the binding operation, thereby implementing the binding of the components through a visual operation, thereby improving the convenience of the binding operation.
[0182] According to some embodiments of the present application, optionally, obtaining a binding relationship between components to be bound in a 2D node and a 3D node includes:
[0183] In response to the binding operation of the components to be bound in the 2D node and the 3D node; determining the binding relationship between the components to be bound in the 2D node and the 3D node according to the binding operation.
[0184] In addition to obtaining the component identifier through a pre-set binding relationship to achieve the binding of 2D nodes and 3D nodes, the binding relationship can also be determined by obtaining the user's binding operation and the user's actual binding operation, so that the binding relationship can be directly determined based on the user's binding operation, thereby improving the accuracy of the binding of 2D nodes and 3D nodes.
[0185] According to some embodiments of the present application, optionally, determining the binding relationship between the components to be bound in the 2D node and the 3D node according to the binding operation includes:
[0186] The corresponding interactive behavior node in the blueprint editor is triggered in a preset manner; the binding operation is monitored through the interactive behavior node to obtain the initial component identifier of the component to be bound; and the binding relationship between the component to be bound in the 2D node and the 3D node is determined according to the initial component identifier.
[0187] In this embodiment, the preset method may be an operation of activating a corresponding interactive behavior node in the blueprint editor, such as a click operation, or other forms of operation, which are not limited in this embodiment.
[0188] This embodiment implements the binding operation of 3D components and 2D components through the corresponding interactive behavior nodes in the low-code blueprint editor, thereby improving the efficiency of component development.
[0189] In a specific implementation, in response to the activation operation of 2D nodes and 3D nodes, the corresponding interactive behavior nodes in the blueprint editor are triggered based on the activation operation of the 2D nodes and 3D nodes; in response to the binding operation of the component to be bound in the 2D node or the 3D node, the binding operation is listened to through the interactive behavior node to obtain the initial component identifier of the component to be bound; and the binding relationship of the component to be bound in the 2D node and the 3D node is determined according to the initial component identifier.
[0190] In this embodiment, the activation operation of the 2D node and the 3D node can be a click operation or other forms of operation. This embodiment does not limit this. Taking the click operation as an example for explanation, when binding the components in the 3D node, click the 3D node, and display the corresponding interactive behavior node in the blueprint editor according to the pre-set node correspondence of the blueprint editor. The interactive behavior node can be a state monitoring node, or other nodes that can realize the monitoring function. According to the triggered state monitoring node, after clicking the component to be bound in the 3D node, the component in the 2D node is operated, so as to monitor the binding information of the 2D component, and obtain the initial component identification of the 3D component and the 2D component according to the monitoring information of the 3D component and the 2D component, and supplement the initial component identification according to the binding information to obtain the component identification for establishing the binding information.
[0191] This embodiment implements the binding operation of 3D components and 2D components through the corresponding interactive behavior nodes in the low-code blueprint editor, thereby improving the efficiency of component development.
[0192] According to some embodiments of the present application, optionally, obtaining an initial component identifier of a component to be bound by monitoring a binding operation through an interactive behavior node includes:
[0193] The listening function in the interactive behavior node is determined according to the type of the component to be bound; the binding operation is listened to according to the listening function to obtain the initial component identifier of the component to be bound.
[0194] In this embodiment, the types of components to be bound include 2D components or 3D components, and may also include other types of components. This embodiment does not limit this. It takes 2D components or 3D components as binding components for explanation. When binding 2D components or 3D components, the binding operation is monitored through a monitoring function, so that the component identification can be obtained according to the monitoring function. In a specific implementation, the operation data obtained by the monitoring function is obtained, the operation data is analyzed, the fields containing identification information are extracted, and information is extracted from the fields to obtain the initial component identification of the component to be bound. Since the initial component identification is constructed according to a specific data structure, the operation data can also be analyzed based on the identification-specific data structure to obtain the initial component identification.
[0195] This embodiment utilizes the monitoring function in the interactive behavior node to obtain the initial component identifier of the component to be bound through the monitoring function without the need to design a separate monitoring program, thereby improving development efficiency.
[0196] According to some embodiments of the present application, optionally, the monitoring the binding operation according to the monitoring function to obtain the initial component identifier of the component to be bound includes:
[0197] When the type of the component to be bound is a 2D component to be bound, the binding operation of the 2D component to be bound in the 2D node is monitored through the monitoring function in the interactive behavior node; when the binding operation of the 2D component to be bound is monitored as a preset behavior event, the initial component identifier of the 2D component to be bound is obtained through the event callback function in the interactive behavior node.
[0198] When the type of the component to be bound is a 3D component to be bound, the binding operation of the 3D component to be bound in the 3D node is obtained through the detection function in the interactive behavior node; the position information of the 3D component to be bound is determined based on the binding operation of the 3D component to be bound; and the initial component identifier of the 3D component to be bound is obtained according to the position information of the 3D component to be bound.
[0199] It should be noted that when obtaining the initial component identifier of the 2D component to be bound, the listening function can be the "addEventListener" method provided by the browser to listen to mouse and keyboard events. The preset behavior events can be mouse and keyboard events, or other interactive behavior events. The initial component identifiers of 2D and 3D can be obtained through the 2D / 3D picking system. The UI / GUI of the 2D component in the 2D / 3D picking system uses the "addEventListener" method provided by the browser to listen to mouse and keyboard events, and obtains the hash key of the 2D component according to the event callback function; the method of obtaining the 3D twin includes the establishment of a cyclic frame self-detection module, obtaining the mouse position information in real time through the requestAnimationFrame method, converting the screen pixel coordinates of the mouse into a three-dimensional coordinate system, and using ray inspection as an auxiliary means to determine the intersection state of the mouse with objects in the three-dimensional scene, thereby realizing the picking of the initial component identifier of the 3D component to be bound.
[0200] This embodiment obtains the initial component identifier of the 2D / 3D component to be bound through the monitoring function and the detection module, and implements the binding of the 2D and 3D components according to the obtained initial component identifier.
[0201] According to some embodiments of the present application, optionally, the method for constructing a digital twin application further includes:
[0202] The initial component identifiers of each component in the binding relationship between the 2D node and the 3D node are parsed to obtain the behavior identifier of each component; a behavior binding node in the blueprint editor is established according to the behavior identifier, wherein the behavior binding node includes a behavior editing component corresponding to the behavior identifier; and the drawing of each component is realized in response to the parameter configuration of the behavior editing component.
[0203] In a specific implementation, the initial component identifier of each component can be decoded by a decoder to obtain the corresponding type identifier, label information, behavior identifier, placeholder relationship identifier and other information in the initial component identifier. The initial component identifier can also be compared with a preset identifier field to determine the type identifier, label information, behavior identifier, placeholder relationship identifier and other information based on the comparison result. Other parsing methods are also possible, which are not limited in this embodiment.
[0204] After parsing the initial component identifiers of each component in the binding relationship between the 2D node and the 3D node, the behavior identifier of each component is obtained, wherein it is determined whether the current component needs to be bound according to the parsed behavior identifier, that is, whether there is a placeholder in the behavior identifier. When there is a placeholder in the behavior identifier, it is determined that the current component needs to be bound. In this embodiment, the current component type and the corresponding interactive behavior node in the blueprint editor are also pre-established, that is, when the current node is a 2D node, the corresponding interactive behavior node in the blueprint editor is called. Since there is a placeholder in the component identifier, it indicates that the current operation is to perform a binding operation, then the binding node required for the binding requirement is determined from the interactive behavior node, and the operation status of the component to be bound is monitored and the component identifier is obtained through the binding node. Then, the behavior binding node in the interactive behavior node in the blueprint editor is triggered according to the parsed behavior identifier, and the behavior attribute node is obtained through the behavior binding node. The behavior attribute node is set by dragging and dropping, thereby realizing the drawing of each component, for example Figure 4 As shown in the behavior binding diagram, if component A needs to flash when it is clicked, behavior 1 and behavior 2 can be displayed in the obtained behavior binding node. The attribute node of the click action can be assigned to behavior 1 by dragging and dropping, and the attribute node of the flashing action can be assigned to behavior 2. In the behavior binding node, a corresponding number of behavior nodes can be obtained according to the behavior identifier. The number of behavior nodes is not limited and can be determined according to the type of behavior identifier, thereby realizing the behavior binding operation in the component and realizing the drawing of the component through the blueprint editor. Therefore, the efficiency of component development is improved under the condition of visual operation.
[0205] According to some embodiments of the present application, optionally, the method for constructing a digital twin application further includes:
[0206] Parse the component identifiers of each component in the binding relationship between the 2D node and the 3D node to obtain the relationship identifiers of each component; obtain the binding relationship between the 2D node and the 3D node based on the relationship identifier; establish an interactive behavior node in the blueprint editor in response to the editing operation of the components corresponding to the 2D node and the 3D node; and adjust the binding relationship between the 2D node and the 3D node according to the editing operation in response to the editing operation of the interactive behavior node.
[0207] In this embodiment, for component identifiers that have established binding relationships, relationship nodes can also be re-established according to actual needs, where the editing operation can be a click operation or other forms of operations. The click operation is taken as an example for explanation. For example, a click operation is performed on the components corresponding to the 2D node and the 3D node. The interactive behavior node in the blueprint editor is triggered according to the click operation, and a new bound component is set to adjust the binding relationship between the original 2D node and the 3D node, so that the binding relationship can be readjusted according to actual needs, thereby improving the flexibility of component binding.
[0208] In the specific implementation, the picking system creates a blueprint picking node, obtains the hash key of the 2D component and the 3D twin through the picking node, and parses it in sequence according to the structure of the hash key after obtaining the hash key, including parsing the type to determine whether the picked content is a 3D or 2D component, parsing the tag information to obtain the tag, parsing the behavior identifier to obtain the behavior blueprint that the current node can use, parsing the relationship identifier to obtain the current binding relationship, and allowing the relationship node to be re-established. According to the parsing method, the user can use the blueprint editor to draw components.
[0209] According to some embodiments of the present application, optionally, the method for constructing a digital twin application further includes:
[0210] Based on the browser in the digital twin application, 3D nodes are rendered to generate 3D rendering nodes; based on the browser in the digital twin application, 2D nodes are rendered to generate 2D rendering nodes; based on the binding relationship between 3D nodes and 2D nodes, a digital twin scene that simultaneously displays 3D rendering nodes and 2D rendering nodes is generated.
[0211] In this embodiment, 3D nodes are rendered through the rendering engine WebGL / WebGPU in the browser, and 2D nodes are rendered through the GUI / UI components in the browser, thereby realizing browser-based node rendering and building a digital twin application scenario based on the B / S architecture.
[0212] The present invention further provides a device for constructing a digital twin application.
[0213] Reference Figure 5 , Figure 5 Schematic diagram of functional modules of some embodiments of the construction device of the digital twin application of the present invention.
[0214] In some embodiments of the digital twin application construction device of the present invention, the digital twin application construction device includes:
[0215] The acquisition module 10 is used to acquire a blueprint editor built based on a browser.
[0216] The construction module 20 is used to construct each interactive behavior node according to the blueprint editor.
[0217] The binding module 30 is used to bind 2D nodes and 3D nodes with interactive relationships according to the interactive behavior nodes in the blueprint editor.
[0218] The application generation module 40 is used to build a digital twin application based on the binding relationship between 2D nodes and 3D nodes.
[0219] The embodiment of the present application obtains a blueprint editor built based on a browser, so that the blueprint editor can be applied to the B / S architecture, and constructs various interactive behavior nodes according to the blueprint editor, binds 2D nodes and 3D nodes in the digital twin application based on the interactive behavior nodes, and builds the digital twin application according to the binding relationship between the 2D nodes and the 3D nodes, thereby realizing the binding of 2D and 3D nodes through the low-code tool blueprint nodes, and completing the construction of digital twin applications under the B / S architecture. The interactive behaviors of 2D and 3D nodes can be performed simultaneously for the digital twin application scenarios, thereby improving the richness of the digital twin application scenarios.
[0220] According to some embodiments of the present application, optionally, the construction module 20 is further used to obtain a user interface component;
[0221] Construct each component in the 2D node according to the user interface components;
[0222] Obtain the 3D model carrier of the digital twin;
[0223] Construct each component in the 3D node based on the 3D model carrier of the digital twin.
[0224] According to some embodiments of the present application, optionally, the binding module 30 is further configured to bind the 2D nodes and 3D nodes having an interactive relationship according to the interactive behavior nodes in the blueprint editor, and further includes:
[0225] Label each component in the 2D node and the 3D node according to the component type to obtain label information;
[0226] The behavior dictionary table is queried according to the tag information to obtain the behavior events corresponding to each tag information, wherein the dictionary table reflects the corresponding relationship between each tag and the corresponding behavior event.
[0227] According to some embodiments of the present application, optionally, the construction module 20 is further used to count each component type and the corresponding behavior event;
[0228] Assign label information to each component type;
[0229] A behavior dictionary table is established according to the tag information and the behavior identifier of the corresponding behavior event.
[0230] According to some embodiments of the present application, optionally, the binding module 30 is further used to construct an initial component identifier of each component according to each component type of the 2D node and the 3D node, the label information corresponding to each component type, the behavior identifier of the behavior event corresponding to each label information, and the initial relationship identifier;
[0231] Based on the binding operation, the initial relationship identifier is supplemented with information to obtain a component identifier;
[0232] Bind 2D nodes and 3D nodes according to component identifiers.
[0233] According to some embodiments of the present application, optionally, the binding module 30 is further used to respond to the binding operation of the components to be bound in the 2D node and the 3D node;
[0234] Determine the binding relationship between the components to be bound in the 2D node and the 3D node according to the binding operation;
[0235] The initial relationship identifier is supplemented with information according to the binding relationship to obtain a component identifier.
[0236] According to some embodiments of the present application, optionally, the binding module 30 is further configured to respond to activation operations of the 2D node and the 3D node, and trigger corresponding interactive behavior nodes in the blueprint editor based on the activation operations of the 2D node and the 3D node;
[0237] In response to a binding operation of a component to be bound in a 2D node or a 3D node, the binding operation is monitored by an interactive behavior node to obtain an initial component identifier of the component to be bound;
[0238] The binding relationship between the components to be bound in the 2D node and the 3D node is determined according to the initial component identifier.
[0239] According to some embodiments of the present application, optionally, the binding module 30 is further configured to monitor the binding operation of the 2D to-be-bound component in the 2D node through the monitoring function in the interactive behavior node;
[0240] When it is detected that the binding operation of the 2D component to be bound is a preset behavior event, the initial component identifier of the 2D component to be bound is obtained through the event callback function in the interactive behavior node.
[0241] According to some embodiments of the present application, optionally, the binding module 30 is further used to obtain the binding operation of the 3D to-be-bound component in the 3D node through the detection function in the interactive behavior node;
[0242] Determine position information of the 3D component to be bound based on the binding operation of the 3D component to be bound;
[0243] According to the position information of the 3D component to be bound, an initial component identifier of the 3D component to be bound is obtained.
[0244] According to some embodiments of the present application, optionally, the binding module 30 is further used to parse the initial component identifiers of each component in the binding relationship between the 2D node and the 3D node to obtain the behavior identifiers of each component;
[0245] Establishing a behavior binding node in a blueprint editor according to the behavior identifier, wherein the behavior binding node includes a behavior editing component corresponding to the behavior identifier;
[0246] In response to the parameter configuration of the behavior editing component, the drawing of each component is realized.
[0247] According to some embodiments of the present application, optionally, the binding module 30 is further used to parse the component identifiers of the components in the binding relationship between the 2D node and the 3D node to obtain the relationship identifiers of the components;
[0248] Obtain the binding relationship between the 2D node and the 3D node according to the relationship identifier;
[0249] In response to the editing operation of the components corresponding to the 2D node and the 3D node, an interactive behavior node in the blueprint editor is established;
[0250] In response to an editing operation of the interactive behavior node, a binding relationship between the 2D node and the 3D node is adjusted according to the editing operation.
[0251] According to some embodiments of the present application, optionally, the application generation module 40 is further used to render the 3D node based on the browser in the digital twin application to generate a 3D rendering node;
[0252] Render the 2D nodes based on the browser in the digital twin application to generate 2D rendering nodes;
[0253] Based on the binding relationship between 3D nodes and 2D nodes, a digital twin scene is generated that displays both 3D rendering nodes and 2D rendering nodes.
[0254] In addition, to achieve the above-mentioned objectives, the present invention also proposes a digital twin application construction device, the digital twin application construction device includes: a memory, a processor, and a digital twin application construction program stored in the memory and runnable on the processor, the digital twin application construction program is configured to implement the digital twin application construction method as described above.
[0255] Since the construction device of the digital twin application adopts all the technical solutions of all the above-mentioned embodiments, it has at least all the beneficial effects brought by the technical solutions of the above-mentioned embodiments, which will not be described one by one here.
[0256] In addition, an embodiment of the present invention also proposes a storage medium, on which a construction program for a digital twin application is stored. When the construction program for the digital twin application is executed by a processor, the construction method for the digital twin application as described above is implemented.
[0257] Since the storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.
[0258] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application, and they should all be included in the scope of the claims and specification of the present application. In particular, as long as there is no structural conflict, the various technical features mentioned in the various embodiments can be combined in any way. The present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions that fall within the scope of the claims.
Claims
1. A method for constructing a digital twin application, characterized in that: The method for constructing the digital twin application includes: Get the browser-based Blueprint Editor; Binding 2D nodes and 3D nodes having an interactive relationship according to the interactive behavior nodes in the blueprint editor, wherein the 2D nodes and 3D nodes are constituent components of the digital twin application; A digital twin application is constructed based on the binding relationship between the 2D node and the 3D node.
2. The method for constructing a digital twin application according to claim 1, characterized in that: Before binding the 2D nodes and 3D nodes having an interactive relationship according to the interactive behavior nodes in the blueprint editor, the method further includes: Get the user interface component; Construct each component in the 2D node according to the user interface component; Obtain the 3D model carrier of the digital twin; Each component in the 3D node is constructed according to the 3D model carrier of the digital twin.
3. The method for constructing a digital twin application according to claim 1, characterized in that: Before binding the 2D nodes and 3D nodes having an interactive relationship according to the interactive behavior nodes in the blueprint editor, the method further includes: Classify the components in the 2D node and the 3D node according to the component type to obtain label information; The behavior dictionary table is queried according to the tag information to obtain the behavior events corresponding to each tag information, wherein the dictionary table reflects the corresponding relationship between each tag and the corresponding behavior event.
4. The method for constructing a digital twin application according to claim 3, characterized in that: Before searching the behavior dictionary table according to the tag information to obtain the behavior events corresponding to each tag information, the method further includes: Count each component type and the corresponding behavior events; Assigning label information to each component type; A behavior dictionary table is established according to the tag information and the behavior identifier of the corresponding behavior event.
5. The method for constructing a digital twin application according to any one of claims 1 to 4, characterized in that: The step of binding the 2D nodes and 3D nodes having an interactive relationship according to the interactive behavior nodes in the blueprint editor includes: Acquire identification information of the 2D node and the 3D node according to the interactive behavior node in the blueprint editor; The 2D nodes and 3D nodes having an interactive relationship are bound according to the identification information.
6. The method for constructing a digital twin application according to any one of claims 1 to 5, characterized in that: The step of binding the 2D nodes and 3D nodes having an interactive relationship according to the interactive behavior nodes in the blueprint editor includes: Obtaining a visual operation component according to the interactive behavior node in the blueprint editor; The interactive 2D nodes and 3D nodes are bound according to the visualization operation component.
7. The method for constructing a digital twin application according to any one of claims 1 to 6, characterized in that: The step of binding the 2D nodes and 3D nodes having an interactive relationship according to the interactive behavior nodes in the blueprint editor includes: Obtaining an initial component identifier of each component in a 2D node and a 3D node according to an interactive behavior node in the blueprint editor, wherein the initial component identifier includes a binding state; The 2D node and the 3D node are bound according to the initial component identifier.
8. The method for constructing a digital twin application according to claim 7, characterized in that: The method for constructing the digital twin application also includes: Obtaining node information of the 2D node and the 3D node; An initial component identifier of each component is constructed according to the node information.
9. The method for constructing a digital twin application according to claim 7, characterized in that: The method for constructing the digital twin application also includes: The initial component identification of each component is constructed according to each component type of the 2D node and the 3D node, the label information corresponding to each component type, the behavior identification of the behavior event corresponding to each label information, and the initial relationship identification.
10. The method for constructing a digital twin application according to claim 9, characterized in that: The binding the 2D node and the 3D node according to the initial component identifier includes: Supplementing the initial relationship identifier with information based on the binding operation to obtain a component identifier; The 2D node and the 3D node are bound according to the component identifier.
11. The method for constructing a digital twin application according to claim 9, characterized in that: The binding the 2D node and the 3D node according to the initial component identifier includes: Obtaining the binding relationship between the components to be bound in the 2D node and the 3D node; The initial relationship identifier is supplemented with information according to the binding relationship to obtain a component identifier.
12. The method for constructing a digital twin application according to claim 11, characterized in that: The obtaining of the binding relationship between the components to be bound in the 2D node and the 3D node includes: Responding to the binding operation of the components to be bound in the 2D node and the 3D node; The binding relationship between the components to be bound in the 2D node and the 3D node is determined according to the binding operation.
13. The method for constructing a digital twin application according to claim 12, characterized in that: The determining, according to the binding operation, the binding relationship between the components to be bound in the 2D node and the 3D node includes: Triggering the corresponding interactive behavior node in the blueprint editor in a preset manner; The binding operation is monitored by the interaction behavior node to obtain an initial component identifier of the component to be bound; The binding relationship between the components to be bound in the 2D node and the 3D node is determined according to the initial component identifier.
14. The method for constructing a digital twin application according to claim 13, characterized in that: The step of monitoring the binding operation through the interactive behavior node to obtain the initial component identifier of the component to be bound includes: Determine the listening function in the interactive behavior node according to the type of the component to be bound; The binding operation is monitored according to the monitoring function to obtain the initial component identifier of the component to be bound.
15. The method for constructing a digital twin application according to claim 14, characterized in that: The step of monitoring the binding operation according to the monitoring function to obtain the initial component identifier of the component to be bound includes: In the case where the type of the component to be bound is a 2D component to be bound, monitoring the binding operation of the 2D component to be bound in the 2D node through the monitoring function in the interactive behavior node; When it is detected that the binding operation of the 2D component to be bound is a preset behavior event, the initial component identifier of the 2D component to be bound is obtained through the event callback function in the interactive behavior node.
16. The method for constructing a digital twin application according to claim 14, characterized in that: The step of monitoring the binding operation through the interactive behavior node to obtain the initial component identifier of the component to be bound includes: In the case where the type of the component to be bound is a 3D component to be bound, obtaining a binding operation of the 3D component to be bound in the 3D node through a detection function in the interaction behavior node; Determine the position information of the 3D component to be bound based on the binding operation of the 3D component to be bound; According to the position information of the 3D component to be bound, an initial component identifier of the 3D component to be bound is obtained.
17. The method for constructing a digital twin application according to any one of claims 1 to 16, characterized in that: The method for constructing the digital twin application also includes: Parsing the initial component identifiers of the components in the binding relationship between the 2D node and the 3D node to obtain the behavior identifiers of the components; Establishing a behavior binding node in the blueprint editor according to the behavior identifier, wherein the behavior binding node includes a behavior editing component corresponding to the behavior identifier; In response to the parameter configuration of the behavior editing component, the drawing of each component is realized.
18. The method for constructing a digital twin application according to any one of claims 1 to 17, characterized in that: The method for constructing the digital twin application also includes: Parsing the component identifiers of the components in the binding relationship between the 2D node and the 3D node to obtain the relationship identifiers of the components; Obtaining a binding relationship between the 2D node and the 3D node according to the relationship identifier; In response to the editing operation of the components corresponding to the 2D node and the 3D node, establishing an interactive behavior node in the blueprint editor; In response to an editing operation of the interactive behavior node, a binding relationship between the 2D node and the 3D node is adjusted according to the editing operation.
19. The method for constructing a digital twin application according to any one of claims 1 to 18, characterized in that: The method for constructing the digital twin application also includes: Rendering the 3D node based on the browser in the digital twin application to generate a 3D rendering node; Rendering the 2D node based on the browser in the digital twin application to generate a 2D rendering node; Based on the binding relationship between the 3D node and the 2D node, a digital twin scene is generated that simultaneously displays the 3D rendering node and the 2D rendering node.
20. A device for constructing a digital twin application, characterized in that: The construction device of the digital twin application includes: Get module, used to get the blueprint editor built on the browser; A construction module, used to construct each interactive behavior node according to the blueprint editor; A binding module, used to bind 2D nodes and 3D nodes with interactive relationships according to the interactive behavior nodes in the blueprint editor; An application generation module is used to build a digital twin application based on the binding relationship between the 2D node and the 3D node.
21. A device for building a digital twin application, characterized in that: The construction device of the digital twin application includes: a memory, a processor, and a construction program of the digital twin application stored in the memory and executable on the processor, wherein the construction program of the digital twin application is configured to implement the construction method of the digital twin application as described in any one of claims 1 to 19.
22. A storage medium, characterized in that: The storage medium stores a construction program for a digital twin application, and when the construction program for the digital twin application is executed by a processor, the construction method for a digital twin application as described in any one of claims 1 to 19 is implemented.