WebGL-based digital twin workshop model construction method and device, equipment and medium

Through the digital twin workshop model construction method based on WebGL, the problem of difficult to realize digital and visual virtual workshop model in the existing technology is solved, and a digital and visual virtual factory building is realized, which reduces unnecessary expenses and saves costs.

CN119513957APending Publication Date: 2025-02-25SHENZHEN YOUZHIYUN IND INTERNET CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311066070.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-23
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The prior art is difficult to effectively implement digital and visual virtual workshop models, resulting in unnecessary expenses and costs.

Method used

The digital twin workshop model construction method based on WebGL is adopted. By setting the size range of the workshop model displayed, the BABYLON.Engine method is loaded, the workshop scene is constructed, the scene object is returned, and the workshop scene is rendered using the runRenderLoop method.

Benefits of technology

A digital and visual virtual factory building has been realized, reducing unnecessary expenses and saving costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513957A_ABST
    Figure CN119513957A_ABST
Patent Text Reader

Abstract

The invention discloses a WebGL-based digital twin workshop model construction method, apparatus and device, and a medium. The method comprises the steps of setting a size range displayed by a workshop model; the target 3D engine is loaded by using a BABYLON.Engine method, and the target 3D engine is loaded by using the BABYLON.Engine method; the method comprises the following steps: constructing a workshop scene by using a BABYLON.Scene method; returning one or more scene objects according to the constructed workshop scene; and executing the scene object by using a runRenderLoop method to render the workshop scene so as to complete construction of the workshop model, so that a digital and visual virtual workshop can be realized, and unnecessary expenditure is further reduced so as to save cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for constructing a digital twin workshop model based on WebGL. Background Art

[0002] WebGL (Web Graphics Library) is a 3D drawing protocol. This drawing technology standard allows JavaScript and OpenGL ES 2.0 to be combined together. By adding a JavaScript binding to OpenGL ES 2.0, WebGL can provide hardware 3D accelerated rendering for HTML5 Canvas, so that Web developers can use the system graphics card to display 3D scenes and models more smoothly in the browser, and create complex data visualization and user interaction operations.

[0003] With the development of IT information technology and mobile terminals, the use of WebGL technology has gradually matured. At the same time, with the continuous advancement of factory informatization and automation construction, the deployment and application of various information systems and automation systems have made workshop management as product production more and more important. The digitalization of 3D factory buildings has been applied by more and more companies and enterprises. The application of three-dimensional digital factory models has accelerated the efficiency of factory buildings, warehousing, production, equipment management, monitoring and control, etc. Realize the digital and visual transformation of physical factory workshops to 3D virtual factory workshops. Make factory production smoother, reduce unnecessary errors and expenses, and save costs. Summary of the invention

[0004] The present invention aims to solve one of the technical problems in the related art to at least a certain extent. To this end, one object of the present invention is to provide a method, device, equipment and medium for building a digital twin workshop model based on WebGL, which can realize a digital and visualized virtual workshop, further reduce unnecessary expenses and save costs.

[0005] The technical solution adopted by the present invention is:

[0006] In the first aspect, the present invention provides a method for constructing a digital twin workshop model based on WebGL, including: setting the size range displayed by the workshop model; using the BABYLON.Engine method to load the target 3D engine; using the BABYLON.Scene method to construct a workshop scene; returning one or more scene objects according to the constructed workshop scene; using the runRenderLoop method to execute the scene object for rendering the workshop scene to complete the construction of the workshop model.

[0007] In the second aspect, the present invention provides a digital twin workshop model construction device based on WebGL, including: a setting module for setting the size range displayed by the workshop model; a loading module for loading the target 3D engine using the BABYLON.Engine method; a construction module for constructing a workshop scene using the BABYLON.Scene method; a first execution module for returning one or more scene objects according to the constructed workshop scene; and a second execution module for using the runRenderLoop method to execute the scene object for rendering the workshop scene to complete the construction of the workshop model.

[0008] In a third aspect, the present invention provides a computer device, comprising: a processor; and a memory, wherein the processor has a computer execution program, and the computer execution program is used to execute the method as described above.

[0009] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method as described above.

[0010] The beneficial effects of the present invention are:

[0011] The present invention sets the size range displayed by the workshop model; uses the BABYLON.Engine method to load the target 3D engine; uses the BABYLON.Scene method to construct a workshop scene; returns one or more scene objects according to the constructed workshop scene; uses the runRenderLoop method to execute the scene object for rendering the workshop scene to complete the construction of the workshop model, thereby realizing a digital and visualized virtual workshop and further reducing unnecessary expenses to save costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a flowchart of an embodiment of a method for constructing a digital twin workshop model based on WebGL of the present invention;

[0013] Figure 2 It is a flow chart of another embodiment of the method for constructing a digital twin workshop model based on WebGL of the present invention;

[0014] Figure 3 It is a structural schematic diagram of an embodiment of a device for building a digital twin workshop model based on WebGL of the present invention;

[0015] Figure 4 It is a schematic structural diagram of an embodiment of a computer device of the present invention. DETAILED DESCRIPTION

[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0017] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

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

[0019] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0020] Embodiment 1

[0021] See also Figure 1 , Figure 1 1 is a flow chart of an embodiment of a method for constructing a digital twin workshop model based on WebGL of the present invention. Figure 1 As shown, the following steps are included:

[0022] S101, setting the size range displayed by the workshop model;

[0023] Among them, this embodiment uses the canvas size attribute in the Canvas element to define the size range of the workshop model displayed. The canvas size attribute refers to the width and height attributes. This embodiment can achieve the display size of the workshop model by setting the width and height attributes.

[0024] S102, use BABYLON.Engine method to load the target 3D engine;

[0025] The target 3D engine refers to the BABYLON.js engine. In this embodiment, the BABYLON.js engine is loaded in the following manner: var engine = new BABYLON.Engine (canvas, true).

[0026] S103, use BABYLON.Scene method to build the workshop scene;

[0027] Among them, in this embodiment, each call to a BABYLON.Scene method is to create a BABYLON Scene workshop scene. In actual applications, multiple BABYLON.Scene methods can be used to create multiple workshop scenes according to the actual number of workshop scenes. The workshop scenes include production lines, lights on production lines, cameras on monitoring systems, etc.

[0028] S104, returning one or more scene objects according to the constructed workshop scene;

[0029] Among them, in this embodiment, the scene objects include at least equipment model objects, animation objects, lighting objects and audio / video objects. In actual applications, different workshop scenes will return different scene objects, and different types of scene objects will be visible on the final screen.

[0030] Optionally, in this embodiment, the events triggered by the workshop model may also be bound through the BABYLON.ActionManager method.

[0031] S105 , using the runRenderLoop method to execute the scene object for rendering the workshop scene, so as to complete the construction of the workshop model.

[0032] In this embodiment, each scene object calls a corresponding runRenderLoop method. Running the runRenderLoop method can execute the scene object to render different scenes so that the user can see all objects described in the scene in the browser.

[0033] Embodiments of the present invention set the size range displayed by the workshop model; use the BABYLON.Engine method to load the target 3D engine; use the BABYLON.Scene method to build a workshop scene; return one or more scene objects according to the constructed workshop scene; use the runRenderLoop method to execute the scene object for rendering the workshop scene to complete the construction of the workshop model, realize a digital and visualized virtual factory, and further reduce unnecessary expenses to save costs.

[0034] Embodiment 2

[0035] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of another embodiment of a method for constructing a digital twin workshop model based on WebGL of the present invention. Figure 2 As shown, the following steps are included:

[0036] S101, setting the size range displayed by the workshop model;

[0037] Among them, this embodiment uses the canvas size attribute in the Canvas element to define the size range of the workshop model displayed. The canvas size attribute refers to the width and height attributes. This embodiment can achieve the display size of the workshop model by setting the width and height attributes.

[0038] S102, use BABYLON.Engine method to load the target 3D engine;

[0039] The target 3D engine refers to the BABYLON.js engine. In this embodiment, the BABYLON.js engine is loaded in the following manner: var engine = new BABYLON.Engine (canvas, true).

[0040] S103, use BABYLON.Scene method to build the workshop scene;

[0041] Among them, in this embodiment, each call to a BABYLON.Scene method is to create a BABYLON Scene workshop scene. In actual applications, multiple BABYLON.Scene methods can be used to create multiple workshop scenes according to the actual number of workshop scenes. The workshop scenes include production lines, lights on production lines, cameras on monitoring systems, etc.

[0042] S104, returning one or more scene objects according to the constructed workshop scene;

[0043] Among them, in this embodiment, the scene objects include at least equipment model objects, animation objects, lighting objects and audio / video objects. In actual applications, different workshop scenes will return different scene objects, and different types of scene objects will be visible on the final screen.

[0044] Optionally, in this embodiment, the events triggered by the workshop model may also be bound through the BABYLON.ActionManager method.

[0045] S105 , using the runRenderLoop method to execute the scene object for rendering the workshop scene, so as to complete the construction of the workshop model.

[0046] In this embodiment, each scene object calls a corresponding runRenderLoop method. Running the runRenderLoop method can execute the scene object to render different scenes so that the user can see all objects described in the scene in the browser.

[0047] S106, using a render method to start the rendered workshop scene.

[0048] After rendering the workshop scene using the runRenderLoop method, each rendered scene object is executed by calling the render method, so that the scene object is visualized in a browser or other display layer.

[0049] Embodiment 3

[0050] See also Figure 3 , Figure 3 Schematic diagram of a structure of an embodiment of a device for constructing a digital twin workshop model based on WebGL according to the present invention. Figure 3 As shown, the device includes a setting module 11, a loading module 12, a construction module 13, a first execution module 14, and a second execution module 15.

[0051] A setting module 11 is used to set the size range displayed by the workshop model;

[0052] A loading module 12 is used to load a target 3D engine using a BABYLON.Engine method;

[0053] Building block 13, for building a workshop scene using BABYLON.Scene method;

[0054] A first execution module 14, used to return one or more scene objects according to the constructed workshop scene;

[0055] The second execution module 15 is used to use the runRenderLoop method to execute the scene object for rendering the workshop scene to complete the construction of the workshop model.

[0056] Specifically, the setting module 11 is specifically used to: use the canvas size attribute in the Canvas element to define the size range of the workshop model displayed.

[0057] Specifically, the target 3D engine is the BABYLON.js engine.

[0058] Specifically, the scene objects include at least a device model object, an animation object, a light object, and an audio / video object.

[0059] Specifically, the device further includes: a starting module 16, which is used to start the rendered workshop scene using a render method.

[0060] The above embodiments of the present invention set the size range displayed by the workshop model; use the BABYLON.Engine method to load the target 3D engine; use the BABYLON.Scene method to build a workshop scene; return one or more scene objects according to the constructed workshop scene; use the runRenderLoop method to execute the scene object for rendering the workshop scene to complete the construction of the workshop model, realize a digital and visualized virtual factory, and further reduce unnecessary expenses to save costs.

[0061] The working methods of each module have been described in detail in the first embodiment and will not be repeated here.

[0062] Embodiment 4

[0063] The present invention also provides a computer device, such as Figure 4 As shown, the system includes a processor and a memory.

[0064] The processor has a computer execution program, and the computer execution program is used to execute the methods described in the above embodiments one to two.

[0065] Embodiment 5

[0066] The present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the methods described in embodiments one to two.

[0067] In summary, the present invention provides a method, device, equipment and medium for constructing a digital twin workshop model based on WebGL, which can realize a digital and visualized virtual factory and further reduce unnecessary expenses to save costs.

[0068] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A method for constructing a digital twin workshop model based on WebGL, characterized in that: The method comprises: Set the size range of the workshop model displayed; Use BABYLON.Engine method to load the target 3D engine; Use BABYLON.Scene method to build the workshop scene; Return one or more scene objects according to the constructed workshop scene; The runRenderLoop method is used to execute the scene object for rendering the workshop scene to complete the construction of the workshop model.

2. The method according to claim 1, characterized in that The size range displayed by the workshop model is as follows: Use the canvas size attribute in the Canvas element to define the size range in which the shop floor model is displayed.

3. The method according to claim 1, characterized in that The target 3D engine is the BABYLON.js engine.

4. The method according to claim 1, characterized in that The scene objects include at least a device model object, an animation object, a light object, and an audio / video object.

5. The method according to claim 1, characterized in that After using the runRenderLoop method to execute the scene object for rendering the workshop scene, the method further includes: The render method is used to start rendering the workshop scene.

6. A digital twin workshop model construction device based on WebGLr, characterized in that: The device comprises: The setting module is used to set the size range displayed by the workshop model; Loading module, used to load the target 3D engine using BABYLON.Engine method; Building blocks for building workshop scenes using BABYLON.Scene methods; A first execution module, used to return one or more scene objects according to the constructed workshop scene; The second execution module is used to use the runRenderLoop method to execute the scene object for rendering the workshop scene to complete the construction of the workshop model.

7. The device according to claim 6, characterized in that The setting module is specifically used to: use the canvas size attribute in the Canvas element to define the size range displayed by the workshop model.

8. The device according to claim 6, characterized in that The target 3D engine is the BABYLON.js engine.

9. A computer device, characterized in that: The device comprises: Processor; and The memory comprises a processor having a computer executable program, wherein the computer executable program is used to execute the method according to any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method according to any one of claims 1 to 5.

Citation Information

Cited By

  • Multi-screen interactive real estate display method based on cave and LED

    CN120540618A