Model loading method and system

CN119066851APending Publication Date: 2024-12-03广域铭岛数字科技有限公司 +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411115404.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-12-03

Smart Images

  • Figure CN119066851A_ABST
    Figure CN119066851A_ABST
Patent Text Reader

Abstract

The invention relates to the field of computer graphics, and discloses a model loading method and system. The method comprises the following steps: acquiring a digital-analog file corresponding to an original model node through a server, analyzing part information corresponding to each part node according to the digital-analog file, and constructing a visual cone region according to a current viewpoint position; according to the part information, node projections corresponding to the part nodes are generated on a preset visual cone face of the visual cone area, and a target node is determined from the part nodes based on the area ratio between the node projections and the preset visual cone face, so that a user terminal carries out model loading according to the part information corresponding to the target node. According to the method, the part nodes are extracted from the digital-analog file, the part nodes are projected according to the current viewpoint position, and the target node is determined from the part nodes based on the projection area, so that a user terminal only loads the target node, the number of parts is reduced, the model loading time is shortened, and the model loading efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer graphics technology, and in particular to a model loading method and system. Background Art

[0002] With the rapid development of modern science and technology, large-scale computer-aided design (CAD) models are increasingly widely and deeply used in all walks of life, becoming a key force in promoting industrial design and manufacturing innovation. These high-precision and high-complexity CAD models not only greatly improve design efficiency and accuracy, but also promote progress in simulation analysis, performance optimization and intelligent manufacturing. In many industries such as architecture, aerospace, automobile manufacturing, mechanical engineering and electronic design, CAD models have become an indispensable design tool. They not only help designers achieve seamless conversion from concept to physical object, but also provide a solid foundation for product performance evaluation and optimization through precise geometric modeling, material simulation and physical parameter setting. In the field of architecture, CAD models allow architects to review design plans in all aspects, from structural layout to interior decoration, every detail is under control; in the field of aerospace, CAD models help engineers design safer, more efficient and environmentally friendly aircraft; and in the fields of automobile manufacturing and mechanical engineering, CAD models run through the entire process of design, simulation and manufacturing, providing a strong guarantee for product innovation and quality improvement.

[0003] However, as the scale of models continues to expand, the amount of data is also growing explosively. Large CAD models usually contain massive amounts of geometric information, material properties, and physical parameters, and their data volume can reach hundreds of megabytes (MB) or even tens of gigabytes (GB). At the same time, the loading and rendering of large CAD models requires powerful computing resource support, which puts more stringent requirements on computer hardware and software performance. Computers with ordinary configurations are often unable to cope with it.

[0004] Due to the huge amount of data in the model and the limitations of computing resources, the model loading process takes a long time, reducing work efficiency. Summary of the invention

[0005] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.

[0006] In view of the above-mentioned shortcomings of the prior art, the present application discloses a model loading method and system to improve the model loading efficiency.

[0007] The present application discloses a model loading method, which is applied to a server side, wherein the server side is connected to a user terminal, and the method comprises: obtaining a digital model file corresponding to an original model node, wherein the original model node is composed of a plurality of component nodes; parsing the digital model file to obtain component information corresponding to each of the component nodes; obtaining a current viewpoint position from the user terminal, and constructing a visual frustum region according to the current viewpoint position, so as to generate node projections corresponding to each of the component nodes on a preset visual frustum plane of the visual frustum region according to the component information; determining a target node from each of the component nodes according to the projection area corresponding to each of the node projections, wherein the user terminal is used to load the model according to the component information corresponding to the target node, and obtain a visualization model corresponding to the current viewpoint position.

[0008] In one embodiment of the present application, the digital model file is parsed to obtain component information corresponding to each of the component nodes, including: the original model node is composed of assembly nodes and / or component nodes, wherein the assembly node is composed of at least a part of the component nodes; the digital model format data corresponding to the assembly node is extracted from the digital model file, and the digital model format data corresponding to the assembly node is format-converted to obtain a transformation matrix and a sub-level list corresponding to the assembly node, wherein the sub-level list includes the component node corresponding to the assembly node; the digital model format data corresponding to the component node is extracted from the digital model file, and the digital model format data corresponding to the component node is format-converted to obtain the grid information and bounding box size corresponding to the component node; the component information corresponding to each of the component nodes is generated according to at least one of the transformation matrix, the grid information and the bounding box size.

[0009] In one embodiment of the present application, the method further includes: pre-setting a data conversion interface and a file storage space, wherein the file storage space is used to store the digital model file; obtaining conversion interface information corresponding to the original model node, wherein the conversion interface information includes at least one of a node identifier, a node name and a file address corresponding to a child node, wherein the child node includes an assembly node and / or a component node; calling the data conversion interface according to the conversion interface information to generate a conversion task corresponding to the original model node by calling the data conversion interface, wherein the conversion task includes conversion items corresponding to each of the child nodes; if the child node is an assembly If the sub-node is a component node, the conversion item corresponding to the component node includes extracting the digital-analog format data corresponding to the assembly node from the digital-analog file according to the file address corresponding to the assembly node, and performing format conversion on the digital-analog format data corresponding to the assembly node to obtain the conversion matrix and child list corresponding to the assembly node; if the child node is a component node, the conversion item corresponding to the component node includes extracting the digital-analog format data corresponding to the component node from the digital-analog file according to the file address corresponding to the component node, and performing format conversion on the digital-analog format data corresponding to the component node to obtain the grid information and bounding box size corresponding to the component node.

[0010] In one embodiment of the present application, generating node projections corresponding to each of the component nodes on a preset viewing frustum surface of the viewing frustum region according to the component information includes: if the component information includes the bounding box size of the bounding box where each of the component nodes is located and the transformation matrix corresponding to each of the component nodes, merging the bounding boxes where each of the component nodes is located according to the bounding box size and the transformation matrix to obtain a merged area; determining a region external node from each of the component nodes according to the merged area; performing model rendering in the viewing frustum region according to the bounding box size corresponding to the region external node to obtain a node model corresponding to the region external node, wherein the node model is located between a near section and a far section of the viewing frustum region, and a near section distance between the near section and the current viewpoint position is less than a far section distance between the far section and the current viewpoint position; forming a node projection corresponding to the node model on a preset viewing frustum surface according to the current viewpoint position, wherein the preset viewing frustum surface includes the far section.

[0011] In one embodiment of the present application, the method further includes: if the current viewpoint position changes, updating the visual cone area according to the changed current viewpoint position; taking the center point of the node model as the ray starting point, drawing a ray to any surface in the visual cone area, and counting the number of intersections between the ray and each surface of the visual cone area; if the number of intersections is an odd number, determining that the node model is within the visual cone area, wherein the node model within the visual cone area is determined as a first model, and the node model outside the visual cone area is determined as a second model; updating the node projection corresponding to the first model, and deleting the node projection corresponding to the second model.

[0012] In one embodiment of the present application, a target node is determined from each of the component nodes according to the projection areas corresponding to the projections of each of the node projections, including at least one of the following: if the projection area corresponding to the component node is greater than a preset area threshold, the component node is determined as a target node; the area ratio between the projection of each of the node and the projection area is calculated according to the projection area, and if the area ratio corresponding to the component node is greater than the preset ratio threshold, the component node is determined as a target node; the area ratio between the projection of each of the node and the projection area is calculated according to the projection area, the node ratio is calculated according to the terminal computing power of the user terminal, and the target ratio is determined from each of the area ratios according to the node ratio, so as to determine the component node corresponding to the target ratio as the target node, wherein there is a positive correlation between the terminal computing power and the node ratio.

[0013] In one embodiment of the present application, the method also includes: pre-setting a flow management service; connecting the user terminal via the WebSocket protocol, and receiving a session connection request sent by the user terminal via a proxy port corresponding to the WebSocket protocol; in response to any received session connection request, determining whether the session connection request includes a model viewing request; if the session connection request includes a model viewing request, determining a target port corresponding to the session connection request from a preset local port, and establishing a flow cache service corresponding to the target port via the flow management service; and processing corresponding session requests respectively via each of the flow cache services, wherein different session connection requests correspond to different target ports, and different session connection requests correspond to different flow cache services.

[0014] The present application discloses a model loading method, which is applied to a user terminal, wherein the client terminal is connected to a server end, and the method comprises: obtaining a target node corresponding to an original model node, wherein the server end is used to obtain a digital model file corresponding to the original model node, wherein the original model node is composed of a plurality of component nodes; parsing the digital model file to obtain component information corresponding to each of the component nodes; obtaining a current viewpoint position from the user terminal, and constructing a frustum region according to the current viewpoint position, so as to generate node projections corresponding to each of the component nodes on a preset frustum surface of the frustum region according to the component information; determining a target node from each of the component nodes according to the projection area corresponding to each of the node projections; and loading a model according to the component information corresponding to the target node to obtain a visualization model corresponding to the current viewpoint position.

[0015] In one embodiment of the present application, the method also includes at least one of the following: if the number of model vertices corresponding to the visualization model is greater than a preset threshold number, determining a visible area from the visualization model according to the current viewpoint position, and loading the visible area; rendering the visualization model according to a preset target rendering frame rate, wherein the target rendering frame rate is determined according to the terminal computing power of the user terminal, and there is a positive correlation between the target rendering frame rate and the terminal computing power; loading the model according to the component information corresponding to the target node to obtain an image frame containing the visualization model, and generating a new image frame in response to the rendering progress corresponding to the image frame being rendering completed.

[0016] The present application discloses a model loading system, comprising: a server side, used to obtain a digital model file corresponding to an original model node, wherein the original model node is composed of a plurality of component nodes; the digital model file is parsed to obtain component information corresponding to each of the component nodes; the current viewpoint position is obtained from a user terminal, and a visual frustum region is constructed according to the current viewpoint position, so as to generate node projections corresponding to each of the component nodes on a preset visual frustum surface of the visual frustum region according to the component information; a target node is determined from each of the component nodes according to the projection area corresponding to each of the node projections; and the user terminal is used to load a model according to the component information corresponding to the target node, so as to obtain a visualization model corresponding to the current viewpoint position.

[0017] Beneficial effects of this application:

[0018] The digital model file corresponding to the original model node is obtained through the server side, and the component information corresponding to each component node is parsed according to the digital model file, and then the viewing cone area is constructed according to the current viewpoint position, so as to generate the node projection corresponding to each component node on the preset viewing cone surface of the viewing cone area according to the component information, and the target node is determined from each component node based on the area ratio between the node projection and the preset viewing cone surface, so that the user terminal loads the model according to the component information corresponding to the target node. Compared with loading the entire original model at one time, the component nodes are extracted from the digital model file, the component nodes are projected according to the current viewpoint position, and the target nodes are determined from the component nodes based on the projection area, so that the user terminal only loads the target node, which reduces the number of components, thereby reducing the model loading time and improving the model loading efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a structural schematic diagram of an application environment for implementing a model loading method in an embodiment of the present invention;

[0020] Figure 2 It is a structural diagram of a microservice architecture in an embodiment of the present invention;

[0021] Figure 3 is a flow chart of a model loading method in an embodiment of the present invention;

[0022] Figure 4 It is a flowchart of a method for parsing a digital model file in an embodiment of the present invention;

[0023] Figure 5 is a schematic structural diagram of a visual frustum region in an embodiment of the present invention;

[0024] Figure 6 is a schematic structural diagram of another visual frustum region in an embodiment of the present invention;

[0025] Figure 7 is a connection diagram of a method for connecting a server and a user terminal in an embodiment of the present invention;

[0026] Figure 8 is a flow chart of another model loading method in an embodiment of the present invention;

[0027] Fig. 9 is a structural schematic diagram of a model loading system in an embodiment of the present invention;

[0028] Fig.10 It is a structural diagram of another model loading system in an embodiment of the present invention. DETAILED DESCRIPTION

[0029] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and sub-samples in the embodiments can be combined with each other without conflict.

[0030] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0031] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0032] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.

[0033] Unless otherwise stated, the term "plurality" means two or more.

[0034] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.

[0035] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.

[0036] Combination Figure 1 As shown, an embodiment of the present disclosure provides an application environment for implementing a model loading method, including a server and a user terminal, wherein the server is connected to the user terminal via a network.

[0037] The server end is used to obtain a digital model file corresponding to an original model node, wherein the original model node is composed of a plurality of component nodes; parse the digital model file to obtain component information corresponding to each of the component nodes; obtain a current viewpoint position from a user terminal, and construct a viewing frustum region according to the current viewpoint position, so as to generate node projections corresponding to each component node on a preset viewing frustum surface of the viewing frustum region according to the component information; and determine a target node from each component node according to a projection area corresponding to each node projection.

[0038] The user terminal is used to load the model according to the component information corresponding to the target node to obtain the visualization model corresponding to the current viewpoint position.

[0039] Combination Figure 2 As shown, an embodiment of the present disclosure provides a microservice architecture including a model loading system, wherein the model loading system is used to implement a model loading method.

[0040] The model loading system provided by the microservice framework uses DevOps to continuously manage development, testing, deployment, and operation and maintenance. It can be deployed in public or private clouds, directly installed within the enterprise, or installed on the cloud of a large cloud service provider. It has the ability to continuously develop and deploy code, and elastically expands capacity. When the flow service pressure is too high, new nodes can be dynamically expanded.

[0041] In some embodiments, DevOps is a combination of Development and Operations. It is a software development and operation methodology that aims to accelerate the software delivery process through automation, collaboration, and continuous improvement while ensuring the quality and security of the software. DevOps emphasizes breaking down the barriers between traditional development and operation teams and promoting close cooperation between teams, thereby delivering high-quality software products more efficiently.

[0042] The microservice architecture includes CAD management service, CAD conversion service, CAD flow service, Nginx, Spring GateWay, NACOS (Naming and Configuration Service), RocketMQ, MySQL database, file storage module, and Redis cache module. Among them, Nginx and SpringGateway serve as the front-end entry and routing layer, Nacos provides service discovery and configuration management, RocketMQ implements message queues and asynchronous communication, MySQL stores structured data, file storage processes unstructured data, and Redis provides caching capabilities.

[0043] CAD management service is used to obtain the digital model file corresponding to the original model node.

[0044] The CAD conversion service is used to parse the digital model file to obtain the component information corresponding to each of the component nodes.

[0045] The CAD stream service is used to obtain the current viewpoint position from the user terminal and construct a viewing frustum area according to the current viewpoint position, so as to generate node projections corresponding to each component node on a preset viewing frustum surface in the viewing frustum area according to the component information; and determine the target node from each component node according to the projection area corresponding to each node projection.

[0046] Nginx is a high-performance HTTP and reverse proxy server, as well as an IMAP / POP3 / SMTP proxy server. In the microservice architecture, Nginx is often used as a static resource server, load balancer, and reverse proxy server to forward external requests to the backend microservice instances. Nginx is configured to proxy the backend Spring Gateway or directly proxy to a specific microservice instance. Requests are distributed through Nginx's load balancing strategies (such as polling, IP hashing, etc.).

[0047] SpringGateway is an API gateway based on Spring Framework 5, Project Reactor, and Spring WebFlux. It provides a simple and effective way to route and filter requests for microservice architecture. SpringGateway is deployed behind Nginx as the entry point for microservices. It is responsible for routing requests to specific microservices and provides centralized processing of cross-cutting concerns such as authentication, current limiting, and logging.

[0048] Nacos is a dynamic service discovery, configuration management and service management platform that makes it easier to build cloud-native applications. It integrates service discovery, configuration management, service health check and other functions. The microservice architecture registers with Nacos when it starts and obtains configuration information from Nacos when needed. Nacos provides service discovery capabilities, allowing microservices to discover and call each other.

[0049] RocketMQ is a distributed messaging and stream computing platform with low latency, high reliability, trillion-level message capacity and high throughput. It is used to decouple calls between microservices and implement asynchronous communication. The microservice architecture sends tasks that need to be processed asynchronously to RocketMQ, and the message queue is responsible for delivering messages to consumers for processing. This can significantly improve the system's response speed and throughput.

[0050] MySQL is a popular relational database management system used to store and manage data. The microservice architecture interacts with the MySQL database through JDBC or ORM frameworks (such as MyBatis and Hibernate) to implement data addition, deletion, modification and query operations.

[0051] The file storage module is used to store unstructured data, such as pictures, videos, documents, etc., using distributed file systems (such as HDFS), object storage services (such as AWS S3, Alibaba Cloud OSS) or dedicated file servers to store files. Microservices interact with these storage services through APIs.

[0052] The Redis cache module is a high-performance key-value database, which is often used to cache hot data and reduce the access pressure of the database. The microservice architecture queries the Redis cache before accessing the database. If the required data exists in the cache, it is returned directly. Otherwise, the database is accessed and the results are stored in the Redis cache.

[0053] Combination Figure 3 As shown, the embodiment of the present disclosure provides a model loading method, which is applied to a server side, and the method includes:

[0054] Step S301, obtaining the digital model file corresponding to the original model node;

[0055] Among them, the original model node is composed of multiple component nodes;

[0056] Step S302, parsing the digital model file to obtain component information corresponding to each component node;

[0057] Step S303, obtaining the current viewpoint position from the user terminal, and constructing a viewing frustum region according to the current viewpoint position, so as to generate node projections corresponding to each component node on a preset viewing frustum plane of the viewing frustum region according to the component information;

[0058] Step S304, determining a target node from each component node according to the projection areas corresponding to the projections of each node;

[0059] The user terminal is used to load the model according to the component information corresponding to the target node to obtain the visualization model corresponding to the current viewpoint position.

[0060] The model loading method provided by the embodiment of the present disclosure is adopted, the digital model file corresponding to the original model node is obtained through the server side, and the component information corresponding to each component node is respectively parsed according to the digital model file, and then the visual cone area is constructed according to the current viewpoint position, so as to generate the node projection corresponding to each component node on the preset visual cone surface of the visual cone area according to the component information, and the target node is determined from each component node based on the area ratio between the node projection and the preset visual cone surface, so that the user terminal loads the model according to the component information corresponding to the target node. In this way, compared with loading the entire original model at one time, the component nodes are extracted from the digital model file, the component nodes are projected according to the current viewpoint position, and the target node is determined from the component node based on the projection area, so that the user terminal only loads the target node, reducing the number of components, thereby reducing the model loading time and improving the model loading efficiency.

[0061] Optionally, the digital model file is parsed to obtain component information corresponding to each component node, including: the original model node is composed of assembly nodes and / or component nodes, wherein the assembly node is composed of at least a part of the component nodes; the digital model format data corresponding to the assembly node is extracted from the digital model file, and the digital model format data corresponding to the assembly node is format-converted to obtain a conversion matrix and a sub-level list corresponding to the assembly node, wherein the sub-level list includes the component node corresponding to the assembly node; the digital model format data corresponding to the component node is extracted from the digital model file, and the digital model format data corresponding to the component node is format-converted to obtain grid information and bounding box size corresponding to the component node; the component information corresponding to each component node is generated according to at least one of the conversion matrix, grid information and bounding box size.

[0062] In some embodiments, the top-level assembly information corresponding to the super-large model is further parsed from the digital model file, and only the entire assembly structure and coordinate information are obtained. The mesh information in the parsed parts is not loaded, and the assembly structure tree and transformation matrix used for dynamic assembly are recorded in the database, wherein the super-large model is an overall structure composed of multiple parts and / or assemblies according to certain design requirements and assembly relationships. These parts or assemblies are connected to each other through specific connection methods (such as bolt connection, welding, riveting, etc.) or matching relationships (such as clearance fit, interference fit, etc.) to jointly realize the overall function and performance of the assembly; all sub-parts are split into an equal number of conversion tasks, and the converted sub-parts are individually parsed and converted into mesh information for Web visualization, and the bounding box size used for rendering optimization is recorded.

[0063] In some embodiments, the assembly structure includes components and connection relationships between the components.

[0064] Optionally, the method also includes: presetting a data conversion interface and a file storage space, wherein the file storage space is used to store digital-analog files; obtaining conversion interface information corresponding to the original model node, the conversion interface information including at least one of a node identifier, a node name and a file address corresponding to the child node, wherein the child node includes an assembly node and / or a component node; calling the data conversion interface according to the conversion interface information to generate a conversion task corresponding to the original model node by calling the data conversion interface, wherein the conversion task includes conversion items corresponding to each child node; if the child node is an assembly node, the conversion item corresponding to the assembly node includes extracting the digital-analog format data corresponding to the assembly node from the digital-analog file according to the file address corresponding to the assembly node, and performing format conversion on the digital-analog format data corresponding to the assembly node to obtain a conversion matrix and a sub-level list corresponding to the assembly node; if the child node is a component node, the conversion item corresponding to the component node includes extracting the digital-analog format data corresponding to the component node from the digital-analog file according to the file address corresponding to the component node, and performing format conversion on the digital-analog format data corresponding to the component node to obtain the grid information and bounding box size corresponding to the component node.

[0065] In some embodiments, a digital model file is extracted from a large model system, and the original digital model file is transferred to a preset file storage space; conversion interface information is obtained, and the conversion interface information includes a unique identifier of each node of the large model assembly structure, a node name, a source file name corresponding to the node, a file address (url) located on a public file storage disk, sub-level information, etc.; the conversion interface information is recorded, and a data conversion interface is called according to the conversion interface information to generate conversion tasks and conversion items through the data conversion interface. The conversion task represents the overall task progress of a conversion (for example, the overall task of a large assembly), and the conversion item is a sub-conversion task for each node to be converted separately. After all sub-conversion items are converted, the entire conversion task is considered to be completed; for each generated conversion item, the original digital model file is taken out from the file storage space, and model parsing conversion is performed. The model parsing conversion here includes parsing the original digital model format into mesh information for model loading by integrating open source or paid format parsing software, including triangles, vertices, edge lines, brep (Boundary Representation, boundary representation) information, etc.; when all sub-conversion items are converted, the data conversion service will set the overall conversion task status to successful conversion; update the database with component information, and notify the model of successful conversion through the interface or message queue.

[0066] Combination Figure 4As shown, an embodiment of the present disclosure provides a method for parsing a digital model file, including: when facing a large model, adopting an optimized method of separated incremental conversion, and performing analysis and conversion on each component separately, rather than parsing such a large entire assembly structure at one time; by respectively setting conversion items corresponding to assembly nodes and component nodes, wherein the conversion items corresponding to assembly nodes are used to parse the transformation matrix and sub-level list of assembly nodes, and the conversion items corresponding to component nodes are used to extract mesh information and bounding box size, etc.

[0067] In this way, compared to using a large amount of conversion server memory to convert the entire large model, the large model is split into several assembly nodes and component nodes, and the performance resources consumed when processing each node will be greatly reduced, thereby reducing the conversion pressure on the conversion server.

[0068] Optionally, generating node projections corresponding to each component node on a preset viewing frustum surface of the viewing frustum region according to the component information includes: if the component information includes the bounding box size of the bounding box where each component node is located and the transformation matrix corresponding to each component node, merging the bounding boxes where each component node is located according to the bounding box size and the transformation matrix to obtain a merged area; determining the external nodes of the region from each component node according to the merged area; rendering a model in the viewing frustum region according to the bounding box size corresponding to the external nodes of the region to obtain a node model corresponding to the external nodes of the region, wherein the node model is located between a near section and a far section of the viewing frustum region, and a near section distance between the near section and the current viewpoint position is smaller than a far section distance between the far section and the current viewpoint position; and forming a node projection corresponding to the node model on a preset viewing frustum surface according to the current viewpoint position, wherein the preset viewing frustum surface includes the far section.

[0069] Optionally, the method further includes: if the current viewpoint position changes, updating the viewing cone area according to the changed current viewpoint position; taking the center point of the node model as the ray starting point, drawing a ray to any surface in the viewing cone area, and counting the number of intersections between the ray and each surface of the viewing cone area; if the number of intersections is an odd number, determining that the node model is within the viewing cone area, wherein the node model within the viewing cone area is determined as the first model, and the node model outside the viewing cone area is determined as the second model; updating the node projection corresponding to the first model, and deleting the node projection corresponding to the second model.

[0070] In some embodiments, in response to changes in the viewpoint position, a new viewing cone area needs to be recalculated; if the node model of the component node cannot be projected onto the viewing cone, it means that the component node cannot be seen at the viewpoint position, and the component node will be filtered and not loaded.

[0071] In some embodiments, a ray is drawn from the node model corresponding to the component node to any surface in the viewing frustum region, and the number of intersections between the ray and all surfaces in the viewing frustum region is counted; if the number of intersections is an odd number, it means that the node model of the component node is located inside the viewing frustum region, and the component nodes located outside the viewing frustum region are deleted from the component nodes.

[0072] In some embodiments, the volume of the bounding boxes of the component nodes is merged by using the bounding box size and the transformation matrix to merge adjacent bounding boxes to obtain a merged area; the component nodes inside the merged area are not loaded, and only the external nodes outside the bounding box are loaded.

[0073] In some embodiments, a node projection corresponding to the node model is formed on a preset viewing cone according to the current viewpoint position, including: projecting the bounding box of the node model on the preset viewing cone according to the current viewpoint position to obtain the node projection corresponding to the node model; projecting the node model on the preset viewing cone according to the current viewpoint position to obtain the node projection corresponding to the node model.

[0074] Combination Figure 5 As shown, the embodiment of the present disclosure provides a viewing frustum region, including a current viewpoint position, a near section and a far section, wherein the coordinates of the current viewpoint position are (x p ,y p ,z p ), the height of the near section is h Near , the width of the near section is w Near , the distance from the near section to the current viewpoint is dist Near , the height of the far section is h Far , the width of the far section is w Far , the distance from the far section to the current viewpoint is dist Far , dist Near Less than dist Far .

[0075] Combination Figure 6 As shown, the distance dist from the far section to the current viewpoint is derived by trigonometric function. Far The calculation formula is Where, FOV h is the horizontal field of view angle corresponding to the current viewpoint position, FOV v is the vertical field of view angle corresponding to the current viewpoint position; the horizontal field of view angle is calculated according to the calculation formula and vertical field of view Since the bounding box of the node model is projected onto the far section, the field of view angle from the current viewpoint position to the front elevation of the node model is equal to the field of view angle from the current viewpoint position to the far section. When the horizontal and vertical field of view angles of the far section from the current viewpoint position are known, the distance dist from the far section to the current viewpoint position is calculated. Far The projection area corresponding to each node projection can be calculated.

[0076] Optionally, the target node is determined from each component node according to the projection area corresponding to each node projection, including at least one of the following: if the projection area corresponding to the component node is greater than a preset area threshold, the component node is determined as the target node; the area ratio between the projection of each node and the projection area is calculated according to the projection area, and if the area ratio corresponding to the component node is greater than a preset ratio threshold, the component node is determined as the target node; the area ratio between the projection of each node and the projection area is calculated according to the projection area, the node ratio is calculated according to the terminal computing power of the user terminal, and the target ratio is determined from each area ratio according to the node ratio, so as to determine the component node corresponding to the target ratio as the target node, wherein there is a positive correlation between the terminal computing power and the node ratio.

[0077] In some embodiments, the ratio of the projected area to the far cross-sectional area is used to represent the proportion of the model corresponding to the component node in the current screen, so that the component nodes are filtered according to the area ratio and are not loaded temporarily.

[0078] In some embodiments, the bounding box corresponding to the component node is projected on the viewing cone plane of the viewing cone area according to the current viewpoint position, so as to calculate the projection area corresponding to the component node, wherein the node projection of the component node is a rectangle; and according to the percentage of the projection area to the far cross-sectional area, parts with a smaller area ratio are filtered through a preset ratio threshold.

[0079] In some embodiments, the web page cannot directly obtain the terminal computing power of the user terminal. By displaying multiple terminal computing power options on the web page and responding to the user's selection instruction for any terminal computing power option, the user terminal computing power is determined according to the selected terminal computing power option; the corresponding node ratio is determined according to the GPU (Graphics Processing Unit) computing power of the user terminal, for example, the node ratio is 75%; then the target ratio with a larger ratio of 75% is extracted from the area ratio, and the target node is determined according to the component node corresponding to the target ratio, that is, the target node is determined according to the component nodes with the top 75% area ratios from large to small.

[0080] In some embodiments, in the process of improving GPU rendering efficiency and reducing resource usage, vertex cache optimization of target nodes is a key step. This optimization process aims to maximize GPU rendering performance by streamlining vertex data, optimizing vertex index arrangement, and applying advanced algorithms; vertex cache optimization mainly includes two core aspects, including removing duplicate vertices and optimizing the arrangement order of vertex indexes, which can reduce the amount of vertex data that the GPU needs to process when processing meshes, and optimize the calling efficiency of vertex shaders, thereby improving overall rendering performance; analyzing existing vertex buffer data, identifying and removing duplicate vertices; this step ensures that each vertex in the vertex buffer is unique, avoiding unnecessary repeated processing; using algorithms such as meshopt_optimizeVertexCache in the meshoptimizer library to re-index vertex indices. Sorting; This algorithm aims to maximize the reuse rate of vertices in the GPU's built-in cache by reorganizing the drawing order of triangles, thereby reducing the number of vertex shader calls; This local optimization is particularly important for improving rendering performance, because GPU caches usually have limited capacity and different replacement strategies; Use the meshoptimizer's meshopt_optimizeOverdraw function to reduce overdrawing (that is, the same pixel is rendered multiple times), which helps to reduce the GPU's rendering burden and improve performance; Use the meshopt_encodeVertexBuffer and meshopt_encodeIndexBuffer algorithms to compress the vertex / index buffer; This compression not only reduces memory usage, but also speeds up network transmission, which is particularly beneficial for scenes that need to load or transmit large amounts of mesh data in real time.

[0081] This can significantly reduce the GPU's resource consumption when processing complex meshes, and improve rendering frame rate and efficiency. Removing duplicate vertices and optimizing index arrangement reduce the number of vertices that the GPU needs to process, while the advanced algorithm of MeshOptimizer further optimizes performance by reducing overdrawing and compressing data. These optimization measures not only improve the efficiency of local rendering, but also improve loading speed and rendering performance in network environments by reducing the amount of data transmission.

[0082] Optionally, the method also includes: pre-setting a stream management service; connecting to a user terminal via the WebSocket protocol, and receiving a session connection request sent by the user terminal via a proxy port corresponding to the WebSocket protocol; in response to any received session connection request, determining whether the session connection request includes a model viewing request; if the session connection request includes a model viewing request, determining a target port corresponding to the session connection request from a preset local port, and establishing a stream cache service corresponding to the target port via the stream management service; and processing corresponding session requests respectively via each stream cache service, wherein different session connection requests correspond to different target ports, and different session connection requests correspond to different stream cache services.

[0083] In some embodiments, the user terminal calls the front-end Web (World Wide Web) engine through the unique identifier of the model node to load the model node, wherein the Web engine transplants the model rendering technology developed in C++ to the user terminal through WebAssembly technology; the user terminal establishes a connection through Websocket and Stream Manager, and establishes a connection mapping, and the mapping relationship is identified by a key-value pair, wherein the key is the current user's connection Session, and the value is the stream cache service.

[0084] In some embodiments, Websocket is a protocol for full-duplex communication over a single TCP (Transmission Control Protocol) connection. This means that WebSocket allows the server to actively push data to the client, and also allows the client to send data to the server, and all of this is done over a persistent connection, without the need to establish a new connection each time like a traditional HTTP request, allowing developers to build applications that require real-time data exchange, such as real-time chat, real-time notifications, online games, etc.

[0085] In some embodiments, the Stream Manager is responsible for receiving data streams from the WebSocket connection, caching, processing or forwarding them elsewhere, maintaining the state of one or more streams, and starting, stopping or modifying the configuration of the streams as needed. The Stream Manager works in conjunction with WebSocket to ensure the correct processing and efficient transmission of data streams.

[0086] In some embodiments, Session is used to uniquely identify a user's connection. Each WebSocket connection can be associated with a specific Session, which can contain the user's authentication information, session status, and other data that needs to be maintained across multiple requests or connections. Stream Manager identifies and manages data streams from different users through Session to ensure the accuracy and security of the data.

[0087] In some embodiments, the server-side stream management service Stream Manager starts a stream cache service. The stream cache service is an application process developed separately in C++ and also uses Websocket for communication. Each stream cache service occupies a local port of the server node and processes the unique identifier of the model node sent by the user terminal to obtain the target node corresponding to the model node.

[0088] In some embodiments, the filtered model vertex mesh data stream and related attribute information are transmitted via Websocket to a Web visualization rendering page developed using WebAssembly. The Web visualization page loads the model according to the component information corresponding to the target node to obtain a visualization model corresponding to the current viewpoint position. Since the component information has been stored in the database, the filtering algorithm takes seconds. When a part is instantiated at multiple locations in the scene, the mesh data will only be transmitted once, and the streaming transmission is also asynchronous. The loading speed felt by the user is very fast. Compared with traditional loading methods, in experiments, the technical solution of the present application can load an ultra-large model with an original model size of 50GB within 2 minutes.

[0089] Combination Figure 7 As shown, an embodiment of the present disclosure provides a connection method between a server and a user terminal, wherein the user terminal connects to the stream management service of the server through a proxy port corresponding to the WebSocket protocol (for example, port 443); when the server receives unique identifiers corresponding to different model nodes, it constructs stream cache services corresponding to different local ports according to different model nodes through the stream management service. For example, the model nodes include node A, node B, and node C, the local port corresponding to node A is Websocket local port 1, the stream cache service corresponding to node A is stream cache service 1, the local port corresponding to node B is Websocket local port 2, the stream cache service corresponding to node B is stream cache service 2, the local port corresponding to node C is Websocket local port 3, and the stream cache service corresponding to node C is stream cache service 3; based on each stream cache service, the corresponding model nodes are obtained from the file storage space.

[0090] Combination Figure 8 As shown, the embodiment of the present disclosure provides a model loading method, which is applied to a user terminal, and the client terminal is connected to a server, and the method includes:

[0091] Step S801, obtaining the target node corresponding to the original model node;

[0092] The server is used to obtain a digital model file corresponding to an original model node, where the original model node is composed of multiple component nodes; the digital model file is parsed to obtain component information corresponding to each component node; the current viewpoint position is obtained from a user terminal, and a viewing cone region is constructed according to the current viewpoint position, so as to generate node projections corresponding to each component node on a preset viewing cone surface in the viewing cone region according to the component information; and a target node is determined from each component node according to the projection area corresponding to each node projection;

[0093] Step S802, loading the model according to the component information corresponding to the target node, and obtaining a visualization model corresponding to the current viewpoint position.

[0094] In some embodiments, the assembly logic is placed on the front end, which is more controllable in selective loading and business filtering.

[0095] The model loading method provided by the embodiment of the present disclosure is adopted, the digital model file corresponding to the original model node is obtained through the server side, and the component information corresponding to each component node is respectively parsed according to the digital model file, and then the visual cone area is constructed according to the current viewpoint position, so as to generate the node projection corresponding to each component node on the preset visual cone surface of the visual cone area according to the component information, and the target node is determined from each component node based on the area ratio between the node projection and the preset visual cone surface, so that the user terminal loads the model according to the component information corresponding to the target node. In this way, compared with loading the entire original model at one time, the component nodes are extracted from the digital model file, the component nodes are projected according to the current viewpoint position, and the target node is determined from the component node based on the projection area, so that the user terminal only loads the target node, reducing the number of components, thereby reducing the model loading time and improving the model loading efficiency.

[0096] Optionally, the method also includes at least one of the following: if the number of model vertices corresponding to the visualization model is greater than a preset threshold number, determining the visible area from the visualization model according to the current viewpoint position, and loading the visible area; rendering the visualization model according to a preset target rendering frame rate, wherein the target rendering frame rate is determined according to the terminal computing power of the user terminal, and there is a positive correlation between the target rendering frame rate and the terminal computing power; loading the model according to the component information corresponding to the target node to obtain an image frame containing the visualization model, and, in response to the rendering progress corresponding to the image frame being rendering completed, generating a new image frame.

[0097] In some embodiments, in order to adapt to user terminals with different performance, a memory limit parameter is built into the Web visualization browser. This parameter is used to control the amount of model vertex data transmitted from the server. For example, it is set to load only vertices of the order of 500Mb. When the mesh data transmitted by the server exceeds the set threshold, the device memory is preferentially loaded with the visible part of the model, and the part of the model that is not visible from the current perspective will not be loaded immediately. Moreover, when the viewpoint position changes, the memory of the invisible model part will be discarded, and the memory will be used for the new visible part. In this way, the user can see the appearance of the entire super-large model and zoom in to the specific details on a device with limited performance. By setting the minimum rendering frame rate of the Web visualization browser, the GPU occupancy can be controllably reduced. This method is very useful on devices with low graphics card performance. By setting whether the Web visualization browser enables incremental updates, when incremental updates are enabled, the next frame will be rendered only when the GPU completely renders the current frame. This parameter can reduce the GPU occupancy, avoid unnecessary redrawing, and reduce the screen flickering problem caused by excessive rendering data.

[0098] Combination Fig. 9 As shown, an embodiment of the present disclosure provides a model loading system, including a server 901 and a user terminal 902 .

[0099] The server end 901 is used to obtain a digital model file corresponding to an original model node, where the original model node is composed of multiple component nodes; parse the digital model file to obtain component information corresponding to each component node; obtain the current viewpoint position from the user terminal, and construct a viewing cone area according to the current viewpoint position, so as to generate node projections corresponding to each component node on a preset viewing cone surface of the viewing cone area according to the component information; determine a target node from each component node according to the projection area corresponding to each node projection;

[0100] The user terminal 902 is used to load the model according to the component information corresponding to the target node, and obtain the visualization model corresponding to the current viewpoint position.

[0101] The model loading system provided by the embodiment of the present disclosure is adopted, the digital model file corresponding to the original model node is obtained through the server side, and the component information corresponding to each component node is respectively parsed according to the digital model file, and then the visual cone area is constructed according to the current viewpoint position, so as to generate the node projection corresponding to each component node on the preset visual cone surface of the visual cone area according to the component information, and the target node is determined from each component node based on the area ratio between the node projection and the preset visual cone surface, so that the user terminal loads the model according to the component information corresponding to the target node. In this way, compared with loading the entire original model at one time, the component nodes are extracted from the digital model file, the component nodes are projected according to the current viewpoint position, and the target node is determined from the component node based on the projection area, so that the user terminal only loads the target node, reducing the number of components, thereby reducing the model loading time and improving the model loading efficiency.

[0102] Combination Fig.10 As shown, an embodiment of the present disclosure provides a model loading system, including a collection module 1001 , a conversion module 1002 and a viewing module 1003 .

[0103] The acquisition module 1001 is used to acquire digital model files from a large model system and synchronize the acquired digital model files to the conversion module, wherein the large digital model system includes CATPart, CATProduct, Sldasm, Sldprt, etc.

[0104] The conversion module 1002 includes file storage space, data management services, data conversion services and a conversion engine.

[0105] The file storage space is used to store digital model files.

[0106] The data management service is used to obtain digital model files from the file storage space.

[0107] The data conversion service is used to parse the digital model file to obtain the component information corresponding to each component node.

[0108] The conversion engine is used to store the component information in the form of stream files in the file storage space.

[0109] The viewing module 1003 includes a connection management unit and a Web terminal.

[0110] The connection management unit is used to establish a stream cache service between the server and the user terminal.

[0111] The web end is used to load the model according to the component information corresponding to the target node to obtain the visualization model corresponding to the current viewpoint position.

[0112] The model loading system provided by the embodiment of the present disclosure is adopted, the digital model file corresponding to the original model node is obtained through the server side, and the component information corresponding to each component node is respectively parsed according to the digital model file, and then the visual cone area is constructed according to the current viewpoint position, so as to generate the node projection corresponding to each component node on the preset visual cone surface of the visual cone area according to the component information, and the target node is determined from each component node based on the area ratio between the node projection and the preset visual cone surface, so that the user terminal loads the model according to the component information corresponding to the target node. In this way, compared with loading the entire original model at one time, the component nodes are extracted from the digital model file, the component nodes are projected according to the current viewpoint position, and the target node is determined from the component node based on the projection area, so that the user terminal only loads the target node, reducing the number of components, thereby reducing the model loading time and improving the model loading efficiency.

[0113] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operation can be changed. Parts and sub-samples of some embodiments may be included in or replace parts and sub-samples of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of a stated sub-sample, whole, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other sub-samples, wholes, steps, operations, elements, components and / or groups of these. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.

[0114] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0115] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some sub-samples can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.

[0116] The flowchart and block diagram in the accompanying drawings show the possible architecture, functions and operations of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. A model loading method, characterized in that: Applied to a server side, the server side is connected to a user terminal, and the method comprises: Obtaining a digital model file corresponding to an original model node, wherein the original model node is composed of a plurality of component nodes; Parsing the digital model file to obtain component information corresponding to each component node; Acquire the current viewpoint position from the user terminal, and construct a visual frustum region according to the current viewpoint position, so as to generate node projections corresponding to each of the component nodes on a preset visual frustum plane of the visual frustum region according to the component information; A target node is determined from each of the component nodes according to the projection areas corresponding to the projections of each of the nodes, wherein the user terminal is used to load a model according to the component information corresponding to the target node to obtain a visualization model corresponding to the current viewpoint position.

2. The method according to claim 1, characterized in that The digital model file is parsed to obtain component information corresponding to each component node, including: The original model nodes are composed of assembly nodes and / or component nodes, wherein the assembly nodes are composed of at least a part of component nodes; Extracting digital-analog format data corresponding to the assembly node from the digital-analog file, and performing format conversion on the digital-analog format data corresponding to the assembly node to obtain a conversion matrix and a sub-level list corresponding to the assembly node, wherein the sub-level list includes a component node corresponding to the assembly node; Extracting digital-analog format data corresponding to the component node from the digital-analog file, and performing format conversion on the digital-analog format data corresponding to the component node to obtain mesh information and bounding box size corresponding to the component node; The component information corresponding to each of the component nodes is generated according to at least one of the conversion matrix, the grid information and the bounding box size.

3. The method according to claim 2, characterized in that The method further comprises: Pre-setting a data conversion interface and a file storage space, wherein the file storage space is used to store the digital model file; Acquire conversion interface information corresponding to the original model node, wherein the conversion interface information includes at least one of a node identifier, a node name, and a file address corresponding to a sub-node, wherein the sub-node includes an assembly node and / or a component node; Calling the data conversion interface according to the conversion interface information to generate a conversion task corresponding to the original model node by calling the data conversion interface, wherein the conversion task includes conversion items corresponding to each of the sub-nodes; If the child node is an assembly node, the conversion item corresponding to the assembly node includes extracting the digital-analog format data corresponding to the assembly node from the digital-analog file according to the file address corresponding to the assembly node, and performing format conversion on the digital-analog format data corresponding to the assembly node to obtain the conversion matrix and child list corresponding to the assembly node; If the child node is a component node, the conversion item corresponding to the component node includes extracting the digital-analog format data corresponding to the component node from the digital-analog file according to the file address corresponding to the component node, and performing format conversion on the digital-analog format data corresponding to the component node to obtain the grid information and bounding box size corresponding to the component node.

4. The method according to claim 1, characterized in that: Generating node projections corresponding to the component nodes on a preset viewing cone surface in the viewing cone area according to the component information, including: If the component information includes the bounding box size of the bounding box where each component node is located and the transformation matrix corresponding to each component node, then the bounding boxes where each component node is located are merged according to the bounding box size and the transformation matrix to obtain a merged area; Determine a region external node from each of the component nodes according to the merged region; Performing model rendering in the viewing frustum region according to the bounding box size corresponding to the external node of the region, to obtain a node model corresponding to the external node of the region, wherein the node model is located between a near section and a far section of the viewing frustum region, and a near section distance between the near section and the current viewpoint position is smaller than a far section distance between the far section and the current viewpoint position; A node projection corresponding to the node model is formed on a preset viewing cone according to the current viewpoint position, wherein the preset viewing cone includes the far section.

5. The method according to claim 4, characterized in that The method further comprises: If the current viewpoint position changes, updating the visual cone area according to the changed current viewpoint position; Taking the center point of the node model as the ray starting point, drawing a ray to any surface in the visual frustum region, and counting the number of intersections between the ray and each surface of the visual frustum region; If the number of intersections is an odd number, it is determined that the node model is within the visual cone area, wherein the node model within the visual cone area is determined as a first model, and the node model outside the visual cone area is determined as a second model; The node projection corresponding to the first model is updated, and the node projection corresponding to the second model is deleted.

6. The method according to any one of claims 1 to 5, characterized in that: Determining a target node from each of the component nodes according to the projection areas corresponding to the projections of each of the nodes, including at least one of the following: If the projection area corresponding to the component node is greater than a preset area threshold, the component node is determined as a target node; Calculating the area ratio between the projection of each node and the projection area according to the projection area, and if the area ratio corresponding to the component node is greater than a preset ratio threshold, determining the component node as a target node; The area ratios between the projections of each node and the projection area are calculated according to the projection areas, the node ratio is calculated according to the terminal computing power of the user terminal, and the target ratio is determined from each of the area ratios according to the node ratio, so as to determine the component node corresponding to the target ratio as the target node, wherein there is a positive correlation between the terminal computing power and the node ratio.

7. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Pre-set stream management services; Connecting to the user terminal through the WebSocket protocol, and receiving a session connection request sent by the user terminal through a proxy port corresponding to the WebSocket protocol; In response to any received session connection request, determining whether the session connection request includes a model viewing request; If the session connection request includes a model viewing request, determining a target port corresponding to the session connection request from a preset local port, and establishing a flow cache service corresponding to the target port through the flow management service; The corresponding session requests are processed respectively by each of the flow cache services, wherein different session connection requests correspond to different target ports, and different session connection requests correspond to different flow cache services.

8. A model loading method, characterized in that: Applied to a user terminal, the client terminal is connected to a server, and the method comprises: Obtaining a target node corresponding to an original model node, wherein the server end is used to obtain a digital model file corresponding to the original model node, wherein the original model node is composed of a plurality of component nodes; parsing the digital model file to obtain component information corresponding to each of the component nodes; obtaining a current viewpoint position from the user terminal, and constructing a frustum region according to the current viewpoint position, so as to generate node projections corresponding to each of the component nodes on a preset frustum surface of the frustum region according to the component information; determining a target node from each of the component nodes according to a projection area corresponding to each of the node projections; The model is loaded according to the component information corresponding to the target node to obtain a visualization model corresponding to the current viewpoint position.

9. The method according to claim 8, characterized in that The method further comprises at least one of the following: If the number of model vertices corresponding to the visualization model is greater than a preset number threshold, determining a visible area from the visualization model according to the current viewpoint position, and loading the visible area; Rendering the visualization model according to a preset target rendering frame rate, wherein the target rendering frame rate is determined according to the terminal computing power of the user terminal, and there is a positive correlation between the target rendering frame rate and the terminal computing power; The model is loaded according to the component information corresponding to the target node to obtain an image frame containing the visualization model, and in response to the rendering progress corresponding to the image frame being rendering completed, a new image frame is generated.

10. A model loading system, characterized in that: include: The server side is used to obtain the digital model file corresponding to the original model node, wherein the original model node is composed of multiple component nodes; the digital model file is parsed to obtain the component information corresponding to each of the component nodes; Acquire the current viewpoint position from the user terminal, and construct a visual frustum region according to the current viewpoint position, so as to generate node projections corresponding to each of the component nodes on a preset visual frustum plane of the visual frustum region according to the component information; determine a target node from each of the component nodes according to the projection areas corresponding to each of the node projections; The user terminal is used to load the model according to the component information corresponding to the target node to obtain the visualization model corresponding to the current viewpoint position.

Citation Information

Cited By

  • Large model layered caching loading method oriented to Plevatory capacity intelligent computing center

    CN120216463A

  • Large model hierarchical cache loading method for inclusive computing power intelligent computing center

    CN120216463B