A method and system for reconstructing a three-dimensional scene based on serialized data
Patent Information
- Application Number
- CN202611210184.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-10-27
AI Technical Summary
本发明通过对场景序列化数据、资源索引及反射元数据进行统一解析和校验,将对象、组件、变换及资源引用关系转换为标准场景记录,并以对象节点、组件节点和资源节点构建场景重建依赖图,使原本分散存储的对象层级、组件挂接及资源引用关系形成统一的结构化表达,减少因对象标识重复、父对象缺失、组件类型异常及资源引用错误导致的场景结构缺失,提高三维场景数据解析和依赖关系恢复的准确性。
Smart Images

Figure CN122990049A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of three-dimensional graphics data processing technology, and in particular to a method and system for three-dimensional scene reconstruction based on serialized data. Background Technology
[0002] With the development of 3D graphics applications, virtual scene editing, and digital simulation technologies, 3D scene data is typically stored and transmitted in serialized form. Current technologies generally write object identifiers, hierarchical relationships, component fields, transformation parameters, and resource paths into a serialized file. During scene loading, objects are parsed sequentially, components are restored, resources are loaded, and spatial transformations are calculated to reconstruct the corresponding 3D scene. Some technologies also improve the efficiency of scene data reading and loading by standardizing field formats, establishing object indexes, or setting resource caches.
[0003] Existing 3D scene reconstruction methods largely rely on pre-saved parent-child relationships, component attachment relationships, and resource reference relationships in serialization records, directly creating object instances and component instances in a fixed order. When serialized data contains duplicate object identifiers, missing parent objects, closed hierarchical loops, abnormal component types, invalid resource paths, or mismatched resource types, existing methods typically handle these issues by terminating loading, skipping abnormal records, or using default resources as substitutes, making it difficult to effectively recover missing or erroneous dependencies. Because objects, components, and resources have continuously propagating dependencies, local anomalies can also cause errors in subsequent object hierarchy, component attachment, resource binding, and world space transformation calculations, leading to missing scene structures, instance misalignment, or abnormal resource display.
[0004] Furthermore, existing technologies for handling abnormal scenario data typically rely on re-analyzing and reconstructing the entire scenario, failing to fully utilize the relational structure formed by object hierarchy, component attachments, and resource references. This makes it difficult to accurately determine the scope of the anomaly's impact and easily leads to repeated processing of correctly recovered object instances, component instances, and resource instances, increasing scenario reconstruction overhead. Existing methods also lack a process for reliably filtering candidate connections by combining anomaly identifiers and multiple types of dependencies, making it difficult to simultaneously meet the requirements of acyclic hierarchy, single component attachment, and resource type matching.
[0005] Therefore, how to provide a method and system for 3D scene reconstruction based on serialized data is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose a method and system for three-dimensional scene reconstruction based on serialized data. This invention achieves three-dimensional scene reconstruction by repairing the dependencies between objects, components and resources through scene reconstruction dependency graphs and improved CompGCN models. It has the advantages of high reconstruction accuracy, strong stability and high processing efficiency.
[0007] A method for reconstructing a 3D scene based on serialized data according to an embodiment of the present invention includes: Obtain scene serialization data, resource indexes, and reflection metadata, and parse them into objects, components, transformations, and resource reference records; Verify object relationships, component types, and resource identifiers; unify fields; and generate standard scenario records and exception identifiers. Using objects, components, and resources recorded in the standard scene as nodes, directed edges are established according to hierarchy, attachment, and reference to generate a scene reconstruction dependency graph; The standard scene record, scene reconstruction dependency graph and anomaly identifier are input into the improved CompGCN model to generate candidate dependency edges with confidence. The improved CompGCN model includes a node relationship initialization layer, a scene dependency gated combination convolutional layer, a relationship embedding update layer and a dependency repair multi-branch output layer. Candidate dependency edges are filtered based on constraints such as hierarchical acyclicity, single component attachment, and resource type matching, and a reliable scenario dependency graph is generated. Based on the trusted scene dependency graph, object instances are created and the hierarchy is restored. The world space transformation matrix is calculated by combining the transformation record. Restore and attach components based on component records and reflected metadata, load and bind resources based on resource reference records and resource indexes, and generate a rebuilt instance; Verify the reconstructed instances, extract abnormal nodes and successor nodes along the trusted scene dependency graph to form an influence subgraph, retain instances outside the graph and reconstruct the subgraph, and output the 3D scene reconstruction results.
[0008] Optionally, the parsing into object, component, transformation, and resource reference records includes: Scene serialization data includes object identifier, parent object identifier, object state, component identifier, component type, component fields, local transformations, and resource reference identifiers; resource index includes resource identifier, resource type, resource path, and loading status; reflection metadata includes component type, field name, field type, and field read / write interface; object records include object identifier, parent object identifier, and object state; component records include component identifier, belonging object identifier, component type, and component fields; transformation records include object identifier, local position, local rotation, and local scaling; resource reference records include resource identifier, referencing component identifier, referenced fields, resource type, and resource path. The scene serialization data is divided according to the object identifier, and the parent object identifier and object state are extracted to generate object records; Based on the reflected metadata, match the component type and component fields, and associate the component identifier, the object identifier, and the component fields with the object record to generate the component record; Extract local position, local rotation, and local scaling based on the object identifier and associate them with the object record to generate a transformation record; The resource index is queried by the resource reference identifier, and the resource identifier, resource type and resource path are associated with the reference component identifier and reference field to generate a resource reference record.
[0009] Optionally, the generation of standard scene records and anomaly identifiers includes: Verify the uniqueness of object identifiers, the existence of parent object identifiers, and the closed loop of parent-child hierarchy, and generate object relationship verification results; Based on the reflected metadata and resource index, the component type, component fields, resource identifier and resource path are verified, and the resource type is matched with the field type of the referenced field to generate the component resource verification result; The field names, field types, and arrangement order of unified object records, component records, transformation records, and resource reference records are used to generate standard scenario records by associating the unified records. An exception identifier is generated based on the object relationship verification results and component resource verification results. The exception identifier includes an exception object identifier, an exception component identifier, an exception resource identifier, an exception type, and an exception field position.
[0010] Optionally, the generated scene reconstruction dependency graph includes: Based on the standard scenario record, create object nodes, component nodes, and resource nodes and write node attributes; Create hierarchical directed edges based on the parent object identifier and mark the root object node; Create directed edges connecting object nodes to component nodes based on their object identifiers, and create directed edges connecting component nodes to resource nodes based on their reference component identifiers. Write the relationship type and dependency direction for each directed edge, summarize each node and directed edge, and generate a scene reconstruction dependency graph.
[0011] Optionally, generating candidate dependency edges with confidence includes: The improved CompGCN model includes a node relationship initialization layer, a scene dependency gated combined convolutional layer, a relationship embedding update layer, and a dependency repair multi-branch output layer connected in sequence. The standard scene record and scene reconstruction dependency graph are input into the node relationship initialization layer. Node attributes are mapped according to node type, and relationship features are mapped according to the relationship type and dependency direction of directed edges to generate initial node embeddings and initial relationship embeddings. The initial node embedding, initial relation embedding, scene reconstruction dependency graph and anomaly label are input into the scene dependency gating combination convolutional layer. Dependency gating coefficients are generated based on the anomaly label. The adjacent node embedding and corresponding relation embedding are combined and weighted to generate scene dependency node embedding. The initial relation embedding and scene dependency node embedding are input relation embedding update layer. The relation embedding is updated according to hierarchical relationship, attachment relationship and reference relationship and the scene dependency node embedding of the corresponding endpoint is merged to generate scene dependency joint embedding. The scene dependency is jointly embedded and the anomaly identifier is input to the dependency repair multi-branch output layer. The relationship scores of object node pairs, object component node pairs and component resource node pairs are calculated through hierarchical repair branches, attached repair branches and reference repair branches to generate candidate dependency edges with confidence. Based on complete historical scene serialization data and correct dependency edges, a training standard scene record, training anomaly identifier, and training scene reconstruction dependency graph are generated and input into the improved CompGCN model. The model parameters are optimized until convergence is achieved by taking hierarchical repair error, attachment repair error, reference repair error, and relation embedding consistency error as joint training objectives, and the model training is completed.
[0012] Optionally, generating the trusted scene dependency graph includes: The candidate dependency edges with confidence scores are merged with the directed edges without associated anomaly markers in the scene reconstruction dependency graph according to the relationship type to generate a set of dependency edges to be filtered. Filter the hierarchical directed edges in the dependency edge set to be filtered according to the endpoint object node and confidence level, retain one hierarchical directed edge corresponding to each non-root object node and remove edges that form hierarchical closed loops to generate a set of reliable hierarchical edges. Filter the attached directed edges in the set of dependent edges to be filtered by component node and confidence level, retain one edge corresponding to each component node, and generate a set of trusted attached edges; Based on the reflection metadata and resource index, filter the directed edges in the dependency edge set to be filtered that match the field type of the referenced field with the resource type, and generate a set of trustworthy reference edges. By aggregating the sets of nodes, trusted layer edges, trusted attached edges, and trusted reference edges, a trusted scenario dependency graph is generated.
[0013] Optionally, the step of creating object instances and restoring the hierarchy based on the trusted scene dependency graph, and calculating the world space transformation matrix in conjunction with the transformation record, includes: Based on the object nodes and object records in the trusted scenario dependency graph, create object instances and establish instance mappings; Based on the trusted hierarchy edges and instance mapping, the parent and child hierarchies are bound and an object reconstruction sequence is generated. Match transformation records according to object identifiers, write local position, local rotation and local scaling into object instances, generate local translation matrix, local rotation matrix and local scaling matrix respectively, and multiply them in sequence to obtain local spatial transformation matrix; Reconstruct the sequence by object, using the local space transformation matrix of the root object instance as the world space transformation matrix, multiply the world space transformation matrix of the parent object instance with the local space transformation matrix of the child object instance, and generate and write the world space transformation matrix of the child object instance.
[0014] Optionally, the generated reconstruction instance includes: Match object instances based on their object identifiers, query reflection metadata based on component type and create component instances, and establish component instance mappings; Transform component fields based on reflection metadata and write them to the component instance, then attach the component instance to the corresponding object instance; Based on the resource identifier, query the resource index, reuse the loaded resource instance and load the unloaded resource according to the resource path, and establish a resource instance mapping; The component instance and resource instance are matched according to the reference component identifier and resource identifier respectively through component instance mapping and resource instance mapping. The resource instance is written into the reference field, and the object instance, component instance and resource instance are summarized to generate a reconstructed instance.
[0015] Optionally, the step of preserving out-of-map instances and reconstructing sub-maps to output 3D scene reconstruction results includes: Verify object hierarchy, component attachment, resource binding, and world space transformation matrix to identify abnormal nodes; Extract abnormal nodes, successor nodes, and directed edges between nodes along the dependency direction of the trusted scenario dependency graph to form an influence subgraph; Preserve instances outside the graph and their relationships, remove and regenerate instances that affect the subgraph according to their dependencies; Connect the regenerated corresponding instance with the off-map instance, restore the object hierarchy, component attachment, resource binding and world space transformation matrix, and output the 3D scene reconstruction result.
[0016] A 3D scene reconstruction system based on serialized data according to an embodiment of the present invention includes the following modules: The data parsing module is used to parse scene serialization data, resource indexes and reflection metadata, and generate object records, component records, transformation records and resource reference records; The record verification module is used to verify object relationships, component types and resource identifiers and unify fields, generating standard scenario records and exception identifiers; The dependency graph construction module is used to generate a scenario reconstruction dependency graph based on standard scenario records. The dependency repair module is used to input the standard scene record, the scene reconstruction dependency graph and the anomaly identifier into the improved CompGCN model to generate candidate dependency edges with confidence. The trusted graph generation module is used to filter candidate dependency edges with confidence based on constraints such as hierarchical acyclicity, single component attachment, and resource type matching, and generate a trusted scene dependency graph. The object reconstruction module is used to generate object instances and world space transformation matrices based on the trusted scene dependency graph and transformation records; The component resource recovery module is used to recover components and bind resources based on component records, reflection metadata, resource reference records, and resource indexes, and generate reconstruction instances. The scene verification and reconstruction module is used to verify reconstruction instances and reconstruct influence subgraphs, and output the 3D scene reconstruction results.
[0017] The beneficial effects of this invention are: This invention unifies the parsing and verification of scene serialization data, resource indexes, and reflection metadata, converting objects, components, transformations, and resource reference relationships into standard scene records. It then constructs a scene reconstruction dependency graph using object nodes, component nodes, and resource nodes, transforming the originally scattered object hierarchy, component attachments, and resource reference relationships into a unified structured expression. This reduces scene structure loss caused by duplicate object identifiers, missing parent objects, abnormal component types, and incorrect resource references, thereby improving the accuracy of 3D scene data parsing and dependency recovery.
[0018] This invention improves the CompGCN model by jointly processing standard scene records, scene reconstruction dependency graphs, and anomaly identifiers. It combines scene dependency gated convolution, relation embedding updates, and multi-branch dependency repair to generate candidate dependency edges with confidence. Based on constraints such as hierarchical acyclicity, single component attachment, and resource type matching, a reliable scene dependency graph is generated. This enables the repair of object hierarchy, component attachment, and resource reference relationships under abnormal serialization data conditions, reducing the impact of hierarchical closure, repeated component attachment, and resource type mismatch on the 3D scene reconstruction results, and improving the stability and reliability of scene reconstruction.
[0019] This invention restores the object hierarchy, world space transformation matrix, component instances, and resource instances based on a trusted scene dependency graph. When an anomaly occurs in the reconstructed instance, it extracts the abnormal nodes and their successors to form an influence subgraph, retains the normal instances outside the influence subgraph, and only regenerates and connects the affected parts. This avoids repeated parsing and overall reconstruction of the complete 3D scene. At the same time, by reusing already loaded resource instances, it reduces the repeated loading of resources, thereby reducing the processing overhead of 3D scene reconstruction, improving the efficiency of abnormal scene repair, and the integrity of 3D scene reconstruction results. Attached Figure Description
[0020] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a three-dimensional scene reconstruction method based on serialized data proposed in this invention; Figure 2 This is a schematic diagram of the structure of an improved CompGCN model for a 3D scene reconstruction method based on serialized data proposed in this invention; Figure 3 This is a schematic diagram of the structure of a three-dimensional scene reconstruction system based on serialized data proposed in this invention. Detailed Implementation
[0021] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0022] refer to Figure 1 and Figure 2 A method for reconstructing a 3D scene based on serialized data, comprising: Obtain scene serialization data, resource indexes, and reflection metadata, and parse them into objects, components, transformations, and resource reference records; Verify object relationships, component types, and resource identifiers; unify fields; and generate standard scenario records and exception identifiers. Using objects, components, and resources recorded in the standard scene as nodes, directed edges are established according to hierarchy, attachment, and reference to generate a scene reconstruction dependency graph; The standard scene record, scene reconstruction dependency graph and anomaly identifier are input into the improved CompGCN model to generate candidate dependency edges with confidence. The improved CompGCN model includes a node relationship initialization layer, a scene dependency gated combination convolutional layer, a relationship embedding update layer and a dependency repair multi-branch output layer. Candidate dependency edges are filtered based on constraints such as hierarchical acyclicity, single component attachment, and resource type matching, and a reliable scenario dependency graph is generated. Based on the trusted scene dependency graph, object instances are created and the hierarchy is restored. The world space transformation matrix is calculated by combining the transformation record. Restore and attach components based on component records and reflected metadata, load and bind resources based on resource reference records and resource indexes, and generate a rebuilt instance; Verify the reconstructed instances, extract abnormal nodes and successor nodes along the trusted scene dependency graph to form an influence subgraph, retain instances outside the graph and reconstruct the subgraph, and output the 3D scene reconstruction results.
[0023] In this embodiment, the parsing into objects, components, transformations, and resource reference records includes: Scene serialization data includes object identifier, parent object identifier, object state, component identifier, component type, component fields, local transformations, and resource reference identifiers; resource index includes resource identifier, resource type, resource path, and loading status; reflection metadata includes component type, field name, field type, and field read / write interface; object records include object identifier, parent object identifier, and object state; component records include component identifier, belonging object identifier, component type, and component fields; transformation records include object identifier, local position, local rotation, and local scaling; resource reference records include resource identifier, referencing component identifier, referenced fields, resource type, and resource path. The scene serialization data is divided according to object identifiers, and the parent object identifier and object state are extracted to generate object records. Specifically, the process of dividing the scene serialization data according to object identifiers and extracting the parent object identifier and object state is as follows: Read the field names and values in the scene serialization data one by one. Use the object identifier field value as the grouping key to group serialization fields with the same object identifier field value into the same object data group and establish the correspondence between object identifier and object data group. In each object data group, locate the parent object identifier field and object status field by field name, read the corresponding field values, write a null value mark when the field does not exist, and write the object record in the field order of object identifier, parent object identifier and object status. Based on the reflection metadata, the component type and component fields are matched, and the component identifier, the belonging object identifier, and the component fields are associated with the object record to generate a component record. The specific process of generating the component record is as follows: The system reads the component identifier, object identifier, component type, field name, and field value from the scene serialization data one by one, and uses the component identifier as the grouping key to group the fields of the same component; it retrieves the component type from the reflection metadata according to the component type, matches the field type and field read / write interface according to the field name, and assembles the field name, field type, and field value into component fields according to the field order in the reflection metadata; it retrieves the object record according to the object identifier, and writes the component identifier, object identifier, component type, and component fields into the same record unit to generate a component record; Extract local position, local rotation, and local scaling based on the object identifier and associate them with the object record to generate a transformation record. Specifically, generating the transformation record involves: Read the object identifier and local transformation field in the scene serialization data one by one, and locate the corresponding object record by using the object identifier as the search key; locate the local position, local rotation and local scaling fields by field name, read the component values contained in each field, and maintain the component arrangement order in the scene serialization data; write the object identifier, local position, local rotation and local scaling into the same record unit, and associate the record unit with the corresponding object record to generate a transformation record; The resource index is queried by the resource reference identifier. The resource identifier, resource type, and resource path are associated with the referencing component identifier and the reference field to generate a resource reference record. The specific process of generating a resource reference record is as follows: Read the resource reference identifier, reference component identifier, and reference field from the scene serialization data one by one. Use the resource reference identifier as the search key to compare it with the resource identifier in the resource index item by item. Read the resource type and resource path with the same identifier. If no matching resource identifier is found, write a null value mark. Write the resource identifier, reference component identifier, reference field, resource type, and resource path into the same record unit in the order of the fields to generate a resource reference record.
[0024] In this embodiment, the generation of standard scene records and anomaly identifiers includes: Verify the uniqueness of object identifiers, the existence of parent object identifiers, and the closed loop of parent-child hierarchy, and generate object relationship verification results. Specifically, generating object relationship verification results involves: Read the object identifiers in each object record one by one and count the occurrences of each object identifier. Mark object identifiers with an occurrence count greater than 1 as duplicate object identifiers. Read the parent object identifiers in each object record. Mark the object record corresponding to a null parent object identifier as the root object record. Compare the non-null parent object identifiers with all object identifiers one by one. If no matching object identifier is found, mark it as a missing parent object. Starting from each non-root object identifier, search the object records level by level according to the parent object identifier. Write the searched object identifiers sequentially into the current level path. If the parent object identifier matches any object identifier in the current level path, mark it as a parent-child level closed loop. The current level path verification ends when a null parent object identifier or a missing parent object is found. Summarize the duplicate object identifiers, missing parent object identifiers, and parent-child level closed loop identifiers to generate the object relationship verification result. Based on reflected metadata and resource indexes, the component type, component fields, resource identifier, and resource path are verified. The resource type is matched with the field types of the referenced fields to generate a component resource verification result. Specifically, generating the component resource verification result involves: Read the component identifier, component type, and component fields from each component record. Compare the component type with the component type in the reflection metadata item by item. If no matching component type is found, mark the component type as abnormal. If a matching component type is found, search for the corresponding field name in the component type item by item. If no matching field name is found, mark the component field as missing. If a matching field name is found, read the field type of the reflection metadata record and compare the data type of the component field value with the field type character by character. If they are inconsistent, mark the component field type as abnormal. Read the resource identifier, referenced component identifier, referenced field, resource type, and resource path from each resource reference record. Compare the resource identifier with the resource identifier in the resource index item by item. If no matching resource identifier is found, mark the resource identifier as abnormal. If a matching resource identifier is found, compare the resource type and resource path. If they are inconsistent, mark the resource type as abnormal and the resource path as abnormal, respectively. Locate the component record by the referenced component identifier, locate the field type in the reflection metadata by the referenced field, and compare the resource type name with the field type name character by character. If they are inconsistent, mark the resource field type as mismatched. Summarize the component identifier, resource identifier, abnormal type, and abnormal field location to generate the component resource verification result. The field names, field types, and arrangement order of unified object records, component records, transformation records, and resource reference records are used to generate standard scene records. Anomaly identifiers are then generated based on object relationship verification results and component resource verification results. These anomaly identifiers include anomaly object identifier, anomaly component identifier, anomaly resource identifier, anomaly type, and anomaly field position. Specifically, generating standard scene records and generating anomaly identifiers based on object relationship verification results and component resource verification results involves: The system uses a unified set of fields defined by object records, component records, transformation records, and resource reference records. It uses the component field names, types, and order of the reflected metadata records as the basis for unifying component fields. Field names with the same meaning are replaced with the unified field names. Field values are parsed according to the target field type, converting character values to corresponding integers or floating-point numbers, and character logical values to Boolean types. Fields that cannot be converted are marked with a null value. Records are then rearranged according to the field order in the unified field set. Object records and transformation records are associated with object identifiers, component records with their owning object identifiers, and resource reference records with their referencing component identifiers and resource identifiers. These associated records are written into the same scene record unit to generate a standard scene record. The system reads abnormal records from the object relationship verification results and component resource verification results item by item. Based on the object identifier, component identifier, and resource identifier associated with the abnormal record, it retrieves the standard scene record and writes the abnormal object identifier, abnormal component identifier, and abnormal resource identifier. If no associated identifier exists, a null value is written. The abnormal type and abnormal field name or field number generated during the verification process are written to the abnormal field position to generate an abnormal identifier.
[0025] In this embodiment, the generation of the scene reconstruction dependency graph includes: Based on the standard scenario record, object nodes, component nodes, and resource nodes are created and their attributes are written. Specifically, creating object nodes, component nodes, and resource nodes based on the standard scenario record involves: Read the object identifier, component identifier, and resource identifier from the standard scene record one by one, and use the object identifier, component identifier, and resource identifier as the node unique key respectively; search for the existence of the same node unique key in the node set. If it does not exist, create a node of the corresponding type. If it exists, reuse the corresponding node; write the object identifier, parent object identifier, and object status into the object node attribute; write the component identifier, belonging object identifier, component type, and component fields into the component node attribute; write the resource identifier, resource type, and resource path into the resource node attribute; and write the node type markers of the object node, component node, and resource node respectively. Create hierarchical directed edges based on the parent object identifier and label the root object node. Specifically, creating hierarchical directed edges based on the parent object identifier and labeling the root object node involves: Read the object identifier and parent object identifier in the object record corresponding to each object node one by one; when the parent object identifier is null, write the corresponding object node into the root object marker; when the parent object identifier is not null, traverse the object identifiers of the object nodes with the parent object identifier as the search key. When an object node with the same identifier is found, establish a hierarchical directed edge with the object node with the same identifier as the starting point and the current object node as the ending point. If no object node with the same identifier is found, no hierarchical directed edge is established. Directed edges are created from object nodes to component nodes based on their owning object identifier, and directed edges are created from component nodes to resource nodes based on their referencing component identifier. Specifically, the creation of directed edges from object nodes to component nodes based on their owning object identifier is as follows: Read the component identifier and the object identifier in the component node properties one by one. Use the object identifier as the search key to traverse the object identifier in the object node properties. When an object node with the same identifier is found, establish a directed edge with the object node as the starting point and the component node as the ending point, and write the object identifier and component identifier into the attributes of the two ends of the directed edge. Check if there is a directed edge with the same two ends in the set of directed edges. If it exists, keep a directed edge. If it does not exist, write it into the set of directed edges. Specifically, directed edges referencing resource nodes are created based on the referenced component identifier, as follows: Read the referenced component identifier and resource identifier in each resource reference record one by one. Use the referenced component identifier as the search key to traverse the component identifier in the component node attributes and the resource identifier as the search key to traverse the resource identifier in the resource node attributes. When a component node and a resource node with the same identifier are found, establish a reference directed edge with the component node as the starting point and the resource node as the ending point, and write the reference field into the reference directed edge attribute. Check whether there is a directed edge in the reference directed edge set with the same starting node, ending node, and reference field. If it exists, keep a reference directed edge; otherwise, write it into the reference directed edge set. Write the relationship type and dependency direction for each directed edge, summarize each node and directed edge, and generate a scene reconstruction dependency graph.
[0026] In this embodiment, generating candidate dependency edges with confidence scores includes: The improved CompGCN model includes a node relationship initialization layer, a scene dependency gated combined convolutional layer, a relationship embedding update layer, and a dependency repair multi-branch output layer connected in sequence. This invention structurally optimizes the traditional CompGCN model and proposes a method and system for 3D scene reconstruction based on serialized data; The node relationship initialization layer maps object nodes, component nodes, resource nodes, and different types of relationships to a unified feature space, reducing the impact of differences in node type and relationship direction on the expression of dependency features. To address the interference of anomalous data on feature propagation, a scene-dependent gated combined convolutional layer is introduced. Anomaly identifiers are used to adjust the aggregation strength of node features and relational features, highlighting anomalous association features and improving the ability to identify erroneous and missing dependencies. The relation embedding update layer integrates relation type, dependency direction, and endpoint node features to enhance the distinguishability of hierarchical relations, attachment relations, and reference relations; the dependency repair multi-branch output layer calculates the scores of the three types of relations separately to reduce the interference between different dependency relations in the judgment. The improved CompGCN model can comprehensively represent node states, relation semantics, and anomaly information, thereby improving the accuracy and stability of candidate dependency edge generation and providing a reliable basis for the construction of trustworthy scene dependency graphs and 3D scene reconstruction. The standard scene record and scene reconstruction dependency graph are input into the node relationship initialization layer. Node attributes are mapped according to node type, and relationship features are mapped according to the relationship type and dependency direction of directed edges, generating initial node embeddings and initial relationship embeddings. The node relationship initialization layer includes: Node attribute reading unit: Based on the node identifiers and node types in the scene reconstruction dependency graph, read object node attributes, component node attributes, and resource node attributes from the standard scene record; Node type encoding unit: Based on the type differences of object nodes, component nodes, and resource nodes, field encoding and type mapping are performed on node attributes to generate a node attribute vector with a unified dimension; Relationship Feature Encoding Unit: Reads the relationship type and dependency direction of directed edges, encodes hierarchical relationships, attachment relationships, reference relationships and their corresponding dependency directions, and generates relationship feature vectors; Embedding Alignment Unit: Performs dimension mapping, non-linear activation, and alignment on node attribute vectors and relation feature vectors to generate initial node embeddings and initial relation embeddings; In the node relationship initialization layer, the node attribute reading unit retrieves standard scenario records according to node identifiers, assembling object node attributes from object identifier, parent object identifier, and object status; component node attributes from component identifier, belonging object identifier, component type, and component fields; and resource node attributes from resource identifier, resource type, and resource path. The node type encoding unit converts string fields and identifier fields into discrete indexes based on the field value dictionary built from training samples. It normalizes numeric fields to 0 to 1 according to the minimum and maximum values in the training samples, encodes boolean fields as 0 or 1, fills missing fields with 0, and writes a missing flag. The encoding results are then input into the lines corresponding to object nodes, component nodes, and resource nodes, respectively. The attribute mapping matrix is activated by ReLU to generate node attribute vectors. The linear mapping matrix and bias vector are obtained by model training. The relation feature encoding unit maps hierarchical relations, attachment relations, and reference relations to relation type indices, maps the dependency direction from the start point of a directed edge to the end point to a forward index, and maps the dependency direction from the end point to the start point to a backward index. It queries the relation type embedding table and dependency direction embedding table obtained by training, concatenates the query results and performs linear mapping to generate relation feature vectors. The embedding alignment unit maps node attribute vectors and relation feature vectors to the same feature dimension and arranges them according to the node arrangement order and directed edge arrangement order in the scene reconstruction dependency graph to form initial node embeddings and initial relation embeddings. The initial node embeddings, initial relation embeddings, scene reconstruction dependency graph, and anomaly markers are input into the scene dependency gated convolutional layer. Dependency gate coefficients are generated based on the anomaly markers. Adjacent node embeddings and corresponding relation embeddings are combined and weighted to generate scene dependency node embeddings. The scene dependency gated convolutional layer includes: Adjacency Dependency Reading Unit: Reads the adjacent nodes of the target node, the corresponding initial node embedding, the initial relation embedding, the relation type, and the dependency direction according to the directed edges in the dependency graph reconstructed by the scenario; Anomaly Feature Encoding Unit: Generates node anomaly codes and relationship anomaly codes based on anomaly object identifier, anomaly component identifier, anomaly resource identifier, anomaly type, and anomaly field position; Dependency Gating Generation Unit: Integrates node anomaly encoding, relation anomaly encoding, and initial relation embedding to calculate the dependency gating coefficient for each directed edge; Node relationship combination unit: Performs element-wise multiplication of adjacent node embeddings with corresponding initial relationship embeddings, and completes feature mapping according to relationship type and dependency direction to generate dependency combination features; Weighted aggregation unit: The dependency combination features pointing to the same target node are weighted and aggregated using dependency gating coefficients to generate scene dependency node embeddings; In the scene-dependent gated convolutional layer, the adjacency dependency reading unit uses the endpoint of the directed edge as the target node, extracting the initial node embedding and the initial relation embedding corresponding to the starting point of each incoming edge; the anomaly feature encoding unit compares the node identifier with the anomaly object identifier, anomaly component identifier, and anomaly resource identifier item by item. When a match is found, the node's anomaly state is encoded as 1, and when no match is found, it is encoded as 0. The unit then queries the trained anomaly type embedding table and anomaly position embedding table according to the anomaly type and anomaly field position to generate node anomaly codes and relation anomaly codes; the dependency gate generation unit concatenates the node anomaly codes of the starting point, the node anomaly codes of the ending point, the relation anomaly codes, and the initial relation embeddings of the directed edge, and compares the concatenation result with the gated weights obtained during training. The matrix multiplication and gating bias vector are superimposed and mapped to dependency gating coefficients between 0 and 1 using the Sigmoid function. The node relationship combination unit multiplies the elements at the same position in the adjacent node embeddings with the corresponding initial relationship embeddings. The feature mapping matrix obtained from training is selected according to hierarchical relationship, attachment relationship, reference relationship, and positive and negative dependency direction. The element-wise multiplication result is multiplied with the feature mapping matrix to generate dependency combination features. The weighted aggregation unit multiplies each dependency combination feature by the corresponding dependency gating coefficient, sums the product results pointing to the same target node element by element, and divides by the sum of the corresponding dependency gating coefficients. The scene dependency node embedding is generated by the ReLU function. When the sum of the dependency gating coefficients is 0, the initial node embedding of the target node is retained. The initial relation embedding and scene dependency node embedding are input into the relation embedding update layer. The relation embedding is updated according to hierarchical relationship, attachment relationship, and reference relationship, and the scene dependency node embeddings of the corresponding endpoints are merged to generate a scene dependency joint embedding. The relation embedding update layer includes: Relationship type routing unit: Reads the relationship type of the directed edge and assigns the initial relationship embedding into the hierarchical relationship group, the attachment relationship group, and the reference relationship group respectively; Endpoint feature extraction unit: Based on the start node identifier and end node identifier of the directed edge, extract the start node embedding and end node embedding from the scene-dependent node embedding; Relation Embedding Update Unit: Select the corresponding parameters according to the relation type, and merge the initial relation embedding, the starting node embedding, and the ending node embedding to generate the updated relation embedding; Joint Embedding Generation Unit: Performs dimension mapping and feature fusion on the update relation embedding and the scene dependency node embedding of the corresponding endpoint to generate scene dependency joint embedding; In the relation embedding update layer, the relation type routing unit reads the start node identifier, end node identifier, and relation type of each directed edge in the scene reconstruction dependency graph, and selects the corresponding relation update weight matrix and relation update bias vector according to the hierarchical relationship, attachment relationship, and reference relationship. The relation update weight matrix and relation update bias vector are obtained by model training. The endpoint feature extraction unit retrieves the scene dependency node embedding according to the start node identifier and end node identifier, and obtains the start node embedding and end node embedding corresponding to each directed edge. The relation embedding update unit concatenates the start node embedding, initial relation embedding, and end node embedding in the order of start node embedding, initial relation embedding, and end node embedding, multiplies the concatenation result with the relation update weight matrix of the corresponding relation type, and adds the relation update bias vector. The result is then processed by the ReLU function to generate the updated relation embedding. The joint embedding generation unit concatenates the updated relation embedding, start node embedding, and end node embedding, multiplies it with the trained joint mapping weight matrix, adds the joint mapping bias vector, maps it to a unified feature dimension through the ReLU function, and generates the scene dependency joint embedding according to the order of the directed edges. The dependency repair multi-branch output layer integrates scene dependency embedding and anomaly identification into the input dependency repair branch. It calculates relationship scores for object node pairs, object component node pairs, and component resource node pairs through hierarchical repair branches, attached repair branches, and reference repair branches, generating candidate dependency edges with confidence. The dependency repair multi-branch output layer includes: Anomaly candidate localization unit: Locates anomaly nodes based on anomaly object identifier, anomaly component identifier, anomaly resource identifier, and anomaly type, and forms pairs of nodes to be scored according to node type; Hierarchical repair branch: Perform feature mapping and scoring on pairs of object nodes to determine the degree of matching in establishing hierarchical directed edges between object nodes; Attachment repair branch: Perform feature mapping and scoring on object component node pairs to determine the degree of matching between object nodes and component nodes in establishing attached directed edges; Reference repair branch: Perform feature mapping and scoring on component resource node pairs to determine the degree of matching in establishing directed reference edges between component nodes and resource nodes; Confidence output unit: Maps the relationship score output by each branch to the interval between 0 and 1, and writes it into the corresponding candidate dependency edge to generate candidate dependency edge with confidence. In the multi-branch output layer of dependency repair, the anomaly candidate localization unit retrieves the node identifier in the scenario dependency joint embedding according to the anomaly identifier. For hierarchical relationships, the anomaly object node is paired with an object node other than itself to form an object node pair; for attachment relationships, the anomaly component node is paired with an object node to form an object component node pair; for reference relationships, the anomaly resource node or the component node corresponding to the reference field anomaly is paired with a resource node to form a component resource node pair. The hierarchical repair branch concatenates the endpoint features, hierarchical relationship embedding, and anomaly encoding of the object node pair according to the order in which the parent object node points to the child object node; the attachment repair branch concatenates the endpoint features, attachment relationship embedding, and anomaly encoding of the object component node pair according to the order in which the object node points to the component node; and the reference repair branch concatenates the endpoint features, reference relationship embedding, and anomaly encoding of the component resource node pair according to the order in which the component node points to the resource node. Each branch multiplies the concatenated result with the corresponding branch's score weight matrix and adds a score bias vector. The result is then processed by the ReLU function and a linear mapping to generate a relation score. The score weight matrix and score bias vector are obtained through model training. The confidence output unit uses the Sigmoid function to convert the relation score into a confidence level between 0 and 1. Candidate dependency edges are established according to the corresponding relation type and dependency direction, and the confidence level is written into the candidate dependency edge attributes to generate candidate dependency edges with confidence. Based on complete historical scene serialization data and correct dependency edges, generate training standard scene records, training anomaly identifiers, and training scene reconstruction dependency graphs, and input them into the improved CompGCN model. Use hierarchical repair error, attachment repair error, reference repair error, and relation embedding consistency error as joint training objectives to optimize model parameters until convergence, thus completing model training. Specifically, model training involves: The training, validation, and test sets are divided into training, validation, and test sets according to scene numbers at ratios of 70%, 15%, and 15%, respectively. Correct dependency edges in the training set are randomly deleted or erroneous nodes are replaced and marked with training anomaly indicators. Correct and erroneous dependency edges are configured in a 1:1 ratio. The CompGCN model is improved with 32 scenes per batch. The binary cross-entropy between the output confidence of the three types of repair branches and the edge labels is calculated to generate hierarchical repair error, attachment repair error, and reference repair error. The mean square error between the embedding of correct dependency edges of the same class and the intra-class mean is calculated to generate the relationship embedding consistency error. The four errors are weighted and summed at 0.3, 0.25, 0.25, and 0.2, with the weights determined by a grid search with a step size of 0.05 on the validation set. The model parameters are updated using the Adam optimizer with an initial learning rate of 0.001. If the validation error does not decrease for 10 consecutive rounds, the learning rate is halved. Training stops when the decrease is less than 0.0001 for 20 consecutive rounds or when training reaches 300 rounds, and the model parameters of the round with the smallest validation error are retained.
[0027] In this embodiment, generating a trusted scene dependency graph includes: Candidate dependency edges with confidence scores are merged with directed edges in the scene reconstruction dependency graph that are not associated with anomalies, according to their relationship type, to generate a set of dependency edges to be filtered. Specifically, the set of dependency edges to be filtered is generated as follows: Each directed edge in the scenario-reconstructed dependency graph is read and compared with the start node identifier, end node identifier, and reference field in the exception identifier, exception object identifier, exception component identifier, exception resource identifier, and exception field position. Directed edges that do not have a matching identifier or field position are retained and their confidence level is set to 1. Candidate dependency edges with confidence levels and retained directed edges are collected according to hierarchical relationships, attachment relationships, and reference relationships. The edge unique key is composed of the start node identifier, end node identifier, relationship type, dependency direction, and reference field. When the edge unique key is repeated, the dependency edge with higher confidence level is retained. The dependency edges of each relationship type are summarized to generate a set of dependency edges to be filtered. Filter the hierarchical directed edges in the dependency edge set to be filtered according to the endpoint object node and confidence level. Retain one hierarchical directed edge corresponding to each non-root object node and remove edges forming hierarchical loops to generate a set of trustworthy hierarchical edges. Specifically, the generation of the trustworthy hierarchical edge set is as follows: From the set of dependency edges to be filtered, extract directed edges of hierarchical relationship type. Remove hierarchical directed edges where the starting object node and the ending object node are the same, and hierarchical directed edges where the ending object node is the root object node. Retain hierarchical directed edges with a confidence score of not less than 0.5, where 0.5 is the median value of the Sigmoid function output that distinguishes between positive and negative relationships. Group the hierarchical directed edges according to the ending object node. Arrange the hierarchical directed edges in each group from high to low confidence. If the confidence scores are the same, arrange them according to the character order of the starting object identifier. Retain the first hierarchical directed edge in each group. Arrange the retained hierarchical directed edges from high to low confidence and read them one by one. Starting from the ending object node, search for adjacent object nodes layer by layer along the dependency direction in the trusted hierarchical edge set. When the starting object node is found, remove the corresponding hierarchical directed edge. When the starting object node is not found, add the corresponding hierarchical directed edge to the trusted hierarchical edge set to generate the trusted hierarchical edge set. Filter the directed edges in the dependency edge set to be filtered by component node and confidence level, retain one edge corresponding to each component node, and generate a set of trustworthy edges. The specific steps for generating the set of trustworthy edges are as follows: From the set of dependent edges to be filtered, extract directed edges of the attachment type. Retain attachment directed edges with a confidence level of not less than 0.5, where 0.5 is the median value of the Sigmoid function output that distinguishes between positive and negative relationships. Group the attachment directed edges according to the endpoint component node, and arrange the attachment directed edges in each group from high to low confidence level. If the confidence levels are the same, arrange them according to the character order of the starting object identifier. Retain the first attachment directed edge in each group and remove the other attachment directed edges corresponding to the same component node. Write the retained attachment directed edges into the edge set according to the component node arrangement order to generate a set of reliable attachment edges. Based on reflection metadata and resource indexes, directed edges referencing the dependency edge set to be filtered are those whose reference fields match the resource types, generating a set of trusted reference edges. Specifically, generating the set of trusted reference edges involves: Extract directed edges with reference relationships from the set of dependency edges to be filtered. Read the component type, reference field, and resource identifier of the starting component node and the ending resource node for each edge. Retrieve reflection metadata according to component type and reference field, and read the corresponding field type. Retrieve resource index according to resource identifier and read the corresponding resource type. If no field type or resource type is found, remove the corresponding reference directed edge. Compare the field type name and resource type name character by character. If the names match, retain the corresponding reference directed edge. If the names do not match, remove it. Arrange the retained reference directed edges according to component node identifier, reference field, and resource node identifier to generate a set of reliable reference edges. By aggregating the sets of nodes, trusted layer edges, trusted attached edges, and trusted reference edges, a trusted scenario dependency graph is generated.
[0028] In this embodiment, the step of creating object instances and restoring hierarchies based on the trusted scene dependency graph, and calculating the world space transformation matrix in conjunction with the transformation record, includes: Based on the object nodes and object records in the trusted scenario dependency graph, object instances are created and instance mappings are established. Specifically, creating object instances and establishing instance mappings involves: Read each object node in the trusted scenario dependency graph one by one, retrieve object records by object identifier and read object state; allocate an independent instance storage unit for each object node, write object identifier and object state, initialize parent object reference, component list and world space transformation matrix fields to empty, generate object instance and allocate instance handle; write the object identifier as mapping key and instance handle as mapping value to key-value table, do not create object instance again if mapping key already exists, generate instance mapping after processing all object nodes; Based on the trusted level edges and instance mapping, parent and child levels are bound and an object reconstruction sequence is generated. Specifically, binding parent and child levels and generating the object reconstruction sequence involves: Read the starting object identifier and ending object identifier from each trusted layer edge, obtain the parent object instance handle and child object instance handle respectively through instance mapping, write the parent object instance handle into the parent object reference field of the child object instance, and write the child object instance handle into the child object list of the parent object instance to complete the parent-child layer binding; count the number of incoming edges corresponding to each object node, and write the object nodes with 0 incoming edges into the waiting queue in the order of object identifier characters; take out the first object node in the waiting queue and write it into the object reconstruction sequence, find the child object node starting from the current object node along the trusted layer edge, decrement the number of incoming edges of each child object node by 1, and write it into the waiting queue in the order of object identifier characters when the number of incoming edges becomes 0; repeat the process until the waiting queue is empty, and generate the object reconstruction sequence according to the order of object node writing; The transformation record is matched according to the object identifier. The local position, local rotation, and local scaling are written into the object instance. Local translation matrix, local rotation matrix, and local scaling matrix are generated respectively and multiplied in sequence to obtain the local spatial transformation matrix. The specific local spatial transformation matrix is as follows: Retrieve transformation records by object identifier, read the first, second, and third coordinate components of the local position, the first, second, third, and fourth rotation components of the local rotation quaternion, and the first, second, and third scaling components of the local scaling, and write them to the corresponding object instance; construct a fourth-order identity matrix, and write the three local position coordinate components sequentially into the 1st row and 4th column, the 2nd row and 4th column, and the 3rd row and 4th column to generate a local translation matrix; add the squares of the four rotation components and calculate the square root to obtain the normalized divisor. When the value is not 0, divide each of the four rotation components by the normalized divisor. When the normalized divisor is 0, set the four rotation components to 0, 0, 0, and 1 respectively. Construct a fourth-order identity matrix. In the first row and first column, write 1 minus the sum of 2 multiplied by the squares of the second and third rotation components. In the first row and second column, write the difference between 2 multiplied by the product of the first and second rotation components and the product of the third and fourth rotation components. In the first row and third column, write the sum of 2 multiplied by the product of the first and third rotation components and the product of the second and fourth rotation components. In the second row and first column, write... Enter 2 multiplied by the product of the first and second rotation components plus the product of the third and fourth rotation components. In the second row, second column, enter 1 minus the sum of 2 multiplied by the squares of the first and third rotation components. In the second row, third column, enter the difference between 2 multiplied by the product of the second and third rotation components and the product of the first and fourth rotation components. In the third row, first column, enter the difference between 2 multiplied by the product of the first and third rotation components and the product of the second and fourth rotation components. In the third row, second column, enter the sum of 2 multiplied by the product of the second and third rotation components. Add the product of the first rotation component and the fourth rotation component to the sum of their products. Write 1 minus the sum of the squares of the first rotation component and the second rotation component in the 3rd row and 3rd column to generate the local rotation matrix. Create a fourth-order identity matrix and write the three local scaling components in the 1st row and 1st column, the 2nd row and 2nd column, and the 3rd row and 3rd column to generate the local scaling matrix. Perform matrix multiplication in the order of local translation matrix, local rotation matrix, and local scaling matrix. Each product element is obtained by multiplying the corresponding row element of the previous matrix with the corresponding column element of the next matrix and then summing the results to generate the local spatial transformation matrix. Based on the object reconstruction sequence, the local space transformation matrix of the root object instance is used as the world space transformation matrix. The world space transformation matrix of the parent object instance is multiplied by the local space transformation matrix of the child object instance to generate and write the world space transformation matrix of the child object instance. Specifically, the generation and writing of the world space transformation matrix of the child object instance is as follows: The object instances are read sequentially according to the object reconstruction sequence. When the parent object reference field is empty, the elements of the local space transformation matrix of the object instance are copied to the world space transformation matrix field. When the parent object reference field is not empty, the world space transformation matrix of the parent object instance is read through the parent object instance handle, and the local space transformation matrix of the child object instance is read. The world space transformation matrix of the parent object instance is used as the left multiplication matrix, and the local space transformation matrix of the child object instance is used as the right multiplication matrix. The elements of each row of the left multiplication matrix are multiplied by the corresponding column elements of the right multiplication matrix and then summed to obtain the elements of the fourth-order product matrix. The fourth-order product matrix is written into the world space transformation matrix field of the child object instance, completing the position, rotation, and scaling transformation of the child object instance in world coordinate space.
[0029] In this embodiment, the generation of reconstruction instances includes: Matching object instances based on their object identifiers, querying reflection metadata based on component type and creating component instances, and establishing component instance mappings are all performed as follows: The process reads the component identifier, the associated object identifier, and the component type from each component record. It then obtains the object instance handle corresponding to the associated object identifier through instance mapping. Using the component type as the search key, it iterates through the component types in the reflection metadata. When a matching component type is found, it calls the instance creation interface registered with the reflection system for that component type. It allocates instance storage units according to the storage space size corresponding to the component type, writes the component identifier, component type, and object instance handle into the instance storage unit, initializes the component field to empty, and generates a component instance and its handle. Finally, it writes the component identifier as the mapping key and the component instance handle as the mapping value into a key-value table. If the mapping key already exists, it reuses the corresponding component instance. After processing all component records, it generates a component instance mapping. The component fields are transformed based on reflection metadata and written to the component instance. The component instance is then attached to the corresponding object instance. Specifically, the transformation of component fields based on reflection metadata and the attachment of the component instance to the corresponding object instance are as follows: The system reads component fields from each component record, retrieves reflection metadata by component type and field name, and reads the corresponding field type and field write interface. If the data type of a component field value matches the field type, it is directly retained; otherwise, character values are converted to integers or floating-point numbers according to the field type. Character logical values "true" and "false" are converted to Boolean values 1 and 0 respectively. The components in the position, rotation, and scaling fields are converted to floating-point arrays according to the component order specified by the reflection metadata. The resource reference field is left empty. The system obtains the component instance handle through component instance mapping, calls the field write interface to write the converted field values to the corresponding field storage location, locates the object instance through the object instance handle recorded in the component instance, writes the component instance handle to the component list of the object instance, and writes the object instance handle to the object field of the component instance, completing the component instance attachment. Based on the resource identifier, the resource index is queried, loaded resource instances are reused, and unloaded resources are loaded according to the resource path. A resource instance mapping is then established. Specifically, reusing loaded resource instances and loading unloaded resources according to the resource path, along with establishing the resource instance mapping, involves: The system reads the resource identifiers from each resource reference record, retrieves the resource index using the resource identifier, and reads the resource type, resource path, and loading status. When the loading status is "loaded," it retrieves the loaded resource instance table generated during system operation using the resource identifier and reads the corresponding resource instance handle. When the loading status is "not loaded," it reads the resource file according to the resource path, selects the corresponding parsing interface based on the resource type, converts the byte data in the resource file into texture data, mesh data, material data, or script data, allocates a resource instance storage unit, writes the converted resource data, generates a resource instance and a resource instance handle, and updates the loading status to "loaded." It writes the resource identifier as the mapping key and the resource instance handle as the mapping value into a key-value table. If the mapping key already exists, it reuses the corresponding resource instance. After processing all resource reference records, it generates a resource instance mapping. Based on the referenced component identifier and resource identifier, component instances and resource instances are matched using component instance mapping and resource instance mapping respectively. The resource instances are written into the reference field. The object instances, component instances, and resource instances are aggregated to generate a reconstructed instance. The specific process of generating the reconstructed instance is as follows: The system reads the referenced component identifier, resource identifier, and reference fields from each resource reference record. It retrieves the component instance mapping and obtains the component instance handle by using the referenced component identifier, and retrieves the resource instance mapping and obtains the resource instance handle by using the resource identifier. It queries the field writing interface in the reflection metadata according to the component type and reference fields, and writes the resource instance handle into the reference field corresponding to the component instance. It reads the object instance with an empty parent object reference field as the root object instance, gathers the object instances according to the object reconstruction sequence, gathers the component instances according to the component list of the object instance, and gathers the resource instances according to the reference fields of the component instances. It writes the root object instance, object instances, component instances, resource instances, and the relationships between instances into the same scene instance container to generate the reconstructed instance.
[0030] In this embodiment, the step of preserving off-map instances and reconstructing sub-maps to output 3D scene reconstruction results includes: Verify the object hierarchy, component attachments, resource bindings, and world space transformation matrix to identify anomalous nodes. Specifically, identifying anomalous nodes involves: Read each object node in the trusted scenario dependency graph one by one. If the parent object reference field of the root object node's corresponding object instance is not null, or if the parent object instance of a non-root object node is inconsistent with the starting object node of the trusted hierarchy edge, mark the corresponding object node as an abnormal node. Read each component node one by one and obtain the component instance handle through component instance mapping. If the component instance handle is not written to the component list of the object instance, is written to the component list of more than two object instances, or if the object field it belongs to is inconsistent with the starting object node of the trusted attached edge, mark the corresponding component node as an abnormal node. Read each trusted reference edge one by one and obtain the component instance handle and resource instance handle through component instance mapping and resource instance mapping. When a reference field is empty, the resource instance handle in the reference field is inconsistent, or the field type of the reflected metadata record is inconsistent with the resource type of the resource index record, the corresponding component node and resource node are marked as abnormal nodes. The world space transformation matrix is recalculated according to the object reconstruction sequence. The root object instance uses the local space transformation matrix as the verification matrix, and the non-root object instance uses the world space transformation matrix of the parent object instance and the local space transformation matrix to obtain the verification matrix. The absolute difference between the verification matrix and the world space transformation matrix in the object instance is calculated element by element. If any difference is greater than 0.000001, the corresponding object node is marked as an abnormal node. Duplicate markings are merged and removed to determine the abnormal nodes. Anomaly nodes, successor nodes, and directed edges between nodes are extracted along the dependency direction of the trusted scenario dependency graph to form an influence subgraph. Specifically, the formation of the influence subgraph involves: An abnormal node is written to a queue to be traversed and a set of affected nodes. Nodes in the queue to be traversed are read sequentially. Hierarchical directed edges, attached directed edges, and referenced directed edges starting from the read node are retrieved from the trusted scenario dependency graph. The endpoint node of each directed edge is written to the set of affected nodes. If the endpoint node has not been traversed, it is written to the queue to be traversed; if it has been traversed, it is not written again. The retrieval is repeated until the queue to be traversed is empty, obtaining the abnormal node and all its successor nodes associated along the dependency direction. Directed edges in the trusted scenario dependency graph where both the starting node and the ending node are located in the set of affected nodes are extracted. The set of affected nodes is combined with the extracted directed edges to form an influence subgraph. Retain instances outside the graph and their relationships, remove and regenerate instances corresponding to the affected subgraphs according to their dependencies. Specifically, removing and regenerating instances corresponding to the affected subgraphs according to their dependencies involves: Read the object nodes, component nodes, and resource nodes in the influence subgraph, locate the corresponding instances through instance mapping, and record the boundary relationships between external instances and nodes in the influence subgraph; delete the corresponding instance handles from the child object list and component list of the object instance, clear the resource reference field of the component instance, and remove the corresponding instance and mapping item in the influence subgraph; recreate the object instance according to the dependency order of the trusted layer edges, bind the parent and child layers, and calculate the world space transformation matrix; create component instances according to the trusted attachment edges and attach them to the object instance; reuse or load resource instances according to the trusted reference edges and write them to the reference field; write the regenerated instance handles to the corresponding instance mapping to complete the regeneration of the corresponding instance in the influence subgraph; Connect the regenerated corresponding instance with the off-map instance, restore the object hierarchy, component attachments, resource bindings, and world space transformation matrix, and output the 3D scene reconstruction result. Specifically, the output of the 3D scene reconstruction result includes: Read the boundary relationships one by one, and obtain the handles of the regenerated instances and the off-map instances through instance mapping. When the boundary relationship is hierarchical, write the parent object instance handle into the parent object reference field of the child object instance, and write the child object instance handle into the child object list of the parent object instance. When the boundary relationship is a hook relationship, write the component instance handle into the component list of the object instance, and write the object instance handle into the object field of the component instance. When the boundary relationship is a reference relationship, query the fields in the reflection metadata according to the reference fields and write them into the interface, and write the resource instance handle into the reference field of the component instance. Read the object instances according to the object reconstruction sequence. Copy the local space transformation matrix of the root object instance. For non-root object instances, multiply the world space transformation matrix of the parent object instance with the local space transformation matrix of the current object instance, and write the product matrix into the world space transformation matrix field. Write the regenerated instance and the retained off-map instances into the scene instance container according to the object identifier, component identifier, and resource identifier. Update the root object list and instance mapping, and output the 3D scene reconstruction result containing object instances, component instances, resource instances, and instance relationships.
[0031] refer to Figure 3 A 3D scene reconstruction system based on serialized data includes the following modules: The data parsing module is used to parse scene serialization data, resource indexes and reflection metadata, and generate object records, component records, transformation records and resource reference records; The record verification module is used to verify object relationships, component types and resource identifiers and unify fields, generating standard scenario records and exception identifiers; The dependency graph construction module is used to generate a scenario reconstruction dependency graph based on standard scenario records. The dependency repair module is used to input the standard scene record, the scene reconstruction dependency graph and the anomaly identifier into the improved CompGCN model to generate candidate dependency edges with confidence. The trusted graph generation module is used to filter candidate dependency edges with confidence based on constraints such as hierarchical acyclicity, single component attachment, and resource type matching, and generate a trusted scene dependency graph. The object reconstruction module is used to generate object instances and world space transformation matrices based on the trusted scene dependency graph and transformation records; The component resource recovery module is used to recover components and bind resources based on component records, reflection metadata, resource reference records, and resource indexes, and generate reconstruction instances. The scene verification and reconstruction module is used to verify reconstruction instances and reconstruct influence subgraphs, and output the 3D scene reconstruction results.
[0032] Example 1: To verify the feasibility of this invention in practice, it was applied to the reconstruction of a 3D scene in a digital factory area. The scene serialization data was exported from the scene editing terminal and included 1864 objects, 4276 components, and 913 resource references. The resource index included 326 texture resources, 214 mesh resources, 173 material resources, and 86 script resources. The reflection metadata recorded 42 component types, 368 field names, corresponding field types, and field read / write interfaces. The test data included 24 instances of duplicate object identifiers, 31 instances of missing parent objects, 12 instances of hierarchical loops, 27 instances of abnormal component types, 35 instances of invalid resource identifiers, and 18 instances of resource type mismatches to simulate serialization data corruption.
[0033] The system parses the scene serialization data line by line, grouping fields by object identifier to generate 1864 object records and 1864 transformation records; it groups component types and component fields by component identifier to generate 4276 component records; and it retrieves resource indexes by resource reference identifiers, generating 913 resource reference records. The parsing process takes 0.84 seconds, and 35 resource references that do not match a resource index are marked as null.
[0034] During the record verification phase, the system counts the occurrences of object identifiers and searches the hierarchical path level by level along the parent object identifier, identifying 24 duplicate object identifiers, 31 missing parent object identifiers, and 12 parent-child hierarchical closed loop identifiers. It also searches reflection metadata by component type and field name, identifying 27 component type anomalies and 16 component field type anomalies. Furthermore, it searches the resource index by resource identifier, resource path, and resource type, identifying 35 resource identifier anomalies, 9 resource path anomalies, and 18 resource field type mismatches. The system standardizes field names, field types, and their order, forming a standard scenario record and 172 anomaly identifiers.
[0035] The system establishes 7053 nodes based on objects, components, and resources, 1833 hierarchical directed edges based on the parent object identifier, 4249 attached directed edges based on the belonging object identifier, and 860 reference directed edges based on the referenced component identifier and resource identifier, forming a scene reconstruction dependency graph containing 6942 directed edges.
[0036] The improved CompGCN model is trained using complete historical scene data, with the training, validation, and test sets comprising 70%, 15%, and 15% respectively. Each batch contains 32 scenes, with an initial learning rate of 0.001, and a maximum training duration of 300 epochs. Correct and incorrect dependency edges are configured in a 1:1 ratio. The weights for hierarchical repair error, attachment repair error, reference repair error, and relation embedding consistency error are 0.3, 0.25, 0.25, and 0.2, respectively. Training stops at epoch 186, retaining parameters from epoch 171.
[0037] After improving the CompGCN model by inputting standard scene records, scene reconstruction dependency graphs, and anomaly identifiers, the node relationship initialization layer generates 128-dimensional initial node embeddings and initial relationship embeddings; the scene dependency gated convolutional layer calculates the dependency gate coefficients based on the anomaly identifiers, with an average gate coefficient of 0.78 for anomaly-related edges and 0.34 for normal-related edges; the relationship embedding update layer generates 256-dimensional scene dependency joint embeddings; and the dependency repair multi-branch output layer generates 286 candidate dependency edges with confidence, including 91 hierarchical candidate dependency edges, 108 attachment candidate dependency edges, and 87 reference candidate dependency edges.
[0038] The system retains candidate dependency edges with a confidence level of not less than 0.5 and filters them according to the constraints of hierarchical acyclicity, single component attachment, and resource type matching. It removes 7 edges that form hierarchical closed loops, 19 edges that are repeatedly attached to the same component, and 14 edges that do not match the field type with the resource type, forming a trusted scenario dependency graph containing 1863 trusted hierarchical edges, 4276 trusted attachment edges, and 913 trusted reference edges.
[0039] Based on the trusted scene dependency graph, 1864 object instances are created, and an object reconstruction sequence is generated according to the trusted level edges. After local position, local rotation, and local scaling are written into the object instances, local translation, local rotation, and local scaling matrices are generated. These matrices are multiplied in the order of translation, rotation, and scaling to obtain the local spatial transformation matrix. The root object instance is written into the local spatial transformation matrix, and non-root object instances multiply the world spatial transformation matrix of their parent object instance with their own local spatial transformation matrix, completing the calculation of 1864 world spatial transformation matrices in 0.19 seconds.
[0040] The system queries reflection metadata according to component type, creates 4276 component instances, converts component fields to target field types, and writes them to the component instances. During the resource loading phase, 681 loaded resource instances are reused, and 232 unloaded resources are loaded according to their resource paths. The resource loading time is reduced from 2.63 seconds when reloading all resources to 0.91 seconds. Component instances are attached to their corresponding object instances, and resource instances are written to their corresponding reference fields, forming reconstructed instances.
[0041] The reconstructed instance verification revealed 3 abnormal nodes at the object level, 2 abnormal nodes in component attachment, and 4 abnormal nodes in resource binding. The system extracted the abnormal nodes and all their successor nodes along the dependency direction of the trusted scene dependency graph, resulting in 47 affected nodes and 52 directed edges, forming an influence subgraph. The instances and their relationships corresponding to the 7006 nodes outside the graph remained unchanged. The instances corresponding to the influence subgraph were removed and regenerated according to the trusted dependencies. Local reconstruction took 0.07 seconds, and the entire scene reconstruction took 1.96 seconds.
[0042] On the same batch of test data, the direct serialization recovery method achieved an object-level recovery accuracy of 91.8%, a component attachment accuracy of 93.2%, a resource binding accuracy of 90.6%, and a scene reconstruction time of 4.21s; the traditional CompGCN dependency repair method achieved an object-level recovery accuracy of 96.4%, a component attachment accuracy of 96.9%, a resource binding accuracy of 95.7%, and a scene reconstruction time of 3.74s; the present invention achieved an object-level recovery accuracy of 99.3%, a component attachment accuracy of 99.5%, a resource binding accuracy of 99.1%, a scene reconstruction time of 2.68s, and an abnormal local reconstruction time of 0.07s.
[0043] As can be seen from Example 1, the present invention can reliably repair the object hierarchy, component attachment and resource reference relationship in abnormal serialized data, and limit the local reconstruction range by influencing the subgraph. While improving the accuracy and completeness of 3D scene reconstruction, it reduces the repeated loading of resources and repeated processing of normal instances, thus verifying the engineering feasibility of the present invention in the 3D scene reconstruction task of digital factory area.
[0044] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for reconstructing a 3D scene based on serialized data, characterized in that, include: Obtain scene serialization data, resource indexes, and reflection metadata, and parse them into objects, components, transformations, and resource reference records; Verify object relationships, component types, and resource identifiers; unify fields; and generate standard scenario records and exception identifiers. Using objects, components, and resources recorded in the standard scene as nodes, directed edges are established according to hierarchy, attachment, and reference to generate a scene reconstruction dependency graph; The standard scene record, scene reconstruction dependency graph and anomaly identifier are input into the improved CompGCN model to generate candidate dependency edges with confidence. The improved CompGCN model includes a node relationship initialization layer, a scene dependency gated combination convolutional layer, a relationship embedding update layer and a dependency repair multi-branch output layer. Candidate dependency edges are filtered based on constraints such as hierarchical acyclicity, single component attachment, and resource type matching, and a reliable scenario dependency graph is generated. Based on the trusted scene dependency graph, object instances are created and the hierarchy is restored. The world space transformation matrix is calculated by combining the transformation record. Restore and attach components based on component records and reflected metadata, load and bind resources based on resource reference records and resource indexes, and generate a rebuilt instance; Verify the reconstructed instances, extract abnormal nodes and successor nodes along the trusted scene dependency graph to form an influence subgraph, retain instances outside the graph and reconstruct the subgraph, and output the 3D scene reconstruction results.
2. The method for reconstructing a 3D scene based on serialized data according to claim 1, characterized in that, The parsing into object, component, transformation, and resource reference records includes: Scene serialization data includes object identifier, parent object identifier, object state, component identifier, component type, component fields, local transformations, and resource reference identifiers; resource index includes resource identifier, resource type, resource path, and loading status; reflection metadata includes component type, field name, field type, and field read / write interface; object records include object identifier, parent object identifier, and object state; component records include component identifier, belonging object identifier, component type, and component fields; transformation records include object identifier, local position, local rotation, and local scaling; resource reference records include resource identifier, referencing component identifier, referenced fields, resource type, and resource path. The scene serialization data is divided according to the object identifier, and the parent object identifier and object state are extracted to generate object records; Based on the reflected metadata, match the component type and component fields, and associate the component identifier, the object identifier, and the component fields with the object record to generate the component record; Extract local position, local rotation, and local scaling based on the object identifier and associate them with the object record to generate a transformation record; The resource index is queried by the resource reference identifier, and the resource identifier, resource type and resource path are associated with the reference component identifier and reference field to generate a resource reference record.
3. The method for reconstructing a 3D scene based on serialized data according to claim 1, characterized in that, The generated standard scene record and anomaly identifier include: Verify the uniqueness of object identifiers, the existence of parent object identifiers, and the closed loop of parent-child hierarchy, and generate object relationship verification results; Based on the reflected metadata and resource index, the component type, component fields, resource identifier and resource path are verified, and the resource type is matched with the field type of the referenced field to generate the component resource verification result; The field names, field types, and arrangement order of unified object records, component records, transformation records, and resource reference records are used to generate standard scenario records by associating the unified records. An exception identifier is generated based on the object relationship verification results and component resource verification results. The exception identifier includes an exception object identifier, an exception component identifier, an exception resource identifier, an exception type, and an exception field position.
4. The method for reconstructing a 3D scene based on serialized data according to claim 1, characterized in that, The generated scene reconstruction dependency graph includes: Based on the standard scenario record, create object nodes, component nodes, and resource nodes and write node attributes; Create hierarchical directed edges based on the parent object identifier and mark the root object node; Create directed edges connecting object nodes to component nodes based on their object identifiers, and create directed edges connecting component nodes to resource nodes based on their reference component identifiers. Write the relationship type and dependency direction for each directed edge, summarize each node and directed edge, and generate a scene reconstruction dependency graph.
5. The method for reconstructing a 3D scene based on serialized data according to claim 1, characterized in that, The generation of candidate dependency edges with confidence scores includes: The improved CompGCN model includes a node relationship initialization layer, a scene dependency gated combined convolutional layer, a relationship embedding update layer, and a dependency repair multi-branch output layer connected in sequence. The standard scene record and scene reconstruction dependency graph are input into the node relationship initialization layer. Node attributes are mapped according to node type, and relationship features are mapped according to the relationship type and dependency direction of directed edges to generate initial node embeddings and initial relationship embeddings. The initial node embedding, initial relation embedding, scene reconstruction dependency graph and anomaly label are input into the scene dependency gating combination convolutional layer. Dependency gating coefficients are generated based on the anomaly label. The adjacent node embedding and corresponding relation embedding are combined and weighted to generate scene dependency node embedding. The initial relation embedding and scene dependency node embedding are input relation embedding update layer. The relation embedding is updated according to hierarchical relationship, attachment relationship and reference relationship and the scene dependency node embedding of the corresponding endpoint is merged to generate scene dependency joint embedding. The scene dependency is jointly embedded and the anomaly identifier is input to the dependency repair multi-branch output layer. The relationship scores of object node pairs, object component node pairs and component resource node pairs are calculated through hierarchical repair branches, attached repair branches and reference repair branches to generate candidate dependency edges with confidence. Based on complete historical scene serialization data and correct dependency edges, a training standard scene record, training anomaly identifier, and training scene reconstruction dependency graph are generated and input into the improved CompGCN model. The model parameters are optimized until convergence is achieved by taking hierarchical repair error, attachment repair error, reference repair error, and relation embedding consistency error as joint training objectives, and the model training is completed.
6. The method for reconstructing a 3D scene based on serialized data according to claim 1, characterized in that, The generation of the trusted scene dependency graph includes: The candidate dependency edges with confidence scores are merged with the directed edges without associated anomaly markers in the scene reconstruction dependency graph according to the relationship type to generate a set of dependency edges to be filtered. Filter the hierarchical directed edges in the dependency edge set to be filtered according to the endpoint object node and confidence level, retain one hierarchical directed edge corresponding to each non-root object node and remove edges that form hierarchical closed loops to generate a set of reliable hierarchical edges. Filter the attached directed edges in the set of dependent edges to be filtered by component node and confidence level, retain one edge corresponding to each component node, and generate a set of trusted attached edges; Based on the reflection metadata and resource index, filter the directed edges in the dependency edge set to be filtered that match the field type of the referenced field with the resource type, and generate a set of trustworthy reference edges. By aggregating the sets of nodes, trusted layer edges, trusted attached edges, and trusted reference edges, a trusted scenario dependency graph is generated.
7. The method for reconstructing a 3D scene based on serialized data according to claim 1, characterized in that, The step of creating object instances and restoring the hierarchy based on the trusted scene dependency graph, and calculating the world space transformation matrix in conjunction with the transformation record, includes: Based on the object nodes and object records in the trusted scenario dependency graph, create object instances and establish instance mappings; Based on the trusted hierarchy edges and instance mapping, the parent and child hierarchies are bound and an object reconstruction sequence is generated. Match transformation records according to object identifiers, write local position, local rotation and local scaling into object instances, generate local translation matrix, local rotation matrix and local scaling matrix respectively, and multiply them in sequence to obtain local spatial transformation matrix; Reconstruct the sequence by object, using the local space transformation matrix of the root object instance as the world space transformation matrix, multiply the world space transformation matrix of the parent object instance with the local space transformation matrix of the child object instance, and generate and write the world space transformation matrix of the child object instance.
8. The method for reconstructing a 3D scene based on serialized data according to claim 1, characterized in that, The generated reconstruction instances include: Match object instances based on their object identifiers, query reflection metadata based on component type and create component instances, and establish component instance mappings; Transform component fields based on reflection metadata and write them to the component instance, then attach the component instance to the corresponding object instance; Based on the resource identifier, query the resource index, reuse the loaded resource instance and load the unloaded resource according to the resource path, and establish a resource instance mapping; The component instance and resource instance are matched according to the reference component identifier and resource identifier respectively through component instance mapping and resource instance mapping. The resource instance is written into the reference field, and the object instance, component instance and resource instance are summarized to generate a reconstructed instance.
9. The method for reconstructing a three-dimensional scene based on serialized data according to claim 1, characterized in that, The process of preserving out-of-map instances and reconstructing sub-maps, outputting 3D scene reconstruction results, includes: Verify object hierarchy, component attachment, resource binding, and world space transformation matrix to identify abnormal nodes; Extract abnormal nodes, successor nodes, and directed edges between nodes along the dependency direction of the trusted scenario dependency graph to form an influence subgraph; Preserve instances outside the graph and their relationships, remove and regenerate instances that affect the subgraph according to their dependencies; Connect the regenerated corresponding instance with the off-map instance, restore the object hierarchy, component attachment, resource binding and world space transformation matrix, and output the 3D scene reconstruction result.
10. A three-dimensional scene reconstruction system based on serialized data, comprising performing the three-dimensional scene reconstruction method based on serialized data as described in any one of claims 1 to 9, characterized in that, Includes the following modules: The data parsing module is used to parse scene serialization data, resource indexes and reflection metadata, and generate object records, component records, transformation records and resource reference records; The record verification module is used to verify object relationships, component types and resource identifiers and unify fields, generating standard scenario records and exception identifiers; The dependency graph construction module is used to generate a scenario reconstruction dependency graph based on standard scenario records. The dependency repair module is used to input the standard scene record, the scene reconstruction dependency graph and the anomaly identifier into the improved CompGCN model to generate candidate dependency edges with confidence. The trusted graph generation module is used to filter candidate dependency edges with confidence based on constraints such as hierarchical acyclicity, single component attachment, and resource type matching, and generate a trusted scene dependency graph. The object reconstruction module is used to generate object instances and world space transformation matrices based on the trusted scene dependency graph and transformation records; The component resource recovery module is used to recover components and bind resources based on component records, reflection metadata, resource reference records, and resource indexes, and generate reconstruction instances. The scene verification and reconstruction module is used to verify reconstruction instances and reconstruct influence subgraphs, and output the 3D scene reconstruction results.
