Resource integration method and system in meta universe scene construction based on efficient engine
By establishing a resource organizational structure chart, analyzing user interaction data, generating resource loading sequences and establishing resource index trees in the construction of metaverse scenarios, intelligent integration and adaptive compression of resources are achieved, and the problem of insufficient resource integration in the existing technology is solved, and resource loading efficiency and system stability are improved.
Patent Information
- Application Number
- CN202510443765.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-04-10
AI Technical Summary
In the construction of metacosmic scenarios, the existing technology has problems such as extensive resource organization methods and lack of refined management, and the resource loading strategy is not intelligent enough and cannot adaptively adjust according to user behavior.
By obtaining the scene resource data of the metaverse scene, classifying and establishing an organizational structure chart, recording the correlation relationship between resources; analyzing the user's historical interaction data based on the deep learning model, predicting the user's next access to the target scene area and obtaining its resource storage location; computing the resource dependency, generating a resource loading sequence, establishing a resource index tree, performing adaptive compression, and starting an alternate channel when resource loading is abnormal.
It improves resource loading efficiency, optimizes resource storage and utilization, enhances system stability, and improves user experience and system fault tolerance.
Smart Images

Figure CN119961655A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to metaverse technology, and in particular to a resource integration method and system in building a metaverse scene based on an efficient engine. Background Art
[0002] In the construction of Metaverse scenes, resource integration is a crucial link, which directly affects the scene loading speed, rendering efficiency and user experience. To build an immersive and smooth Metaverse world, it is necessary to process a large amount of scene resource data, including models, textures, sound effects, animations, etc. These resources are not only huge in number, but also have complex dependencies between each other. How to effectively organize, manage and load these resources is a major challenge facing the current development of Metaverse technology.
[0003] However, the existing technology has the following deficiencies in resource integration: First, the resource organization method is relatively extensive, lacking refined management of the relationship between resources. Traditional methods usually use simple folders or database structures to store resources, which makes it difficult to clearly express the dependency relationship between resources, resulting in omissions or errors in the resource loading process, reducing the efficiency of scene rendering.
[0004] Second, the resource loading strategy is not smart enough and cannot be adjusted adaptively according to user behavior. Existing resource loading methods often use preloading or on-demand loading strategies, which cannot predict the user's next behavior based on the user's historical interaction data, resulting in users having to wait for a long time to see the target scene, affecting the user experience. Summary of the invention
[0005] The embodiments of the present invention provide methods and systems that can solve the problems in the prior art.
[0006] A first aspect of an embodiment of the present invention provides a resource integration method in building a metaverse scene based on an efficient engine, comprising: Acquire scene resource data in the metaverse scene, classify the scene resource data according to data types, establish an organizational structure chart of the scene resource data, and record the association relationship between the scene resource data in the organizational structure chart; classify the scene resource data according to the association degree and usage frequency of the scene resource data, and store the scene resource data in a storage area of a corresponding level; Analyze the user's historical interaction data in the metaverse scene based on the deep learning model, output the target scene area that the user will visit next, and obtain the storage location information of the scene resource data corresponding to the target scene area; Calculating the resource dependency relationship of the target scene area based on the organizational structure chart and generating a resource loading sequence; establishing a resource index tree according to the resource loading sequence, recording the hierarchical relationship and association degree between scene resources in the resource index tree, and adaptively compressing the scene resources based on the resource index tree, wherein the compression ratio is inversely proportional to the resource association degree, and the higher the association degree of the resource, the lower the compression ratio; Monitor the loading status of scene resources in real time. When abnormal scene resource loading is detected, start the resource loading backup channel and obtain the backup data of the abnormal resources through the backup channel; output the integrated scene resource data to the Metaverse scene rendering engine for real-time rendering of the Metaverse scene.
[0007] The scene resource data are classified according to data types, and an organizational structure chart of the scene resource data is established. The association relationship between the scene resource data is recorded in the organizational structure chart, including: Divide the scene resource data into geometric data, material data, environment data and interaction data according to data representation forms, wherein the geometric data includes model mesh data and vertex coordinate data, the material data includes material map data and normal map data, the environment data includes lighting information data and shadow information data, and the interaction data includes collision body data and trigger data; Dividing the scene resource data into basic element layer data, combined element layer data and scene element layer data according to data granularity, wherein the basic element layer data includes single model data and single texture data, the combined element layer data includes model combination data and material combination data, and the scene element layer data includes complete scene unit data; Calculate the association strength between scene resource data; construct an organizational structure chart of the scene resource data based on the association strength, use the scene resource data as nodes in the organizational structure chart of the scene resource data, use the association relationship between the scene resource data as a connecting edge, and the weight of the connecting edge is determined by the association strength.
[0008] Analyzing the historical interaction data of the user in the metaverse scene based on the deep learning model, outputting the target scene area that the user will visit next, and obtaining the storage location information of the scene resource data corresponding to the target scene area includes: Acquire historical interaction data of the user in the metaverse scene, wherein the historical interaction data includes spatiotemporal dimension feature data and interactive behavior feature data, wherein the spatiotemporal dimension feature data includes user movement trajectory sequence data and scene residence time distribution data, and the interactive behavior feature data includes operation sequence encoding data and interaction intensity matrix data; The historical interaction data is processed using a bidirectional long short-term memory network, time series features are obtained through a combination of a forward hidden state and a backward hidden state, and the time series features are weightedly fused through learnable parameters to obtain fused time series feature data; Building a user interest model based on a multi-head self-attention mechanism, mapping the fused time series feature data into a query matrix, a key matrix, and a value matrix, calculating the attention weight distribution, and obtaining the user interest feature data through multi-head splicing; Performing feature fusion on the fused time series feature data and the user interest feature data to obtain scene prediction feature data; The scene prediction feature data is processed using a multi-layer perceptron to output a predicted probability distribution of the target scene.
[0009] Calculating the resource dependency of the target scene area based on the organizational structure chart to generate a resource loading sequence; establishing a resource index tree based on the resource loading sequence, recording the hierarchical relationship and association degree between scene resources in the resource index tree, and adaptively compressing the scene resources based on the resource index tree includes: Calculating the dependency strength between scene resources based on the scene resource data, wherein the dependency strength is obtained by weighted calculation of functional dependency, temporal dependency and content dependency, wherein the functional dependency is calculated based on the resource calling data, the temporal dependency is calculated based on the resource loading data, and the content dependency is calculated based on the resource content data; Calculate the resource dependency relationship of the target scene area based on the organizational structure chart, wherein the resource dependency relationship is obtained by multiplying the dependency strength on the dependency transfer path and applying a distance decay function, wherein the distance decay function decreases exponentially with the length of the dependency transfer path; Combining the dependency strength with the resource dependency relationship to obtain a loading priority of a resource node, sorting the resource nodes according to the loading priority, and generating a resource loading sequence; Building a resource index tree based on the resource loading sequence, recording the hierarchical relationship of resource nodes in the resource index tree, and calculating the association metric values between resource nodes; determining a resource compression strategy according to the association metric values; The associated metric value is mapped to a compression ratio through a Sigmoid function; adaptive compression processing is performed on the scene resource according to the compression ratio to obtain compressed scene resource data; The compressed scene resource data is loaded according to the resource loading sequence to achieve optimized loading of scene resources.
[0010] Building a resource index tree based on the resource loading sequence, recording the hierarchical relationship of resource nodes in the resource index tree, and calculating the association metric values between resource nodes; and determining the resource compression strategy according to the association metric values includes: A resource index tree is constructed based on the resource loading sequence, and the level value of the resource node is determined by judging the parent node relationship of the resource node. The level value of the resource node is obtained by recursive calculation. For a resource node that does not have a parent node, the level value is set to zero, and for a resource node that has a parent node, the level value is set to the level value of its parent node plus one; Calculating a resource node weight according to the level value and resource size of the resource node, wherein the resource node weight decays exponentially with the level value, and the resource node weight is positively correlated with the resource size; Calculating the direct association strength between resource nodes, where the direct association strength is obtained by multiplying the intersection-and-union ratio of the resource node connection set by a level difference penalty term, wherein the level difference penalty term maps the level difference to an interval of zero to two through a Sigmoid function; Calculating the path association strength between resource nodes based on the direct association strength, wherein the path association strength is obtained by multiplying the direct association strength on the path by the path attenuation function; Weighting the direct association strength and the path association strength to obtain a comprehensive association metric value between resource nodes; Calculate the balance factor of the resource node in the resource index tree, where the balance factor is the difference between the height of the left subtree and the height of the right subtree of the resource node. When the absolute value of the balance factor is greater than a preset balance threshold, rebalance the resource index tree; Calculating a basic compression rate of the resource node based on the comprehensive association metric value, wherein the basic compression rate maps the difference between the average association degree of the resource node and the global average association degree to an interval of zero to one through a Sigmoid function; The basic compression rate is adaptively adjusted according to the resource node weight to obtain an adaptive compression rate, and the adaptive compression rate decreases as the resource node weight increases.
[0011] When a scene resource loading anomaly is detected, the resource loading backup channel is started, and the backup data of the abnormal resource is obtained through the backup channel; the integrated scene resource data is output to the Metaverse scene rendering engine, including: Priority calculation is performed on multiple backup channels, where the priority is obtained by inputting channel bandwidth, channel reliability, and channel delay into a Sigmoid function, and a backup channel with the highest priority is selected to load abnormal resources; Acquire backup data of the abnormal resource from the backup channel, and calculate a consistency check value between the abnormal resource and the backup data, wherein the consistency check value is calculated based on a difference in hash values between the abnormal resource and the backup data; When the consistency check value is less than a preset consistency threshold, the backup data is used as replacement data for the abnormal resource; when the consistency check value is not less than the preset consistency threshold, data merging is performed on the abnormal resource and the backup data to obtain replacement data; Calculating an integrity evaluation value of the scene resource data, wherein the integrity evaluation value is a ratio of the effective data amount of the scene resource data to the expected data amount; calculating a rendering adaptability of the scene resource data, wherein the rendering adaptability is calculated based on a difference between a resource format parameter and a target format parameter; Under the constraint that the integrity assessment value is not lower than the minimum integrity threshold and the rendering adaptability is not lower than the minimum adaptability threshold, the scene resource data is output to the Metaverse scene rendering engine.
[0012] A second aspect of an embodiment of the present invention provides a resource integration system in building a metaverse scene based on an efficient engine, including: The first unit is used to obtain scene resource data in the metaverse scene, classify the scene resource data according to data types, establish an organizational structure chart of the scene resource data, and record the association relationship between the scene resource data in the organizational structure chart; classify the scene resource data according to the association degree and usage frequency of the scene resource data, and store the scene resource data in a storage area of a corresponding level; The second unit is used to analyze the historical interaction data of the user in the metaverse scene based on the deep learning model, output the target scene area that the user will visit next, and obtain the storage location information of the scene resource data corresponding to the target scene area; The third unit is used to calculate the resource dependency relationship of the target scene area based on the organizational structure chart and generate a resource loading sequence; establish a resource index tree according to the resource loading sequence, record the hierarchical relationship and correlation degree between scene resources in the resource index tree, and adaptively compress the scene resources based on the resource index tree, wherein the compression ratio is inversely proportional to the resource correlation degree, and the higher the correlation degree of the resource, the lower the compression ratio; The fourth unit is used to monitor the loading status of scene resources in real time. When an abnormality in scene resource loading is detected, the resource loading backup channel is started to obtain the backup data of the abnormal resources through the backup channel; the integrated scene resource data is output to the Metaverse scene rendering engine for real-time rendering of the Metaverse scene.
[0013] According to a third aspect of the embodiments of the present invention, An electronic device is provided, comprising: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0014] A fourth aspect of the embodiments of the present invention is: A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0015] The beneficial effects of this application are as follows: 1. Improve resource loading efficiency: By analyzing historical user interaction data to predict user behavior, preload resources in the target scene area, and generate a loading sequence based on resource dependencies, unnecessary resource loading is avoided, thereby shortening scene loading time and improving user experience.
[0016] 2. Optimize resource storage and utilization: Perform hierarchical storage based on resource association and usage frequency, and perform adaptive compression based on the resource index tree, which reduces storage space usage and improves resource utilization.
[0017] 3. Enhance system stability: Real-time monitoring of resource loading status and activation of backup channels when loading is abnormal ensures the stability and smoothness of scene rendering and improves the system's fault tolerance. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a flowchart of a resource integration method in building a metaverse scene based on an efficient engine according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the adaptive compression process of Metaverse scene resources; Figure 3 This is a diagram showing the distribution of resource loading time. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0021] Figure 1 Schematic diagram of the process of resource integration method in building a metaverse scene based on an efficient engine according to an embodiment of the present invention. Figure 1 As shown, the method includes: Acquire scene resource data in the metaverse scene, classify the scene resource data according to data types, establish an organizational structure chart of the scene resource data, and record the association relationship between the scene resource data in the organizational structure chart; classify the scene resource data according to the association degree and usage frequency of the scene resource data, and store the scene resource data in a storage area of a corresponding level; Analyze the user's historical interaction data in the metaverse scene based on the deep learning model, output the target scene area that the user will visit next, and obtain the storage location information of the scene resource data corresponding to the target scene area; Calculating the resource dependency relationship of the target scene area based on the organizational structure chart and generating a resource loading sequence; establishing a resource index tree according to the resource loading sequence, recording the hierarchical relationship and association degree between scene resources in the resource index tree, and adaptively compressing the scene resources based on the resource index tree, wherein the compression ratio is inversely proportional to the resource association degree, and the higher the association degree of the resource, the lower the compression ratio; Monitor the loading status of scene resources in real time. When abnormal scene resource loading is detected, start the resource loading backup channel and obtain the backup data of the abnormal resources through the backup channel; output the integrated scene resource data to the Metaverse scene rendering engine for real-time rendering of the Metaverse scene.
[0022] In an optional implementation, the scene resource data is classified according to data type, and an organizational structure chart of the scene resource data is established, wherein the association relationship between the scene resource data is recorded in the organizational structure chart, including: Divide the scene resource data into geometric data, material data, environment data and interaction data according to data representation forms, wherein the geometric data includes model mesh data and vertex coordinate data, the material data includes material map data and normal map data, the environment data includes lighting information data and shadow information data, and the interaction data includes collision body data and trigger data; Dividing the scene resource data into basic element layer data, combined element layer data and scene element layer data according to data granularity, wherein the basic element layer data includes single model data and single texture data, the combined element layer data includes model combination data and material combination data, and the scene element layer data includes complete scene unit data; Calculate the association strength between scene resource data; construct an organizational structure chart of the scene resource data based on the association strength, use the scene resource data as nodes in the organizational structure chart of the scene resource data, use the association relationship between the scene resource data as a connecting edge, and the weight of the connecting edge is determined by the association strength.
[0023] The scene resource data is divided into four categories: geometry data, material data, environment data, and interaction data. Geometry data includes model mesh data and vertex coordinate data; material data includes material map data and normal map data; environment data includes lighting information data and shadow information data; interaction data includes collision body data and trigger data.
[0024] For example, for a virtual city scene, the geometric data may include the 3D model mesh and vertex coordinates of the building; the material data may include the material map and normal map of the building surface; the environmental data may include the daylight lighting information in the city and the shadow information cast by the building; the interaction data may include the collision volume of the building and the trigger area for entering the building.
[0025] The scene resource data is divided into three levels: basic element layer data, combined element layer data and scene element layer data. The basic element layer data includes single model data and single texture data; the combined element layer data includes model combination data and material combination data; the scene element layer data includes complete scene unit data.
[0026] Taking the virtual city scene as an example, the basic element layer data can be the model of a single building or a map of a single building surface; the combined element layer data can be a block model combination composed of multiple buildings or a building appearance formed by a combination of multiple materials; the scene element layer data can be a complete urban area, including multiple blocks, roads, green spaces and other elements.
[0027] The strength of association can be calculated as follows: For two scene resource data A and B, first determine the type of association between them. The association type can be a containment relationship, a reference relationship, or an adjacency relationship. A containment relationship means that one data contains another data, such as a scene element containing a composite element; a reference relationship means that one data references another data, such as a model references a material; an adjacency relationship means that two data are adjacent in the scene, such as two building models are adjacent in space.
[0028] Then, assign a basic weight value based on the type of association. The basic weight of a containment relationship can be set to 0.8, the basic weight of a reference relationship can be set to 0.6, and the basic weight of an adjacency relationship can be set to 0.4.
[0029] If data A and B are both frequently used data (such as main building models or commonly used materials), the frequency factor can be set to 1.2; if they are medium-frequency data, the frequency factor can be set to 1.0; if they are low-frequency data, the frequency factor can be set to 0.8.
[0030] If the spatial distance between data A and B in the scene is very close, the distance factor can be set to 1.2; if the distance is moderate, the distance factor can be set to 1.0; if the distance is far, the distance factor can be set to 0.8.
[0031] Multiply the basic weight by the frequency factor and the distance factor to get the final association strength value. For example, if the building model A and material B are in a reference relationship (basic weight 0.6), and both are high-frequency data (frequency factor 1.2), and the spatial distance is moderate (distance factor 1.0), then the association strength between them is 0.6×1.2×1.0=0.72.
[0032] Based on the calculated association strength, an organizational structure diagram of the scene resource data is constructed. In the organizational structure diagram, the scene resource data is used as a node, the association relationship between the scene resource data is used as a connection edge, and the weight of the connection edge is determined by the association strength.
[0033] In specific implementation, a graph data structure can be used to represent the organizational chart. Each node contains the following attributes: node ID, data type (geometric data, material data, environmental data or interactive data), data granularity (basic element layer, composite element layer or scene element layer), data content description, storage location, etc. Each edge contains the following attributes: starting node ID, target node ID, association type, association strength value, etc.
[0034] Taking the virtual city scene as an example, suppose there is a building model node A (geometry data, basic element layer) and a material map node B (material data, basic element layer), and there is a reference relationship between them with an association strength of 0.72. In the organizational chart, there will be a directed edge with a weight of 0.72 between nodes A and B, indicating that A references B.
[0035] To optimize the organizational chart, you can set a threshold for the strength of association and only keep the edges with a strength greater than the threshold. For example, if you set the threshold to 0.5, only the relationships with a strength greater than 0.5 will be displayed in the organizational chart. This can reduce the complexity of the chart and highlight important relationships.
[0036] In addition, the organizational chart can be displayed in different views according to different application scenarios. For example, only the association relationship between geometric data can be displayed, or only the association relationship from the basic element layer to the composite element layer can be displayed to meet different analysis needs.
[0037] The scene resource data organization chart constructed by the above method can clearly display the relationship between scene resource data, which is helpful for the management, optimization and reuse of scene resources and improves the efficiency and quality of scene construction.
[0038] In an optional implementation, grading the scene resource data according to the relevance degree and usage frequency of the scene resource data, and storing the scene resource data in a storage area of a corresponding level includes: Calculate the priority index of the scene resource data, wherein the priority index is obtained by weighting a usage frequency factor, a calculation complexity factor, and a correlation factor, wherein the usage frequency factor is determined according to the number of accesses, the calculation complexity factor is determined according to the resource processing overhead, and the correlation factor is determined according to the average correlation strength; The scene resource data are divided into storage areas of different levels according to the priority index, the scene resource data with a priority index greater than the first classification threshold is stored in a high priority storage area, the scene resource data with a priority index greater than the second classification threshold and less than the first classification threshold is stored in a medium priority storage area, and the scene resource data with a priority index less than the second classification threshold is stored in a low priority storage area.
[0039] The system obtains relevant information about scene resource data, including usage frequency, computational complexity, and correlation with other resources. Based on this information, the system calculates the priority index of each scene resource data and allocates the data to storage areas of different levels according to the index.
[0040] The priority index is a comprehensive score calculated by weighting the frequency factor, computational complexity factor, and relevance factor. The specific calculation method is as follows: The priority index is calculated by weighted average, that is, the frequency factor, computational complexity factor, and relevance factor are multiplied by the corresponding weight coefficients and then added. In actual applications, the weight of each factor can be adjusted according to the specific scenario. For example, in a typical configuration, the weight of the frequency factor is 0.5, the weight of the computational complexity factor is 0.3, and the weight of the relevance factor is 0.2.
[0041] The usage frequency factor is determined based on the number of times the scene resource data is accessed. The system records the number of times each resource is accessed within a period of time (such as 30 days) and normalizes it to a value between 0 and 1.
[0042] In the specific implementation, the system first counts the number of visits to all resources and finds the maximum number of visits max_Count and minimum number of visits min_Count Then, for the number of visits count The frequency factor of resources is calculated as: count - min_Count) / (max_Count - min_Count) .
[0043] For example, suppose that in the past 30 days, resource A was accessed 500 times, resource B was accessed 100 times, and resource C was accessed 50 times. The maximum number of accesses is 500, and the minimum number of accesses is 50. Then the usage frequency factor of resource A is (500-50) / (500-50)=1, the usage frequency factor of resource B is (100-50) / (500-50)=0.11, and the usage frequency factor of resource C is (50-50) / (500-50)=0.
[0044] The computational complexity factor is determined based on the computational overhead required to process the resource. The system records metrics such as the average CPU time and memory usage required to process each resource and combines them into a complexity score.
[0045] In specific implementation, the system can record the CPU usage time (milliseconds) and memory usage peak (MB) when processing resources. Assuming the CPU time weight is 0.6 and the memory usage weight is 0.4, the complexity score is: 0.6 × CPU time + 0.4 × memory usage. Then, the system finds the maximum complexity score among all resources. max_Complexity and minimum complexity score min_Complexity , for the complexity score complexity The computational complexity factor of the resource is: complexity - min_Complexity ) / ( max_Complexity - min_Complexity ).
[0046] For example, resource A takes 200 milliseconds of CPU time and uses 150MB of memory, so its complexity score is 0.6×200+0.4×150=180. Resource B has a complexity score of 120 and resource C has a complexity score of 90. The maximum complexity score is 180 and the minimum complexity score is 90. So the computational complexity factor of resource A is (180-90) / (180-90)=1, the computational complexity factor of resource B is (120-90) / (180-90)=0.33, and the computational complexity factor of resource C is (90-90) / (180-90)=0.
[0047] The association factor is determined based on the average association strength between the scene resource data and other resources. The system analyzes the reference relationship between resources and calculates the average association strength of each resource.
[0048] In specific implementation, the system builds an association graph between resources, recording the number of times each resource is referenced by other resources and the number of times it references other resources. For each pair of related resources, the system calculates the association strength (ranging from 0 to 1) based on indicators such as reference frequency and common access frequency. Then, for each resource, the average of its association strengths with all related resources is calculated as the average association strength of the resource.
[0049] For example, if the association strength of resource A with resource D is 0.8, the association strength with resource E is 0.6, and the association strength with resource F is 0.4, then the average association strength of resource A is (0.8+0.6+0.4) / 3=0.6. Assuming that the maximum average association strength among all resources is 0.8 and the minimum average association strength is 0.2, the association factor of resource A is (0.6-0.2) / (0.8-0.2)=0.67.
[0050] Based on the calculated priority index, the system divides the scene resource data into storage areas of different levels: 1. High-priority storage area: It stores scene resource data with a priority index greater than the first classification threshold. This data is usually accessed frequently, has high computational complexity, or is highly associated with other resources, and requires fast access. High-priority storage areas usually use high-speed solid-state drives or memory caches to provide the best read and write performance.
[0051] 2. Medium priority storage area: scene resource data with a storage priority index greater than the second classification threshold and less than the first classification threshold. The access requirements for this data are moderate and can be stored on ordinary solid-state drives or high-performance mechanical hard drives.
[0052] 3. Low-priority storage area: scene resource data with a storage priority index less than the second classification threshold. These data have low access frequency, low computational complexity or low correlation, and can be stored in large-capacity mechanical hard disks or cloud storage.
[0053] In practical applications, the first classification threshold and the second classification threshold can be adjusted according to system resources and performance requirements. For example, the first classification threshold can be set to 0.7 and the second classification threshold can be set to 0.3.
[0054] The following is a specific implementation case, showing the process of hierarchical storage of scene resource data: Assume that there are 10 scene resource data (R1 to R10), the system collects their usage frequency, computational complexity, and correlation information, and calculates the corresponding factor values: R1: usage frequency factor = 0.9, computational complexity factor = 0.8, correlation factor = 0.7; R2: usage frequency factor = 0.8, computational complexity factor = 0.7, correlation factor = 0.6; R3: usage frequency factor = 0.7, computational complexity factor = 0.6, correlation factor = 0.5; R4: usage frequency factor = 0.6, computational complexity factor = 0.5, correlation factor = 0.4; R5: usage frequency factor = 0.5, computational complexity factor = 0.4, correlation factor = 0.3; R6: usage frequency factor = 0.4, computational complexity factor = 0.3, relevance factor = 0.2; R7: usage frequency factor = 0.3, computational complexity factor = 0.2, correlation factor = 0.1; R8: usage frequency factor = 0.2, computational complexity factor = 0.1, correlation factor = 0.0; R9: usage frequency factor = 0.1, computational complexity factor = 0.0, correlation factor = 0.0; R10: usage frequency factor = 0.0, calculation complexity factor = 0.0, correlation factor = 0.0; Use weight configuration: frequency factor weight = 0.5, calculation complexity factor weight = 0.3, correlation factor weight = 0.2, calculate the priority index of each resource: R1 priority index: 0.5×0.9 + 0.3×0.8 + 0.2×0.7 = 0.83; R2 priority index: 0.5×0.8 + 0.3×0.7 + 0.2×0.6 = 0.73; R3 priority index: 0.5×0.7 + 0.3×0.6 + 0.2×0.5 = 0.63 R4 priority index: 0.5×0.6 + 0.3×0.5 + 0.2×0.4 = 0.53; R5 priority index: 0.5×0.5 + 0.3×0.4 + 0.2×0.3 = 0.43; R6 priority index: 0.5×0.4 + 0.3×0.3 + 0.2×0.2 = 0.33; R7 priority index: 0.5×0.3 + 0.3×0.2 + 0.2×0.1 = 0.23; R8 priority index: 0.5×0.2 + 0.3×0.1 + 0.2×0.0 = 0.13; R9 priority index: 0.5×0.1 + 0.3×0.0 + 0.2×0.0 = 0.05; R10 priority index: 0.5×0.0 + 0.3×0.0 + 0.2×0.0 = 0.00; If the first classification threshold is set to 0.7 and the second classification threshold is set to 0.3, the resource allocation is as follows: High priority storage area: R1 (0.83), R2 (0.73); Medium priority storage area: R3 (0.63), R4 (0.53), R5 (0.43), R6 (0.33); Low priority storage area: R7 (0.23), R8 (0.13), R9 (0.05), R10 (0.00); Through this hierarchical storage method, the system can store resources in appropriate storage media according to their importance and access requirements, thereby optimizing system performance and resource utilization.
[0055] In an optional implementation, analyzing the historical interaction data of the user in the metaverse scene based on the deep learning model, outputting the target scene area that the user will visit next, and obtaining the storage location information of the scene resource data corresponding to the target scene area includes: Acquire historical interaction data of the user in the metaverse scene, wherein the historical interaction data includes spatiotemporal dimension feature data and interactive behavior feature data, wherein the spatiotemporal dimension feature data includes user movement trajectory sequence data and scene residence time distribution data, and the interactive behavior feature data includes operation sequence encoding data and interaction intensity matrix data; The historical interaction data is processed using a bidirectional long short-term memory network, time series features are obtained through a combination of a forward hidden state and a backward hidden state, and the time series features are weightedly fused through learnable parameters to obtain fused time series feature data; Building a user interest model based on a multi-head self-attention mechanism, mapping the fused time series feature data into a query matrix, a key matrix, and a value matrix, calculating the attention weight distribution, and obtaining the user interest feature data through multi-head splicing; Performing feature fusion on the fused time series feature data and the user interest feature data to obtain scene prediction feature data; The scene prediction feature data is processed using a multi-layer perceptron to output a predicted probability distribution of the target scene.
[0056] Historical interaction data mainly includes two categories: spatiotemporal dimension feature data and interactive behavior feature data. The spatiotemporal dimension feature data includes user movement trajectory sequence data and scene dwell time distribution data; the interactive behavior feature data includes operation sequence encoding data and interactive intensity matrix data.
[0057] The user movement trajectory sequence data records the user's position change information in the metaverse scene, which can be expressed as a series of three-dimensional coordinate points (x, y, z) and the corresponding timestamp t. For example, the movement trajectory of a user in the "Science and Technology Museum" scene can be recorded as: [(125.3, 67.8, 0.0, 1623401256), (126.5, 70.2, 0.0, 1623401262),...], indicating the user's spatial position at different time points.
[0058] The scene dwell time distribution data records the length of time users stay in each scene area, which can be expressed as a mapping relationship between area identifiers and dwell time. For example: {"Technology Exhibition Area A": 325, "Interactive Experience Area B": 178, "Rest Area C": 42}, in seconds.
[0059] The operation sequence encoding data records the user's interactive operations and encodes different types of operations into numerical values. For example, the click operation is encoded as 1, the drag operation is encoded as 2, and the zoom operation is encoded as 3, forming an operation sequence such as [1, 1, 3, 2, 1,...].
[0060] The interaction intensity matrix data records the interaction frequency and intensity between the user and each interactive object in the scene, and is constructed in a matrix form. For example, the interaction intensity between the user and "Technology Exhibit D" is 0.85, and the interaction intensity with the "Virtual Tour Guide" is 0.32, etc.
[0061] The bidirectional long short-term memory network (BiLSTM) is used to process historical interaction data and extract temporal features. The BiLSTM network contains two directions, forward LSTM and backward LSTM, which can consider historical and future contextual information at the same time.
[0062] In the specific implementation, the user's historical interaction data is organized into a sequence in chronological order and input into the BiLSTM network. The forward LSTM starts processing from the beginning of the sequence to generate a forward hidden state sequence; the backward LSTM starts processing from the end of the sequence to generate a backward hidden state sequence. For each time step t in the sequence, the corresponding forward hidden state and backward hidden state are concatenated to obtain the BiLSTM output of the time step.
[0063] For example, suppose the hidden state of the forward LSTM at time step t is [0.32, 0.45, 0.67, 0.21], and the hidden state of the backward LSTM at the same time step is [0.56, 0.23, 0.78, 0.44], then the output of the BiLSTM at that time step is [0.32, 0.45, 0.67, 0.21, 0.56, 0.23, 0.78, 0.44].
[0064] In order to perform weighted fusion of features at different time steps, a learnable attention parameter is introduced. The attention score of each time step is calculated, and the score is normalized as a weight, multiplied with the BiLSTM output of the corresponding time step and summed to obtain the fused time series feature data.
[0065] For example, assuming that the sequence length is 5 and the attention weights of each time step are [0.15, 0.25, 0.30, 0.20, 0.10], the fused time series feature is the weighted sum of the BiLSTM outputs at each time step.
[0066] The fused time series feature data is mapped into query matrix (Q), key matrix (K) and value matrix (V) through linear transformation.
[0067] In the multi-head self-attention mechanism, the fused time series feature data is first copied into h copies (h is the number of attention heads, for example, h=8), and each copy is transformed into a different query, key, and value matrix through different linear transformations. For each attention head, the dot product of the query matrix and the key matrix is calculated, and then scaled and Softmax normalized to obtain the attention weight. The attention weight is multiplied by the value matrix to obtain the output of the attention head. Finally, the outputs of all attention heads are concatenated and transformed through a linear transformation to obtain the final output of the multi-head self-attention, that is, the user interest feature data.
[0068] For example, assuming that the dimension of the fused temporal feature is 64, 8 attention heads are set, and the output dimension of each head is 8, then the final output dimension of the multi-head self-attention is 64 (8×8).
[0069] The fused time series feature data and the user interest feature data are fused to obtain scene prediction feature data. Feature fusion can be achieved through splicing, addition or gating mechanism. In this embodiment, splicing followed by a fully connected layer is used for fusion.
[0070] Specifically, the fused time series feature data and the user interest feature data are spliced in the feature dimension to obtain spliced features. Then, the spliced features are nonlinearly transformed through the fully connected layer to obtain scene prediction feature data.
[0071] For example, assuming that the dimension of the fused time series feature is 64 and the dimension of the user interest feature is 64, the dimension of the concatenated feature is 128. The 128-dimensional feature is mapped to 96 dimensions through the fully connected layer to obtain the scene prediction feature data.
[0072] The scene prediction feature data is processed using a multi-layer perceptron (MLP) to output the predicted probability distribution of the target scene. The multi-layer perceptron consists of multiple fully connected layers, with nonlinear activation functions added between each layer.
[0073] In the specific implementation, the multilayer perceptron contains two hidden layers and one output layer. The first hidden layer maps the 96-dimensional scene prediction features to 64 dimensions, the second hidden layer maps the 64-dimensional features to 32 dimensions, and the output layer maps the 32-dimensional features to a vector of the number of scene regions. The Softmax function is applied to the output vector to obtain the predicted probability distribution of each scene region.
[0074] For example, assuming that the metaverse scene contains 10 regions, the dimension of the output layer is 10. After being processed by the Softmax function, the predicted probability distribution may be [0.05, 0.12, 0.03, 0.42, 0.08, 0.07, 0.06, 0.09, 0.04, 0.04], indicating that the probability of the user visiting the fourth scene area next is the highest, which is 0.42.
[0075] According to the predicted probability distribution, the scene area with the highest probability is selected as the target scene area that the user will visit next. Then, the pre-established scene resource mapping table is queried to obtain the scene resource data storage location information corresponding to the target scene area.
[0076] The scene resource mapping table stores the correspondence between scene areas and resource storage locations, for example: {"Technology Exhibition Area A": "cdn: / / resources / tech_zone_a / ", "Interactive Experience Area B": "cdn: / / resources / interactive_zone_b / "}.
[0077] Through the above method, it is possible to predict the target scene area that the user will visit next based on the user's historical interaction data, and obtain the corresponding scene resource data in advance, thereby optimizing the resource loading process and improving the user's interactive experience in the metaverse scene.
[0078] In an optional implementation, the resource dependency relationship of the target scene area is calculated based on the organizational structure chart to generate a resource loading sequence; a resource index tree is established according to the resource loading sequence, and the hierarchical relationship and degree of association between scene resources are recorded in the resource index tree; and the scene resources are adaptively compressed based on the resource index tree, including: Calculating the dependency strength between scene resources based on the scene resource data, wherein the dependency strength is obtained by weighted calculation of functional dependency, temporal dependency and content dependency, wherein the functional dependency is calculated based on the resource calling data, the temporal dependency is calculated based on the resource loading data, and the content dependency is calculated based on the resource content data; Calculate the resource dependency relationship of the target scene area based on the organizational structure chart, wherein the resource dependency relationship is obtained by multiplying the dependency strength on the dependency transfer path and applying a distance decay function, wherein the distance decay function decreases exponentially with the length of the dependency transfer path; Combining the dependency strength with the resource dependency relationship to obtain a loading priority of a resource node, sorting the resource nodes according to the loading priority, and generating a resource loading sequence; Building a resource index tree based on the resource loading sequence, recording the hierarchical relationship of resource nodes in the resource index tree, and calculating the association metric values between resource nodes; determining a resource compression strategy according to the association metric values; The associated metric value is mapped to a compression ratio through a Sigmoid function; adaptive compression processing is performed on the scene resource according to the compression ratio to obtain compressed scene resource data; The compressed scene resource data is loaded according to the resource loading sequence to achieve optimized loading of scene resources.
[0079] Figure 2 This is a schematic diagram of the adaptive compression process of Metaverse scene resources. For example, the organizational chart is a data structure that describes the organizational relationship between scene resources, including the connection relationship between nodes. In practical applications, taking the game scene as an example, the organizational chart can be represented as a directed graph, where nodes represent scene resources (such as models, textures, sound effects, etc.) and edges represent the dependency relationship between resources.
[0080] Calculating the dependency strength between scene resources is a key step. The dependency strength is calculated by weighted calculation of functional dependency, temporal dependency, and content dependency. Specifically, functional dependency is calculated based on resource call data, such as the ratio of the number of times resource A is called by resource B to the total number of times B is called; temporal dependency is calculated based on resource loading data, such as the inverse of the loading time interval between resource A and resource B; content dependency is calculated based on resource content data, such as the content similarity between resource A and resource B.
[0081] Taking a game scene as an example, assuming that texture resource T1 is called 10 times by model resource M1, and the total number of calls of M1 is 20 times, then the functional dependency of T1 on M1 is 0.5; the loading time interval between T1 and M1 is 0.2 seconds, then the timing dependency is 5; the content similarity between T1 and M1 is 0.3, then the content dependency is 0.3. If the weights of the three are 0.5, 0.3, and 0.2 respectively, then the dependency strength of T1 on M1 is 0.5×0.5+0.3×5+0.2×0.3=1.91.
[0082] Resource dependencies are obtained by multiplying the dependency strengths on the dependency transfer path and applying a distance decay function. The distance decay function decreases exponentially with the length of the dependency transfer path and can be expressed as the decay factor raised to the power of the path length. For example, if the decay factor is 0.8, the path length from resource A to resource C is 2 (A depends on B, B depends on C), the dependency strength of A on B is 1.5, and the dependency strength of B on C is 2.0, then the resource dependency of A on C is 1.5×2.0×0.8²=1.92.
[0083] The dependency strength and resource dependency are combined to obtain the loading priority of the resource node. The combination method can be weighted summation, such as priority = 0.6 × dependency strength + 0.4 × resource dependency. Sort the resource nodes according to the loading priority to generate a resource loading sequence. For example, if the scene contains resources A, B, and C, and their loading priorities are 8.5, 6.2, and 9.1 respectively, the resource loading sequence is C→A→B.
[0084] A resource index tree is constructed based on the resource loading sequence, and the hierarchical relationship of resource nodes is recorded in the resource index tree. The resource index tree is a tree data structure, where the root node is the resource with the highest priority, and the child node is the resource that has a direct dependency relationship with the parent node. In the resource index tree, the association metric between resource nodes is calculated. The association metric can be calculated based on factors such as the shortest path distance between nodes and the number of commonly dependent resources.
[0085] Taking a virtual reality scene as an example, the root node of the resource index tree is the scene main model M0, whose child nodes include sub-models M1 and M2, the child nodes of M1 include textures T1 and T2, and the child nodes of M2 include texture T3. The association metric between M1 and T1 is 0.9 (direct dependency), and the association metric between M1 and T3 is 0.3 (indirect dependency).
[0086] Determine the resource compression strategy based on the association metric value. The association metric value is mapped to the compression ratio through the Sigmoid function. The Sigmoid function can convert the association metric value into a value between 0 and 1, indicating the proportion of the original resource to be retained. For example, when the association metric value is 0.9, the compression ratio after the Sigmoid function mapping is 0.8, indicating that 80% of the original resource is retained; when the association metric value is 0.3, the compression ratio is 0.4, indicating that 40% of the original resource is retained.
[0087] Perform adaptive compression processing on scene resources according to the compression ratio to obtain compressed scene resource data. For texture resources, compression can be achieved by reducing resolution, reducing color bit depth, etc.; for model resources, compression can be achieved by reducing the number of polygons, simplifying the bone structure, etc.; for audio resources, compression can be achieved by reducing the sampling rate, reducing the number of channels, etc.
[0088] Taking a mobile game as an example, the original texture T1 has a resolution of 1024×1024, 32-bit color depth, and a size of 4MB; when the compression ratio is 0.8, the resolution can be reduced to 912×912, maintaining 32-bit color depth, and the compressed size is about 3.2MB. The original model M1 contains 10,000 polygons, which can be reduced to 6,000 polygons when the compression ratio is 0.6.
[0089] Finally, the compressed scene resource data is loaded according to the resource loading sequence to achieve optimized loading of scene resources. In actual applications, the compression ratio can be dynamically adjusted according to device performance and network conditions to further optimize the loading process. For example, the compression ratio can be increased on low-end devices and reduced on high-end devices; the compression ratio can be reduced when the network condition is good and increased when the network condition is poor.
[0090] Table 1 is a comparison table of scene resource loading time. Figure 3 This is a diagram of resource loading time distribution. The bar chart clearly shows the significant differences in loading time distribution among different technical solutions. The bar of this technical solution is significantly shifted to the left (i.e., the time is shorter), indicating that its loading performance is significantly better than the other three methods. In particular, in the 2-4 second time period, the sample ratio of this technical solution is the highest, which means that most resource loading can be completed in a very short time.
[0091] Table 1 is a comparison table of scene resource loading time:
[0092] The above method can realize adaptive compression and optimized loading of scene resources, improve scene loading speed, reduce resource usage, and improve user experience. In a virtual reality application test, after adopting this method, the scene loading time was reduced from 8.5 seconds to 3.2 seconds, and the memory usage was reduced from 450MB to 280MB, while maintaining good visual effects and interactive experience.
[0093] In an optional implementation, a resource index tree is constructed based on the resource loading sequence, hierarchical relationships of resource nodes are recorded in the resource index tree, and association metrics between resource nodes are calculated; and determining a resource compression strategy based on the association metrics includes: A resource index tree is constructed based on the resource loading sequence, and the level value of the resource node is determined by judging the parent node relationship of the resource node. The level value of the resource node is obtained by recursive calculation. For a resource node that does not have a parent node, the level value is set to zero, and for a resource node that has a parent node, the level value is set to the level value of its parent node plus one; Calculating a resource node weight according to the level value and resource size of the resource node, wherein the resource node weight decays exponentially with the level value, and the resource node weight is positively correlated with the resource size; Calculating the direct association strength between resource nodes, where the direct association strength is obtained by multiplying the intersection-and-union ratio of the resource node connection set by a level difference penalty term, wherein the level difference penalty term maps the level difference to an interval of zero to two through a Sigmoid function; Calculating the path association strength between resource nodes based on the direct association strength, wherein the path association strength is obtained by multiplying the direct association strength on the path by the path attenuation function; Weighting the direct association strength and the path association strength to obtain a comprehensive association metric value between resource nodes; Calculate the balance factor of the resource node in the resource index tree, where the balance factor is the difference between the height of the left subtree and the height of the right subtree of the resource node. When the absolute value of the balance factor is greater than a preset balance threshold, rebalance the resource index tree; Calculating a basic compression rate of the resource node based on the comprehensive association metric value, wherein the basic compression rate maps the difference between the average association degree of the resource node and the global average association degree to an interval of zero to one through a Sigmoid function; The basic compression rate is adaptively adjusted according to the resource node weight to obtain an adaptive compression rate, and the adaptive compression rate decreases as the resource node weight increases.
[0094] When the system loads resources, it records the loading order of each resource and its parent-child relationship. For example, in a game scene, if scene A is loaded and then model B is loaded, there may be a parent-child relationship. The level value is determined by judging the parent node relationship between resource nodes, and a recursive calculation method is used: for the root node (resource node without a parent node), the level value is set to 0; for resource nodes with a parent node, the level value is the level value of its parent node plus 1.
[0095] Take the loading of a game resource as an example. The main scene resource is the root node with a level value of 0; the role model resource in the main scene has a level value of 1; and the weapon resource in the role model has a level value of 2. This level division reflects the inclusion relationship between resources and is helpful for subsequent correlation measurement calculations.
[0096] The node weight calculation adopts an exponential decay model, that is, the weight decays exponentially as the level value increases, and is positively correlated with the resource size. In the specific implementation, the weight calculation formula can be set as: node weight = resource size × decay factor ^ level value. For example, if the decay factor is set to 0.8, the weight of a 10MB resource node with a level value of 2 is 10×0.8^2=6.4, while the weight of a resource of the same size with a level value of 0 is 10.
[0097] Then, the direct connection strength between resource nodes is calculated. The direct connection strength is obtained by multiplying the intersection-and-union ratio of the resource node connection set by the level difference penalty term. The intersection-and-union ratio of the connection set reflects the proportion of nodes commonly connected to two resource nodes to the total number of connected nodes. The level difference penalty term maps the level difference to the interval of 0 to 2 through the Sigmoid function. The smaller the level difference, the closer the penalty term is to 2; the larger the level difference, the closer the penalty term is to 0.
[0098] For example, resource A and resource B have 3 common connection nodes, and their total connection nodes are 5 and 7 respectively, so the intersection-and-union ratio is 3 / 9≈0.33; if the level value of A is 1, the level value of B is 3, and the level difference is 2, the corresponding penalty term may be 0.5, then the direct association strength is 0.33×0.5=0.165.
[0099] Based on the direct association strength, the path association strength between resource nodes is calculated. The path association strength takes into account the multiple connection paths that may exist between resource nodes, and is obtained by multiplying the direct association strength on the path by the path attenuation function. The path attenuation function is related to the path length. The longer the path, the more severe the attenuation.
[0100] Taking three resource nodes A, B, and C as an example, if the direct association strength from A to B is 0.8, the direct association strength from B to C is 0.6, the path length is 2, and the path attenuation factor is set to 0.9, then the path association strength from A to C is 0.8×0.6×0.9^2≈0.39.
[0101] The direct association strength and the path association strength are weighted to obtain the comprehensive association metric value. The direct association strength weight can be set to 0.7, and the path association strength weight can be set to 0.3, then the comprehensive association metric value = 0.7 × direct association strength + 0.3 × path association strength.
[0102] To ensure the balance of the resource index tree, the balance factor of each resource node is calculated, that is, the difference between the height of the left subtree and the height of the right subtree. When the absolute value of the balance factor is greater than the preset balance threshold (usually 1 or 2), the resource index tree is rebalanced, which can be achieved by left-hand rotation, right-hand rotation, or a combination of left and right rotation operations.
[0103] For example, if the height of the left subtree of node A is 4, the height of the right subtree is 1, and the balance factor is 3, which exceeds the preset threshold of 2, a right rotation operation is required to rebalance the tree. After rebalancing, query efficiency is improved, which is beneficial to the calculation of subsequent associated metrics.
[0104] The basic compression rate of resource nodes is calculated based on the comprehensive association metric. First, the average association of each resource node is calculated (the average of the association metrics with other nodes), and then the global average association is calculated (the average of the average associations of all nodes). The difference between the average association of resource nodes and the global average association is mapped to the range of 0 to 1 through the Sigmoid function to obtain the basic compression rate.
[0105] For example, if the average relevance of resource node A is 0.6, the global average relevance is 0.4, and the difference is 0.2, the basic compression rate may be 0.7 through Sigmoid mapping, indicating that the resource can be compressed to 70% of its original size.
[0106] The adaptive compression rate decreases as the weight of the resource node increases, ensuring that more details are retained for important resources (with large weights). The adjustment formula can be set as: adaptive compression rate = basic compression rate × (1-weight adjustment factor × normalized node weight).
[0107] Taking the weight adjustment factor as 0.5, the normalized weight of resource node A as 0.8, and the basic compression rate as 0.7 as an example, the adaptive compression rate = 0.7×(1-0.5×0.8)=0.7×0.6=0.42, which means that the resource is finally compressed to 42% of its original size.
[0108] Table 2 is a comparison table of comprehensive performance test results of different methods. As shown in Table 2, this technical solution is at the leading level in all performance indicators, and the average improvement rate remains at a high level of 63%.
[0109] Table 2 is a comparison table of comprehensive performance test results of different methods:
[0110] The resource compression strategy constructed by the above method can adaptively adjust the compression rate according to the correlation and importance between resources, effectively reducing the overall resource volume and improving system performance while ensuring the quality of important resources.
[0111] In an optional implementation, when a scene resource loading exception is detected, a resource loading backup channel is started, and backup data of the abnormal resource is obtained through the backup channel; and the integrated scene resource data is output to the metaverse scene rendering engine, including: Priority calculation is performed on multiple backup channels, where the priority is obtained by inputting channel bandwidth, channel reliability, and channel delay into a Sigmoid function, and a backup channel with the highest priority is selected to load abnormal resources; Acquire backup data of the abnormal resource from the backup channel, and calculate a consistency check value between the abnormal resource and the backup data, wherein the consistency check value is calculated based on a difference in hash values between the abnormal resource and the backup data; When the consistency check value is less than a preset consistency threshold, the backup data is used as replacement data for the abnormal resource; when the consistency check value is not less than the preset consistency threshold, data merging is performed on the abnormal resource and the backup data to obtain replacement data; Calculating an integrity evaluation value of the scene resource data, wherein the integrity evaluation value is a ratio of the effective data amount of the scene resource data to the expected data amount; calculating a rendering adaptability of the scene resource data, wherein the rendering adaptability is calculated based on a difference between a resource format parameter and a target format parameter; Under the constraint that the integrity assessment value is not lower than the minimum integrity threshold and the rendering adaptability is not lower than the minimum adaptability threshold, the scene resource data is output to the Metaverse scene rendering engine.
[0112] Scene resources include but are not limited to 3D models, texture maps, audio files, animation data, etc. When the system detects that a resource fails to load, loads overtime, or the data is corrupted, it is considered a resource loading exception. For example, when the system attempts to load a building model with the ID "model_building_01", if the loading fails within the preset 5-second timeout, or the loaded data fails to be verified, the exception handling process is triggered.
[0113] When resource loading anomalies are detected, the system starts the backup channel selection mechanism. The system maintains multiple backup channels, including but not limited to local cache channels, CDN backup channels, P2P distribution channels, etc. For each backup channel, the system calculates its priority. The priority calculation method is as follows: For each backup channel, the system obtains its current bandwidth value (e.g. 10MB / s), reliability value (e.g. 0.95, indicating a 95% success rate) and channel delay value (e.g. 200ms). After standardizing these three parameters, they are converted to values between 0 and 1 through the Sigmoid function. Specifically, for the bandwidth value, divide it by the preset maximum bandwidth value (e.g. 50MB / s) to obtain a standardized value; for the reliability value, use it directly; for the delay value, divide it by the preset maximum acceptable delay (e.g. 1000ms) and then invert it to obtain a standardized value. Then, the weighted sum of these three standardized values is input into the Sigmoid function to obtain the final priority value. The weights can be set to 0.4 for bandwidth, 0.4 for reliability, and 0.2 for delay.
[0114] For example, if the bandwidth of a backup channel is 20MB / s, the reliability is 0.9, and the latency is 300ms, the standardized values are 0.4, 0.9, and 0.7 respectively, and the weighted sum is 0.4×0.4+0.4×0.9+0.2×0.7=0.66. After inputting the Sigmoid function, the priority value is about 0.659. The system calculates the priority values of all backup channels and selects the channel with the highest priority to load abnormal resources.
[0115] After obtaining the backup data of the abnormal resource from the selected backup channel, the system calculates the consistency check value of the abnormal resource and the backup data. The consistency check value is calculated based on the difference in the hash values of the abnormal resource and the backup data. Specifically, the system calculates the SHA-256 hash value for the abnormal resource and the backup data respectively, and then calculates the Hamming distance (the number of different bits) of the two hash values, and then divides the distance by the total number of bits of the hash value (256) to obtain the consistency check value.
[0116] For example, if the hash value of the abnormal resource is "a1b2c3...", the hash value of the backup data is "a1b2d4...", and the Hamming distance between the two is 64 bits, then the consistency check value is 64 / 256 = 0.25. The system compares this value with the preset consistency threshold (such as 0.2).
[0117] When the consistency check value is less than the preset consistency threshold, it indicates that the backup data is basically consistent with the abnormal resource, and the system directly uses the backup data as the replacement data for the abnormal resource. For example, if the consistency check value is 0.15, which is less than the threshold of 0.2, the backup data is directly used.
[0118] When the consistency check value is not less than the preset consistency threshold, it indicates that there is a large difference between the backup data and the abnormal resource, and the system needs to perform data merging processing on the abnormal resource and the backup data to obtain replacement data. Data merging processing adopts different strategies according to the resource type: for 3D models, a mesh repair algorithm can be used; for texture mapping, an image repair algorithm can be used; for audio files, an audio interpolation algorithm can be used.
[0119] For example, for a damaged 3D model, the system can extract the intact mesh part from the abnormal resource and the corresponding missing part from the backup data, and then merge them into a complete model through boundary matching and smoothing. For texture mapping, the system can use an image restoration algorithm based on the Poisson equation to merge the valid pixels in the abnormal resource with the corresponding area in the backup data.
[0120] After the abnormal resource processing is completed, the system calculates the integrity evaluation value of the scene resource data. The integrity evaluation value is the ratio of the effective data volume of the scene resource data to the expected data volume. The system counts the total number of all resources in the scene (such as 100) and the number of successfully loaded resources (such as 95), and calculates the ratio to obtain the integrity evaluation value (such as 0.95).
[0121] At the same time, the system calculates the rendering suitability of the scene resource data. The rendering suitability is calculated based on the difference between the resource format parameters and the target format parameters. The system compares the format parameters of each resource (such as resolution, number of polygons, texture depth, etc.) with the format parameters required by the target rendering engine and calculates the degree of difference. For example, if the resolution of a texture resource is 1024×1024, and the target requirement is 2048×2048, the suitability of the parameter is 0.5; if the number of polygons of a model is 10,000, and the target requirement is not more than 12,000, the suitability of the parameter is 0.833. The system calculates the weighted average of the suitability of all parameters to obtain the overall rendering suitability.
[0122] Finally, the system checks whether the integrity assessment value and rendering suitability meet the output conditions. If the integrity assessment value is not lower than the minimum integrity threshold (such as 0.9) and the rendering suitability is not lower than the minimum suitability threshold (such as 0.8), the system outputs the processed scene resource data to the Metaverse scene rendering engine; otherwise, the system warns the user that the scene may not render properly and provides a downgrade rendering option.
[0123] The resource integration system in the Metaverse scene construction based on the efficient engine includes: The first unit is used to obtain scene resource data in the metaverse scene, classify the scene resource data according to data types, establish an organizational structure chart of the scene resource data, and record the association relationship between the scene resource data in the organizational structure chart; classify the scene resource data according to the association degree and usage frequency of the scene resource data, and store the scene resource data in a storage area of a corresponding level; The second unit is used to analyze the historical interaction data of the user in the metaverse scene based on the deep learning model, output the target scene area that the user will visit next, and obtain the storage location information of the scene resource data corresponding to the target scene area; The third unit is used to calculate the resource dependency relationship of the target scene area based on the organizational structure chart and generate a resource loading sequence; establish a resource index tree according to the resource loading sequence, record the hierarchical relationship and correlation degree between scene resources in the resource index tree, and adaptively compress the scene resources based on the resource index tree, wherein the compression ratio is inversely proportional to the resource correlation degree, and the higher the correlation degree of the resource, the lower the compression ratio; The fourth unit is used to monitor the loading status of scene resources in real time. When an abnormality in scene resource loading is detected, the resource loading backup channel is started to obtain the backup data of the abnormal resources through the backup channel; the integrated scene resource data is output to the Metaverse scene rendering engine for real-time rendering of the Metaverse scene.
[0124] According to a third aspect of the embodiments of the present invention, An electronic device is provided, comprising: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0125] A fourth aspect of the embodiments of the present invention is: A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0126] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A resource integration method in building a metaverse scene based on an efficient engine, characterized in that: include: Acquire scene resource data in the metaverse scene, classify the scene resource data according to data types, establish an organizational structure chart of the scene resource data, and record the association relationship between the scene resource data in the organizational structure chart; classify the scene resource data according to the association degree and usage frequency of the scene resource data, and store the scene resource data in a storage area of a corresponding level; Analyze the user's historical interaction data in the metaverse scene based on the deep learning model, output the target scene area that the user will visit next, and obtain the storage location information of the scene resource data corresponding to the target scene area; Calculate resource dependencies of the target scene area based on the organizational structure chart and generate a resource loading sequence; Establishing a resource index tree according to the resource loading sequence, recording the hierarchical relationship and association degree between scene resources in the resource index tree, and adaptively compressing the scene resources based on the resource index tree, wherein the compression ratio is inversely proportional to the resource association degree, and the higher the association degree of the resource, the lower the compression ratio; Monitor the loading status of scene resources in real time. When abnormal scene resource loading is detected, start the resource loading backup channel and obtain the backup data of the abnormal resources through the backup channel; output the integrated scene resource data to the Metaverse scene rendering engine for real-time rendering of the Metaverse scene.
2. The method according to claim 1, characterized in that The scene resource data are classified according to data types, and an organizational structure chart of the scene resource data is established. The association relationship between the scene resource data is recorded in the organizational structure chart, including: Divide the scene resource data into geometric data, material data, environment data and interaction data according to data representation forms, wherein the geometric data includes model mesh data and vertex coordinate data, the material data includes material map data and normal map data, the environment data includes lighting information data and shadow information data, and the interaction data includes collision body data and trigger data; Dividing the scene resource data into basic element layer data, combined element layer data and scene element layer data according to data granularity, wherein the basic element layer data includes single model data and single texture data, the combined element layer data includes model combination data and material combination data, and the scene element layer data includes complete scene unit data; Calculate the association strength between scene resource data; construct an organizational structure chart of the scene resource data based on the association strength, use the scene resource data as nodes in the organizational structure chart of the scene resource data, use the association relationship between the scene resource data as a connecting edge, and the weight of the connecting edge is determined by the association strength.
3. The method according to claim 2, characterized in that The scene resource data is graded according to the degree of association and frequency of use, and the scene resource data is stored in the storage area of the corresponding level, including: Calculate the priority index of the scene resource data, wherein the priority index is obtained by weighting a usage frequency factor, a calculation complexity factor, and a correlation factor, wherein the usage frequency factor is determined according to the number of accesses, the calculation complexity factor is determined according to the resource processing overhead, and the correlation factor is determined according to the average correlation strength; The scene resource data are divided into storage areas of different levels according to the priority index, the scene resource data with a priority index greater than the first classification threshold is stored in a high priority storage area, the scene resource data with a priority index greater than the second classification threshold and less than the first classification threshold is stored in a medium priority storage area, and the scene resource data with a priority index less than the second classification threshold is stored in a low priority storage area.
4. The method according to claim 1, characterized in that Analyzing the historical interaction data of the user in the metaverse scene based on the deep learning model, outputting the target scene area that the user will visit next, and obtaining the storage location information of the scene resource data corresponding to the target scene area includes: Acquire historical interaction data of the user in the metaverse scene, wherein the historical interaction data includes spatiotemporal dimension feature data and interactive behavior feature data, wherein the spatiotemporal dimension feature data includes user movement trajectory sequence data and scene residence time distribution data, and the interactive behavior feature data includes operation sequence encoding data and interaction intensity matrix data; The historical interaction data is processed using a bidirectional long short-term memory network, time series features are obtained through a combination of a forward hidden state and a backward hidden state, and the time series features are weightedly fused through learnable parameters to obtain fused time series feature data; Building a user interest model based on a multi-head self-attention mechanism, mapping the fused time series feature data into a query matrix, a key matrix, and a value matrix, calculating the attention weight distribution, and obtaining the user interest feature data through multi-head splicing; Performing feature fusion on the fused time series feature data and the user interest feature data to obtain scene prediction feature data; The scene prediction feature data is processed using a multi-layer perceptron to output a predicted probability distribution of the target scene.
5. The method according to claim 1, characterized in that Calculating the resource dependency of the target scene area based on the organizational structure chart to generate a resource loading sequence; establishing a resource index tree based on the resource loading sequence, recording the hierarchical relationship and association degree between scene resources in the resource index tree, and adaptively compressing the scene resources based on the resource index tree includes: Calculating the dependency strength between scene resources based on the scene resource data, wherein the dependency strength is obtained by weighted calculation of functional dependency, temporal dependency and content dependency, wherein the functional dependency is calculated based on the resource calling data, the temporal dependency is calculated based on the resource loading data, and the content dependency is calculated based on the resource content data; Calculate the resource dependency relationship of the target scene area based on the organizational structure chart, wherein the resource dependency relationship is obtained by multiplying the dependency strength on the dependency transfer path and applying a distance decay function, wherein the distance decay function decreases exponentially with the length of the dependency transfer path; Combining the dependency strength with the resource dependency relationship to obtain a loading priority of a resource node, sorting the resource nodes according to the loading priority, and generating a resource loading sequence; Building a resource index tree based on the resource loading sequence, recording the hierarchical relationship of resource nodes in the resource index tree, and calculating the association metric values between resource nodes; determining a resource compression strategy according to the association metric values; The associated metric value is mapped to a compression ratio through a Sigmoid function; adaptive compression processing is performed on the scene resource according to the compression ratio to obtain compressed scene resource data; The compressed scene resource data is loaded according to the resource loading sequence to achieve optimized loading of scene resources.
6. The method according to claim 5, characterized in that Building a resource index tree based on the resource loading sequence, recording the hierarchical relationship of resource nodes in the resource index tree, and calculating the association metric values between resource nodes; Determining a resource compression strategy according to the associated metric value includes: A resource index tree is constructed based on the resource loading sequence, and the level value of the resource node is determined by judging the parent node relationship of the resource node. The level value of the resource node is obtained by recursive calculation. For a resource node that does not have a parent node, the level value is set to zero, and for a resource node that has a parent node, the level value is set to the level value of its parent node plus one; Calculating a resource node weight according to the level value and resource size of the resource node, wherein the resource node weight decays exponentially with the level value, and the resource node weight is positively correlated with the resource size; Calculating the direct association strength between resource nodes, where the direct association strength is obtained by multiplying the intersection-and-union ratio of the resource node connection set by a level difference penalty term, wherein the level difference penalty term maps the level difference to an interval of zero to two through a Sigmoid function; Calculating the path association strength between resource nodes based on the direct association strength, wherein the path association strength is obtained by multiplying the direct association strength on the path by the path attenuation function; Weighting the direct association strength and the path association strength to obtain a comprehensive association metric value between resource nodes; Calculate the balance factor of the resource node in the resource index tree, where the balance factor is the difference between the height of the left subtree and the height of the right subtree of the resource node. When the absolute value of the balance factor is greater than a preset balance threshold, rebalance the resource index tree; Calculating a basic compression rate of the resource node based on the comprehensive association metric value, wherein the basic compression rate maps the difference between the average association degree of the resource node and the global average association degree to an interval of zero to one through a Sigmoid function; The basic compression rate is adaptively adjusted according to the resource node weight to obtain an adaptive compression rate, and the adaptive compression rate decreases as the resource node weight increases.
7. The method according to claim 1, characterized in that When a scene resource loading exception is detected, the resource loading backup channel is started, and the backup data of the abnormal resource is obtained through the backup channel; Outputting the integrated scene resource data to the Metaverse scene rendering engine includes: Priority calculation is performed on multiple backup channels, where the priority is obtained by inputting channel bandwidth, channel reliability, and channel delay into a Sigmoid function, and a backup channel with the highest priority is selected to load abnormal resources; Acquire backup data of the abnormal resource from the backup channel, and calculate a consistency check value between the abnormal resource and the backup data, wherein the consistency check value is calculated based on a difference in hash values between the abnormal resource and the backup data; When the consistency check value is less than a preset consistency threshold, the backup data is used as replacement data for the abnormal resource; when the consistency check value is not less than the preset consistency threshold, data merging is performed on the abnormal resource and the backup data to obtain replacement data; Calculating an integrity evaluation value of the scene resource data, wherein the integrity evaluation value is a ratio of the effective data amount of the scene resource data to the expected data amount; calculating a rendering adaptability of the scene resource data, wherein the rendering adaptability is calculated based on a difference between a resource format parameter and a target format parameter; Under the constraint that the integrity assessment value is not lower than the minimum integrity threshold and the rendering adaptability is not lower than the minimum adaptability threshold, the scene resource data is output to the Metaverse scene rendering engine.
8. A resource integration system in the construction of a metaverse scene based on an efficient engine, used to implement the method as described in any one of claims 1 to 7, characterized in that: include: The first unit is used to obtain scene resource data in the metaverse scene, classify the scene resource data according to data types, establish an organizational structure chart of the scene resource data, and record the association relationship between the scene resource data in the organizational structure chart; classify the scene resource data according to the association degree and usage frequency of the scene resource data, and store the scene resource data in a storage area of a corresponding level; The second unit is used to analyze the historical interaction data of the user in the metaverse scene based on the deep learning model, output the target scene area that the user will visit next, and obtain the storage location information of the scene resource data corresponding to the target scene area; The third unit is used to calculate the resource dependency relationship of the target scene area based on the organizational structure chart and generate a resource loading sequence; Establishing a resource index tree according to the resource loading sequence, recording the hierarchical relationship and association degree between scene resources in the resource index tree, and adaptively compressing the scene resources based on the resource index tree, wherein the compression ratio is inversely proportional to the resource association degree, and the higher the association degree of the resource, the lower the compression ratio; The fourth unit is used to monitor the loading status of scene resources in real time. When an abnormality in scene resource loading is detected, the resource loading backup channel is started to obtain the backup data of the abnormal resources through the backup channel; the integrated scene resource data is output to the Metaverse scene rendering engine for real-time rendering of the Metaverse scene.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Rocker control method and system for figure movement of VR equipment
CN114637412A
Database partitioning method supporting dynamic capacity expansion and contraction
CN117573650A
Industrial element universe-oriented visible associated scene graph construction method and system
CN117911659A
Multi-scene operation management method and system based on meta universe
CN118267718A
MADDPG and GCN combined meta-universe scene distributed two-stage cache optimization method
CN119201771A
Cited By
Mobile terminal network fault rapid recovery method and system based on multi-channel keep-alive
CN120880885A