A 3D virtual space application method, device, equipment and medium based on artificial intelligence

Through the 3D virtual space application method based on artificial intelligence, the problems of insufficient realism of virtual space and emotional feedback bias are solved, and a virtual space experience that is closer to reality and accurate emotional interaction are achieved.

CN118860161BActive Publication Date: 2024-12-17ENTERTAINMENT ELECTRONICS (SHANGHAI) TECHNOLOGY CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411338372.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-17
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

The authenticity of virtual space in existing virtual reality technology is insufficient, and it is difficult for virtual characters to provide accurate feedback based on user's emotions or body changes, resulting in a deviation in emotional value.

Method used

Adopt 3D virtual space application method based on artificial intelligence, and improve visual rendering by obtaining virtual space construction resources and virtual portrait construction resources, and manipulating virtual non-player characters for virtual interaction based on user emotional parameters to improve the depth information of the virtual space and Emotional feedback.

Benefits of technology

It improves the authenticity and user experience of the virtual space, enhances the emotional value of users, and provides visual effects that are closer to reality and accurate emotional feedback by dynamically updating the size of the blur circle and emotional judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118860161B_ABST
    Figure CN118860161B_ABST
Patent Text Reader

Abstract

The present invention relates to a 3D virtual space application method, device, equipment and medium based on artificial intelligence, belonging to the field of virtual scene construction. The method includes: obtaining virtual space construction resources, including virtual scene construction resources and virtual portrait construction resources; generating 3D virtual space based on virtual space construction resources, and the 3D virtual space includes 3D virtual scenes and 3D virtual characters; improving the visual rendering of the 3D virtual space and obtaining the improved 3D virtual space; users log in to the improved 3D virtual space through VR technology and control 3D virtual users to perform virtual interaction; identifying the user's emotional tendency in the virtual interaction process, and controlling the 3D virtual non-player character to perform virtual interaction with the 3D virtual user according to the user's emotional tendency, so that the constructed virtual space is closer to the visual effect of the human eye, and realizes scientific and humanized emotional value for users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of virtual scene construction, and specifically relates to a 3D virtual space application method, device, equipment and medium based on artificial intelligence. Background Art

[0002] Virtual reality technology mainly includes aspects such as simulated environment, perception, natural skills and sensor equipment. The simulated environment is a real-time dynamic three-dimensional realistic image generated by a computer. Perception means that the ideal VR should have all the perceptions that people have. In addition to the visual perception generated by computer graphics technology, there are also hearing, touch, force, movement and other perceptions, and even smell and taste. Natural skills refer to the movement of a person's head, eyes, gestures, or other human behavior. The computer processes the data that is adapted to the participant's actions, responds to the user's input in real time, and feeds back to the user's five senses. With the continuous advancement of virtual reality technology, people can project any object into the virtual space and interact with it in a virtual way to meet emotional needs, but the authenticity of the current virtual space still needs to be improved. It still has a certain gap with what the human eye sees, and it is difficult for virtual characters to make accurate feedback based on people's emotions or body changes, and the emotional value provided may be biased. Summary of the invention

[0003] In order to solve the above problems existing in the prior art, the present invention provides a 3D virtual space application method, device, equipment and medium based on artificial intelligence.

[0004] The purpose of the present invention can be achieved through the following technical solutions:

[0005] A 3D virtual space application method based on artificial intelligence, the implementation of the 3D virtual space application method comprises the following steps:

[0006] Acquire virtual space construction resources, wherein the virtual space construction resources include virtual scene construction resources and virtual portrait construction resources;

[0007] Generate a 3D virtual space based on the virtual space construction resources, the 3D virtual space includes a 3D virtual scene and 3D virtual characters, the 3D virtual characters include 3D virtual users and 3D virtual non-player characters;

[0008] Performing improved visual rendering processing on the 3D virtual space according to the depth information of the 3D virtual space to obtain an improved 3D virtual space, wherein the depth information includes a first depth value of the 3D virtual scene and a second depth value of the 3D virtual character;

[0009] The user logs into the improved 3D virtual space through VR technology and controls the 3D virtual user to interact virtually with the 3D virtual space;

[0010] The user emotion tendency is determined according to the user emotion parameters in the virtual interaction process, and the 3D virtual non-player character is controlled to perform virtual interaction with the 3D virtual user according to the user emotion tendency.

[0011] Preferably, obtaining the virtual scene construction resources includes:

[0012] Acquire data of a scene to be constructed, wherein the data of the scene to be constructed includes at least any one of a picture, a video, and a text description;

[0013] The virtual scene construction resources are extracted according to the scene data to be constructed.

[0014] Preferably, obtaining the virtual portrait building resource includes:

[0015] Get realistic portrait videos;

[0016] Performing frame processing on the real portrait video and obtaining frame-by-frame real portrait images;

[0017] Determine the region of interest of the framed realistic portrait image by a three-frame difference method;

[0018] Performing target segmentation on the region of interest to obtain the virtual portrait building resource;

[0019] Preferably, the step of performing improved visual rendering on the 3D virtual space to obtain an improved 3D virtual space specifically includes:

[0020] Acquire a first depth value and a second depth value of the 3D virtual space, and render the first depth value and the second depth value into a texture by using a multi-rendering target technology to obtain a depth texture;

[0021] Extracting the three-dimensional coordinates of the 3D virtual scene and the three-dimensional coordinates of the 3D virtual character based on the depth texture and converting them into spherical coordinates in a spherical coordinate system;

[0022] Acquire a focus pixel point and a focus distance, wherein the focus pixel point is the center point of the 3D virtual user's viewing angle, and the focus distance is the distance between the 3D virtual user and the focus pixel point;

[0023] An initial blur circle size and an ideal blur circle size are preset based on the spherical coordinates, the focus pixel point, and the focus distance, and the initial blur circle size is dynamically updated until the ideal blur circle size is reached to obtain the improved 3D virtual space.

[0024] Preferably, the presetting of an initial blur circle size and an ideal blur circle size based on the spherical coordinates, the focus pixel point, and the focus distance, and dynamically updating the initial blur circle size until the ideal blur circle size is reached to obtain the improved 3D virtual space comprises:

[0025] The light intensity of the focused pixel point is calculated using the following formula:

[0026] ,

[0027] Among them, U is the light intensity of the focused pixel, R is the red value, G is the green value, and B is the blue value;

[0028] The visual persistence time of human eyes is calculated based on the light intensity of the focused pixel point, and the calculation formula is:

[0029] ,

[0030] Among them, t is the visual retention time of human eyes, and U is the light intensity of the focused pixel;

[0031] The initial blur circle update weight is calculated according to the visual persistence time of the human eye, and the calculation formula is:

[0032] ,

[0033] in, Update weight for initial blur circle, t is visual retention time of human eye;

[0034] Based on the initial blur circle update weight, an initial blur circle dynamic update formula is obtained and used to dynamically update the initial blur circle size until the current blur circle size is consistent with the ideal blur circle size. The initial blur circle dynamic update formula is:

[0035] ,

[0036] in, is the current blur circle size, Update the weights for the initial blur circle, is the initial blur circle size, is the size of the blur circle obtained from the last dynamic update, The initial value is 0.

[0037] Preferably, determining the user emotional tendency according to the user emotional parameters in the virtual interaction process, and manipulating the 3D virtual non-player character to perform virtual interaction with the 3D virtual user according to the user emotional tendency comprises:

[0038] Get user emotion parameters;

[0039] The user emotion change index is calculated by the user emotion parameter, and a user emotion change model is constructed according to the user emotion change index and user emotion change information is output, wherein the user emotion change information includes user emotion fluctuation information and user emotion stability information; wherein the user emotion change index is calculated by the following calculation formula:

[0040] ,

[0041] in, is the user emotion change index, Tt is the pupil diameter ratio, CJ is the lip angle, V is the speech rate parameter, and BK is the nostril dilation degree. The user emotion parameter includes the pupil diameter ratio, the lip angle, the speech rate parameter, and the nostril dilation degree;

[0042] Determine the user emotion change information by comparing the user emotion change index with a preset user emotion change index threshold;

[0043] Determine the user emotion change index, when the user emotion change index is greater than or equal to the user emotion change index threshold, the user emotion change model outputs the user emotion fluctuation information to collect the user's EEG signal through an EEG device, and outputs the user's emotion trend based on the recognition result of the user's EEG signal, the user's emotion trend includes happiness, sadness, fear, anxiety, and tension;

[0044] When the user emotion change index is less than the user emotion change index threshold, the user emotion change model outputs the user emotion stability information.

[0045] In one example, the present application also provides an artificial intelligence-based 3D virtual space application device for executing the above-mentioned 3D virtual space application method, including: a resource acquisition module, a virtual space construction module, a visual rendering module, and a virtual interaction module;

[0046] The resource acquisition module is used to acquire virtual space construction resources, and the virtual space construction resources include virtual scene construction resources and virtual portrait construction resources;

[0047] The virtual space construction module is used to generate a 3D virtual space based on the virtual space construction resources, wherein the 3D virtual space includes a 3D virtual scene and 3D virtual characters, and the 3D virtual characters include a 3D virtual user and a 3D virtual non-player character;

[0048] The visual rendering module is used to perform improved visual rendering processing on the 3D virtual space according to the depth information of the 3D virtual space to obtain an improved 3D virtual space, wherein the depth information includes a first depth value of the 3D virtual scene and a second depth value of the 3D virtual character;

[0049] The virtual interaction module is used for the user to log in to the improved 3D virtual space through VR technology and control the 3D virtual space and the 3D virtual character to perform virtual interaction; and is used to determine the user's emotional trend according to the user's emotional parameters during the virtual interaction process, and control the 3D virtual non-player character to perform virtual interaction with the 3D virtual user according to the user's emotional trend.

[0050] Preferably, the obtaining of the virtual scene construction resources includes:

[0051] Acquire data of a scene to be constructed, wherein the data of the scene to be constructed includes at least any one of a picture, a video, and a text description;

[0052] The virtual scene construction resources are extracted according to the scene data to be constructed.

[0053] In one example, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned 3D virtual space application method when executing the program.

[0054] In one example, the present application also provides a storage medium containing computer executable instructions, which are used to execute the above-mentioned 3D virtual space application method when executed by a computer processor.

[0055] The beneficial effects of the present invention are:

[0056] (1) By building a 3D virtual space, users can interact virtually with other users or non-player characters, so that children and lonely elderly people, long-distance lovers, and even the living and the dead can interact across time and space, providing emotional value for users;

[0057] (2) Build a virtual image by uploading a real-life portrait video, making the virtual portrait closer to reality and giving users a stronger sense of immersion;

[0058] (3) By segmenting the region of interest and obtaining virtual portrait building resources, the acquisition of virtual portrait building resources is more accurate, and the target segmentation method has the advantages of simplicity and high efficiency;

[0059] (4) By presetting the initial blur circle size and the ideal blur circle size based on the spherical coordinates, the focus pixel point, and the focus distance, the initial blur circle size is dynamically updated until the ideal blur circle size is reached and an improved 3D virtual space is obtained, so that the visual effect of the virtual space is closer to reality, simulating the blur effect of the human eye, and further enhancing the user's sense of immersion;

[0060] (5) Calculate the user emotion change index through the user emotion parameters and judge whether the user has emotional fluctuations. The multi-indicator judgment method makes the judgment result more accurate;

[0061] (6) When the user's emotional fluctuations are detected, AI is used to control non-player characters to interact with the user virtually, such as hugging and comforting, to enhance the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 The present invention is a flowchart of the steps of a 3D virtual space application method based on artificial intelligence. DETAILED DESCRIPTION

[0063] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments.

[0064] The working principle and use process of the present invention:

[0065] See also Figure 1 , a 3D virtual space application method based on artificial intelligence, comprising:

[0066] S1: Acquire virtual space construction resources, where the virtual space construction resources include virtual scene construction resources and virtual portrait construction resources;

[0067] S2: generating a 3D virtual space based on the virtual space construction resources, wherein the 3D virtual space includes a 3D virtual scene and 3D virtual characters, wherein the 3D virtual characters include 3D virtual users and 3D virtual non-player characters, wherein the 3D virtual users include a first 3D virtual user, a second 3D virtual user to an Nth 3D virtual user, and the 3D virtual non-player characters include a first 3D virtual non-player character, a second 3D virtual non-player character to an nth 3D virtual non-player character;

[0068] S3: performing improved visual rendering processing on the 3D virtual space according to the depth information of the 3D virtual space to obtain an improved 3D virtual space;

[0069] S4: The user logs into the improved 3D virtual space through VR technology and controls the 3D virtual user to interact virtually with the 3D virtual scene and the 3D virtual character;

[0070] S5: determining a user emotion tendency according to the user emotion parameters in the virtual interaction process, and manipulating the 3D virtual non-player character to perform virtual interaction with the 3D virtual user according to the user emotion tendency.

[0071] In this embodiment, obtaining virtual space construction resources, which include virtual scene construction resources and virtual portrait construction resources, can be specifically implemented by the following steps:

[0072] S101: Acquire the virtual scene construction resources through artificial intelligence;

[0073] S102: Acquire the virtual portrait building resources through a segmentation algorithm.

[0074] In this embodiment, the virtual scene construction resources are obtained through artificial intelligence, which can be implemented through the following steps:

[0075] S101-1: Upload the scene data to be built, wherein the scene data to be built includes but is not limited to at least any one of a picture, a video, and a text description;

[0076] S101 - 2: extracting the virtual scene construction resources according to the scene data to be constructed through artificial intelligence.

[0077] In this embodiment, the virtual portrait building resources are obtained by target segmentation, so that the virtual portrait is closer to reality and the user has a stronger sense of immersion. Specifically, the following steps can be performed:

[0078] S102-1: Upload a real-life portrait video, where the real-life portrait video must show the person’s front face;

[0079] S102-2: performing frame processing on the real portrait video and obtaining a framed real portrait image, determining a region of interest of the framed real portrait image according to a three-frame difference method, wherein the three-frame difference method specifically selects three consecutive frames of the framed real portrait image and obtains a difference image of two adjacent frames of the framed real portrait image, performs binarization processing on the difference image using a threshold method and obtains a difference binary image, and performs a logical operation on the difference binary image to obtain the region of interest;

[0080] S102-3: Improve target segmentation of the region of interest and obtain the virtual portrait building resources. The acquisition of the virtual portrait building resources is more accurate, and the target segmentation method has the advantages of simplicity and high efficiency. The improved target segmentation is specifically:

[0081] The region of interest is divided into a target region and a background region by a closed boundary, the target region is the region where the real portrait is located, and an energy function is constructed based on the target region and the background region. The expression of the energy function is:

[0082] ,

[0083] Among them, E is the energy function, λ is the weighting coefficient, A is the target area, I is the region of interest, CA is the average gray value of the target area, B is the background area, CB is the average gray value of the background area, L is the closed boundary smoothness, The first guarantee item is is the second guarantee item, and when located at the boundary of the target area, the sum of the first guarantee item and the second guarantee item is the smallest;

[0084] The level set function is introduced to describe the closed boundary and obtain the energy function. The expression of the energy function is:

[0085] ,

[0086] in, To describe the energy function, θ is the level set function, λ is the weighting coefficient, I is the region of interest, is the derivative of the level set function, CA is the average gray value of the target area, is the level set function Hamiltonian operator, |·| is the absolute value;

[0087] Obtaining an optimal closed boundary, wherein the optimal closed boundary is the closed boundary corresponding to the minimum value of the description energy function;

[0088] The virtual portrait construction resource is obtained based on the optimal closed boundary.

[0089] In this embodiment, the 3D virtual space is improved in visual rendering and the improved 3D virtual space is obtained, so that the visual rendering effect of the 3D virtual space is closer to the visual effect of human eyes, which can be specifically implemented by the following steps:

[0090] S301: Acquire depth information of the 3D virtual space, where the depth information stores a first depth value of the 3D virtual scene and a second depth value of the 3D virtual character in the 3D virtual space, and render the depth information into a texture through a multi-rendering target technology to obtain a depth texture;

[0091] S302: extracting the three-dimensional coordinates of the 3D virtual scene and the three-dimensional coordinates of the 3D virtual character based on the depth texture and converting them into spherical coordinates in a spherical coordinate system;

[0092] S303: Acquire a focus pixel point and a focus distance, wherein the focus pixel point is a center point of a 3D virtual user's viewing angle, and the focus distance is a distance between the 3D virtual user and the focus pixel point;

[0093] S304: Preset an initial blur circle size and an ideal blur circle size based on the spherical coordinates, the focus pixel point, and the focus distance, and dynamically update the initial blur circle size until the ideal blur circle size is reached to obtain the improved 3D virtual space, so that the visual effect of the virtual space is closer to reality, simulating the blur effect of the human eye, and further enhancing the user's sense of immersion.

[0094] In this embodiment, an initial blur circle size and an ideal blur circle size are preset based on the spherical coordinates, the focus pixel point, and the focus distance, and the initial blur circle size is dynamically updated until the ideal blur circle size is reached and the improved 3D virtual space is obtained. Specifically, the following steps may be performed:

[0095] S304-1: Calculate the focus pixel light intensity of the focus pixel, the calculation formula is:

[0096] ,

[0097] Among them, U is the light intensity of the focused pixel, R is the red value, G is the green value, and B is the blue value;

[0098] S304-2: Calculate the visual persistence time of human eyes based on the light intensity of the focused pixel point, and the calculation formula is:

[0099] ,

[0100] Among them, t is the visual retention time of human eyes, and U is the light intensity of the focused pixel;

[0101] S304-3: Calculate the initial blur circle update weight according to the visual persistence time of the human eye, and the calculation formula is:

[0102] ,

[0103] in, Update weight for initial blur circle, t is visual retention time of human eye;

[0104] S304-4: Obtaining a dynamic update formula for the initial blur circle based on the initial blur circle update weight and using it to dynamically update the initial blur circle size until the current blur circle size is consistent with the ideal blur circle size. The dynamic update formula for the initial blur circle is:

[0105] ,

[0106] in, is the current blur circle size, Update the weights for the initial blur circle, is the initial blur circle size, is the size of the blur circle obtained from the last dynamic update, The initial value is 0.

[0107] In this embodiment, the user's emotional tendency is determined according to the user's emotional parameters in the virtual interaction process, and the 3D virtual non-player character is controlled to perform virtual interaction with the 3D virtual user according to the user's emotional tendency, such as hugging, comforting, etc., so that children and lonely elderly people, long-distance lovers, and even the living and the dead can have a method of breaking the boundaries of time and space to interact, so as to achieve the purpose of providing emotional value for users. Specifically, it can be implemented by the following steps:

[0108] S501: Obtain user emotion parameters, wherein the user emotion parameters include pupil diameter ratio, lip angle, speech speed parameter, and nostril dilation. The pupil diameter ratio is the ratio of the user's pupil diameter to the user's pupil diameter in a naturally relaxed state. The lip angle is the angle formed by the corners of the user's mouth and the lowest point of the lips. The speech speed parameter is the ratio of the user's speech speed to the user's speech speed in a natural state. The nostril dilation is the ratio of the user's nostril diameter to the nostril diameter in a naturally relaxed state. It should be noted that when a user expresses different emotions, there will be correlated changes between their user emotion parameters. For example, when expressing tension, the speech speed will increase, which will affect the user's mood. Correspondingly, the dilation degree of the nostrils and the pupil diameter will also increase accordingly. Therefore, whether the user emotional parameters are reasonable can be judged by judging the relationship between the user emotional parameters. For example, if the speaking speed increases, but the changes in the nostrils and the pupil diameter do not change, it means that it may be concealing or there is a data collection error; specifically, after obtaining the user emotional parameters, the user emotional parameters can be converted into an emotional parameter matrix, and then the correlation value of the emotional parameter matrix can be calculated according to the Pearson coefficient. If the correlation value is within the preset range, the user emotional parameters are judged to be normal, otherwise it is judged to be abnormal. At this time, the user emotional parameters are re-identified or abnormal alarm processing is performed.

[0109] S502: Calculating a user emotion change index through the user emotion parameter, constructing a user emotion change model according to the user emotion change index, and outputting user emotion change information, wherein the user emotion change information includes user emotion fluctuation information and user emotion stability information;

[0110] The calculation formula of the user emotion change index is:

[0111] ,

[0112] in, is the user emotion change indicator, Tt is the pupil diameter ratio, CJ is the lip angle, V is the speech speed parameter, and BK is the nostril dilation degree;

[0113] Preset a user emotion change index threshold, and obtain the user emotion change information by comparing the user emotion change index with the user emotion change index threshold;

[0114] Determining the user emotion change index, when the user emotion change index is greater than or equal to the user emotion change index threshold, the user emotion change model outputs the user emotion fluctuation information;

[0115] When the user emotion change index is less than the user emotion change index threshold, the user emotion change model outputs the user emotion stability information;

[0116] S503: When the user emotion change model outputs the user emotion fluctuation information, the user's EEG signal is collected through an electroencephalogram device and the user's emotional trend is output through EEG emotion recognition. The EEG emotion recognition may specifically include removing noise and smoothing signals from the user's EEG signal, extracting characteristic parameters related to the user's emotion, and classifying the user's EEG signal based on the characteristic parameters and identifying the user's emotional trend. The user's emotional trend includes but is not limited to pleasure, sadness, fear, uneasiness, and tension.

[0117] A 3D virtual space application device based on artificial intelligence, comprising a resource acquisition module, a virtual space construction module, a visual rendering module, and a virtual interaction module;

[0118] The resource acquisition module is used to acquire virtual space construction resources, and the virtual space construction resources include virtual scene construction resources and virtual portrait construction resources;

[0119] The virtual space construction module is used to generate a 3D virtual space based on the virtual space construction resources, the 3D virtual space includes a 3D virtual scene and 3D virtual characters, the 3D virtual characters include 3D virtual users and 3D virtual non-player characters, the 3D virtual users include a first 3D virtual user, a second 3D virtual user to an Nth 3D virtual user, and the 3D virtual non-player characters include a first 3D virtual non-player character, a second 3D virtual non-player character to an nth 3D virtual non-player character;

[0120] The visual rendering module is used to perform improved visual rendering on the 3D virtual space and obtain an improved 3D virtual space;

[0121] The virtual interaction module is used for the user to log in to the improved 3D virtual space through VR technology and control the 3D virtual user to virtually interact with the 3D virtual scene and the 3D virtual character; identify the user's emotional tendency during the virtual interaction process, and control the 3D virtual non-player character through AI to virtually interact with the 3D virtual user according to the user's emotional tendency.

[0122] The obtaining of the virtual scene construction resource comprises:

[0123] Acquire data of a scene to be constructed, wherein the data of the scene to be constructed includes at least any one of a picture, a video, and a text description;

[0124] The virtual scene construction resources are extracted according to the scene data to be constructed.

[0125] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device.

[0126] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0127] The program code included on the computer readable medium can be transmitted with any appropriate medium, including but not limited to wireless, electric wire, optical cable, RF, etc., or any suitable combination of the above. The computer program code for performing the operation of the present invention can be written in one or more programming languages ​​or their combinations, and the programming language includes object-oriented programming languages-such as Java, Smalltalk, C++, and also includes conventional procedural programming languages-such as "C" language or similar programming languages. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0128] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still fall within the scope of the technical solution of the present invention.

Claims

1. A 3D virtual space application method based on artificial intelligence, characterized in that: The implementation of the 3D virtual space application method comprises the following steps: Acquire virtual space construction resources, wherein the virtual space construction resources include virtual scene construction resources and virtual portrait construction resources; Generate a 3D virtual space based on the virtual space construction resources, the 3D virtual space includes a 3D virtual scene and 3D virtual characters, the 3D virtual characters include 3D virtual users and 3D virtual non-player characters; Performing improved visual rendering processing on the 3D virtual space according to the depth information of the 3D virtual space to obtain an improved 3D virtual space, wherein the depth information includes a first depth value of the 3D virtual scene and a second depth value of the 3D virtual character; The user logs into the improved 3D virtual space through VR technology and controls the 3D virtual user to interact virtually with the 3D virtual space; Determining a user emotional tendency according to the user emotional parameters during the virtual interaction process, and manipulating the 3D virtual non-player character to perform virtual interaction with the 3D virtual user according to the user emotional tendency; The step of performing improved visual rendering on the 3D virtual space to obtain an improved 3D virtual space comprises: Acquire a first depth value and a second depth value of the 3D virtual space, and render the first depth value and the second depth value into a texture by using a multi-rendering target technology to obtain a depth texture; Extracting the three-dimensional coordinates of the 3D virtual scene and the three-dimensional coordinates of the 3D virtual character based on the depth texture and converting them into spherical coordinates in a spherical coordinate system; Acquire a focus pixel point and a focus distance, wherein the focus pixel point is the center point of the 3D virtual user's viewing angle, and the focus distance is the distance between the 3D virtual user and the focus pixel point; Presetting an initial blur circle size and an ideal blur circle size based on the spherical coordinates, the focus pixel point, and the focus distance, and dynamically updating the initial blur circle size until the ideal blur circle size is reached to obtain the improved 3D virtual space; The presetting of the initial blur circle size and the ideal blur circle size based on the spherical coordinates, the focus pixel point, and the focus distance, and dynamically updating the initial blur circle size until the ideal blur circle size is reached to obtain the improved 3D virtual space comprises: The light intensity of the focused pixel point is calculated using the following formula: U=0.299R+0.587G+0.114B, Among them, U is the light intensity of the focused pixel, R is the red value, G is the green value, and B is the blue value; The visual persistence time of human eyes is calculated based on the light intensity of the focused pixel point, and the calculation formula is: t = lg (255U + 1), Among them, t is the visual retention time of human eyes, and U is the light intensity of the focused pixel; The initial blur circle update weight is calculated according to the visual persistence time of the human eye, and the calculation formula is: Among them, ε is the initial blur circle update weight, t is the visual retention time of human eyes; Based on the initial blur circle update weight, an initial blur circle dynamic update formula is obtained and used to dynamically update the initial blur circle size until the current blur circle size is consistent with the ideal blur circle size. The initial blur circle dynamic update formula is: cur⊙=ε·ini⊙+(1-ε)·cur′⊙, Among them, cur⊙ is the current blur circle size, ε is the initial blur circle update weight, ini⊙ is the initial blur circle size, cur′⊙ is the blur circle size obtained by the previous dynamic update, and the initial value of cur′⊙ is 0.

2. The 3D virtual space application method based on artificial intelligence according to claim 1, characterized in that: Acquiring the virtual scene construction resources includes: Acquire data of a scene to be constructed, wherein the data of the scene to be constructed includes at least any one of a picture, a video, and a text description; The virtual scene construction resources are extracted according to the scene data to be constructed.

3. The 3D virtual space application method based on artificial intelligence according to claim 1, characterized in that: Acquiring the virtual portrait building resources includes: Get realistic portrait videos; Performing frame processing on the real portrait video and obtaining frame-by-frame real portrait images; Determine the region of interest of the framed realistic portrait image by a three-frame difference method; The region of interest is segmented to obtain the virtual portrait building resource.

4. The 3D virtual space application method based on artificial intelligence according to claim 1, characterized in that: The identifying the user's emotional tendency in the virtual interaction process, and controlling the 3D virtual non-player character through AI to perform virtual interaction with the 3D virtual user according to the user's emotional tendency comprises: Obtain user emotion parameters; The user emotion change index is calculated by the user emotion parameter, and a user emotion change model is constructed according to the user emotion change index and user emotion change information is output, wherein the user emotion change information includes user emotion fluctuation information and user emotion stability information; wherein the user emotion change index is calculated by the following formula: Wherein, δ is the user emotion change index, Tt is the pupil diameter ratio, CJ is the lip angle, V is the speech rate parameter, and BK is the nostril dilation degree. The user emotion parameter includes the pupil diameter ratio, the lip angle, the speech rate parameter, and the nostril dilation degree. Determine the user emotion change information by comparing the user emotion change index with a preset user emotion change index threshold; Determine the user emotion change index, when the user emotion change index is greater than or equal to the user emotion change index threshold, the user emotion change model outputs the user emotion fluctuation information, collects the user's electroencephalogram signal through an electroencephalogram device, and outputs the user's emotion trend based on the recognition result of the user's electroencephalogram signal, the user's emotion trend includes happiness, sadness, fear, anxiety, and tension; When the user emotion change index is less than the user emotion change index threshold, the user emotion change model outputs the user emotion stability information.

5. A 3D virtual space application device based on artificial intelligence, characterized in that: It includes resource acquisition module, virtual space construction module, visual rendering module and virtual interaction module; The resource acquisition module is used to acquire virtual space construction resources, and the virtual space construction resources include virtual scene construction resources and virtual portrait construction resources; The virtual space construction module is used to generate a 3D virtual space based on the virtual space construction resources, wherein the 3D virtual space includes a 3D virtual scene and 3D virtual characters, and the 3D virtual characters include a 3D virtual user and a 3D virtual non-player character; The visual rendering module is used to perform improved visual rendering processing on the 3D virtual space according to the depth information of the 3D virtual space to obtain an improved 3D virtual space, wherein the depth information includes a first depth value of the 3D virtual scene and a second depth value of the 3D virtual character; The virtual interaction module is used for the user to log in to the improved 3D virtual space through VR technology and control the 3D virtual user to interact virtually with the 3D virtual space; and is used to determine the user's emotional tendency according to the user's emotional parameters during the virtual interaction process, and control the 3D virtual non-player character to interact virtually with the 3D virtual user according to the user's emotional tendency; The step of performing improved visual rendering on the 3D virtual space to obtain an improved 3D virtual space comprises: Acquire a first depth value and a second depth value of the 3D virtual space, and render the first depth value and the second depth value into a texture by using a multi-rendering target technology to obtain a depth texture; Extracting the three-dimensional coordinates of the 3D virtual scene and the three-dimensional coordinates of the 3D virtual character based on the depth texture and converting them into spherical coordinates in a spherical coordinate system; Acquire a focus pixel point and a focus distance, wherein the focus pixel point is the center point of the 3D virtual user's viewing angle, and the focus distance is the distance between the 3D virtual user and the focus pixel point; Presetting an initial blur circle size and an ideal blur circle size based on the spherical coordinates, the focus pixel point, and the focus distance, and dynamically updating the initial blur circle size until the ideal blur circle size is reached to obtain the improved 3D virtual space; The presetting of the initial blur circle size and the ideal blur circle size based on the spherical coordinates, the focus pixel point, and the focus distance, and dynamically updating the initial blur circle size until the ideal blur circle size is reached to obtain the improved 3D virtual space comprises: The light intensity of the focused pixel point is calculated using the following formula: U=0.299R+0.587G+0.114B, Among them, U is the light intensity of the focused pixel, R is the red value, G is the green value, and B is the blue value; The visual persistence time of human eyes is calculated based on the light intensity of the focused pixel point, and the calculation formula is: t = lg (255U + 1), Among them, t is the visual retention time of human eyes, and U is the light intensity of the focused pixel; The initial blur circle update weight is calculated according to the visual persistence time of the human eye, and the calculation formula is: Among them, ε is the initial blur circle update weight, t is the visual retention time of human eyes; Based on the initial blur circle update weight, an initial blur circle dynamic update formula is obtained and used to dynamically update the initial blur circle size until the current blur circle size is consistent with the ideal blur circle size. The initial blur circle dynamic update formula is: cur☉=ε·ini⊙+(1-ε)·cur′⊙, Among them, cur⊙ is the current blur circle size, ε is the initial blur circle update weight, ini⊙ is the initial blur circle size, cur′⊙ is the blur circle size obtained by the previous dynamic update, and the initial value of cur′⊙ is 0.

6. The 3D virtual space application device based on artificial intelligence according to claim 5, characterized in that: The obtaining of the virtual scene construction resource comprises: Acquire data of a scene to be constructed, wherein the data of the scene to be constructed includes at least any one of a picture, a video, and a text description; The virtual scene construction resources are extracted according to the scene data to be constructed.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the 3D virtual space application method as described in any one of claims 1-4 is implemented.

8. A storage medium containing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to execute the 3D virtual space application method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Man-machine interaction method and device, mobile terminal and computer readable storage medium

    CN110888532A

  • Virtual space-based multi-user interaction system and multi-user interaction method thereof

    CN111984114A

  • Game interaction method and device

    CN112190921A

  • Method for realizing AI interaction in virtual space

    CN116431001A

  • Virtual human interaction method and system and storage medium

    CN117422798A