Metaverse Scenario Automatic Generation and Optimization Platform Based on AIGC Technology
Through the AIGC technology meta-universe scene automation generation and optimization platform, the time-consuming and labor-intensive generation of traditional meta-universe scenes is solved, efficient and customized scene generation is achieved, and user experience and visual effects are improved.
Patent Information
- Application Number
- CN202411483163.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2044-10-23
AI Technical Summary
The generation of traditional meta-universe scenarios requires a lot of manpower and time costs, which is difficult to quickly meet users' personalized needs, resulting in poor user experience.
The metacosmic scene automation generation and optimization platform based on AIGC technology is adopted, including resource management module, resource matching module, scene generation module and scene optimization module. Resource matching is optimized through user portrait and behavior history information, and particle swarm algorithm and texture synthesis technology are used to achieve efficient and customized scene generation.
It realizes efficient, customized and superior visual effects of metacosmic scene generation, improves development efficiency and user experience, and enhances space utilization and visual depth.
Smart Images

Figure CN119379946B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of the metaverse, and particularly to a metaverse scene automatic generation and optimization platform based on AIGC technology. Background Art
[0002] With the development of technology, technologies such as virtual reality and augmented reality have gradually matured, and the metaverse, as a brand-new digital world concept, has emerged globally. However, the generation of traditional metaverse scenes often requires a large amount of human and time costs. Designers need to manually create building frameworks, design component layouts, render textures, etc. This process is complex and time-consuming. In addition, it is difficult to quickly meet the diverse needs of users by manually handling personalized requirements, resulting in an unsatisfactory user experience.
[0003] In response to the above existing problems, the industry has adopted some technical means in recent years to optimize the metaverse scene generation process. For example, parametric design and prefabricated component libraries are used to improve design efficiency, so as to shorten the development time and enhance the generation effect. At the same time, the development of cloud computing and edge computing technologies also provides computational resource support for the real-time rendering and interaction of large-scale scenes.
[0004] Nevertheless, these methods still have deficiencies in terms of efficiency and effect in dealing with the automatic generation of customized metaverse scenes. It is difficult for existing technologies to quickly obtain and combine resources that meet the personalized needs of users, resulting in the generated scenes being difficult to fully meet the personalized expectations of users. Summary of the Invention
[0005] The present invention provides a metaverse scene automatic generation and optimization platform based on AIGC technology to solve at least one of the problems mentioned in the above background art.
[0006] The specific technical solutions provided by this application are as follows:
[0007] A metaverse scene automatic generation and optimization platform based on AIGC technology, including a resource management module, a resource matching module, a scene generation module, and a scene optimization module that are communicatively connected;
[0008] The resource matching module is used to transmit a resource acquisition request to the resource management module according to the metaverse user profile;
[0009] The resource management module returns framework resources, component resources, and texture resources to the resource matching module according to the resource acquisition request;
[0010] The scene generation module includes a framework construction module, a component layout module, and a texture synthesis module; the framework construction module is used to construct a basic building framework according to framework resources; the component layout module is used to determine the positions of components according to component resources and add corresponding components to the basic building framework according to the positions of the components; the texture synthesis module is used to perform texture rendering on the basic building framework and components according to texture resources;
[0011] The scene optimization module is used to optimize the global illumination effect of the scene in real time.
[0012] As a preferred solution, it further includes a user management module; the resource matching module is further used to send a preference information acquisition request to the user management module; the user management module is used to:
[0013] Parse the preference information acquisition request to obtain the user identifier;
[0014] Query the user preference information corresponding to each scene type in the database through the user identifier;
[0015] If the user preference information corresponding to the scene type is empty, it is supplemented by obtaining the reference user preference information with the highest similarity of user basic information in the database;
[0016] Transmit the user preference information corresponding to each scene type to the resource matching module.
[0017] As a preferred solution, the user management module is further used to set user preference information through user behavior history information;
[0018] The setting of user preference information through user behavior history information includes:
[0019] If the amount of information in the user behavior history information of the target user reaches the set threshold, obtain the user behavior history information and its corresponding scene resource combination according to the user basic information;
[0020] Obtain the scene features of the scene resource combination through a feature extraction algorithm;
[0021] Obtain several reference users with the highest similarity of user basic information to the target user in the database, and construct a user analysis matrix according to the user behavior history information and scene features of the target user and several reference users;
[0022] Input the user analysis matrix into the user preference model to obtain the user preference information of the target user and store it in the database.
[0023] As a preferred solution, the user preference model includes a matrix analysis module, a collaborative filtering module, a scenario similarity recommendation module, and a joint decision-making module; the matrix analysis module is used to obtain the scenario features with missing elements in the user analysis matrix, denoted as the missing element columns; the collaborative filtering module is used to calculate the first reference preference value of the missing element columns according to the user analysis matrix and the collaborative filtering algorithm; the scenario similarity recommendation module is used to obtain the scenario features with the highest similarity to the missing element columns, and record the preference value of the scenario features with the highest similarity as the second reference preference value of the missing element columns; the joint decision-making module is used to fill the preference values of the missing element columns according to the first reference preference value and the second reference preference value.
[0024] As a preferred solution, the framework construction module is used to parse the framework resources to obtain a three-dimensional design model and basic structural elements, set several sub-regions and their attribute information in the basic building framework according to the three-dimensional design model and the basic structural elements, construct a path structure through a path generation algorithm, and form a basic building framework according to several sub-regions and the path structure.
[0025] As a preferred solution, the component layout module is used to allocate components to corresponding sub-regions according to the attribute information, and determine the positions of the components in each sub-region through a particle swarm algorithm.
[0026] As a preferred solution, determining the positions of the components in each sub-region through a particle swarm algorithm includes:
[0027] S11. Obtain the preset optimal spacing and preset minimum spacing of each component, and create a group of particles for each sub-region and allocate initial velocities; each particle represents a component layout method;
[0028] S12. Calculate the fitness value of each particle using a fitness function;
[0029] S13. Update the personal best position and the global best position of each particle;
[0030] S14. Update the velocity and position of each particle according to the personal best position and the global best position;
[0031] S15. Repeat steps S12 to S14 until the maximum number of iterations is reached or the fitness value of a particle meets the preset conditions, and output the global best position;
[0032] The fitness function is expressed as:
[0033] ;
[0034] ;
[0035] Where It represents the fitness function of the i-th particle; n is the number of components in the sub-region; both j and k represent the component numbers; It represents the preset optimal spacing of the j-th component; It represents the spacing between the j-th component and the k-th component; It represents the preset minimum spacing of the j-th component.
[0036] As a preferred solution, the texture synthesis module is used to obtain the texture sample maps corresponding to the basic building framework and components, synthesize texture images according to the sizes of the basic building framework and components and the texture sample maps, and perform real-time rendering on the basic building framework and components according to the texture images.
[0037] As a preferred solution, the synthesizing of the texture image according to the sizes of the basic building framework and components and the texture sample maps includes the steps:
[0038] Create a blank target texture image and set the starting position for synthesis of the target texture image; the size of the target texture image is the size of the selected basic structural element or component;
[0039] Obtain the neighborhood error values of each pixel point in the texture sample map to generate a sample map error set; the sample map error set stores the coordinates of each pixel point in the sample map and its neighborhood error value;
[0040] Randomly select values from the texture sample map and fill them into the starting position for synthesis of the target texture image;
[0041] Traverse the pixels to be filled in the target texture image based on the starting position for synthesis and the preset scan line order; obtain the neighborhood error value of the pixel to be filled;
[0042] Loop and execute the pixel filling strategy until the last pixel; the pixel filling strategy is: based on the neighborhood error value of the pixel to be filled, match the sample pixel point corresponding to the neighborhood error value with the smallest relative error in the sample map error set, and use the pixel value of the sample pixel point as the pixel value of the pixel to be filled.
[0043] As a preferred solution, the relative error is expressed as:
[0044] ;
[0045] Among them, The neighborhood of the pixel point t to be filled, Is the neighborhood of the sample pixel point s, Represents the relative error of the neighborhood error value between the filled pixel point t and the sample pixel point s; Represents the neighborhood, which can be represented in matrix form; Represents The pixel value of the neighborhood pixel point (i, j) in; Represents The pixel value of the pixel point (i, j) in the neighborhood; N represents the number of pixel points in the neighborhood.
[0046] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0047] In the embodiment of the present invention, the resource matching module transmits a resource acquisition request to the resource management module according to the metaverse user profile. The resource management module returns framework resources, component resources, and texture resources to the resource matching module according to the resource acquisition request, enabling the customized scenario resources that meet the personalized needs of users to be automatically acquired and efficiently combined, reducing the complexity and time cost of manual intervention; the scenario generation module automatically constructs a scenario according to the framework resources, component resources, and texture resources, and the global illumination is optimized through the scenario optimization module, enhancing the overall visual depth and immersion. This application realizes the generation of a metaverse scenario with high efficiency, customization, and excellent visual effects, improving the development efficiency and user experience.
[0048] The embodiment of the present invention tracks and records the activities of users in different scenarios, obtains comprehensive user behavior history information, and clarifies the specific needs of users in different virtual scenarios to optimize scenario resource matching and provide a personalized and satisfactory user experience.
[0049] In the embodiment of the present invention, the component layout module assigns components to corresponding sub-regions according to attribute information, and uses the particle swarm algorithm to optimize the positions of components in each sub-region, ensuring that the components meet the user's needs and the characteristics of the scenario, and maintaining the visual and functional consistency between the components in the scenario, enhancing the space utilization rate, and making the automatic generation of the scenario more reasonable. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The drawings herein are incorporated into the specification and form a part of the specification, indicating the embodiments that conform to the present invention, and are used together with the specification to explain the principles of the present invention.
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0052] Figure 1 It is a schematic structural diagram of a metaverse scenario automatic generation and optimization platform based on AIGC technology provided by an embodiment of the present invention;
[0053] Figure 2 It is a schematic structural diagram of a metaverse scenario automatic generation and optimization platform based on AIGC technology provided by another embodiment of the present invention;
[0054] Figure 3 A structural schematic diagram of the user preference model provided by an embodiment of the present invention;
[0055] Figure 4 A flowchart showing the synthesis of texture images according to the dimensions and texture sample maps of the basic building framework and components provided by an embodiment of the present invention. Detailed implementation manners
[0056] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0057] It should be noted that all directional indications (such as up, down, left, right, front, back...) in the embodiments of the present invention are only used to explain the relative position relationship and movement conditions between components in a specific posture (as shown in the accompanying drawings). If this specific posture changes, the directional indications will also change accordingly.
[0058] In addition, the descriptions involving "first", "second", etc. in the present invention are only for descriptive purposes, and cannot be understood as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least this feature. In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the fact that those of ordinary skill in the art can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope required by the present invention.
[0059] With the development of technology, technologies such as virtual reality and augmented reality have gradually matured, and the metaverse, as a brand-new digital world concept, has emerged globally. However, the generation of traditional metaverse scenes often requires a large amount of human and time costs. Designers need to manually create building frameworks, design component layouts, render textures, etc. This process is complex and time-consuming. In addition, it is difficult to quickly meet the diverse needs of users by manually handling personalized requirements, resulting in an unsatisfactory user experience.
[0060] In response to the above existing problems, the industry has adopted some technical means in recent years to optimize the metaverse scene generation process. For example, parametric design and prefabricated component libraries are used to improve design efficiency, so as to shorten the development time and enhance the generation effect. At the same time, the development of cloud computing and edge computing technologies also provides computational resource support for the real-time rendering and interaction of large-scale scenes.
[0061] However, these methods still have deficiencies in terms of efficiency and effectiveness in dealing with the automated generation of customized metaverse scenarios. It is difficult for existing technologies to quickly obtain and combine resources that meet the personalized needs of users, resulting in scenarios that are difficult to fully meet the personalized expectations of users.
[0062] Therefore, the present invention provides a metaverse scenario automated generation and optimization platform based on AIGC (Artificial Intelligence Generated Content) technology. The specific implementation process of the present invention will be elaborated in detail below.
[0063] Please refer to Figure 1 , the present invention provides a metaverse scenario automated generation and optimization platform based on AIGC technology, including a resource management module, a resource matching module, a scenario generation module, and a scenario optimization module that are communicatively connected;
[0064] The resource matching module is used to transmit a resource acquisition request to the resource management module according to the metaverse user profile;
[0065] The resource management module returns frame resources, component resources, and texture resources to the resource matching module according to the resource acquisition request;
[0066] The scenario generation module includes a frame construction module, a component layout module, and a texture synthesis module; the frame construction module is used to construct a basic building frame according to the frame resources; the component layout module is used to determine the component positions according to the component resources, and add corresponding components to the basic building frame according to the component positions; the texture synthesis module is used to perform texture rendering on the basic building frame and components according to the texture resources;
[0067] The scenario optimization module is used to optimize the global illumination effect of the scenario in real time.
[0068] In this application, the resource matching module transmits a resource acquisition request to the resource management module according to the metaverse user profile, and the resource management module returns frame resources, component resources, and texture resources to the resource matching module according to the resource acquisition request, enabling the automatic acquisition and efficient combination of customized scenario resources that meet the personalized needs of users, reducing the complexity and time cost of manual intervention; the scenario generation module automatically constructs a scenario according to the frame resources, component resources, and texture resources, and the global illumination optimization is achieved through the scenario optimization module, enhancing the overall visual depth and immersion. This application realizes the generation of metaverse scenarios with high efficiency, customization, and excellent visual effects, improving the development efficiency and user experience.
[0069] Further, the Metaverse user profile includes basic user information and user preference information corresponding to each scenario type. For example, the basic user information includes user identification, age, gender, occupation, several style preferences, etc.; the scenario types may include virtual conference and event venues, virtual educational environments, virtual museums, and virtual shopping environments, and the user preference information corresponding to each scenario type can be constructed through the user behavior history information.
[0070] As a preferred embodiment, please refer to Figure 2 , the automated generation and optimization platform of the present application further includes a user management module; the resource matching module is further configured to send a preference information acquisition request to the user management module; the user management module is configured to:
[0071] Parse the preference information acquisition request to obtain the user identification;
[0072] Query the user preference information corresponding to each scenario type in the database through the user identification;
[0073] If the user preference information corresponding to a certain scenario type is empty, complete it by obtaining the reference user preference information with the highest similarity of the basic user information in the database;
[0074] Transmit the user preference information corresponding to each scenario type to the resource matching module.
[0075] Based on the foregoing, to obtain the Metaverse user profile, the resource matching module will send a preference information acquisition request to the user management module. After receiving the preference information acquisition request, the user management module parses the content therein to identify the user identification (such as user ID). Using the user identification, the user management module retrieves the database to find the user's preference information under different scenario types. If the user preference information for some scenario types is missing, the user management module will find similar users through the basic user information and obtain their preference information as a reference; this step aims to find users with higher similarity by analyzing the user's basic information (such as age, gender, occupation, etc.), so as to borrow their preference information for completion. Finally, the user management module returns the complete or complemented user preference information to the resource matching module, ensuring that even in the case of incomplete user preference information, the intelligent complementation mechanism can be used to improve the personalization of scenario generation and user satisfaction.
[0076] Based on the above embodiments, the Metaverse scene automatic generation and optimization platform can be used to construct virtual conference and event venues, virtual education environments, virtual museums, virtual shopping environments, etc. Taking the virtual museum as an example, the basic building framework constructed by the framework construction module includes the walls, floors, and ceilings of each exhibition hall, as well as the basic layouts such as roads, stairs, and corridors. At this stage, the overall spatial distribution and traffic flow of the museum are displayed internally, and users can know where the exhibition halls and rest areas are. However, the elements in the basic building framework are relatively simple and lack exhibits and detailed decorations. After completing the construction of the basic building framework, the component layout module is used to determine the positions of components such as exhibits, description boards, information screens, guardrails, indicator lights, and rest area furniture according to the component resources and the basic building framework, and automatically configure the interaction elements between the user and each component. The texture synthesis module provides basic textures for main components such as walls, floors, and ceilings, such as the basic patterns of wallpaper, wooden floors, or stone floors, and adds surface textures to components, such as the fabric texture of the sofa, the wood grain and luster of the coffee table, etc.
[0077] Furthermore, the user management module is also used to set user preference information through user behavior history information. Specifically, setting user preference information through user behavior history information includes:
[0078] If the amount of information in the user behavior history information of the target user reaches the set threshold, the user behavior history information and its corresponding scene resource combination are obtained according to the user's basic information. The purpose of this step is to observe and record the data of the user's activities in a specific virtual scene to collect and analyze the process of the user's behavior; the scene resources include framework resources, component resources, and texture resources; the user behavior history information includes the specific activities, operations, and corresponding residence times of the user in various scene types. For example, in a virtual conference and event venue, count the number of meetings the user participates in, the duration, and the interaction frequency; in a virtual education environment, count the number of courses the user participates in, the learning progress, and the completion rate; in a virtual museum, count the number of visits, the residence time, and the types of exhibits browsed by the user; in a virtual shopping environment, count the user's shopping behavior, the types of products browsed, and the purchase history. In this step, the user identity is identified through the user identifier in the user's basic information, and each user's basic information corresponds to multiple pieces of user behavior history information and their corresponding scene resource combinations, that is, the user behavior history information collected by the user under different scene resource combinations. It can be understood that when executing this step, if the amount of information in the user behavior history information does not reach the set threshold, the subsequent steps are not executed, but the user preference information is directly supplemented by referring to the user preference information with the highest similarity in the previously obtained database of user basic information.
[0079] Obtain the scene features of the scene resource combination through the feature extraction algorithm; the scene features include visual elements (color, shape, layout), interactive elements (buttons, links), functional elements (educational tools, exhibits), etc. of the scene;
[0080] Obtain several reference users with the highest similarity of user basic information to the target user in the database, and construct a user analysis matrix based on the user behavior history information and scene features of the target user and several reference users; the user analysis matrix is a two-dimensional matrix, with rows representing users and columns representing scene features. Each element of the matrix represents the preference value of the target user or several reference users for the scene feature, and the preference value is obtained through the preference value of the reference user or by quantifying the user behavior history information. Among them, the quantification and weighting process is specifically as follows: Extract several behavior features according to the user behavior history information, quantify each behavior feature to obtain a behavior feature preference score, and perform weighted calculation on the behavior feature preference score according to the importance of the behavior feature to obtain the preference value of the scene feature. For example, the number of clicks, browsing time, interaction frequency, etc. can be standardized to make them suitable for comparison values, and the weights can be obtained based on experience, business requirements, or learned through a machine learning model.
[0081] Input the user analysis matrix into the user preference model to obtain the user preference information of the target user, and store it in the database. The user preference model in this embodiment can identify the user's preferences for different scenes, so as to predict the user's reaction or score when encountering a scene with similar features in the future.
[0082] Further, please refer to Figure 3 The user preference model includes a matrix analysis module, a collaborative filtering module, a scene similarity recommendation module, and a joint decision-making module; the matrix analysis module is used to obtain the scene features with missing elements in the user analysis matrix for the target user, denoted as the missing element column; the collaborative filtering module is used to calculate the first reference preference value of the missing element column according to the user analysis matrix and the collaborative filtering algorithm; the scene similarity recommendation module is used to obtain the scene feature with the highest similarity to the missing element column, and record the preference value of the scene feature with the highest similarity as the second reference preference value of the missing element column; the joint decision-making module is used to fill the preference value of the missing element column according to the first reference preference value and the second reference preference value.
[0083] In this embodiment, the matrix analysis module is used to identify which scene feature preference values are missing in the user analysis matrix for the user. For example, a certain user has never generated user behavior history information for a certain scene feature, so the preference value corresponding to this scene feature cannot be directly calculated according to the user behavior history information. The matrix analysis module will mark this scene feature of the user as the missing element column.
[0084] The collaborative filtering module is used to calculate the first reference preference value of the element missing column according to the user analysis matrix and the collaborative filtering algorithm, that is, to predict the preferences of the target user based on the behaviors of similar users. By analyzing the similarity between the target user and other users on the non-empty scenario features, the preference value for the scenario features not contacted by the target user is predicted. For example, if two users show similar behaviors in most cases, the system will assume that they may also have similar preferences in other features.
[0085] The scenario similarity recommendation module is used to obtain the scenario feature with the highest similarity to the element missing column, and record the preference value of the scenario feature with the highest similarity as the second reference preference value of the element missing column, that is, to estimate the user's preference value for the element missing column according to the similarity of the scenario features. When the element missing column has a significant correlation with other scenario features, the scenario similarity recommendation module uses other scenario features as the second reference preference value of the element missing column.
[0086] The joint decision-making module synthesizes the prediction results from the collaborative filtering module and the scenario similarity recommendation module, and finally determines the preference value of the element missing column. This module will evaluate and integrate the preference values generated by the collaborative filtering module and the scenario similarity recommendation module to balance the user's historical behavior and the recommendation results of the scenario features, so as to obtain a more accurate and personalized user preference information.
[0087] In this embodiment, by tracking and recording the activities of users in different scenarios, comprehensive user behavior history information is obtained, and the specific needs of users in different virtual scenarios are clarified to optimize the scenario resource matching and provide a personalized and satisfactory user experience.
[0088] Further, the framework construction module is used to parse the framework resources to obtain the three-dimensional design model and basic structure elements, set several sub-regions and their attribute information in the basic building framework according to the three-dimensional design model and basic structure elements, construct the path structure through the path generation algorithm, and form the basic building framework according to several sub-regions and the path structure. Among them, the three-dimensional design model is used to identify the boundaries and positions of each sub-region; the basic structure elements include elements such as exhibition hall locations, walls, floors, and ceilings, and the size and position information can be extracted according to the basic structure elements; the path structure can include roads, corridors, stairs, etc. to ensure the connectivity between sub-regions within the basic building framework. Among them, the path generation algorithm is the Dijkstra algorithm; by generating paths through the Dijkstra algorithm, the shortest path in the internal space of the building can be found to ensure the efficient connectivity between sub-regions.
[0089] Further, the component layout module is used to allocate components to corresponding sub-regions according to attribute information, and determine the positions of components within each sub-region through the particle swarm algorithm. The determining of the positions of components within each sub-region through the particle swarm algorithm includes:
[0090] S11. Obtain the preset optimal spacing and preset minimum spacing of each component, create a group of particles for each sub-region and assign initial velocities; each particle represents a component layout mode;
[0091] S12. Calculate the fitness value of each particle using the fitness function; the fitness function is used to evaluate the layout spacing of components in the particle and the construction of the preset optimal spacing.
[0092] The fitness function is expressed as:
[0093] ;
[0094] ;
[0095] Wherein, represents the fitness function of the i-th particle; n is the number of components in the sub-region; j and k both represent component numbers; represents the preset optimal spacing of the j-th component; represents the spacing between the j-th component and the k-th component; represents the preset minimum spacing of the j-th component.
[0096] S13. Update the personal best position and the global best position of each particle;
[0097] S14. Update the velocity and position of each particle according to the personal best position and the global best position;
[0098] The velocity of the particle is expressed as:
[0099] ,
[0100] The position of the particle is expressed as:
[0101] ,
[0102] Wherein, is the inertia weight, indicating the influence of the velocity of the previous generation of particles on the velocity of the current generation of particles; t represents the iteration round; i represents the serial number of the particle; specifically represents the velocity of the i-th particle at the t-th iteration; specifically represents the position of the i-th particle at the t-th iteration; and They are the first learning factor and the second learning factor respectively. The first learning factor is used to control the amplitude of the particle moving towards the personal best position, and the second learning factor is used to control the amplitude of the particle moving towards the global best position. is the personal best position of the particle, and is the global best position of the group to which the particle belongs. and are both random numbers within the interval [0, 1], which are used to provide randomness for each iteration.
[0103] S15. Repeat steps S12 to S14 until the maximum number of iterations is reached or the fitness value of a particle meets the preset conditions, and output the global best position.
[0104] In this embodiment, the component layout module assigns components to corresponding sub-regions through attribute information, and uses the particle swarm algorithm to optimize the positions of components in each sub-region, ensuring that the components meet the user's needs and scene characteristics, maintaining the visual and functional consistency between components in the scene, enhancing the space utilization rate, and making the automatic generation of the scene more reasonable.
[0105] Furthermore, the texture synthesis module is used to obtain the texture sample maps corresponding to the basic building framework and components, synthesize texture images according to the dimensions of the basic building framework and components and the texture sample maps, and perform real-time rendering on the basic building framework and components according to the texture images.
[0106] Among them, the texture sample map is a two-dimensional image file used to define the surface appearance in 3D modeling and rendering. It provides visual information about surface details, such as color, pattern, material, etc. The texture image is a large-size image generated by splicing, expanding, or synthesizing texture sample maps. In one embodiment, the texture image is synthesized by repeatedly splicing and tiling the texture sample maps to generate a large-size image according to the dimensions of the basic building framework and components to cover the surfaces of the building framework and components. In another embodiment, the texture image is synthesized by analyzing and mixing adjacent regions through a domain search algorithm to gradually synthesize a large-size texture image to avoid obvious boundaries and seams.
[0107] Specifically, please refer to Figure 4 The synthesis of the texture image according to the dimensions of the basic building framework and components and the texture sample maps includes the steps of:
[0108] S21. Create a blank target texture image and set the starting position for the synthesis of the target texture image; the size of the target texture image is the size of the selected basic structural element or component;
[0109] S22. Obtain the domain error values of each pixel point in the texture sample map to generate a sample map error set; the sample map error set stores the coordinates of each pixel point in the sample map and its domain error value;
[0110] S23. Randomly select values from the texture sample map and fill them into the starting position of the synthesis of the target texture image;
[0111] S24. Traverse the pixels to be filled in the target texture image based on the starting position of synthesis and the preset scan line order; obtain the neighborhood error value of the pixels to be filled;
[0112] S25. Loop and execute the pixel filling strategy until the last pixel; the pixel filling strategy is: based on the neighborhood error value of the pixel to be filled, match the sample image pixel point corresponding to the neighborhood error value with the smallest relative error in the sample error set, and use the pixel value of the sample image pixel point as the pixel value of the pixel to be filled.
[0113] In one embodiment, the neighborhood error value is an L-shaped neighborhood error value. In this embodiment, the neighborhood of the pixel to be filled is not an unconventional complete rectangular window, but an L-shaped area. This selection method is more suitable for filling textures in the order of scan lines because within the L-shaped area, many filled pixels can be used to calculate the error value. The L-shaped neighborhood consists of two parts: a horizontal line segment and a vertical line segment, which together form an L shape. For example, the L-shaped neighborhood of the pixel to be filled is set as a vertical line segment consisting of two pixels and a horizontal line segment consisting of five pixels around the pixel to be filled.
[0114] The relative error is expressed as:
[0115] ;
[0116] Where The neighborhood of the pixel point t to be filled, Is the neighborhood of the sample image pixel point s, Represents the relative error of the neighborhood error value between the filled pixel point t and the sample image pixel point s; Represents the neighborhood, which can be represented in matrix form; Represents The pixel value of the neighborhood pixel point (i, j) in; Represents The pixel value of the neighborhood pixel point (i, j) in; N represents the number of pixel points in the neighborhood.
[0117] In this embodiment, by point-by-point matching and mixing, seams and boundaries are reduced, making the final texture image natural and continuous; through the neighborhood search algorithm, randomness and local feature processing are appropriately introduced to avoid generating monotonous and repetitive texture images, making the texture image have higher heterogeneity.
[0118] In one embodiment, the scene optimization module, which performs real-time optimization of the global illumination of the scene, includes:
[0119] Starting from the eye position of the metaverse user, an initial ray is generated and projected into the scene;
[0120] Trace the path of the ray, which finally reaches the light source through multiple interactions such as reflection, refraction, and scattering; where refers to the entity or point that emits light in the scene.
[0121] When the ray interacts with the object surface, calculate the surface lighting properties of the intersection point; the surface lighting properties include normal, reflectivity, refractive index, etc.
[0122] Use the BSDF (Bidirectional Scattering Distribution Function) model to determine the ray propagation direction;
[0123] Determine the final color of the pixels in the scene by accumulating the rays traced to the light source;
[0124] Use the Russian roulette method to determine the ray tracing stop condition. In this embodiment, when the ray is traced in the scene, it will continuously reflect, refract, or scatter with the object surface, and each interaction will increase the computational cost. To avoid infinite tracing, each ray needs a termination condition. The Russian roulette method terminates the ray randomly after a certain interaction. Specifically, it can calculate the termination probability according to the reflectivity and refractive index of the ray at the current interaction point. If the termination probability is high, the ray is more likely to continue tracing; otherwise, it is more likely to terminate. Specifically, a random number between 0 and 1 is generated. If the random number is less than the termination probability, the ray continues to trace; otherwise, the ray terminates. Further, to maintain the consistency and physical authenticity of the result, the contribution of the terminated ray needs to be weighted according to the termination probability that determines the ray to continue tracing. For the ray that continues to trace, its contribution will be amplified, that is, divided by the termination probability, to make up for the loss caused by random termination.
[0125] In this embodiment, the Russian roulette method reduces the average tracing depth of the rays. This reduces the resources and time required for each frame calculation, thereby improving the rendering speed of the scene, and can reasonably allocate the calculation focus of tracing rays under limited computing resources to ensure that the light and shadow changes in the high dynamic range are effectively presented. The technical effect of this embodiment is particularly significant in large-scale and complex scenes.
[0126] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A metaverse scene automatic generation and optimization platform based on AIGC technology, characterized in that: It includes a resource management module, a resource matching module, a scene generation module, and a scene optimization module that are communicatively connected; The resource matching module is used to transmit a resource acquisition request to the resource management module according to the metaverse user profile; The resource management module returns framework resources, component resources, and texture resources to the resource matching module according to the resource acquisition request; The scene generation module includes a framework construction module, a component layout module, and a texture synthesis module; the framework construction module is used to construct a basic building framework according to the framework resources; the component layout module is used to determine the component positions according to the component resources, and add corresponding components to the basic building framework according to the component positions; the texture synthesis module is used to perform texture rendering on the basic building framework and components according to the texture resources; The scene optimization module is used to optimize the global illumination effect of the scene in real time; It also includes a user management module; the resource matching module is also used to initiate a preference information acquisition request to the user management module; the user management module is used to: Parse the preference information acquisition request to obtain the user identifier; Query the user preference information corresponding to each scene type in the database through the user identifier; If the user preference information corresponding to the scene type is empty, it is completed by obtaining the reference user preference information with the highest similarity of the user basic information in the database; Transmit the user preference information corresponding to each scene type to the resource matching module.
2. The automated generation and optimization platform for the metaverse scenario based on the AIGC technology according to claim 1, wherein: The user management module is also used to set the user preference information through the user behavior history information; The setting of the user preference information through the user behavior history information includes: If the amount of information in the user behavior history information of the target user reaches the set threshold, obtain the user behavior history information and its corresponding scene resource combination according to the user basic information; Obtain the scene features of the scene resource combination through the feature extraction algorithm; Obtain several reference users with the highest similarity of the user basic information to the target user in the database, and construct a user analysis matrix according to the user behavior history information and scene features of the target user and several reference users; Input the user analysis matrix into the user preference model to obtain the user preference information of the target user, and store it in the database.
3. The automated generation and optimization platform for the metaverse scenario based on AIGC technology according to claim 2, characterized in that: The user preference model includes a matrix analysis module, a collaborative filtering module, a scene similarity recommendation module, and a joint decision-making module; the matrix analysis module is used to obtain the scene features with missing elements in the user analysis matrix of the target user, denoted as the missing element columns; the collaborative filtering module is used to calculate the first reference preference value of the missing element columns according to the user analysis matrix and the collaborative filtering algorithm; the scene similarity recommendation module is used to obtain the scene features with the highest similarity to the missing element columns, and denote the preference value of the scene features with the highest similarity as the second reference preference value of the missing element columns; The joint decision-making module is used to fill the preference values of the missing element columns according to the first reference preference value and the second reference preference value.
4. The metaverse scenario automated generation and optimization platform based on AIGC technology according to claim 1, characterized in that: The framework construction module is used to parse the framework resources to obtain the 3D design model and basic structure elements, set several sub-regions and their attribute information in the basic building framework according to the 3D design model and basic structure elements, construct the path structure through the path generation algorithm, and form the basic building framework according to several sub-regions and the path structure.
5. The automated generation and optimization platform for the metaverse scenario based on the AIGC technology according to claim 1, characterized in that: The component layout module is used to allocate components to the corresponding sub-regions according to the attribute information, and determine the positions of the components in each sub-region through the particle swarm algorithm.
6. The automated generation and optimization platform for the metaverse scenario based on the AIGC technology according to claim 5, wherein: Determining the positions of the components in each sub-region through the particle swarm algorithm includes: S11. Obtain the preset optimal spacing and preset minimum spacing of each component, and create a group of particles for each sub-region and assign initial velocities; each particle represents a component layout method; S12. Calculate the fitness value of each particle using the fitness function; S13. Update the personal best position and the global best position of each particle; S14. Update the velocity and position of each particle according to the personal best position and the global best position; S15. Repeat steps S12 to S14 until the maximum number of iterations is reached or the fitness value of a particle meets the preset conditions, and output the global best position; The fitness function is expressed as: ; ; Among them, represents the fitness function of the i-th particle; n is the number of components in the sub-region; both j and k represent the component numbers; represents the preset optimal spacing of the j-th component; represents the spacing between the j-th component and the k-th component; represents the preset minimum spacing of the j-th component.
7. The automated generation and optimization platform for the metaverse scenario based on the AIGC technology according to claim 1, characterized in that: The texture synthesis module is used to obtain the texture sample maps corresponding to the basic building framework and components, synthesize the texture image according to the sizes of the basic building framework and components and the texture sample maps, and perform real-time rendering on the basic building framework and components according to the texture image.
8. The metaverse scenario automatic generation and optimization platform based on AIGC technology according to claim 7, characterized in that: Synthesizing the texture image according to the sizes of the basic building framework and components and the texture sample maps includes the steps of: Create a blank target texture image and set the synthesis start position of the target texture image; the size of the target texture image is the size of the selected basic structure element or component; Obtain the neighborhood error values of each pixel point in the texture sample map to generate a sample map error set; the sample map error set stores the coordinates of each pixel point in the texture sample map and its neighborhood error value; Randomly select values from the texture sample map and fill them into the synthesis start position of the target texture image; Traverse the pixels to be filled in the target texture image based on the synthesis start position and the preset scan line order; obtain the neighborhood error value of the pixel to be filled; Loop to execute the pixel filling strategy until the last pixel; the pixel filling strategy is: based on the neighborhood error value of the pixel to be filled, match the sample pixel point corresponding to the neighborhood error value with the smallest relative error in the sample map error set, and use the pixel value of the sample pixel point as the pixel value of the pixel to be filled.
9. The automated generation and optimization platform for the metaverse scenario based on AIGC technology according to claim 8, characterized in that: The relative error is expressed as: ; Among them, The neighborhood of the pixel point t to be filled Is the neighborhood of the sample pixel point s Represents the relative error of the neighborhood error value between the filled pixel point t and the sample pixel point s; Represents the neighborhood, which can be represented in matrix form; Represents The pixel value of the neighborhood pixel point (i, j) in Represents The pixel value of the neighborhood pixel point (i, j) in; N represents the number of pixel points in the neighborhood.
Citation Information
Patent Citations
Metacosm scene generation system based on AIGC
CN118132781A