Data processing method and device, electronic equipment, storage medium and program

By constructing a graph structure for the 3D model and optimizing the subgraph merging, the problems of insufficient efficiency and accuracy in existing technologies are solved, and efficient rendering and smooth interactive 3D model display are achieved.

CN120953541APending Publication Date: 2025-11-14SHENZHEN SMARTCITY TECH DEV GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511105235.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-07
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

The existing data processing workflow is inefficient and inaccurate when generating models at different resolutions, and urgently needs to be optimized.

Method used

By establishing a graph structure for the 3D model, dividing it into multiple subgraphs, and merging the subgraphs with the most matching node pairs during the iteration process, different levels of detail model versions are generated. Multi-core computing resources are used for parallel processing, and subgraphs of different resolutions are dynamically applied for rendering.

Benefits of technology

It significantly improves the rendering efficiency and accuracy of 3D models, achieves seamless switching and a smooth interactive experience, and reduces data transmission and memory usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120953541A_ABST
    Figure CN120953541A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data processing method and device, electronic equipment and a storage medium. According to the embodiment of the invention, the graph structure of the three-dimensional model can be established; dividing the graph structure to obtain a plurality of sub-graphs; obtaining a graph structure of the ith iteration; determining the number of matching node pairs of each sub-graph and the adjacent sub-graph in the graph structure of the ith iteration; if the number of the matching node pairs of the target sub-graph and the adjacent sub-graph thereof is larger than the number of the matching node pairs of other sub-graphs and the adjacent sub-graphs thereof, the target sub-graph and the adjacent sub-graph thereof are combined to obtain a graph structure of the (i + 1) th iteration, and the graph structure of each iteration is used for rendering the three-dimensional model. According to the embodiment of the invention, the triangular meshes of the three-dimensional model are merged based on the graph structure, and the successively refined three-dimensional model has multiple resolutions from coarse to fine, so that the three-dimensional model can be used for image rendering for dynamically adjusting detail levels. According to the scheme, the rendering effect of the three-dimensional model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically to a data processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] Progressive rendering is a technique that dynamically switches between different resolutions of the same model based on actual needs. Low-resolution models enable fast loading and rendering, ensuring smooth interaction; high-resolution models are used for the final presentation to meet high requirements for image detail and visual quality.

[0003] In real-time rendering, the commonly used Level of Detail (LOD) mechanism automatically switches between different levels of detail based on the distance between the camera and the object, screen pixel coverage, or system performance metrics, balancing rendering efficiency and image quality. On the other hand, offline preprocessing and multi-resolution storage can pre-generate and cache multiple precision versions of geometric data for large scenes or multi-user applications, thereby significantly shortening subsequent loading time and improving rendering performance.

[0004] However, existing data processing workflows still face issues of insufficient efficiency and accuracy when generating models at different resolutions, and urgently need further optimization and improvement. Summary of the Invention

[0005] This application provides a data processing method, apparatus, electronic device, and storage medium that can improve the efficiency and accuracy of data processing, thereby enhancing the rendering effect of 3D models.

[0006] This application provides a data processing method, including: Establish the graph structure of the 3D model. The 3D model is composed of multiple triangular faces. The graph structure includes nodes and edges. Each node represents one of the triangular faces, and the edges represent two adjacent triangular faces. The graph structure is divided into multiple subgraphs; Obtain the graph structure of the i-th iteration. The graph structure of the first iteration includes the graph structure. Determine the number of matching node pairs between each subgraph and its adjacent subgraphs in the graph structure of the i-th iteration, where i is a positive integer. The matching node pairs include the first node and the second node. The first node is located in the subgraph, and the second node is located in the adjacent subgraph. The triangles corresponding to the first node and the triangles corresponding to the second node are adjacent to each other. If the number of matching node pairs between the target subgraph and its neighboring subgraphs is greater than the number of matching node pairs between other subgraphs and their neighboring subgraphs, then the target subgraph and its neighboring subgraphs are merged to obtain the graph structure of the (i+1)th iteration. The graph structure of each iteration is used to render the 3D model. The target subgraph is any subgraph in the graph structure of the i-th iteration, and the other subgraphs are the other subgraphs in the graph structure of the i-th iteration except for the target subgraph.

[0007] This application also provides a data processing apparatus, including: Establishment unit, used to establish the graph structure of the 3D model. The 3D model is composed of multiple triangular faces. The graph structure includes nodes and edges. Each node represents one of the triangular faces, and the edges represent two triangular faces that are adjacent to each other. The partitioning unit is used to divide the graph structure into multiple subgraphs; The acquisition unit is used to acquire the graph structure of the i-th iteration, where the graph structure of the first iteration includes the graph structure. The determining unit is used to determine the number of matching node pairs between each subgraph and its adjacent subgraphs in the graph structure of the i-th iteration. i is a positive integer. The matching node pairs include the first node and the second node. The first node is located in the subgraph and the second node is located in the adjacent subgraph. The triangles corresponding to the first node and the triangles corresponding to the second node are adjacent to each other. The merging unit is used to merge the target subgraph with its neighboring subgraphs if the number of matching node pairs between the target subgraph and its neighboring subgraphs is greater than the number of matching node pairs between other subgraphs and their neighboring subgraphs, thus obtaining the graph structure of the (i+1)th iteration. The graph structure of each iteration is used to render the 3D model. The target subgraph is any subgraph in the graph structure of the i-th iteration, and the other subgraphs are the other subgraphs in the graph structure of the i-th iteration except for the target subgraph.

[0008] In some embodiments, the establishing unit is configured to: Based on the attribute information of each triangle, generate a corresponding node for each triangle; If two triangular faces share the same geometric edge at the geometric level, then an edge is established between the corresponding nodes of the two triangular faces.

[0009] In some embodiments, the attribute information includes geometric information and texture data.

[0010] In some embodiments, the partitioning unit is used for: The graph structure is coarsened to obtain a coarsened graph. The coarsening process includes merging multiple nodes into one, so that the number of nodes in the coarsened graph is less than the number of nodes in the graph structure. The coarsened map is divided into multiple partitioned maps. The partitioned graph is expanded to obtain multiple subgraphs. The expansion process includes expanding a node into multiple subgraphs, such that the number of triangles contained in each subgraph does not exceed a preset threshold.

[0011] In some embodiments, the merging unit includes: The merge sub-unit is used to merge a subgraph with its adjacent subgraphs to obtain a merged subgraph. The merged subgraph includes all nodes of the subgraph and all nodes of the adjacent subgraphs. The simplified sub-unit is used to simplify the merged subgraph to obtain a simplified subgraph. The number of nodes in the simplified subgraph is a preset threshold, which is less than the sum of the number of nodes in the subgraph and the number of nodes in the adjacent subgraphs.

[0012] In some embodiments, the simplified subunit is used for: For each foldable edge in the merged subgraph, calculate the folding cost between the nodes at both ends of the foldable edge. A foldable edge is an edge that is not located at the boundary of the graph structure or the intersection of adjacent subgraphs. Adjacent subgraphs are adjacent to the merged subgraph. The folding cost represents the shape deviation of the nodes at both ends of the foldable edge before and after merging. If the folding cost between the nodes at both ends of the target foldable edge is less than the folding cost between the nodes at both ends of other foldable edges, then merge the triangular faces corresponding to the nodes at both ends of the target foldable edge. The process continues until the total number of nodes in the merged subgraph is no greater than a preset threshold, resulting in a simplified subgraph.

[0013] This application also provides an electronic device, including a memory storing multiple instructions; the processor loads instructions from the memory to execute steps in any of the data processing methods provided in this application.

[0014] This application also provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any of the data processing methods provided in this application.

[0015] This application embodiment can establish a graph structure for a 3D model. The 3D model is composed of multiple triangular faces. The graph structure includes nodes and edges. Each node represents one of the triangular faces, and an edge represents two adjacent triangular faces. The graph structure is divided to obtain multiple subgraphs. The graph structure of the i-th iteration is obtained. The graph structure of the first iteration includes the graph structure. The number of matching node pairs between each subgraph and its adjacent subgraphs in the graph structure of the i-th iteration is determined. i is a positive integer. The matching node pairs include a first node and a second node. The first node is located in the subgraph, and the second node is located in the adjacent subgraph. The triangular face corresponding to the first node and the triangular face corresponding to the second node are adjacent to each other. If the number of matching node pairs between the target subgraph and its adjacent subgraphs is greater than the number of matching node pairs between other subgraphs and their adjacent subgraphs, the target subgraph and its adjacent subgraphs are merged to obtain the graph structure of the (i+1)-th iteration. The graph structure of each iteration is used to render the 3D model. The target subgraph is any subgraph in the graph structure of the i-th iteration, and the other subgraphs are the other subgraphs in the graph structure of the i-th iteration except for the target subgraph.

[0016] In this application, the triangular faces of the 3D model are first abstracted as graph structure nodes, and edges are established based on the adjacency relationship between adjacent triangular faces to realize the topological representation of the model mesh. After dividing the graph structure and generating multiple subgraphs, the number of matching node pairs between each subgraph and its neighboring subgraphs is counted in each iteration to measure the mesh connectivity. For the target subgraph with the most matching node pairs with its neighboring subgraphs, a merging operation is performed to generate the graph structure for the next iteration. During the merging process, by maintaining boundary continuity and topological consistency, the boundaries of the merged subgraphs are ensured to be seamlessly connected, and parallel processing is supported to make full use of multi-core computing resources.

[0017] Ultimately, through multiple iterations, this solution can gradually reconstruct and optimize the mesh hierarchy, preserving model details while improving rendering efficiency. During real-time rendering, subgraphs of different resolutions can be dynamically applied, achieving seamless switching and reducing redundant calculations, significantly improving rendering performance, reducing data transfer and memory consumption, and thus providing a smoother interactive experience in large scenes and multi-user environments. Therefore, this solution can improve the efficiency and accuracy of data processing, thereby enhancing the rendering effect of 3D models. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of a scenario illustrating the data processing method provided in an embodiment of this application; Figure 2 This is a flowchart illustrating the data processing method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of the data processing apparatus provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0021] This application provides a data processing method, apparatus, electronic device, and storage medium.

[0022] Specifically, the data processing device can be integrated into an electronic device, such as a terminal or server. The terminal can be a mobile phone, tablet, smart Bluetooth device, laptop, or personal computer (PC); the server can be a single server or a server cluster consisting of multiple servers.

[0023] In some embodiments, the data processing apparatus may also be integrated into multiple electronic devices, such as multiple servers, with the data processing method of this application being implemented by the multiple servers.

[0024] In some embodiments, the terminal may also be used as a server to perform some or all of the functions of a server.

[0025] For example, refer to Figure 1 The electronic device can be a server, which can retrieve a 3D model from a model database and establish a graph structure of the 3D model; divide the graph structure to obtain multiple subgraphs; obtain the graph structure of the i-th iteration; determine the number of matching node pairs between each subgraph and its neighboring subgraphs in the graph structure of the i-th iteration; if the number of matching node pairs between the target subgraph and its neighboring subgraphs is greater than the number of matching node pairs between other subgraphs and their neighboring subgraphs, then merge the target subgraph and its neighboring subgraphs to obtain the graph structure of the (i+1)-th iteration; store the graph structure of each iteration in the model database for rendering.

[0026] In some embodiments, this solution can be deployed in a server equipped with a multi-core CPU, GPU, and large-capacity memory, which can efficiently process computationally intensive tasks such as graph partitioning, matching, and merging in parallel. Through unified scheduling, it facilitates load balancing of multi-user requests, dynamically allocates computing resources, avoids single-machine performance bottlenecks, and realizes centralized computing and resource management.

[0027] In some embodiments, this solution can pre-generate and iteratively merge multi-resolution subgraphs, generating model versions at different levels of detail and caching them in a distributed storage system. When a client requests a subgraph, the server only needs to quickly retrieve and distribute the most suitable subgraph based on the real-time view requirements, effectively shortening the response time.

[0028] In some embodiments, this solution can employ a distributed computing framework to distribute the merging tasks of each subgraph to cluster nodes for parallel processing, linearly expanding the computing throughput as the cluster size increases, thereby achieving automatic scaling up and down as needed.

[0029] In some embodiments, the server can integrate a rendering engine to directly push the final image or video stream to the client without requiring the client to consume a large amount of local computing power.

[0030] Therefore, deploying this solution on the server side not only fully utilizes centralized computing resources and the advantages of parallelization, but also significantly improves the processing and rendering efficiency of 3D models through caching, multi-user scheduling, and cloud rendering, while ensuring the system's scalability, security, and maintainability.

[0031] The following sections provide detailed descriptions of each example. It should be noted that the sequence numbers of the following embodiments are not intended to limit the preferred order of the embodiments.

[0032] In this embodiment, a data processing method is provided, such as... Figure 2 As shown, the specific flow of this data processing method can be as follows: 110. Establish the graph structure of the three-dimensional model.

[0033] In this context, a 3D model represents a meshed entity composed of multiple triangles in three-dimensional space. It can be used to build virtual scenes, such as video game scenes, virtual architectural scenes, and so on. A triangle is the smallest geometric unit of a 3D model, a planar segment formed by connecting three vertices in a certain order, and is the basic element for constructing a mesh surface.

[0034] A graph structure is a mathematical structure consisting of vertices and edges, used to describe the adjacency relationships between triangular faces. A node is an element in the graph, corresponding to a triangular face in this case; an edge is a line connecting two nodes, indicating that the corresponding triangular faces are geometrically adjacent, that is, the two triangular faces share an edge.

[0035] In some embodiments, step 110 includes the following steps: Based on the attribute information of each triangle, generate a corresponding node for each triangle; If two triangular faces share the same geometric edge at the geometric level, then an edge is established between the corresponding nodes of the two triangular faces.

[0036] In a 3D model, the edge connecting two vertices forms a triangle; when two triangles each have the same pair of vertex lines, they share this geometric edge.

[0037] In some embodiments, the attribute information includes geometric information and texture data.

[0038] Among them, attribute information is a set of data describing the inherent characteristics of triangular faces or geometric units, which is used to distinguish different elements and drive subsequent operations in the graphics processing and rendering pipeline.

[0039] Geometric information represents the shape and position of a triangular facet in three-dimensional space, including but not limited to vertex coordinates, normal vectors, and adjacency. Vertex coordinates are the three-dimensional coordinates of the three vertices of the triangular facet; the normal vector is the vector pointing towards the triangular facet and is used for lighting calculations. Adjacency includes vertex or boundary data shared with adjacent triangular faces.

[0040] Texture mapping data provides texture mapping information that gives color and detail to the surface of triangles, including but not limited to texture coordinates (UV coordinates), texture maps, and material parameters. Texture coordinates map a 2D texture image to a 3D surface; texture maps are image files or data blocks that store attributes such as color, normals, and specular highlights; and material parameters, working in conjunction with texture maps, determine the final appearance of the 3D model, and may include, but are not limited to, reflectivity, roughness, and transparency.

[0041] In some embodiments, all m 3D models in the virtual scene can be traversed, and a graph structure can be built for each model. For example, each triangle face of the 3D model can generate a corresponding node, and edges can be built based on the adjacency relationships between triangle faces sharing geometric edges; at the same time, the vertex attribute data of each model can be extracted and labeled as V. m The texture data is T. m .

[0042] 120. Divide the graph structure to obtain multiple subgraphs.

[0043] A subgraph is a set of non-overlapping subsets obtained after partitioning the original graph structure. Each subset retains the node-edge relationship and corresponds to a set of triangular faces in the mesh.

[0044] In some embodiments, a multi-level partitioning method can be used to repeatedly merge several nodes in the original graph into super nodes, resulting in a series of increasingly smaller graphs. Then, the super nodes are gradually restored, and local optimization is used to improve the partitioning boundaries in each round until the original graph is returned to. Finally, the original graph structure is decomposed into several non-overlapping subgraphs of controllable size for subsequent parallel processing or detailed level rendering.

[0045] For example, in some embodiments, step 120 includes the following steps: The graph structure is coarsened to obtain a coarsened graph. The coarsening process includes merging multiple nodes into one, so that the number of nodes in the coarsened graph is less than the number of nodes in the graph structure. The coarsened map is divided into multiple partitioned maps. The partitioned graph is expanded to obtain multiple subgraphs. The expansion process includes expanding a node into multiple subgraphs, such that the number of triangles contained in each subgraph does not exceed a preset threshold.

[0046] Among them, the coarsened graph is a simplified graph obtained by merging some nodes in the original or fine-grained graph structure into supernodes and correspondingly merging or simplifying edges through graph coarsening. By first quickly partitioning the low-resolution graph to reduce the number of nodes, the partitioning overhead is reduced and the algorithm efficiency is improved.

[0047] The set of several non-overlapping subgraphs obtained after applying a partitioning algorithm to a coarsened graph is called a partitioned graph. Each partitioned subgraph consists of a supernode and the edges between them.

[0048] In some embodiments, when expanding the partitioned graph, it can be gradually restored to the original graph. By using a preset threshold for the number of triangles, the upper limit of the number of faces inside each subgraph is forced, thereby providing a predictable load for subsequent LOD construction, parallel computing, or memory management.

[0049] In some embodiments, when unfolding the partitioned graph, it can be gradually restored to the original graph and the boundaries can be fine-tuned to ensure the partitioning quality.

[0050] For example, in some embodiments, a pair of nodes can be repeatedly selected on the boundary of the subgraph at the current level, and the gain of the objective function after they are swapped to the other subgraph can be calculated. For example, the number of cross-partition edges, boundary cutting weights, etc. are calculated. The swap pair with the largest gain is selected in each round and executed until it is no longer possible to improve.

[0051] For example, in some embodiments, all boundary nodes can be examined cyclically, and nodes that minimize the cost of cross-partition connections can be immediately migrated to adjacent subgraphs.

[0052] In this context, two subgraphs that are directly connected by the same edge are considered to be adjacent subgraphs.

[0053] For example, in some embodiments, a small subgraph can be constructed in the boundary region of two adjacent subgraphs, and the dividing edges can be regarded as sources and sinks. The minimum cut / maximum flow can be solved to redraw the boundary.

[0054] For example, in some embodiments, boundary region nodes can be mapped to Euclidean space, and then the dividing lines can be fine-tuned using clustering or geometric segmentation methods.

[0055] In some embodiments, the constructed graph structure can be input into the Metis library for subgraph partitioning, resulting in multiple subgraphs, each containing no more than 128 nodes, which serve as subgraphs within the graph structure. Then, the resource references and attributes of the partitioned subgraphs are recorded in the configuration file. For example, this includes vertex attribute data V. m Index reference, texture data T m The index reference, subgraph identifier ID, number of triangles, resource offset, bounding box range, geometric center point coordinates, LOD level, parent-child hierarchy, geometric error amount used for LOD switching, etc.

[0056] 130. Obtain the graph structure of the i-th iteration. The graph structure of the first iteration includes the graph structure.

[0057] In the embodiments of this application, each processing step constitutes an iteration; the i-th iteration is the graph structure state obtained after performing the i-th round of operations, where i is a positive integer.

[0058] 140. Determine the number of matching node pairs between each subgraph and its neighboring subgraphs in the graph structure of the i-th iteration.

[0059] A matching node pair consists of a first node and a second node. The first node is located within a subgraph, and the second node is located within an adjacent subgraph. Furthermore, the triangular faces corresponding to the first node and the second node are adjacent to each other. In other words, a matching node pair refers to selecting one node from each of two adjacent subgraphs, where the triangular faces corresponding to these two nodes are adjacent to each other in the original model.

[0060] The number of matching node pairs is the total number of all possible matching node pairs between two subgraphs, used to measure the connection strength between the two subgraphs.

[0061] 150. If the number of matching node pairs between the target subgraph and its neighboring subgraphs is greater than the number of matching node pairs between other subgraphs and their neighboring subgraphs, then merge the target subgraph with its neighboring subgraphs to obtain the graph structure of the (i+1)th iteration.

[0062] In this embodiment, the graph structure of each iteration is used to render the 3D model. For example, the mesh data of the triangular faces, such as geometry, material, and texture, is used to generate a visual image in the graphics pipeline. The graph structure of each iteration can be used for rendering at different LOD (Level of Detail) levels.

[0063] The target subgraph is any subgraph in the graph structure of the i-th iteration, and the other subgraphs are the other subgraphs in the graph structure of the i-th iteration besides the target subgraph.

[0064] This application embodiment can merge two subgraphs into a larger subgraph to reduce the overall number of subgraphs and form higher-level LOD nodes. For example, a union operation is performed on the node sets and edge sets of the two subgraphs, and the intersecting edges are updated to internal edges.

[0065] In some embodiments, the merged subgraph needs to inherit the attributes and weights of the two subgraphs. For example, the attributes of nodes and edges, such as triangle face normals, folding costs, weight labels, etc., can be recalculated or directly inherited; in some embodiments, if there are conflicting attributes with the same name, they can be merged according to priority or interpolation.

[0066] In some embodiments, step 150 includes the following steps: Merge a subgraph with its adjacent subgraphs to obtain a merged subgraph, which includes all nodes of the subgraph and all nodes of the adjacent subgraphs. The merged subgraph is simplified to obtain a simplified subgraph. The number of nodes in the simplified subgraph is a preset threshold, which is less than the sum of the number of nodes in the subgraph and the number of nodes in the adjacent subgraphs.

[0067] Among them, the number of nodes in the subgraph obtained after performing topological or geometric simplification operations on the merged subgraph is compressed to no more than a preset threshold.

[0068] In the embodiments of this application, simplified processing can be achieved based on various methods such as edge folding, triangular face clustering, and error tolerance.

[0069] For example, in some embodiments, the merged subgraph is simplified to obtain a simplified subgraph, including: For each foldable edge in the merged subgraph, calculate the folding cost between the nodes at both ends of the foldable edge. A foldable edge is an edge that is not located at the boundary of the graph structure or at the intersection with an adjacent subgraph. Adjacent subgraphs are adjacent to the merged subgraph. The folding cost represents the shape deviation of the nodes at both ends of the foldable edge before and after merging. If the folding cost between the nodes at both ends of the target foldable edge is less than the folding cost between the nodes at both ends of other foldable edges, then merge the triangular faces corresponding to the nodes at both ends of the target foldable edge. The process continues until the total number of nodes in the merged subgraph is no greater than a preset threshold, resulting in a simplified subgraph.

[0070] Collapsible edges are edges that allow the merging of their two endpoints during edge collapse operations. They must satisfy geometric or topological constraints to ensure model validity. Essentially, collapsible edges are those that remove some internal edges while maintaining the overall boundary of the merged subgraph and the overall graph structure. These internal edges do not affect the overall outline of the 3D model or the outline of the merged subgraph after folding. For each collapsible edge, the folding cost—the geometric error or topological impact introduced by merging its two endpoints—can be evaluated to select the optimal folding order.

[0071] Therefore, the error quantity can be used to... As can be seen from the above, the embodiments of this application can establish a graph structure of a three-dimensional model. The three-dimensional model is composed of multiple triangular faces. The graph structure includes nodes and edges. Each node represents one of the triangular faces, and an edge represents two adjacent triangular faces. The graph structure is divided to obtain multiple subgraphs. The graph structure of the i-th iteration is obtained. The graph structure of the first iteration includes the graph structure. The number of matching node pairs between each subgraph and its adjacent subgraphs in the graph structure of the i-th iteration is determined. i is a positive integer. The matching node pairs include a first node and a second node. The first node is located in the subgraph, and the second node is located in the adjacent subgraph. The triangular face corresponding to the first node and the triangular face corresponding to the second node are adjacent to each other. If the number of matching node pairs between the target subgraph and its adjacent subgraphs is greater than the number of matching node pairs between other subgraphs and their adjacent subgraphs, the target subgraph and its adjacent subgraphs are merged to obtain the graph structure of the (i+1)-th iteration. The graph structure of each iteration is used to render the three-dimensional model. The target subgraph is any subgraph in the graph structure of the i-th iteration, and the other subgraphs are the other subgraphs in the graph structure of the i-th iteration except for the target subgraph.

[0072] This method constructs a triangular facet structure, divides it into subgraphs, and prioritizes merging subgraphs with the most matching node pairs with neighboring blocks during iteration. This ensures that each merge minimizes redundant boundaries between blocks, balancing rendering efficiency and the integrity of details within blocks. After merging subgraphs, the method calculates the folding cost for collapsible edges and prioritizes folding the edges with the lowest cost, repeating this process until the number of nodes reaches a preset threshold. This precise control of error accumulation ensures rendering efficiency while preserving the original shape as much as possible. Through multiple iterations, this method can output subgraphs suitable for the current performance budget at each stage for rendering, or continue iterating according to subsequent needs, flexibly adjusting the mesh hierarchy. Therefore, the embodiments of this application both quickly and efficiently reduce data size and maximize the preservation of the local and overall shape of the model.

[0073] It is understood that, in the specific embodiments of this application, data such as three-dimensional models are involved. When the following embodiments of this application are applied to specific products or technologies, permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0074] To better implement the above methods, this application also provides a data processing device, which can be integrated into an electronic device, such as a terminal or server. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers.

[0075] For example, in this embodiment, the method of this application embodiment will be described in detail by taking the data processing device specifically integrated into the server as an example.

[0076] For example, such as Figure 3 As shown, the data processing device may include an establishment unit 310, a division unit 320, an acquisition unit 330, a determination unit 340, and a merging unit 350, as follows: (a) Establishing Unit 310.

[0077] Element 310 is used to establish the graph structure of the three-dimensional model.

[0078] The 3D model consists of multiple triangular faces. The graph structure includes nodes and edges. Each node represents one of the triangular faces, and an edge represents two adjacent triangular faces.

[0079] In some embodiments, the establishing unit 310 is configured to: Based on the attribute information of each triangle, generate a corresponding node for each triangle; If two triangular faces share the same geometric edge at the geometric level, then an edge is established between the corresponding nodes of the two triangular faces.

[0080] In some embodiments, the attribute information includes geometric information and texture data.

[0081] (ii) Divide into units 320.

[0082] The partitioning unit 320 is used to partition the graph structure to obtain multiple subgraphs.

[0083] In some embodiments, the partitioning unit 320 is used for: The graph structure is coarsened to obtain a coarsened graph. The coarsening process includes merging multiple nodes into one, so that the number of nodes in the coarsened graph is less than the number of nodes in the graph structure. The coarsened map is divided into multiple partitioned maps. The partitioned graph is expanded to obtain multiple subgraphs. The expansion process includes expanding a node into multiple subgraphs, such that... The number of triangles contained in each subgraph does not exceed a preset threshold.

[0084] (iii) Acquisition Unit 330.

[0085] The acquisition unit 330 is used to acquire the graph structure of the i-th iteration.

[0086] The graph structure in the first iteration includes the graph structure itself.

[0087] (iv) Determine unit 340.

[0088] The determining unit 340 is used to determine the number of matching node pairs between each subgraph and its neighboring subgraphs in the graph structure of the i-th iteration.

[0089] Where i is a positive integer, the matching node pair includes the first node and the second node, the first node is located in the subgraph, the second node is located in the adjacent subgraph, and the triangle face corresponding to the first node and the triangle face corresponding to the second node are adjacent to each other.

[0090] (v) Merging Unit 350.

[0091] The merging unit 350 is used to merge the target subgraph with its neighboring subgraphs if the number of matching node pairs between the target subgraph and its neighboring subgraphs is greater than the number of matching node pairs between other subgraphs and their neighboring subgraphs, thus obtaining the graph structure of the (i+1)th iteration.

[0092] In each iteration, the graph structure is used to render the 3D model. The target subgraph is any subgraph in the graph structure of the i-th iteration, and the other subgraphs are the other subgraphs in the graph structure of the i-th iteration besides the target subgraph.

[0093] In some embodiments, the merging unit 350 includes: The merge sub-unit is used to merge a subgraph with its adjacent subgraphs to obtain a merged subgraph. The merged subgraph includes all nodes of the subgraph and all nodes of the adjacent subgraphs. The simplified sub-unit is used to simplify the merged subgraph to obtain a simplified subgraph. The number of nodes in the simplified subgraph is a preset threshold, which is less than the sum of the number of nodes in the subgraph and the number of nodes in the adjacent subgraphs.

[0094] In some embodiments, the simplified subunit is used for: For each foldable edge in the merged subgraph, calculate the folding cost between the nodes at both ends of the foldable edge. A foldable edge is an edge that is not located at the boundary of the graph structure or the intersection of adjacent subgraphs. Adjacent subgraphs are adjacent to the merged subgraph. The folding cost represents the shape deviation of the nodes at both ends of the foldable edge before and after merging. If the folding cost between the nodes at both ends of the target foldable edge is less than the folding cost between the nodes at both ends of other foldable edges, then merge the triangular faces corresponding to the nodes at both ends of the target foldable edge. The process continues until the total number of nodes in the merged subgraph is no greater than a preset threshold, resulting in a simplified subgraph.

[0095] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.

[0096] In this application embodiment, the terms "module" or "unit" refer to a computer program product or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0097] As can be seen from the above, the data processing device in this embodiment comprises: a building unit for building the graph structure of the three-dimensional model, the three-dimensional model being composed of multiple triangular faces, the graph structure including nodes and edges, each node representing one of the triangular faces, and an edge representing two adjacent triangular faces; a partitioning unit for partitioning the graph structure to obtain multiple subgraphs; an acquisition unit for acquiring the graph structure of the i-th iteration, the graph structure of the first iteration including the graph structure; and a determination unit for determining the number of matching node pairs between each subgraph and its adjacent subgraphs in the graph structure of the i-th iteration, where i is a positive integer, and the matching node pairs include the first subgraph... The first node is located within a subgraph, and the second node is located within an adjacent subgraph. The triangular faces corresponding to the first node and the triangular faces corresponding to the second node are adjacent to each other. The merging unit is used to merge the target subgraph with its adjacent subgraphs if the number of matching node pairs between the target subgraph and its adjacent subgraphs is greater than the number of matching node pairs between other subgraphs and their adjacent subgraphs, thus obtaining the graph structure of the (i+1)th iteration. The graph structure of each iteration is used to render the 3D model. The target subgraph is any subgraph in the graph structure of the i-th iteration, and the other subgraphs are the other subgraphs in the graph structure of the i-th iteration except for the target subgraph.

[0098] Therefore, the embodiments of this application can improve the efficiency and accuracy of data processing, thereby improving the rendering effect of the three-dimensional model.

[0099] This application also provides an electronic device, which can be a terminal, a server, or other similar device. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers, etc.

[0100] In some embodiments, the data processing apparatus may also be integrated into multiple electronic devices, such as multiple servers, with the data processing method of this application being implemented by the multiple servers.

[0101] In this embodiment, a server will be used as an example for detailed description. For example, ... Figure 4 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically: The electronic device may include components such as a processor 410 with one or more processing cores, a memory 420 with one or more computer-readable storage media, a power supply 430, an input module 440, and a communication module 450. Those skilled in the art will understand that... Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 410 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 420, and by calling data stored in the memory 420, it performs various functions and processes data, thereby performing overall detection of the electronic device. In some embodiments, the processor 410 may include one or more processing cores; in some embodiments, the processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 410.

[0102] The memory 420 can be used to store software programs and modules. The processor 410 executes various functional applications and data processing by running the software programs and modules stored in the memory 420. The memory 420 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 420 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 420 may also include a memory controller to provide the processor 410 with access to the memory 420.

[0103] The electronic device also includes a power supply 430 that supplies power to the various components. In some embodiments, the power supply 430 can be logically connected to the processor 410 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 430 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0104] The electronic device may also include an input module 440, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0105] The electronic device may also include a communication module 450. In some embodiments, the communication module 450 may include a wireless module, through which the electronic device can perform short-range wireless transmission, thereby providing users with wireless broadband internet access. For example, the communication module 450 can be used to help users send and receive data. e-mail Browsing web pages and accessing streaming media, etc.

[0106] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 410 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 420 according to the following instructions, and the processor 410 runs the applications stored in the memory 420 to realize various functions, as follows: Establish the graph structure of the 3D model. The 3D model is composed of multiple triangular faces. The graph structure includes nodes and edges. Each node represents one of the triangular faces, and the edges represent two adjacent triangular faces. The graph structure is divided into multiple subgraphs; Obtain the graph structure of the i-th iteration. The graph structure of the first iteration includes the graph structure. Determine the number of matching node pairs between each subgraph and its adjacent subgraphs in the graph structure of the i-th iteration, where i is a positive integer. The matching node pairs include the first node and the second node. The first node is located in the subgraph, and the second node is located in the adjacent subgraph. The triangles corresponding to the first node and the triangles corresponding to the second node are adjacent to each other. If the number of matching node pairs between the target subgraph and its neighboring subgraphs is greater than the number of matching node pairs between other subgraphs and their neighboring subgraphs, then the target subgraph and its neighboring subgraphs are merged to obtain the graph structure of the (i+1)th iteration. The graph structure of each iteration is used to render the 3D model. The target subgraph is any subgraph in the graph structure of the i-th iteration, and the other subgraphs are the other subgraphs in the graph structure of the i-th iteration except for the target subgraph.

[0107] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0108] As can be seen from the above, the embodiments of this application can improve the efficiency and accuracy of data processing, thereby improving the rendering effect of the three-dimensional model.

[0109] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0110] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the data processing methods provided in embodiments of this application. For example, the instructions can execute the following steps: Establish the graph structure of the 3D model. The 3D model is composed of multiple triangular faces. The graph structure includes nodes and edges. Each node represents one of the triangular faces, and the edges represent two adjacent triangular faces. The graph structure is divided into multiple subgraphs; Obtain the graph structure of the i-th iteration. The graph structure of the first iteration includes the graph structure. Determine the number of matching node pairs between each subgraph and its adjacent subgraphs in the graph structure of the i-th iteration, where i is a positive integer. The matching node pairs include the first node and the second node. The first node is located in the subgraph, and the second node is located in the adjacent subgraph. The triangles corresponding to the first node and the triangles corresponding to the second node are adjacent to each other. If the number of matching node pairs between the target subgraph and its neighboring subgraphs is greater than the number of matching node pairs between other subgraphs and their neighboring subgraphs, then the target subgraph and its neighboring subgraphs are merged to obtain the graph structure of the (i+1)th iteration. The graph structure of each iteration is used to render the 3D model. The target subgraph is any subgraph in the graph structure of the i-th iteration, and the other subgraphs are the other subgraphs in the graph structure of the i-th iteration except for the target subgraph.

[0111] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0112] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various optional implementations of image rendering or graphics aspects provided in the above embodiments.

[0113] Since the instructions stored in the storage medium can execute the steps of any of the data processing methods provided in the embodiments of this application, the beneficial effects that any of the data processing methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0114] The foregoing has provided a detailed description of a data processing method, apparatus, electronic device, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A data processing method, characterized in that, include: A graph structure for a 3D model is established, wherein the 3D model is composed of multiple triangular faces, and the graph structure includes nodes and edges. Each node represents one of the triangular faces, and each edge represents two triangular faces that are adjacent to each other. The graph structure is divided into multiple subgraphs; Obtain the graph structure of the i-th iteration, where the graph structure of the first iteration includes the graph structure; Determine the number of matching node pairs between each subgraph and its adjacent subgraphs in the graph structure of the i-th iteration, where i is a positive integer, and the matching node pairs include a first node and a second node, where the first node is located in the subgraph, the second node is located in the adjacent subgraph, and the triangle face corresponding to the first node and the triangle face corresponding to the second node are adjacent to each other. If the number of matching node pairs between the target subgraph and its neighboring subgraphs is greater than the number of matching node pairs between other subgraphs and their neighboring subgraphs, then the target subgraph and its neighboring subgraphs are merged to obtain the graph structure of the (i+1)th iteration. The graph structure of each iteration is used to render the 3D model. The target subgraph is any subgraph in the graph structure of the i-th iteration, and the other subgraphs are the other subgraphs in the graph structure of the i-th iteration besides the target subgraph.

2. The data processing method as described in claim 1, characterized in that, The establishment of the graph structure for the three-dimensional model includes: Based on the attribute information of each triangle, generate a corresponding node for each triangle; If two triangular faces share the same geometric edge at the geometric level, then an edge is established between the corresponding nodes of the two triangular faces.

3. The data processing method as described in claim 2, characterized in that, The attribute information includes geometric information and texture data.

4. The data processing method as described in claim 1, characterized in that, The graph structure is partitioned to obtain multiple sub-graphs, including: The graph structure is coarsened to obtain a coarsened graph. The coarsening process includes merging multiple nodes into one, so that the number of nodes in the coarsened graph is less than the number of nodes in the graph structure. The coarsened graph is divided into multiple partitioned graphs. The partitioned graph is expanded to obtain multiple subgraphs. The expansion process includes expanding a node into multiple subgraphs, such that the number of triangles contained in each subgraph does not exceed a preset threshold.

5. The data processing method as described in claim 1, characterized in that, The step of merging the subgraph with its neighboring subgraphs includes: The subgraph is merged with its neighboring subgraphs to obtain a merged subgraph, which includes all nodes of the subgraph and all nodes of the neighboring subgraphs. The merged subgraph is simplified to obtain a simplified subgraph. The number of nodes in the simplified subgraph is a preset threshold, which is less than the sum of the number of nodes in the simplified subgraph and the number of nodes in the adjacent subgraphs.

6. The data processing method as described in claim 5, characterized in that, The process of simplifying the merged subgraph to obtain a simplified subgraph includes: For each foldable edge in the merged subgraph, calculate the folding cost between the nodes at both ends of the foldable edge. The foldable edge is an edge that is not located at the boundary of the graph structure or at the intersection with the adjacent subgraph. The adjacent subgraph is adjacent to the merged subgraph. The folding cost represents the shape deviation of the nodes at both ends of the foldable edge before and after merging. If the folding cost between the nodes at both ends of the target foldable edge is less than the folding cost between the nodes at both ends of other foldable edges, then the triangular faces corresponding to the nodes at both ends of the target foldable edge are merged. The process continues until the total number of nodes in the merged subgraph is no greater than a preset threshold, resulting in a simplified subgraph.

7. A data processing apparatus, characterized in that, include: A building unit is used to build the graph structure of a three-dimensional model, which is composed of multiple triangular faces. The graph structure includes nodes and edges, where each node represents one of the triangular faces and each edge represents two adjacent triangular faces. A partitioning unit is used to partition the graph structure to obtain multiple subgraphs; The acquisition unit is used to acquire the graph structure of the i-th iteration, wherein the graph structure of the first iteration includes the graph structure. A determining unit is used to determine the number of matching node pairs between each subgraph and its adjacent subgraphs in the graph structure of the i-th iteration, where i is a positive integer, and the matching node pair includes a first node and a second node, where the first node is located in the subgraph, the second node is located in the adjacent subgraph, and the triangle face corresponding to the first node and the triangle face corresponding to the second node are adjacent to each other. The merging unit is configured to merge the target subgraph with its neighboring subgraphs if the number of matching node pairs between the target subgraph and its neighboring subgraphs is greater than the number of matching node pairs between other subgraphs and their neighboring subgraphs, to obtain the graph structure of the (i+1)th iteration. The graph structure of each iteration is used to render the 3D model. The target subgraph is any subgraph in the graph structure of the i-th iteration, and the other subgraphs are the other subgraphs in the graph structure of the i-th iteration besides the target subgraph.

8. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing multiple instructions; the processor loads instructions from the memory to perform the steps of the data processing method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the data processing method according to any one of claims 1 to 6.

10. A computer program comprising computer instructions stored in a computer-readable storage medium; a processor of an electronic device reading the computer instructions from the computer-readable storage medium, the processor executing the computer instructions to perform the steps of the data processing method as claimed in any one of claims 1 to 6.