A human-computer interaction system based on Metaverse
By combining graphics technology and natural language processing technology to generate realistic metaverse scenes and analyze user instructions, it solves the lack of personalized experience and natural language understanding problems in the existing system, achieves efficient user interaction, and improves the metaverse experience. Authenticity and immersion.
Patent Information
- Application Number
- CN202410750416.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-12
AI Technical Summary
The existing human-computer interaction system based on the Metaverse lacks personalized interaction experience, the quality of Metaverse scene generation and rendering is insufficient, and it is difficult to accurately understand the user's natural language instructions, resulting in an unrealistic and unimmersive user experience.
It uses advanced graphics technology, natural language processing technology and ray tracing technology to generate realistic and rich metaverse scenes through Monte Carlo path tracing, and trains natural language processing models to analyze user instructions and achieve intelligent interaction.
It provides a highly personalized, real and immersive user experience, improves the interactive capabilities and practicality of the system, and makes the user experience smoother and more convenient.
Smart Images

Figure CN118331429B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of virtual reality technology, and in particular relates to a human-computer interaction system based on the metaverse. Background Art
[0002] In today's digital age, as the demand for human-computer interaction continues to increase, the human-computer interaction system based on the metaverse has gradually become a hot spot for research and development. The metaverse is a virtual digital space that allows users to interact, communicate and experience through technologies such as augmented reality (AR) and virtual reality (VR). This human-computer interaction system based on the metaverse will provide users with a more intuitive and immersive experience and promote the development of the field of human-computer interaction.
[0003] In the past few years, some human-computer interaction systems based on the Metaverse have emerged. These systems are usually composed of a Metaverse end and a human-computer interaction end. The human-computer interaction end is used to receive user instructions and communicate with the Metaverse end, while the Metaverse end is responsible for generating virtual Metaverse scenes and interacting with users. However, these systems often have some problems, which limit their development and application in practical applications. First, the existing human-computer interaction systems based on the Metaverse often lack a highly personalized interactive experience. Due to the lack of in-depth understanding of user behavior and preferences, these systems can often only provide a general interaction mode and cannot be adjusted and optimized according to the personalized needs of users. This leads to limitations in user experience and reduces the attractiveness and practicality of the system. Secondly, the existing systems have certain limitations in the generation and rendering of Metaverse scenes. Although the existing technology has been able to generate some more realistic Metaverse scenes, there are still problems such as low picture quality and insufficient scene details. These problems make the user experience in the Metaverse not real and immersive enough, and cannot achieve the expected effect. In addition, the existing systems also have some challenges in processing natural language instructions and generating interactive requests. Due to the complexity and diversity of natural language, existing systems often have difficulty accurately understanding user instructions, resulting in generated interactive requests that do not match user expectations. This limits the interactive capabilities and practicality of the system and reduces user satisfaction.
[0004] In order to overcome the above problems, it is necessary to further research and develop new human-computer interaction systems based on the Metaverse. These systems should be able to achieve highly personalized interactive experiences, generate realistic and rich Metaverse scenes, and accurately understand user instructions and generate corresponding interactive requests. This will provide users with a more realistic, immersive and personalized interactive experience, and promote the development and application of human-computer interaction technology. Summary of the invention
[0005] In view of this, the main purpose of the present invention is to provide a human-computer interaction system based on the metaverse, which realizes the generation of realistic and rich metaverse scenes and intelligent user interaction by integrating advanced graphics technology, natural language processing technology and ray tracing technology.
[0006] The technical solution adopted by the present invention is as follows:
[0007] A human-computer interaction system based on a metaverse, the system comprising: a metaverse end and a human-computer interaction end; the human-computer interaction end is used to respond to an initial startup instruction of a local user, generate an initial request at an initial time step, and send the initial request to the metaverse end; the metaverse end generates a metaverse scene according to the received initial request, and sends it to the human-computer interaction end to provide it to the user for interaction; the human-computer interaction end responds to the user's operation instruction at each subsequent time step, analyzes the operation instruction by natural language analysis, generates an interaction request, and sends the interaction request to the metaverse end; after receiving the interaction request, the metaverse end responds to the interaction request, performs an interactive operation on objects in the generated metaverse scene, updates the metaverse scene, and then sends the updated metaverse scene back to the human-computer interaction end, thereby realizing a human-computer interaction system based on a metaverse.
[0008] Furthermore, the metaverse end includes: a scene generation end, an interactive operation end and a communication end; the scene generation end is used to generate a metaverse scene when an initial request is received; the interactive operation end is used to respond to the interactive request after receiving the interactive request, perform interactive operations on objects in the generated metaverse scene, and update the metaverse scene; the communication end is used to send the metaverse scene or the updated metaverse scene back to the human-computer interaction end; the communication end communicates with the human-computer interaction end through WebSocket, and performs JSON data encoding when sending the metaverse scene or the updated metaverse scene.
[0009] Furthermore, the process of generating a metaverse scene by the scene generation end specifically includes: establishing an initial metaverse scene; generating a description of the corresponding metaverse scene, including: object geometry, object material properties, light source position, light source intensity and camera position; for each pixel, randomly selecting multiple sampling points on it, these sampling points determine the sampling position of each pixel, emitting multiple rays from the camera position through these sampling points, and tracing the paths of these rays in the metaverse scene until they intersect with the light source or other objects, performing Monte Carlo path tracing to estimate their color; for each ray, using a ray tracing algorithm, performing a ray-object intersection test, and solving the intersection point between the ray and the object to check its intersection with the object in the metaverse scene. Intersection situation, if there is an intersection, return the intersection closest to the ray and the corresponding object information; otherwise, return a null value; the object information includes: object geometry and object material properties; once the intersection of the ray and the object is determined, calculate the radiance and corresponding luminous flux of the point; based on the calculated radiance and luminous flux, judge the properties of the object, and trace the light corresponding to the ray according to the properties of the object, consider the attenuation effect of the light during propagation, and use the attenuation model to calculate the attenuation of the light; according to the light propagation in the scene, recursively trace the light until the maximum recursive depth is reached or the light no longer intersects the object; mix the colors of all sampling points to obtain the color value of the final pixel, form the final metaverse scene, and provide it to the user for interaction.
[0010] Furthermore, the object properties include: reflectivity, transparency and absorption; if the object property is reflective, the direction of the reflected light is calculated according to the law of reflection, and the light is traced; if the object property is transparent, the direction of the refracted light is calculated according to the law of refraction, and the light is traced; if the object property is absorption, the light tracing is terminated directly.
[0011] Furthermore, the attenuation model is expressed using the following formula:
[0012] ;
[0013] in, is the light source intensity; is the path length of the light ray; is the absorption cross-section coefficient; is the scattering cross-section coefficient; is the scattering phase function, which indicates the direction of light Scattering direction The probability distribution of is the radiance of the light source; Indicates in the direction The intensity of the light source on the beam; the attenuation expression obtained by solving the attenuation model is:
[0014] ;
[0015] in, is the attenuation constant, is the set value, and its value range is 0.15 to 0.3.
[0016] Furthermore, the scattering correlation function Use the following formula to express it:
[0017] ;
[0018] Among them, is the scattering parameter, which is used to describe the degree to which the scattered light deviates from the incident light; when When , the scattering phase function is expressed as forward scattering, and represents forward scattering, represents backscattering; express Direction and The cosine of the angle between the directions.
[0019] Furthermore, based on the calculated radiance and luminous flux, the method for determining the properties of the object includes: assuming that the incident luminous flux is , the reflected luminous flux is , the transmitted light flux is , the incident radiance is , the reflected radiance is , the transmitted radiance is ; Use the following formula to calculate the judgment value:
[0020] ;
[0021] like If the value is greater than the upper limit of the set threshold range, the object property is reflective; if is less than the lower limit of the set threshold range, then the object property is transparency; if If it is within the threshold range, it means that the property of the object is absorption.
[0022] Furthermore, a natural language processing model is trained to analyze the operation instructions and generate interactive requests. The training process of the natural language processing model includes: first, obtaining a training set of operation instructions for training; preprocessing the training set of operation instructions, including: word segmentation and removal of stop words; assuming that the input is a training sample in the training set of operation instructions , after word segmentation, the word embedding is expressed as ,in Indicates words; is the number of words; the generator network using a generative adversarial network To learn word embedding representation; assuming that the goal of the generator network is to minimize the difference between the true word embedding representation vector and the generated word embedding representation, the optimization goal of the generator network is:
[0023] ;
[0024] in, Represents the random noise vector From the probability distribution Expectations extracted from is the generator network Input, yes Distribution of Representation Generator Network The random noise vector for the input The generated word embedding representation of the operation instructions; Word embedding representation representing the operation instructions, Word embedding representation for real data; Represents the norm of a vector; using a generator network The generated word embedding representation, assuming the input random noise vector is , the generated operation instruction is ; Discriminator network It is used to distinguish generated operation instructions from real operation instructions. The goal of the discriminator network is to maximize the probability that the generated operation instructions are correctly identified as generated, and minimize the probability that the real operation instructions are incorrectly identified as generated. By alternately optimizing the generator network and the discriminator network, the ability of the generator to generate real operation instructions is continuously improved, while the ability of the discriminator to accurately identify generated operation instructions is improved. A classifier is constructed to classify sentences. Assume that the classifier used is a support vector machine, and its decision function is:
[0025] ;
[0026] in, is the weight vector, is the bias term; for a given training sample ,in It is an operation instruction. is the corresponding category label, and the cross entropy loss function is used to measure the performance of the classifier. The formula is:
[0027] ;
[0028] in is the total number of training samples; the gradient descent algorithm is used to optimize the loss function and update the model parameters; assuming that the gradient descent algorithm used is stochastic gradient descent, the parameter update formula is:
[0029] ;
[0030] in represents the model parameters, is the learning rate; is the gradient of the model parameters.
[0031] Furthermore, the optimization goal of the discriminator network is:
[0032] ;
[0033] in, Indicates the real operation instructions From the data distribution of real operation instructions Expectations extracted from Indicates the real operation instructions for a given , the discriminator network The logarithmic probability of identifying it as a real operation instruction; the goal of the generator network is to minimize the probability that the generated operation instruction is identified as generated, and the optimization goal of the generator network is:
[0034] ;
[0035] in is a hyperparameter that balances the difference between the operation instructions generated by the generator network and the real operation instructions.
[0036] By adopting the above technical scheme, the present invention produces the following beneficial effects: the present invention has outstanding advantages in the generation and rendering of metaverse scenes. Through advanced graphics technologies such as Monte Carlo path tracing, the present invention can generate realistic and rich metaverse scenes, including details such as the geometric shape of objects, material properties, and light source positions. These scenes can not only meet the user's visual needs, but also provide users with a more realistic and vivid interactive environment. In addition, the present invention also achieves accurate understanding and response to user instructions by introducing natural language processing technology. By training the natural language processing model, the system can analyze the instructions input by the user and generate corresponding interactive requests, thereby realizing natural and intelligent interaction between the user and the system. This interactive mode not only simplifies the user operation process, but also improves the intelligence of the system, making the user experience smoother and more convenient. In addition, the present invention also has important innovations in ray tracing and attenuation models. Through the ray tracing algorithm, the system can simulate the propagation and reflection process of light in the metaverse scene, realizing the real simulation and rendering of light. At the same time, by introducing the attenuation model, the system can consider the attenuation effect of light during propagation, making the generated metaverse scene more realistic and real. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of the system structure of a human-computer interaction system based on the metaverse provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0038] All features disclosed in this specification, or steps in all methods or processes disclosed, except mutually exclusive features and / or steps, can be combined in any manner.
[0039] Any feature disclosed in this specification (including any additional claims and abstract), unless otherwise stated, may be replaced by other alternative features that are equivalent or have similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.
[0040] Example 1: Reference Figure 1, a human-computer interaction system based on metaverse, the system comprising: a metaverse end and a human-computer interaction end; the human-computer interaction end is used to respond to the initial startup instruction of the local end user, generate an initial request at the initial time step, and send the initial request to the metaverse end; the metaverse end generates a metaverse scene according to the received initial request, and sends it to the human-computer interaction end to provide it to the user for interaction; the human-computer interaction end responds to the user's operation instruction at each subsequent time step, analyzes the operation instruction by natural language analysis, generates an interaction request, and sends the interaction request to the metaverse end; after receiving the interaction request, the metaverse end responds to the interaction request, performs interactive operations on objects in the generated metaverse scene, updates the metaverse scene, and then sends the updated metaverse scene back to the human-computer interaction end, thereby realizing a human-computer interaction system based on metaverse.
[0041] Specifically, through the Metaverse technology, users can enter a virtual, digital environment, interact with objects and scenes in the virtual world, and obtain a more immersive experience. Users can directly influence and change objects and scenes in the Metaverse through natural language instructions or other interactive methods, thereby enhancing the user's sense of participation and control in the virtual environment. Traditional human-computer interaction methods are usually limited to input devices such as keyboards and mice, while the interactive system based on the Metaverse can provide a more flexible and natural interactive method, such as interacting with the virtual environment through gestures, voice, etc. Multiple users can enter the same Metaverse environment at the same time to collaborate, communicate and share experiences together. This shared experience can bring richer interactive and social experiences. When the user issues a start command, the human-computer interaction end sends the initial request to the Metaverse end. Based on these requests, the Metaverse end generates a virtual scene, which can be a simulation based on the real world or a completely fictional environment. The process of generating a Metaverse scene may involve technologies such as three-dimensional modeling and physical engines. Users can send operation instructions through the human-computer interaction end, and these instructions will be parsed into natural language and converted into corresponding interactive requests and sent to the Metaverse end. The interaction request includes the user's intention and behavior, such as moving, rotating, placing and other operations. After receiving the interaction request, the Metaverse end will update the position, state and other information of the objects in the Metaverse scene according to the user's intention and behavior. This may involve the simulation of the physics engine, collision detection and other technologies to ensure the authenticity and interactivity of the virtual environment. The whole process is carried out in real time, and the user's operation instructions will be immediately reflected in the Metaverse scene, thus realizing a real-time human-computer interaction experience. This requires the system to have high-performance real-time computing and communication capabilities to ensure the smoothness and responsiveness of the user experience.
[0042] Embodiment 2: The metaverse end includes: a scene generation end, an interactive operation end and a communication end; the scene generation end is used to generate a metaverse scene upon receiving an initial request; the interactive operation end is used to perform interactive operations on objects in the generated metaverse scene in response to the interactive request after receiving the interactive request, and update the metaverse scene; the communication end is used to send the metaverse scene or the updated metaverse scene back to the human-computer interaction end; the communication end communicates with the human-computer interaction end through WebSocket, and performs JSON data encoding when sending the metaverse scene or the updated metaverse scene.
[0043] Specifically, after receiving the interactive request from the human-computer interaction end, the interactive operation end performs corresponding operations on the corresponding objects in the metaverse scene according to the operations specified in the request (such as moving, rotating, placing, etc.). The WebSocket protocol establishes a long-lasting TCP connection between the client and the server, and provides a mechanism for two-way data transmission on the connection. It establishes the connection through the upgrade mechanism of the HTTP protocol. After the connection is established, the client and the server can send and receive data directly through the connection without re-establishing the connection every time. JSON is a text-based data exchange format that consists of key-value pairs. The data is separated by commas, and the keys and values are separated by colons. JSON data can represent complex data structures, including objects, arrays, etc. It is easy to parse and generate, and also has good readability.
[0044] Embodiment 3: The process of generating a metaverse scene by the scene generation end specifically includes: establishing an initial metaverse scene; generating a description of the corresponding metaverse scene, including: object geometry, object material properties, light source position, light source intensity and camera position; for each pixel, randomly selecting multiple sampling points on it, these sampling points determine the sampling position of each pixel, emitting multiple rays from the camera position through these sampling points, and tracing the paths of these rays in the metaverse scene until they intersect with the light source or other objects, and performing Monte Carlo path tracing to estimate their color; for each ray, using a ray tracing algorithm, performing a ray-object intersection test, and solving the intersection point between the ray and the object to check its intersection with the object in the metaverse scene. Intersection situation, if there is an intersection, return the intersection closest to the ray and the corresponding object information; otherwise, return a null value; the object information includes: object geometry and object material properties; once the intersection of the ray and the object is determined, calculate the radiance and corresponding luminous flux of the point; based on the calculated radiance and luminous flux, judge the properties of the object, and trace the light corresponding to the ray according to the properties of the object, consider the attenuation effect of the light during propagation, and use the attenuation model to calculate the attenuation of the light; according to the light propagation in the scene, recursively trace the light until the maximum recursive depth is reached or the light no longer intersects the object; mix the colors of all sampling points to obtain the color value of the final pixel, form the final metaverse scene, and provide it to the user for interaction.
[0045] Specifically, the purpose of randomly selecting multiple sampling points on each pixel is to reduce the estimation error, because a single sampling point may not fully reflect the true color of the pixel. By randomly selecting multiple sampling points on the pixel, the accuracy of color estimation can be improved. Rays are emitted from the camera position to each sampling point, which represent the direction of sight. These rays pass through each sampling point in the scene and trace their paths in the metaverse scene. Each ray will be traced until it encounters a light source or other object. If the ray intersects with the light source, the radiance and luminous flux of the light will be calculated, and the color value will be determined according to the properties of the light source; if the ray intersects with the object, the color of the ray continuing to propagate forward will be calculated according to the object properties at the intersection point, such as surface color, reflectivity, etc. Monte Carlo path tracing is a ray tracing method based on random sampling. It estimates the color value of each pixel by randomly sampling and tracing the light path in the scene. This method estimates the integral through a large number of random samples to obtain the final color of the pixel. In each tracing process, the direction of the next ray is selected based on randomness, which can avoid oversampling in a specific direction and improve efficiency. Through the Monte Carlo path tracing method, multiple random sampling and ray tracing are performed on each pixel, and the color values of multiple sampling points are finally obtained. These color values will be mixed or averaged to get the color estimate of the final pixel.
[0046] The ray-object intersection test is one of the key steps of the ray tracing algorithm. It is used to determine whether the ray intersects with an object in the scene and calculate the position of the intersection and the corresponding object information. When performing the intersection test, each object in the scene needs to be checked. For each object, it is usually represented as a geometric body, such as a sphere, a cube, etc., and the intersection problem between the ray and these geometric bodies needs to be solved. For simple geometric bodies, such as a sphere or a plane, there may be an analytical solution to solve the intersection of the ray and the object. For complex geometric bodies, such as polygonal mesh models, numerical methods, such as numerical solutions or iterative methods, are usually required to approximate the intersection. If there is an intersection, it means that the ray intersects with the object. In the intersection test, it is usually necessary to check whether the position of the intersection is within the effective range of the ray and whether the intersection is on the surface of the object. If the intersection meets the conditions, the intersection closest to the ray and the corresponding object information are returned, such as the intersection position, normal direction, surface material properties, etc. If there is an intersection, the intersection closest to the ray and the corresponding object information are returned, which will be used for subsequent ray tracing calculations. If there is no intersection, a null value is returned, indicating that the ray does not intersect with the object in the scene, and the ray can continue to propagate forward or end.
[0047] According to the calculated radiance and luminous flux, the properties of the object can be determined, such as diffuse reflection, specular reflection, refraction, etc. These properties determine the reflection or refraction behavior of light on the surface of the object. For diffuse reflection surfaces, light is scattered uniformly on the surface of the object, and there is no clear reflection direction; for specular reflection surfaces, light is reflected in a way that the reflection angle is equal to the incident angle; for refractive surfaces, light is refracted according to the refractive index of the object. According to the properties of the object, the light is tracked accordingly. The behavior of light will be different for different object properties. For diffuse reflection surfaces, a reflection direction can be randomly selected, and the attenuation effect of light during propagation can be considered; for specular reflection surfaces, light is reflected in a way that the reflection angle is equal to the incident angle, and the attenuation effect is not considered; for refractive surfaces, light is refracted according to the refractive index of the object, and the attenuation effect of light during propagation can be considered. Considering the attenuation effect during the propagation of light, the attenuation model can be used to calculate the attenuation of light. The attenuation model usually takes into account the absorption and scattering effects of light in the medium, thereby determining the intensity change of light during propagation. Commonly used attenuation models include exponential attenuation models, linear attenuation models, etc. These models calculate the attenuation of light according to the properties of the medium and the distance the light propagates. According to the propagation of light in the scene, recursively trace the light until the maximum recursive depth is reached or the light no longer intersects the object. Recursively tracing the light can simulate the propagation path of light in the scene, so as to calculate the final color value. Each time the light is traced, the direction and intensity of the light are updated according to the properties of the object and the propagation mode of the light, and the attenuation effect of the light during the propagation process is considered. The colors of all sampling points are mixed to obtain the color value of the final pixel. These color values reflect the influence of the propagation path of light in the scene, such as reflection, refraction, attenuation, etc. Color mixing can adopt weighted average or other mixing methods to ensure the true color value of the final pixel.
[0048] Embodiment 4: The object properties include: reflectivity, transparency and absorption; if the object property is reflective, the direction of the reflected light is calculated according to the law of reflection, and the light is traced; if the object property is transparent, the direction of the refracted light is calculated according to the law of refraction, and the light is traced; if the object property is absorption, the light tracing is terminated directly.
[0049] Specifically, absorption means that an object can absorb the energy of incident light and convert it into other forms of energy, such as heat. When light enters the surface of an object, if the object has absorption properties, the light will be absorbed by the object and will no longer propagate in or around the object. Reflection means that an object can reflect incident light back. When light intersects the surface of an object, if the object has reflection properties, the light will be reflected from the surface of the object at an angle equal to the angle of incidence. This principle is described by the law of reflection, which states that the angle of incidence is equal to the angle of reflection. The direction of the reflected light is calculated based on the angle between the incident light and the surface normal of the object, usually using the vector reflection formula. Transparency means that the object allows light to penetrate and propagate into the object. When light intersects the surface of a transparent object, part of the light will be refracted into the object, while another part may be reflected or pass through the object. Transparent objects usually have different refractive indices, which are used to describe the degree of deflection of light when it enters from one medium into another. The direction of the refracted light is calculated based on the law of refraction, the angle between the incident light and the surface normal, and the refractive indices of the two media.
[0050] Example 5: The attenuation model is expressed using the following formula:
[0051] ;
[0052] This formula describes the rate of change of the intensity of light as it propagates through a medium, taking into account factors such as absorption, scattering, and radiation from the light source. First, Indicates light intensity With path length The rate of change of . Path length It can be understood as the distance that light travels in the medium. The light intensity changes along this path due to the influence of various factors. Describes the attenuation effects due to absorption and scattering. represents the absorption cross-section coefficient, represents the scattering cross-section coefficient, which respectively represents the ability of light to be absorbed and scattered in the medium. This term represents the rate at which light is attenuated due to absorption and scattering of the medium during propagation. The second term on the right side of the formula is Describes the effect of the scattering process on the intensity of light. is the scattering cross section coefficient, is the scattering phase function, which indicates the distribution of light in different directions when it is scattered. For all possible incident directions Integrate and calculate the current direction of the light after it is scattered This term represents the rate at which light increases due to scattering in the medium during propagation. The last term Represents the radiance of the light source, which indicates the intensity of the incident light. This term represents the contribution of the light source to the light intensity. The terms on the right side of the formula respectively describe the intensity changes caused by factors such as absorption, scattering and radiation of the light source in the medium. This formula describes the dynamic changes of light during propagation in the medium. By solving this differential equation, we can understand the propagation behavior of light in the medium and obtain the law of change of light intensity with path length.
[0053] in, is the light source intensity; is the path length of the light ray; is the absorption cross-section coefficient; is the scattering cross-section coefficient; is the scattering phase function, which indicates the direction of light Scattering direction The probability distribution of is the radiance of the light source; Indicates in the direction The intensity of the light source on the beam; the attenuation expression obtained by solving the attenuation model is:
[0054] ;
[0055] in, is the attenuation constant, is the set value, and its value range is 0.15 to 0.3.
[0056] The length of the light path The strength of the place. It can be understood as the distance and intensity of light propagation in the medium. Indicates the brightness or energy of light. is a constant term, representing the attenuation constant. is a setting value used to adjust the rate of decay. A higher value means a faster decay rate, and vice versa. This item is mainly used to adjust the intensity of the entire decay process. Describes the path length of the light The attenuation on . Among them: Represents the total attenuation due to absorption and scattering. is the absorption cross-section coefficient, are the scattering cross-section coefficients, which respectively represent the ability of light to be absorbed and scattered in the medium. Represents the attenuation of the scattering process. It is the scattering phase function, which indicates the distribution of light in different directions when scattering occurs. It is the scattering cross-section coefficient, which indicates the ability of light to be scattered. This term describes the degree of attenuation of light due to medium scattering during propagation.
[0057] Example 6: Scattering Correlation Function Use the following formula to express it:
[0058] ;
[0059] Among them, is the scattering parameter, which is used to describe the degree to which the scattered light deviates from the incident light; when When , the scattering phase function is expressed as forward scattering, and represents forward scattering, represents backscattering; express Direction and The cosine of the angle between the directions.
[0060] Specifically, the scattering parameters is a parameter that describes the degree to which the scattered light deviates from the incident light. When , it indicates forward scattering; when When , it indicates forward scattering; when , it indicates backscattering. The value of affects the shape and deviation of the scattering phase function. It represents the part of the scattering intensity of light that is independent of the scattering direction. When light is scattered, part of the energy will be scattered in different directions, and represents the part of energy that is independent of the scattering direction. The denominator describes the relationship between the scattered light direction and the incident light direction. is a normalization constant that ensures that the integral of the scattering phase function over the entire sphere is 1, that is, it satisfies the properties of the probability density function. Describes the angle between the direction of the scattered light and the direction of the incident light. When the angle between the two is smaller, the denominator is larger, and the possibility of the scattered light deviating from the incident light is smaller; conversely, the larger the angle, the smaller the denominator, and the greater the possibility of the scattered light deviating from the incident light. The power of the denominator is , which makes the scattering phase function present a specific shape, usually showing a distribution with a higher center and a lower edge, which conforms to the physical law of light in the scattering process. The scattering phase function describes the degree to which light deviates from the incident light in the scattering process. By adjusting the scattering parameters , can control the degree of deviation of scattered light, thus affecting the light distribution during the scattering process. When , it indicates forward scattering, and most of the light keeps propagating forward; when When , it indicates forward scattering, and the light propagates more toward the front; when , it indicates backscattering, and the light propagates more toward the rear.
[0061] Embodiment 7: Based on the calculated radiance and luminous flux, the method for determining the properties of an object includes: assuming that the incident luminous flux is , the reflected luminous flux is , the transmitted light flux is , the incident radiance is , the reflected radiance is , the transmitted radiance is ; Use the following formula to calculate the judgment value:
[0062] ;
[0063] like If the value is greater than the upper limit of the set threshold range, the object property is reflective; if is less than the lower limit of the set threshold range, then the object property is transparency; if If it is within the threshold range, it means that the property of the object is absorption.
[0064] Specifically, the incident light flux Indicates the flux of light entering an object, which describes the intensity of the incident light. It represents the radiation intensity of the incident light, that is, the energy density of the light. and transmitted luminous flux They represent the flux of light reflected and transmitted from the surface of an object, respectively, and they describe the intensity of reflected and transmitted light. and transmitted radiance They represent the radiation intensity of reflected and transmitted light, that is, the energy density of reflected and transmitted light. It is obtained by comparing the power of the incident light with the total power of the reflected and transmitted light. It represents the power of the incident light, that is, the energy of the incident light. It represents the total power of reflected and transmitted light, that is, the sum of the energy of reflected and transmitted light. By calculating this ratio, we can understand the relative intensity of incident light and reflected and transmitted light, and thus infer the properties of the object. The value of is used to judge the nature of the object. When it is greater than the upper limit of the set threshold range, it means that the power of the incident light is much greater than the total power of the reflected and transmitted light, that is, most of the light is reflected, so the property of the object is reflective. When it is less than the lower limit of the set threshold range, it means that the power of the incident light is much less than the total power of the reflected and transmitted light, that is, most of the light is transmitted, so the property of the object is transparency. When it is within the threshold range, it means that the power of the incident light is equivalent to the total power of the reflected and transmitted light, that is, the object has a certain absorption of light, so the property of the object is absorptive. In summary, this method can accurately judge the properties of an object, including reflectivity, transparency, and absorptivity, by comparing the power of incident, reflected, and transmitted light. This method is simple and intuitive, suitable for judging the properties of objects in various scenarios, and provides an important reference for research and application in the field of optics.
[0065] Example 8: By training a natural language processing model, the operation instruction is analyzed by natural language analysis to generate an interactive request; the training process of the natural language processing model includes: first, obtaining a training set of operation instructions for training; preprocessing the operation instruction training set, including: word segmentation and removal of stop words; assuming that the input is a training sample in the operation instruction training set , after word segmentation, the word embedding is expressed as ,in Indicates words; is the number of words; the generator network using a generative adversarial network To learn word embedding representation; assuming that the goal of the generator network is to minimize the difference between the true word embedding representation vector and the generated word embedding representation, the optimization goal of the generator network is:
[0066] ;
[0067] in, Represents the random noise vector From the probability distribution Expectations extracted from is the generator network Input, yes Distribution of Representation Generator Network The random noise vector for the input The word embedding representation of the generated operation instructions; Word embedding representation representing the operation instructions, Word embedding representation for real data; Represents the norm of a vector; using a generator network The generated word embedding representation, assuming the input random noise vector is , the generated operation instruction is ; Discriminator network It is used to distinguish generated operation instructions from real operation instructions. The goal of the discriminator network is to maximize the probability that the generated operation instructions are correctly identified as generated, and minimize the probability that the real operation instructions are incorrectly identified as generated. By alternately optimizing the generator network and the discriminator network, the ability of the generator to generate real operation instructions is continuously improved, while the ability of the discriminator to accurately identify generated operation instructions is improved. A classifier is constructed to classify sentences. Assume that the classifier used is a support vector machine, and its decision function is:
[0068] ;
[0069] in is the weight vector, is the bias term; for a given training sample ,in It is an operation instruction. is the corresponding category label; the cross entropy loss function is used to measure the performance of the classifier, and the loss function The formula is:
[0070] ;
[0071] in is the total number of training samples; the gradient descent algorithm is used to optimize the loss function and update the model parameters; assuming that the gradient descent algorithm used is stochastic gradient descent, the parameter update formula is:
[0072] ;
[0073] in represents the model parameters, is the learning rate; is the gradient of the model parameters.
[0074] Specifically, Example 8 describes a process of analyzing operation instructions and generating interactive requests by training a natural language processing model. This process involves using techniques such as generative adversarial networks (GANs) and support vector machines (SVMs) to train the model so that it can understand operation instructions and make correct responses. First, training data needs to be obtained, which includes text samples of operation instructions. It is important to preprocess these samples, including operations such as word segmentation and removal of stop words, so that the model can better understand semantics. Next, a generator network is trained using a generative adversarial network (GAN). The goal of the generator is to learn how to generate The word embedding representation of the generated operation instructions is generated in . By minimizing the difference between the word embedding representation of the generated operation instructions and the word embedding representation of the real data, the generator can gradually improve its ability to generate accurate operation instructions. At the same time, a discriminator network needs to be trained . The goal of the discriminator is to distinguish between generated operation instructions and real operation instructions. By maximizing the probability that the generated operation instructions are correctly discriminated as generated, and minimizing the probability that the real operation instructions are incorrectly discriminated as generated, the discriminator can improve its ability to accurately discriminate generated operation instructions. In the alternating optimization process of the generator and the discriminator, the ability of the generator to generate real operation instructions is continuously improved, while the ability of the discriminator to accurately discriminate generated operation instructions is also improved. In this way, the model can gradually learn the semantics and structure of the operation instructions and generate content similar to the real operation instructions. In addition, a support vector machine (SVM) classifier is constructed to classify the operation instructions. The goal of this classifier is to classify the operation instructions into different categories so that the corresponding interaction requests can be generated. By training this classifier and using the cross entropy loss function to measure its performance, the operation instructions can be more accurately classified and understood. Finally, the gradient descent algorithm is used to optimize the model parameters, and the model is continuously iterated to continuously improve its performance. Through this process, a natural language processing model that can accurately understand the operation instructions and generate interaction requests can be trained, providing a smarter and more natural experience for human-computer interaction.
[0075] Example 9: The optimization goal of the discriminator network is:
[0076] ;
[0077] in, Indicates the real operation instructions From the data distribution of real operation instructions Expectations extracted from Indicates the real operation instructions for a given , the discriminator network The logarithmic probability of identifying it as a real operation instruction; the goal of the generator network is to minimize the probability that the generated operation instruction is identified as generated, and the optimization goal of the generator network is:
[0078] ;
[0079] in is a hyperparameter that balances the difference between the operation instructions generated by the generator network and the real operation instructions.
[0080] Specifically, Example 9 describes the optimization objectives of the discriminator network and the generator network in the generative adversarial network (GAN). The goal of the discriminator network is to maximize the recognition probability of the real operation instructions and maximize the recognition probability of the generated operation instructions. Specifically, the discriminator network hopes to correctly recognize the real operation instructions as real, so as to maximize Indicates the real operation instructions for a given , the discriminator network The logarithmic probability of identifying it as a real operation instruction. At the same time, the discriminator also hopes to correctly identify the generated operation instructions as generated, so maximize Indicates the operation instructions generated by the generator , the discriminator network The goal of the generator network is to minimize the probability that the generated operation instructions are judged as generated, that is, to make the generated operation instructions as close to the real operation instructions as possible. At the same time, in order to ensure that the generated operation instructions are semantically consistent with the real operation instructions, an additional loss term is introduced. Specifically, the goal of the generator is to minimize , represents the operation instructions generated by the generator network The logarithmic probability of being identified as generated. In addition, a balance term is added ,in is a hyperparameter that balances the difference between the operation instructions generated by the generator network and the real operation instructions, Representation Generator Network The random noise vector for the input The word embedding representation of the generated operation instructions, Representation Discriminator Network Word embedding representation of real operation instructions. The purpose of this item is to ensure that the generated operation instructions are as semantically consistent as possible with the real operation instructions by minimizing the difference in word embedding representation between the generated operation instructions and the real operation instructions. Through the above optimization objectives, the generator network and the discriminator network can cooperate with each other to continuously improve the generator's ability to generate real operation instructions, while improving the discriminator's ability to accurately discriminate generated operation instructions. Through this adversarial training method, the model can learn the semantics and structure of the operation instructions, thereby generating realistic and diverse operation instructions.
[0081] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that these specific embodiments are only illustrative, and those skilled in the art may omit, replace, and change the details of the above methods and systems in various ways without departing from the principles and essence of the present invention. For example, merging the above method steps so as to perform substantially the same functions in substantially the same manner to achieve substantially the same results is within the scope of the present invention. Therefore, the scope of the present invention is limited only by the appended claims.
Claims
1. A human-computer interaction system based on Metaverse, characterized in that: The system includes: a metaverse end and a human-computer interaction end; the human-computer interaction end is used to respond to the initial startup instruction of the local end user, generate an initial request at the initial time step, and send the initial request to the metaverse end; the metaverse end generates a metaverse scene according to the received initial request, and sends it to the human-computer interaction end to provide it to the user for interaction; the human-computer interaction end responds to the user's operation instruction at each subsequent time step, analyzes the operation instruction by natural language analysis, generates an interaction request, and sends the interaction request to the metaverse end; after receiving the interaction request, the metaverse end responds to the interaction request, performs interactive operations on objects in the generated metaverse scene, updates the metaverse scene, and then sends the updated metaverse scene back to the human-computer interaction end, thereby realizing a human-computer interaction system based on the metaverse; The metaverse end includes: a scene generation end, an interactive operation end and a communication end; the scene generation end is used to generate a metaverse scene when receiving an initial request; the interactive operation end is used to perform interactive operations on objects in the generated metaverse scene in response to the interactive request after receiving the interactive request, and update the metaverse scene; the communication end is used to send the metaverse scene or the updated metaverse scene back to the human-computer interaction end; the communication end communicates with the human-computer interaction end through WebSocket, and performs JSON data encoding when sending the metaverse scene or the updated metaverse scene; The process of generating a metaverse scene by the scene generation end specifically includes: establishing an initial metaverse scene; generating a description of the corresponding metaverse scene, including: object geometry, object material properties, light source position, light source intensity and camera position; for each pixel, randomly selecting multiple sampling points on it, these sampling points determine the sampling position of each pixel, emitting multiple rays from the camera position through these sampling points, and tracing the paths of these rays in the metaverse scene until they intersect with the light source or other objects, and performing Monte Carlo path tracing to estimate their color; for each ray, using a ray tracing algorithm, performing a ray-object intersection test, and solving the intersection point between the ray and the object to check its intersection with the object in the metaverse scene If there is an intersection, the nearest intersection to the ray and the corresponding object information are returned; otherwise, a null value is returned; the object information includes: the geometric shape of the object and the material properties of the object; once the intersection of the ray and the object is determined, the radiance and the corresponding luminous flux of the point are calculated; based on the calculated radiance and luminous flux, the properties of the object are judged, and the light corresponding to the ray is traced according to the properties of the object, considering the attenuation effect of the light during the propagation process, and the attenuation model is used to calculate the attenuation of the light; according to the light propagation in the scene, the light is recursively traced until the maximum recursive depth is reached or the light no longer intersects the object; the colors of all sampling points are mixed to obtain the color value of the final pixel, forming the final metaverse scene, and providing it to the user for interaction.
2. The human-computer interaction system based on the metaverse according to claim 1, characterized in that: The object properties include: reflectivity, transparency and absorption; if the object property is reflective, the direction of the reflected light is calculated according to the law of reflection, and the light is traced; if the object property is transparent, the direction of the refracted light is calculated according to the law of refraction, and the light is traced; if the object property is absorption, the light tracing is terminated directly.
3. The human-computer interaction system based on the metaverse as claimed in claim 2, characterized in that: The attenuation model is expressed using the following formula: ; in, is the light source intensity; is the path length of the light ray; is the absorption cross-section coefficient; is the scattering cross-section coefficient; is the scattering phase function, which indicates the direction of light Scattering direction The probability distribution of is the radiance of the light source; Indicates in the direction The intensity of the light source on the beam; the attenuation expression obtained by solving the attenuation model is: ; in, is the attenuation constant, is the set value, and its value range is 0.15 to 0.
3.
4. The human-computer interaction system based on the metaverse as claimed in claim 3, characterized in that: Scattering correlation function Use the following formula to express it: ; Among them, is the scattering parameter, which is used to describe the degree to which the scattered light deviates from the incident light; when When , the scattering phase function is expressed as forward scattering, and represents forward scattering, represents backscattering; express Direction and The cosine of the angle between the directions.
5. The human-computer interaction system based on the metaverse as claimed in claim 4, characterized in that: Based on the calculated radiance and luminous flux, the method of judging the properties of the object includes: assuming that the incident luminous flux is , the reflected luminous flux is , the transmitted light flux is , the incident radiance is , the reflected radiance is , the transmitted radiance is ; Use the following formula to calculate the judgment value: ; like If the value is greater than the upper limit of the set threshold range, the object property is reflective; if is less than the lower limit of the set threshold range, then the object property is transparency; if If it is within the threshold range, it means that the property of the object is absorption.
6. The human-computer interaction system based on the metaverse according to claim 5, characterized in that: By training a natural language processing model, the operation instructions are analyzed by natural language analysis to generate interaction requests; The training process of the natural language processing model includes: first, obtaining the training instruction training set; preprocessing the training instruction training set, including: word segmentation and removal of stop words; assuming that the input is a training sample in the training instruction training set , after word segmentation, the word embedding is expressed as ,in Indicates words; is the number of words; the generator network using a generative adversarial network To learn word embedding representation; assuming that the goal of the generator network is to minimize the difference between the true word embedding representation vector and the generated word embedding representation, the optimization goal of the generator network is: ; in, Represents the random noise vector From the probability distribution Expectations extracted from is the generator network Input, yes Distribution of Representation Generator Network The random noise vector for the input The word embedding representation of the generated operation instructions; Word embedding representation representing the operation instructions, Word embedding representation for real data; Represents the norm of a vector; using a generator network The generated word embedding representation, assuming the input random noise vector is , the generated operation instruction is ; The goal of the discriminator network is to maximize the probability that the generated operation instructions are correctly identified as generated, and minimize the probability that the real operation instructions are incorrectly identified as generated; by alternately optimizing the generator network and the discriminator network, the ability of the generator to generate real operation instructions is continuously improved, while the ability of the discriminator to accurately identify generated operation instructions is improved; a classifier is constructed to classify sentences; the classifier used is assumed to be a support vector machine, and its decision function is: ; in, is the weight vector, is the bias term; for a given training sample ,in It is an operation instruction. is the corresponding category label, and the cross entropy loss function is used to measure the performance of the classifier. The formula is: ; in is the total number of training samples; the gradient descent algorithm is used to optimize the loss function and update the model parameters; assuming that the gradient descent algorithm used is stochastic gradient descent, the parameter update formula is: ; in represents the model parameters, is the learning rate; is the gradient of the model parameters.
7. The human-computer interaction system based on the metaverse according to claim 6, characterized in that: The optimization goal of the discriminator network is: ; in, Indicates the real operation instructions From the data distribution of real operation instructions Expectations extracted from Indicates the real operation instructions for a given , the discriminator network The logarithmic probability of identifying it as a real operation instruction; the goal of the generator network is to minimize the probability that the generated operation instruction is identified as generated, and the optimization goal of the generator network is: ; in is a hyperparameter that balances the difference between the operation instructions generated by the generator network and the real operation instructions.
