VR physics engine tuning method and system based on machine learning

Through the VR physics engine tuning method based on machine learning, the convolutional neural network and scene graph structure are used to adjust the physics engine parameters and resource allocation in real time, which solves the problem of traditional methods being unable to adapt to scene changes in the virtual reality environment and improves the efficiency of virtual reality. Environment realism and user experience.

CN118245136BActive Publication Date: 2024-08-27北京天平地成信息技术服务有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410628695.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2024-08-27
Estimated Expiration
2044-05-21

AI Technical Summary

Technical Problem

Traditional physics engine tuning methods are difficult to adapt to scene changes in real-time in virtual reality environments, resulting in unnatural and delayed physical interactions and environmental reactions. Resource allocation is static or based on presets and cannot be dynamically adjusted, resulting in high-complexity scenes. Waste or insufficient resources affect performance and user interaction quality.

Method used

Adopt a VR physics engine tuning method based on machine learning, train the model through a convolutional neural network, capture object movement and collision data, adjust the physics engine parameters in real time, build a VR scene graph, identify key collision events, and optimize processing priorities and resource allocation. , dynamically allocate computing resources.

Benefits of technology

It achieves dynamic adjustment of the physics engine based on real-time data, improves scene complexity and dynamic response speed, accurately identifies and prioritizes key collision events, enhances simulation authenticity and interactivity, ensures the efficient operation of the physics engine during critical periods, and improves the quality of the virtual environment. Realism and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118245136B
    Figure CN118245136B
Patent Text Reader

Abstract

The present invention relates to the technical field of engine tuning, specifically to a VR physics engine tuning method and system based on machine learning, comprising the following steps: based on a target VR scene, collecting object motion and collision data in the VR scene, performing data cleaning, classifying objects by type and interaction frequency, and obtaining classified scene data. The present invention dynamically adjusts the operating parameters of the physics engine according to the prediction results through a convolutional neural network, reduces the consumption of computing resources, can adjust the physics engine according to real-time data, improves scene complexity and dynamic response speed, and can more accurately identify and prioritize key collision events by converting the VR scene into a graph structure and dynamically updating nodes and edges, thereby enhancing the authenticity and interactivity of the simulation, and the dynamic allocation strategy of resources ensures the efficient operation of the physics engine during critical periods, effectively responds to the real-time physical computing needs of highly complex scenes, and ensures the natural and smooth animation and interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of engine tuning, and in particular to a VR physics engine tuning method and system based on machine learning. Background Art

[0002] The field of engine tuning technology involves optimizing the performance of engines in software or hardware to improve their efficiency, processing speed, accuracy or response time. In a virtual reality environment, the physics engine is a key component responsible for simulating physical interactions and environmental reactions, such as collision detection, object motion simulation, and other physics-based behaviors. Tuning the physics engine can significantly improve the user's immersive experience and enhance the realism and interactivity of the virtual environment.

[0003] Among them, the VR physics engine tuning method is used to improve the performance and efficiency of the physics engine in the virtual reality system. The purpose of this method is to achieve higher realism and better user experience by optimizing the physical simulation process, reducing computing resource consumption, and increasing the complexity and dynamic response speed of the scene. It aims to solve the challenges of physical simulation in virtual environments, such as handling real-time physical calculations of highly complex scenes, and ensuring natural and smooth animations and interactions.

[0004] Traditional physics engine tuning methods have difficulty adapting to scene changes in real time in a virtual reality environment, resulting in unnatural and delayed physical interactions and environmental responses. The physics engine cannot accurately predict and handle rapidly changing physical interactions, such as complex collisions and object dynamics, resulting in a degraded user experience. The resource allocation of traditional methods is static or based on preset scene configurations, lacking dynamic adjustment capabilities, and prone to resource waste or shortage when dealing with large-scale or highly complex virtual environments. For example, for sudden high-load events, traditional methods fail to allocate resources in a timely manner, resulting in processing delays or calculation errors, affecting overall performance and user interaction quality. Summary of the invention

[0005] The purpose of the present invention is to solve the shortcomings of the prior art and propose a VR physics engine tuning method and system based on machine learning.

[0006] In order to achieve the above object, the present invention adopts the following technical solution: a VR physics engine tuning method based on machine learning, comprising the following steps:

[0007] S1: Based on the target VR scene, capture the movement and collision data of objects in the VR scene, classify them according to the object type and the interaction frequency between objects, and obtain classified scene data;

[0008] S2: Based on the classified scene data, receiving multiple types of physical interaction data through the input layer of the convolutional neural network, training the network to predict the physical parameter adjustment value, and obtaining a training optimized parameter adjustment model;

[0009] S3: Based on the training optimized parameter adjustment model, monitor and analyze the real-time object interaction in the VR scene, automatically adjust the physical engine parameters, and obtain the real-time optimized physical engine configuration;

[0010] S4: Based on the real-time optimized physical engine configuration, the VR scene is represented by a graph, nodes are set to represent objects in the VR scene, edges are set to represent potential collisions between objects, and a VR scene graph structure is obtained;

[0011] S5: identifying key collision events according to the VR scene graph structure, adjusting the collision processing priority of objects in the VR scene, and generating a dynamic priority adjustment result;

[0012] S6: Based on the dynamic priority adjustment result, set the time window of computing resources, analyze the computing resource requirements of the physical engine in each window, optimize the operating efficiency of the physical engine in the critical period, and obtain a dynamic resource allocation plan.

[0013] The improvements of the present invention are that the classified scene data includes the velocity vector, collision frequency and object type label of the object, the parameter adjustment model of the training optimization includes the learning rate adjustment strategy, weight update and activation function type, the real-time tuned physical engine configuration includes collision response parameters, friction coefficient adjustment and gravity effect setting, the VR scene graph structure includes node priority sorting rules, edge weight definition and graph update frequency, the dynamic priority adjustment result includes real-time position update of the object, collision detection sequence and processing delay optimization, and the dynamic resource allocation scheme includes resource quantity setting of differentiated time windows, scene complexity evaluation parameters and resource priority during key time periods.

[0014] The present invention is improved in that, based on the training optimized parameter adjustment model, the real-time object interaction in the VR scene is monitored and analyzed, and the physical engine parameters are automatically adjusted to obtain the real-time tuned physical engine configuration. The specific steps are as follows:

[0015] S301: Based on the training optimized parameter adjustment model, the movement speed and collision force of the object in the VR scene are captured, and the data is recorded to obtain real-time interactive monitoring data;

[0016] S302: Based on the real-time interactive monitoring data, use the trained and optimized parameter adjustment model to perform data analysis, identify the behavior pattern of the object, and adjust the physical engine parameters, including changing the friction coefficient and adjusting the elastic response during collision, to obtain adjusted physical parameters;

[0017] S303: Using the adjusted physical parameters, run a simulation test of the physical engine to verify whether the accuracy of the collision and motion simulation meets expectations, optimize the realism of the physical simulation, and obtain a real-time tuned physical engine configuration.

[0018] The present invention is improved in that, based on the real-time optimized physical engine configuration, the VR scene is represented by a graph, nodes are set to represent objects in the VR scene, and edges are set to represent potential collisions between objects. The specific steps of obtaining the VR scene graph structure are as follows:

[0019] S401: Based on the real-time optimized physical engine configuration, the VR scene is represented by a graph, each object is represented as a corresponding node in the graph, and the relationship between the objects in the scene is sorted out to obtain a VR scene node graph;

[0020] S402: Based on the VR scene node graph, for each pair of nodes in the graph, based on the relative positions and interaction frequencies between the nodes, the edges of the graph are set, and the weights of the edges are preset according to the collision data of the real-time physical simulation to generate a collision probability edge weight graph;

[0021] S403: Based on the collision probability edge weight graph, according to the possibility and impact of the collision, the weights of the edges in the graph are adjusted to reflect the potential influence and occurrence probability of the differentiated collision, and a VR scene graph structure is obtained.

[0022] The present invention is improved in that, according to the VR scene graph structure, the key collision events are identified, the collision processing priority of objects in the VR scene is adjusted, and the specific steps of generating a dynamic priority adjustment result are as follows:

[0023] S501: Based on the VR scene graph structure, the entire graph is traversed and analyzed, each node and adjacent edge are checked, collision events whose edge weights are higher than a set threshold are identified as key collisions, and a key collision identifier list is obtained;

[0024] S502: Based on the critical collision identifier list, a priority queue algorithm is used to reconfigure the processing queue of the physics engine, adjust the processing priority of the critical collision event, and give priority to simulating and calculating the critical collision event to obtain a priority adjustment mapping;

[0025] S503: Based on the priority adjustment mapping, the movement update of the objects in the VR scene is monitored, the nodes and edges of the VR scene graph structure are adjusted in real time, the current position and speed of the objects are matched, and a dynamic priority adjustment result is obtained.

[0026] The present invention improves that the priority queue algorithm is based on the formula:

[0027] ,

[0028] Calculate the priority score for each collision event, where P is the priority score, F is the collision force, O is the probability of collision, V is the relative velocity between the colliding objects, D is the distance between objects, is the intensity weight factor, is the probability weight factor, is the dynamic weight factor.

[0029] The present invention is improved in that, based on the dynamic priority adjustment result, a time window of computing resources is set, computing resource requirements of the physical engine in each window are analyzed, and the operation efficiency of the physical engine in the critical period is optimized. The specific steps of obtaining a dynamic resource allocation scheme are as follows:

[0030] S601: Based on the dynamic priority adjustment result, define a time window of computing resources, the time window is set according to the time requirement of the physics engine to process key collision events, set the duration and start time of each window, and obtain a time window configuration;

[0031] S602: Based on the time window configuration, a linear regression algorithm is used to perform resource demand assessment, quantify the demand of the physics engine for the processor and memory in each time window, and the assessment includes the estimated CPU occupancy percentage and the required memory capacity, and obtain a resource demand analysis result;

[0032] S603: Based on the resource demand analysis results, automatically adjust and allocate computing resources, update the computing resource allocation during peak demand periods, including the number of CPU cores and memory allocation, optimize the performance and response speed of the physics engine during critical periods, and obtain a dynamic resource allocation plan.

[0033] The present invention is improved in that the linear regression algorithm is according to the formula:

[0034] ,

[0035] Calculate the resource demand in each time window, where R Indicates the resource demand. C represents the complexity of collision calculation, M represents the computing resource usage baseline of the scenario, S Represents the spatial complexity of the scene, A Indicates the activity level of the scene. is the intercept term, , , and is the slope parameter.

[0036] A VR physics engine tuning system based on machine learning, the system comprising:

[0037] The data processing module collects the object's moving speed, acceleration, collision force and collision angle data based on the target VR scene, and classifies them according to the object type and interaction frequency to obtain the classified data set;

[0038] The network configuration module configures a convolutional neural network based on the classified data set, optimizes the network structure by adjusting the learning rate and weight update strategy, and obtains an optimized network model;

[0039] The real-time monitoring module uses the optimized network model to monitor the interactive behavior of objects in the VR scene in real time, automatically adjust the physical engine parameters, simulate the collision and movement of objects, and obtain the real-time optimized engine configuration;

[0040] The scene graph construction module creates a graph structure of the VR scene based on the real-time optimized engine configuration, uses nodes to represent objects and edges to represent potential collisions, and adjusts the priorities of key events to obtain dynamic priority adjustment results;

[0041] The resource allocation module sets the time window of computing resources according to the dynamic priority adjustment result, analyzes the physical engine computing requirements of each window, optimizes the physical engine performance in the critical period, and obtains a dynamic resource allocation plan.

[0042] Compared with the prior art, the advantages and positive effects of the present invention are:

[0043] In the present invention, through a convolutional neural network, the operating parameters of the physics engine are dynamically adjusted according to the prediction results, which reduces the consumption of computing resources, can adjust the physics engine according to real-time data, improve the scene complexity and dynamic response speed, and convert the VR scene into a graph structure and dynamically update the nodes and edges. It can more accurately identify and prioritize key collision events, enhance the realism and interactivity of the simulation, and the dynamic allocation strategy of resources ensures the efficient operation of the physics engine during critical periods, effectively responds to the real-time physical computing needs of highly complex scenes, ensures the natural and smooth animation and interaction, and greatly enhances the realism of the virtual environment and the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A flowchart of a VR physics engine tuning method based on machine learning is proposed for the present invention;

[0045] Figure 2 A schematic diagram of the detailed flow of step S1 in the VR physics engine tuning method based on machine learning proposed in the present invention;

[0046] Figure 3A schematic diagram of the detailed process of step S2 in the VR physics engine tuning method based on machine learning proposed in the present invention;

[0047] Figure 4 A schematic diagram of the detailed flow of step S3 in the VR physics engine tuning method based on machine learning proposed in the present invention;

[0048] Figure 5 A schematic diagram of the detailed process of step S4 in the VR physics engine tuning method based on machine learning proposed in the present invention;

[0049] Figure 6 A schematic diagram of the detailed flow of step S5 in the VR physics engine tuning method based on machine learning proposed in the present invention;

[0050] Figure 7 A schematic diagram of the detailed process of step S6 in the VR physics engine tuning method based on machine learning proposed in the present invention;

[0051] Figure 8 A module diagram of a VR physics engine tuning system based on machine learning is proposed for the present invention. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0053] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating positions or positional relationships, are based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0054] Example:

[0055] See also Figure 1 The present invention provides a technical solution: a VR physics engine tuning method based on machine learning, comprising the following steps:

[0056] S1: Based on the target VR scene, capture the movement and collision data of objects in the VR scene, including the object's movement speed, acceleration, collision force and collision angle, perform data cleaning, classify according to object type and interaction frequency between objects, and obtain classified scene data;

[0057] S2: Based on the classified scene data, multiple types of physical interaction data are received through the input layer of the convolutional neural network, and the parameters of the convolutional neural network are adjusted. By adjusting the learning rate and optimizing the weight update strategy of the network layer, the network is optimized to automatically match multiple types of physical behavior changes, and the network is trained to predict the physical parameter adjustment value, thus obtaining a trained and optimized parameter adjustment model;

[0058] S3: Based on the training optimized parameter adjustment model, monitor and analyze the real-time object interaction in the VR scene, automatically adjust the physics engine parameters, optimize the accuracy of the physics engine simulating object collision and movement, and obtain the real-time tuned physics engine configuration;

[0059] S4: Based on the real-time optimized physical engine configuration, the VR scene is represented by a graph. Nodes are set to represent objects in the VR scene, and edges are set to represent potential collisions between objects. The weights of the edges are adjusted according to the possibility and impact of the collision, and the VR scene graph structure is obtained.

[0060] S5: According to the VR scene graph structure, identify key collision events, adjust the collision processing priority of objects in the VR scene, optimize the processing order of the physics engine for key collision events, and update the VR scene graph structure in real time to reflect object movement and generate dynamic priority adjustment results;

[0061] S6: Based on the dynamic priority adjustment results, set the time window of computing resources, analyze the computing resource requirements of the physics engine in each window, automatically allocate computing resources according to the complexity of the scene, optimize the operating efficiency of the physics engine in the critical period, and obtain a dynamic resource allocation plan;

[0062] The classified scene data includes the object's velocity vector, collision frequency and object type label. The parameter adjustment model for training optimization includes the learning rate adjustment strategy, weight update and activation function type. The real-time tuning of the physics engine configuration includes collision response parameters, friction coefficient adjustment and gravity effect settings. The VR scene graph structure includes node priority sorting rules, edge weight definition and graph update frequency. The dynamic priority adjustment results include real-time position updates of objects, collision detection sequences and processing delay optimization. The dynamic resource allocation plan includes resource quantity settings for differentiated time windows, scene complexity assessment parameters and resource priorities during critical periods.

[0063] See also Figure 2 ,Based on the target VR scene, collect the object motion and collision data in the VR scene,,including the object's moving speed, acceleration, collision force and collision angle, perform data cleaning,,classify by object type and interaction frequency, and obtain the classified scene data,specific steps are as follows:

[0064] S101: Based on the target VR scene, the object motion and collision data in the VR scene are captured, and the moving speed, acceleration, collision force and collision angle of each object are recorded. The specific process of obtaining the basic physical data is as follows;

[0065] In S101, based on the target VR scene, the three-dimensional coordinate position and timestamp of each object are captured in real time. The data collection interval is set to 0.01 seconds to ensure that continuous dynamic information is captured. For each object, its position information at any point in time is recorded, and the moving speed and acceleration are calculated. Speed ​​= (current position - previous position) / time interval, acceleration = (current speed - previous speed) / time interval, capture the force and angle of the collision, and record data points including the object speed and acceleration at the moment of collision. Force = change in momentum during collision / time interval, angle = the angle between the initial collision angle and the direction of movement of the object. The data is calibrated through real-time monitoring to obtain basic physical data.

[0066] S102: Based on the basic physical data, data review and cleaning are performed to exclude data distortion caused by outliers and non-physical phenomena, including speed and force exceeding the preset threshold, and duplicate records in the data set are removed. The specific process of obtaining cleaned data is as follows;

[0067] In S102, based on basic physical data, the reasonable threshold of speed is set to 0 to 100 meters per second, and the threshold of force is set to 0 to 10,000 Newtons as the reasonable range of physical movement. Automatically scan the entire data set to identify and mark abnormal data points that exceed the threshold. Use the median removal method to process outliers for the speed and force data of each object, and filter out data points that deviate from the median by 1.5 times the interquartile range. For duplicate records in the data set, use hash table technology to identify and remove them. A hash key is generated for each data point, including the object's identification and timestamp. By comparing the hash keys, duplicates are identified and cleared in the data set. Ensure the uniqueness and accuracy of the data set, obtain cleaned data, and provide a clean and reliable data source for subsequent data processing.

[0068] S103: Based on the cleaned data, the data is grouped according to the type of objects and the frequency of interaction between objects. The types of objects include fixed, mobile and interactive. A category identifier is assigned to each type of data. The specific process of obtaining the classified scene data is as follows;

[0069] In S103, based on the cleaned data, objects are divided into three categories according to their motion characteristics: fixed, mobile, and interactive. A motion threshold is set. If the maximum moving distance of an object during the entire monitoring period is less than 0.5 meters, it is classified as fixed. If it is greater than 0.5 meters but does not frequently interact with other objects, it is classified as mobile. If it frequently interacts with other objects, it is classified as interactive. Each category is assigned a unique identifier, and the K-means clustering algorithm is used to process the entire data set, and clustering and grouping are performed according to the movement distance and interaction frequency of the objects. Clustering is performed based on Euclidean distance, and the class center is iteratively updated until the classification is stable, and classified scene data that is easy to analyze and process is obtained.

[0070] See also Figure 3 Based on the classified scene data, various types of physical interaction data are received through the input layer of the convolutional neural network, and the parameters of the convolutional neural network are adjusted. By adjusting the learning rate and optimizing the weight update strategy of the network layer, the network is optimized to automatically match multiple types of physical behavior changes, and the network is trained to predict the physical parameter adjustment value. The specific steps of obtaining the training and optimized parameter adjustment model are as follows:

[0071] S201: Based on the classified scene data, the input layer of the convolutional neural network is configured, multi-dimensional physical interaction data from differentiated categories is received, and matching data interfaces and network structures are set to obtain the specific process of network initialization configuration as follows;

[0072] In S201, based on the classified scene data, a convolutional neural network input layer is constructed to determine the dimension and type of the data. According to the classified scene data, a specific data interface is designed for each object type, and the data interface can receive multi-dimensional physical interaction data such as the speed, acceleration, force and collision angle of the corresponding object. The input layer is configured as follows: two channels are allocated for fixed objects to receive speed and force data respectively; three channels are allocated for moving objects to receive speed, acceleration and force data; four channels are allocated for interactive objects to receive all four physical parameters. Through differentiated configuration, the behavior of different types of objects in the physical environment can be captured more accurately. The network structure is set according to the complexity of the data and the expected processing power. Multi-layer convolutional layers are used to extract physical interaction features of different scales. At the same time, pooling layers are configured to reduce the amount of calculation and improve the generalization ability of the model to obtain the network initialization configuration.

[0073] S202: Based on the network initialization configuration, adjust the structural parameters of the network, including the layer depth and node width, set the dynamically adjusted learning rate, match the learning needs of various types of data, perform network training, and obtain the specific process of the parameter adjustment model as follows;

[0074] In S202, based on the network initialization configuration, the hierarchical depth of the network is set to ensure that the complex features in the data can be fully learned. The setting of the hierarchical depth is determined according to the interaction complexity of the object and the amount of data. The node width is also adjusted according to the complexity of the data dimension and category to be processed. For example, for the processing layer of interactive objects, wider nodes are required to process more interactive features, and the learning rate setting adopts a dynamic adjustment strategy to adapt to the needs of training at different stages. In the initial stage, a higher learning rate is used for rapid convergence. As the training progresses, the learning rate is gradually reduced to refine the parameter adjustment. The learning rate adjustment adopts the formula: learning rate = initial learning rate × attenuation coefficient ^ (current number of rounds / total number of rounds). The network can more effectively adapt to the learning needs of different types of data and obtain a parameter adjustment model.

[0075] S203: Based on the parameter adjustment model, the network training process is optimized, the weight update strategy is adjusted, the adaptability and prediction accuracy of the parameter adjustment model to the change of physical behavior are optimized, and the prediction of the physical parameter adjustment value by the network is optimized through testing and tuning. The specific process of obtaining the trained and optimized parameter adjustment model is as follows;

[0076] In S203, based on the parameter adjustment model, the performance of the model on the training set is analyzed, and each parameter is adjusted by the error back propagation method. The weight update strategy adopts the stochastic gradient descent method with momentum, and the momentum term helps to maintain the consistency of the update direction and reduce oscillations. The weight update formula is: new weight = old weight - learning rate × gradient + momentum × update difference. It can speed up the convergence speed and improve the generalization ability of the model on new data. Through continuous testing and tuning, the network structure is fine-tuned, especially the accuracy of predicting the adjustment value of the physical parameters is optimized. Use the validation data set to test the prediction accuracy and generalization ability of the model, and adjust the parameters of the model according to the test results. Improve the model's adaptability to changes in physical behavior, and obtain a trained and optimized parameter adjustment model that can accurately predict the behavior changes of objects in different physical interaction scenarios.

[0077] See also Figure 4 Based on the training optimized parameter adjustment model, monitor and analyze the real-time object interaction in the VR scene, automatically adjust the physics engine parameters, and optimize the accuracy of the physics engine simulating object collision and movement. The specific steps to obtain the real-time tuned physics engine configuration are as follows:

[0078] S301: Based on the training optimized parameter adjustment model, the movement speed and collision force of the object in the VR scene are captured and the data is recorded to obtain the specific process of real-time interactive monitoring data as follows;

[0079] In S301, based on the training optimized parameter adjustment model, the object movement speed and collision force in the VR scene are captured in real time. The position and speed of each object are recorded regularly to calculate the movement speed. The calculation formula of the movement speed is: movement speed = (current position - previous position) / time interval, and the force at the time of collision is recorded. The calculation formula of the collision force is: collision force = momentum change at the time of collision / time interval. All data are timestamped to form real-time interactive monitoring data. It includes detailed records of key physical interactions in VR scenes, providing a basis for subsequent data analysis.

[0080] S302: Based on the real-time interactive monitoring data, the trained and optimized parameter adjustment model is used to perform data analysis, identify the behavior pattern of the object, and adjust the physical engine parameters, including changing the friction coefficient and adjusting the elastic response during collision. The specific process of obtaining the adjusted physical parameters is as follows;

[0081] In S302, based on the real-time interactive monitoring data, the parameter adjustment model after training and optimization is applied to analyze the data. Identify the behavior patterns of objects in a specific physical environment. Through the output of the model, identify the movement and collision behavior patterns of various objects, and adjust the parameters of the physics engine accordingly. The adjustment includes the friction coefficient and the collision elastic response. The adjustment of the friction coefficient is based on the moving speed of the object and the material of the contact surface. The adjustment formula is: adjusted friction coefficient = current friction coefficient + adjustment factor × (target friction coefficient-current friction coefficient). The adjustment of the collision elastic response is based on the collision force and the material of the object. The adjustment formula is: adjusted elastic response = current elastic response + adjustment factor × (target elastic response-current elastic response), and the adjusted physical parameters are obtained to achieve accurate configuration of the physical parameters and enhance the realism and adaptability of the physical simulation.

[0082] S303: Using the adjusted physical parameters, running the simulation test of the physical engine to verify whether the accuracy of the collision and motion simulation meets expectations, optimizing the realism of the physical simulation, and obtaining the specific process of the real-time tuned physical engine configuration is as follows;

[0083] In S303, the adjusted physical parameters are used to run the physics engine for simulation testing to verify the accuracy of collision and motion simulation, and to analyze whether the object's motion trajectory, reaction after collision, and interaction effect conform to physical laws and expected settings. The simulation test uses a standard test scene, including objects of different materials and shapes interacting. By comparing the test results with the expected model, the adjustment effect of the friction coefficient and elastic response is evaluated. If the test results show that the physical behavior deviates from expectations, the physical parameters are fine-tuned until the best simulation effect is achieved, and a real-time tuned physics engine configuration is obtained to ensure that the physical interaction simulation in the VR scene is both accurate and highly realistic.

[0084] See also Figure 5 Based on the real-time optimized physical engine configuration, the VR scene is represented by a graph. Nodes are set to represent objects in the VR scene, and edges are set to represent potential collisions between objects. The weights of the edges are adjusted according to the possibility and impact of the collision. The specific steps to obtain the VR scene graph structure are as follows:

[0085] S401: Based on the real-time optimized physical engine configuration, the VR scene is represented by a graph, each object is represented as a corresponding node in the graph, and the relationship between the objects in the scene is sorted out to obtain the VR scene node graph. The specific process is as follows;

[0086] In S401, based on the real-time optimized physical engine configuration, objects in the VR scene are mapped one by one to nodes of the graph, each object is identified and assigned a unique node identifier, and the relationship data of objects in the scene are collected and organized, including the spatial position relationship and interaction history between objects. The relationship is expressed in an intuitive graphical way. Each object is not only represented as a node in the graph, but also its interaction with other objects is represented by lines. The complex physical interaction network of the VR scene is converted into a manageable graph structure to obtain a VR scene node graph.

[0087] S402: Based on the VR scene node graph, for each pair of nodes in the graph, based on the relative positions and interaction frequencies between the nodes, the edges of the graph are set, and the weights of the edges are preset according to the collision data of the real-time physical simulation. The specific process of generating the collision probability edge weight graph is as follows;

[0088] In S402, based on the VR scene node graph, edges are set for each pair of nodes in the graph, and the edge setting is based on the relative position and interaction frequency between the nodes. The distance between each pair of object nodes and the historical interaction data are calculated, and the existence of the edge is set based on this. For pairs of objects that interact frequently, thicker edges are set to indicate that their interaction frequency is high; for pairs that interact occasionally, thinner edges are set. Based on the collision data obtained from real-time physical simulation, the weight of each edge is preset. The weight is expressed as the collision probability. The calculation formula is: collision probability = historical collision number / total interaction number. A collision probability edge weight graph is generated to reflect the interaction intensity and collision possibility between objects.

[0089] S403: Based on the collision probability edge weight graph, according to the possibility and impact of the collision, the weights of the edges in the graph are adjusted to reflect the potential influence and occurrence probability of the differentiated collision. The specific process of obtaining the VR scene graph structure is as follows;

[0090] In S403, based on the collision probability edge weight graph, the weights of the edges in the graph are adjusted to more accurately reflect the possibility of collision between different objects and the potential influence of the collision. The adjustment is based on an in-depth analysis of the impact of the collision, taking into account factors such as the intensity of the collision, physical changes after the collision, and environmental factors. For example, if a collision may cause damage to key scene elements, the weight of the collision will be increased. The weight adjustment formula is: adjusted weight = current weight + adjustment factor × (impact assessment - current weight). The VR scene graph structure is obtained, which more realistically reflects the dynamics and complexity of various physical interactions in the scene.

[0091] See also Figure 6 ,According to the VR scene graph structure, key collision events are identified, the collision processing priority of objects in the VR scene is adjusted, the processing order of key collision events by the physics engine is optimized, and the VR scene graph structure is updated in real time to reflect the movement of objects. The specific steps for generating dynamic priority adjustment results are as follows:

[0092] S501: Based on the VR scene graph structure, the entire graph is traversed and analyzed, each node and adjacent edge are checked, and collision events with edge weights higher than a set threshold are identified as key collisions. The specific process of obtaining a key collision identifier list is as follows;

[0093] In S501, based on the VR scene graph structure, a depth-first search or breadth-first search is performed on the entire graph to check each node and its connected edges. The weight of the edge represents the potential influence of the collision, such as strength or range of influence. A collision threshold is set, such as a strength threshold = 200 Newtons. If the weight of the edge exceeds this threshold, the collision is considered a critical collision. That is, "if the weight of the edge > collision threshold, the node pair of the edge is added to the critical collision identification list" to obtain a critical collision identification list, ensuring that only the most influential collision events are identified as critical events, providing data support for subsequent processing priority arrangement.

[0094] S502: Based on the key collision identifier list, a priority queue algorithm is used to reconfigure the processing queue of the physics engine, adjust the processing priority of key collision events, and give priority to simulating and calculating key collision events. The specific process of obtaining the priority adjustment mapping is as follows;

[0095] In S502, the priority queue algorithm is used to prioritize key collision events and configure processing queues. Each collision event is sorted according to its weight and potential impact to ensure that the event with the greatest impact on the entire VR scene is processed first. The processing queue of the physics engine is reconfigured based on the sorting to adjust the processing priority of key collision events. When simulating collisions and dynamic interactions, the physics engine can first calculate and parse the most critical events, thereby optimizing the response time and processing efficiency of the entire scene and obtaining a priority adjustment mapping.

[0096] Priority queue algorithm, according to the formula:

[0097] ,

[0098] Calculate the priority score for each collision event, where P is the priority score, which is the final calculation result and determines the priority of the collision event in the processing queue. F The collision force quantifies the energy released during the collision or the intensity of the collision. O is the probability of a collision, based on the scene dynamics and historical data to assess the likelihood of a collision. V is the relative velocity between the colliding objects, measuring the speed at which the objects moved before the collision. D is the distance between objects, representing the spatial separation between two colliding objects. is the force weight factor, adjusting the collision force F Impact in Priority Scoring, Is the probability weight factor, adjusting the probability of collision O Impact in Priority Scoring, is a dynamic weight factor, adjusted by the relative speed V Distance to object D The combined impact.

[0099] The specific implementation process of the improved formula is as follows:

[0100] The physics engine monitors and records the relevant data of all objects involved in the collision, including the strength of the objects F , probability of occurrence O , relative speed V , and the distance between objects D , based on previous experimental results and data analysis, accurately set the weighting factors , and .For example, , It can be determined by a linear regression model, and respectively indicate the statistical significance of force and probability on the collision outcome, and By considering the compound impact of dynamic factors, genetic algorithms or machine learning models are used to ensure It can effectively reflect the actual impact of speed and distance on priority, combine the collected data with the weight factor, and calculate the priority score of each collision event according to the improved formula P , based on the calculated priority score P, update the collision processing queue of the physics engine to ensure that high-priority events can be processed faster.

[0101] S503: Based on the priority adjustment mapping, the movement update of the object in the VR scene is monitored, the nodes and edges of the VR scene graph structure are adjusted in real time, and the current position and speed of the object are matched to obtain the dynamic priority adjustment result. The specific process is as follows;

[0102] In S503, based on the priority adjustment mapping, the movement and update of objects in the VR scene are monitored. The current position and speed of the object are tracked in real time, and the nodes and edges of the VR scene graph structure are dynamically adjusted according to the data. Ensure that the physics engine can respond to the latest state and behavior pattern of the object in a timely manner. For example, if the movement of an object increases the probability of its collision with another object, the corresponding edge weight will be adjusted, thereby changing the priority of the event in the processing queue. This dynamic adjustment mechanism enables the VR scene to simulate complex physical interactions more accurately and adaptively, improves the overall simulation efficiency and realism, and obtains dynamic priority adjustment results.

[0103] See also Figure 7 ,Based on the results of dynamic priority adjustment, set the time window of computing resources, analyze the computing resource requirements of the physics engine in each window, automatically allocate computing resources according to the complexity of the scene, optimize the operating efficiency of the physics engine in the critical period, and obtain the specific steps of the dynamic resource allocation plan as follows:

[0104] S601: Based on the dynamic priority adjustment result, define the time window of computing resources. The time window is set according to the time requirement of the physics engine to process the key collision event. The duration and start time of each window are set. The specific process of obtaining the time window configuration is as follows;

[0105] In S601, based on the dynamic priority adjustment result, a time window for computing resources is defined. The duration and start time of the window are set according to the time requirements of the physics engine to process key collision events. By analyzing the processing time of key collision events, including the computational complexity and resource consumption of each event. Then, the length of the time window is set according to the data. For example, if the processing time of key events is 200 milliseconds on average, the duration of the time window is set to 250 milliseconds to provide a buffer. The start time of the window is set according to the frequency of occurrence of the event to ensure that computing resources are available when needed. The time window configuration is obtained to ensure that the physics engine has sufficient computing resources and time when processing the most complex and resource-intensive events.

[0106] S602: Based on the time window configuration, a linear regression algorithm is used to perform resource demand assessment to quantify the processor and memory requirements of the physics engine in each time window. The assessment includes the estimated CPU usage percentage and required memory capacity. The specific process of obtaining the resource demand analysis result is as follows;

[0107] In S602, based on the time window configuration, a linear regression algorithm is used to evaluate resource requirements and quantify the requirements of the physical engine for the processor and memory in each time window. By collecting the CPU and memory usage of each time window in the historical data, the data is used as input to establish a linear regression model, in which the independent variable is the amount of computing tasks in the window and the dependent variable is the resource usage. The purpose of the model is to predict resource requirements under similar tasks in the future, accurately evaluate and predict resource requirements in each time window, provide a basis for resource optimization, and obtain resource requirement analysis results.

[0108] Linear regression algorithm, according to the formula:

[0109] ,

[0110] Calculate the resource demand in each time window, where R Indicates resource demand, such as CPU usage percentage or memory capacity. C Indicates the complexity of collision calculation, which is related to the number of dynamic objects in the scene and the frequency of interaction. M Represents the scene's computational resource usage baseline, estimated based on static scene elements and texture usage, reflecting basic resource requirements. S Represents the spatial complexity of the scene, including the spatial relationship and layout complexity between objects, which affects the resource requirements for scene rendering and physical calculations. A Indicates the activity level of a scene, which is used to measure the frequency of user interaction with the scene. Active scenes require more computing resources. is the intercept term, used to provide a baseline resource demand forecast, , , and is the slope parameter, corresponding to C , M , S and A The parameters are obtained by data fitting, indicating the relative importance of each variable in resource demand forecasting.

[0111] The specific implementation process of the improved formula is as follows:

[0112] Get the dynamic object data in the scene through the physical engine monitoring and calculate the collision calculation complexity C, including the number of dynamic objects and the frequency of object interactions, to evaluate the computing resource usage baseline in the scene M , including the computational resource usage of static elements such as textures and models, and analyzing the scene layout to evaluate spatial complexity S , considering the layout and spatial relationship between objects, such as object spacing, layout complexity, etc., to quantify the activity of the scene A , including the frequency and type of user interactions, such as player movement, frequency of interactive objects, etc., using historical data and statistical methods such as least squares to fit a linear regression model and determine the model parameters , , , and Through regression analysis of a large amount of data, the model is adjusted and verified by evaluating the statistical significance and contribution of each parameter, and the linear regression model is applied to calculate the resource requirements within each time window. R , in order to optimize resource configuration and allocation and improve system performance.

[0113] S603: Based on the resource demand analysis results, automatically adjust and allocate computing resources, update the computing resource allocation during the peak demand period, including the number of CPU cores and memory allocation, optimize the performance and response speed of the physics engine during the critical period, and obtain the specific process of the dynamic resource allocation plan as follows;

[0114] In S603, based on the resource demand analysis results, computing resources are automatically adjusted and allocated. By determining which time periods require more CPU cores or more memory, resources are dynamically allocated. For example, if the predicted CPU demand exceeds 80%, the number of CPU cores is increased by 20%. The allocation strategy of computing resources is updated to ensure that the physics engine has the best performance and response speed when processing key tasks. The dynamic resource allocation plan is obtained, which can adapt to changes in scene requirements in real time, optimize resource utilization efficiency, and improve overall performance and reliability.

[0115] See also Figure 8 , a VR physics engine tuning system based on machine learning, the system includes data processing module, network configuration module, real-time monitoring module, scene graph construction module, and resource allocation module.

[0116] The data processing module collects the object's moving speed, acceleration, collision force and collision angle data based on the target VR scene, performs data cleaning, excludes outliers and duplicate records, and classifies them according to object type and interaction frequency to obtain a classified data set;

[0117] The network configuration module configures the convolutional neural network based on the classified data set, matches a variety of physical interaction data, optimizes the network structure by adjusting the learning rate and weight update strategy, matches the changes in physical behavior, and obtains an optimized network model;

[0118] The real-time monitoring module uses an optimized network model to monitor the interactive behavior of objects in the VR scene in real time, automatically adjust the physical engine parameters, simulate the collision and movement of objects, and obtain the real-time optimized engine configuration;

[0119] The scene graph construction module creates a graph structure of the VR scene based on the real-time tuned engine configuration. Nodes represent objects, edges represent potential collisions, and the weights of edges are adjusted according to the possibility and impact of collisions. The priority of key events is adjusted to obtain dynamic priority adjustment results.

[0120] The resource allocation module sets the time window of computing resources according to the dynamic priority adjustment results, analyzes the physical engine computing requirements of each window, automatically allocates computing resources, optimizes the physical engine performance during critical periods, and obtains a dynamic resource allocation plan.

[0121] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.

Claims

1. A VR physics engine tuning method based on machine learning, characterized in that: The following steps are involved: Based on the target VR scene, the movement and collision data of objects in the VR scene are captured, and the objects are classified according to the type of objects and the frequency of interaction between objects to obtain classified scene data; Based on the classified scene data, multiple types of physical interaction data are received through the input layer of the convolutional neural network, and the network is trained to predict the physical parameter adjustment value to obtain a training optimized parameter adjustment model; Based on the training optimized parameter adjustment model, real-time object interactions in the VR scene are monitored and analyzed, and physical engine parameters are automatically adjusted to obtain a real-time optimized physical engine configuration; Based on the training optimized parameter adjustment model, the specific steps of monitoring and analyzing the real-time object interaction in the VR scene, automatically adjusting the physical engine parameters, and obtaining the real-time tuned physical engine configuration are as follows: Based on the training optimized parameter adjustment model, the movement speed and collision force of objects in the VR scene are captured, and data is recorded to obtain real-time interactive monitoring data; Based on the real-time interactive monitoring data, the trained and optimized parameter adjustment model is used to perform data analysis, identify the behavior pattern of the object, and adjust the physical engine parameters, including changing the friction coefficient and adjusting the elastic response during collision, to obtain adjusted physical parameters; Using the adjusted physical parameters, running simulation tests of the physical engine to verify whether the accuracy of collision and motion simulation meets expectations, optimizing the realism of the physical simulation, and obtaining a real-time tuned physical engine configuration; Based on the real-time optimized physical engine configuration, the VR scene is represented by a graph, nodes are set to represent objects in the VR scene, edges are set to represent potential collisions between objects, and a VR scene graph structure is obtained; According to the VR scene graph structure, key collision events are identified, object collision processing priorities in the VR scene are adjusted, and dynamic priority adjustment results are generated; Based on the dynamic priority adjustment result, a time window for computing resources is set, the computing resource requirements of the physical engine in each window are analyzed, the operating efficiency of the physical engine in the critical period is optimized, and a dynamic resource allocation plan is obtained.

2. The VR physics engine tuning method based on machine learning according to claim 1, characterized in that: The classified scene data includes the object's velocity vector, collision frequency and object type label; the training optimization parameter adjustment model includes learning rate adjustment strategy, weight update and activation function type; the real-time tuning physics engine configuration includes collision response parameters, friction coefficient adjustment and gravity effect setting; the VR scene graph structure includes node priority sorting rules, edge weight definition and graph update frequency; the dynamic priority adjustment result includes real-time position update of the object, collision detection sequence and processing delay optimization; the dynamic resource allocation scheme includes resource quantity setting of differentiated time windows, scene complexity evaluation parameters and resource priority during critical time periods.

3. The VR physics engine tuning method based on machine learning according to claim 1, characterized in that: Based on the real-time optimized physical engine configuration, the VR scene is represented by a graph, nodes are set to represent objects in the VR scene, and edges are set to represent potential collisions between objects. The specific steps of obtaining the VR scene graph structure are as follows: Based on the real-time optimized physical engine configuration, the VR scene is represented by a graph, each object is represented as a corresponding node in the graph, and the relationship between the objects in the scene is sorted out to obtain a VR scene node graph; Based on the VR scene node graph, for each pair of nodes in the graph, based on the relative positions and interaction frequencies between the nodes, the edges of the graph are set, and the weights of the edges are preset according to the collision data of the real-time physical simulation to generate a collision probability edge weight graph; Based on the collision probability edge weight graph, the weights of the edges in the graph are adjusted according to the possibility and impact of the collision to reflect the potential influence and occurrence probability of the differentiated collision, thereby obtaining a VR scene graph structure.

4. The VR physics engine tuning method based on machine learning according to claim 1, characterized in that: The specific steps of identifying key collision events according to the VR scene graph structure, adjusting the collision processing priority of objects in the VR scene, and generating dynamic priority adjustment results are as follows: Based on the VR scene graph structure, the entire graph is traversed and analyzed, each node and adjacent edge are checked, and collision events whose edge weights are higher than a set threshold are identified as key collisions, and a key collision identifier list is obtained; Based on the critical collision identification list, a priority queue algorithm is adopted to reconfigure the processing queue of the physics engine, adjust the processing priority of the critical collision events, give priority to simulating and calculating the critical collision events, and obtain a priority adjustment mapping; Based on the priority adjustment mapping, the movement update of objects in the VR scene is monitored, the nodes and edges of the VR scene graph structure are adjusted in real time, the current position and speed of the objects are matched, and a dynamic priority adjustment result is obtained.

5. The VR physics engine tuning method based on machine learning according to claim 4 is characterized in that: The priority queue algorithm is based on the formula: , Calculate the priority score for each collision event, where P is the priority score, F is the collision force, O is the probability of collision, V is the relative velocity between the colliding objects, D is the distance between objects, is the intensity weight factor, is the probability weight factor, is the dynamic weight factor.

6. The VR physics engine tuning method based on machine learning according to claim 1, characterized in that: Based on the dynamic priority adjustment result, the time window of computing resources is set, the computing resource requirements of the physical engine in each window are analyzed, and the operation efficiency of the physical engine in the critical period is optimized. The specific steps of obtaining the dynamic resource allocation solution are as follows: Based on the dynamic priority adjustment result, define a time window for computing resources, the time window is set according to the time requirement of the physics engine to process key collision events, and the duration and start time of each window are set to obtain a time window configuration; Based on the time window configuration, a linear regression algorithm is used to perform resource demand assessment, quantify the processor and memory requirements of the physics engine in each time window, and the assessment includes the estimated CPU occupancy percentage and required memory capacity, to obtain resource demand analysis results; Based on the resource demand analysis results, computing resources are automatically adjusted and allocated, computing resource allocation during peak demand periods is updated, including the number of CPU cores and memory allocation, the performance and response speed of the physics engine during critical periods are optimized, and a dynamic resource allocation plan is obtained.

7. The VR physics engine tuning method based on machine learning according to claim 6, characterized in that: The linear regression algorithm is based on the formula: , Calculate the resource demand in each time window, where R Indicates the resource demand, C represents the complexity of collision calculation, M represents the computing resource usage baseline of the scenario, S represents the spatial complexity of the scene, A Indicates the activity level of the scene. is the intercept term, , , and is the slope parameter.

8. VR physics engine tuning system based on machine learning, characterized by: According to the method for tuning a VR physics engine based on machine learning according to any one of claims 1 to 7, the system comprises: The data processing module collects the object's moving speed, acceleration, collision force and collision angle data based on the target VR scene, and classifies them according to the object type and interaction frequency to obtain the classified data set; The network configuration module configures a convolutional neural network based on the classified data set, optimizes the network structure by adjusting the learning rate and weight update strategy, and obtains an optimized network model; The real-time monitoring module uses the optimized network model to monitor the interactive behavior of objects in the VR scene in real time, automatically adjust the physical engine parameters, simulate the collision and movement of objects, and obtain the real-time optimized engine configuration; The scene graph construction module creates a graph structure of the VR scene based on the real-time optimized engine configuration, uses nodes to represent objects and edges to represent potential collisions, and adjusts the priorities of key events to obtain dynamic priority adjustment results; The resource allocation module sets the time window of computing resources according to the dynamic priority adjustment result, analyzes the physical engine computing requirements of each window, optimizes the physical engine performance in the critical period, and obtains a dynamic resource allocation plan.

Citation Information

Patent Citations

  • Real-time physical engine enhancement calculation method based on neural network, medium and system

    CN111814970A

  • System for feature-based motion adaptation

    US10022628B1

  • Role simulation method and terminal apparatus in VR scene

    US20200047074A1

  • Method for implementing virtual reality software framework applicable to visual-haptic fusion feedback

    WO2022028055A1

  • Method and apparatus for predicting collision simulation result, device and storage medium

    WO2023160162A1