CN116966568A - Picture generation method, device, computer equipment and storage medium - Google Patents

Picture generation method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116966568A
CN116966568A CN202310696069.1A CN202310696069A CN116966568A CN 116966568 A CN116966568 A CN 116966568A CN 202310696069 A CN202310696069 A CN 202310696069A CN 116966568 A CN116966568 A CN 116966568A
Authority
CN
China
Prior art keywords
parameter
moment
virtual object
parameters
behavior
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310696069.1A
Other languages
Chinese (zh)
Inventor
刘星言
程鹏宇
陈万顺
代勇
杜楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202310696069.1A priority Critical patent/CN116966568A/en
Publication of CN116966568A publication Critical patent/CN116966568A/en
Pending legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/822Strategy games; Role-playing games
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/65Methods for processing data by generating or executing the game program for computing the condition of a game character
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/807Role playing or strategy games
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/8082Virtual reality

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present application relates to a picture generation method, apparatus, computer device, storage medium and computer program product. The method can be applied to the fields of artificial intelligence, game application and the like, the game application is operated on a vehicle-mounted terminal or other equipment, and the method comprises the following steps: determining an intention parameter and a second behavior parameter of the virtual object at a first moment based on the behavior parameter and the first object parameter of the virtual object at the first moment, wherein the second moment is positioned after the first moment; determining a second object parameter of the virtual object based on the second behavior parameter; converting the second behavior parameters into events and adding the events to an event stream; determining an environmental state at a second time based on the environmental state at the first time and each event; determining an object relationship at a second moment based on the object relationship at the first moment and each event at the first moment; and generating a picture at the second moment based on the second object parameter, the environmental state at the second moment and the object relation. By adopting the method, the display effect of the picture can be improved.

Description

Picture generation method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technology, and in particular, to a method, an apparatus, a computer device, a storage medium, and a computer program product for generating a picture.
Background
With the development of computer technology and internet technology, the development and use of engines plays an important role in the fields of computer vision and the like, so that various types of manufacturing tools are widely paid attention to. The virtual object is a computer program simulating human thinking or behavior, is generally used in the fields of man-machine interaction, virtual reality, games and the like, and can generally serve as intelligent customer service, virtual teacher, virtual actor and the like.
In the current picture generation mode, a rule-driven mode is generally used for driving the behavior of the virtual object, and the rule-driven mode has higher controllability, but a large number of rules and scenes are required to be manually written, and the rule parameters are required to be debugged to be reasonable. For example, for interactive virtual objects in a screen, a language layer is usually a task-type dialog system, and first performs intention recognition based on user input, and then combines rules and templates to output reply contents. Because of the rule driven, conversations and behaviors of open virtual objects cannot be supported. In addition, by adopting the mode, a large number of rules which are manually formulated are needed, and the evolution direction of the virtual object is limited, so that the content presented by different users or the same user in pictures in different time periods is fixed, and the display effect of the pictures is not ideal.
Disclosure of Invention
Based on the foregoing, it is necessary to provide a method, an apparatus, a computer device, a computer readable storage medium and a computer program product for generating a picture, which can effectively improve the diversity of virtual object evolution, and improve the individuation and flexibility of virtual object evolution, so that the content presented by different users or the same user in pictures of different periods can be changed, and further effectively improve the display effect of the picture.
In a first aspect, the present application provides a picture generation method. The method comprises the following steps: determining an intention parameter of a virtual object at a first moment and a second behavior parameter of the virtual object at a second moment based on a first behavior parameter of the virtual object at the first moment and a first object parameter; wherein the second time is located after the first time; determining a second object parameter of the virtual object at a second moment based on the second behavior parameter; converting the second behavior parameters into events and adding the events to an event stream; determining the environmental state at the second moment based on the environmental state at the first moment and each event at the first moment in the event stream; determining the object relation of the second moment based on the object relation of the first moment and each event of the first moment; and generating a picture at the second moment based on the second object parameter, the environment state at the second moment and the object relation at the second moment.
In a second aspect, the application further provides a picture generation device. The device comprises: the determining module is used for determining an intention parameter of the virtual object at the first moment and a second behavior parameter of the virtual object at the second moment based on the first behavior parameter of the virtual object at the first moment and the first object parameter; wherein the second time is located after the first time; determining a second object parameter of the virtual object at a second moment based on the second behavior parameter; the conversion module is used for converting the second behavior parameters into events and adding the events to an event stream; the determining module is further configured to determine an environmental state at the second time based on the environmental state at the first time and each event at the first time in the event stream; determining the object relation of the second moment based on the object relation of the first moment and each event of the first moment; and the generation module is used for generating a picture at the second moment based on the second object parameter, the environment state at the second moment and the object relation at the second moment.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of: determining an intention parameter of a virtual object at a first moment and a second behavior parameter of the virtual object at a second moment based on a first behavior parameter of the virtual object at the first moment and a first object parameter; wherein the second time is located after the first time; determining a second object parameter of the virtual object at a second moment based on the second behavior parameter; converting the second behavior parameters into events and adding the events to an event stream; determining the environmental state at the second moment based on the environmental state at the first moment and each event at the first moment in the event stream; determining the object relation of the second moment based on the object relation of the first moment and each event of the first moment; and generating a picture at the second moment based on the second object parameter, the environment state at the second moment and the object relation at the second moment.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of: determining an intention parameter of a virtual object at a first moment and a second behavior parameter of the virtual object at a second moment based on a first behavior parameter of the virtual object at the first moment and a first object parameter; wherein the second time is located after the first time; determining a second object parameter of the virtual object at a second moment based on the second behavior parameter; converting the second behavior parameters into events and adding the events to an event stream; determining the environmental state at the second moment based on the environmental state at the first moment and each event at the first moment in the event stream; determining the object relation of the second moment based on the object relation of the first moment and each event of the first moment; and generating a picture at the second moment based on the second object parameter, the environment state at the second moment and the object relation at the second moment.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of: determining an intention parameter of a virtual object at a first moment and a second behavior parameter of the virtual object at a second moment based on a first behavior parameter of the virtual object at the first moment and a first object parameter; wherein the second time is located after the first time; determining a second object parameter of the virtual object at a second moment based on the second behavior parameter; converting the second behavior parameters into events and adding the events to an event stream; determining the environmental state at the second moment based on the environmental state at the first moment and each event at the first moment in the event stream; determining the object relation of the second moment based on the object relation of the first moment and each event of the first moment; and generating a picture at the second moment based on the second object parameter, the environment state at the second moment and the object relation at the second moment.
The above-mentioned picture generation method, apparatus, computer device, storage medium and computer program product, on the basis of the first behavior parameter and first object parameter of the virtual object at the first moment, confirm the intention parameter and second behavior parameter at the second moment of the virtual object at the first moment; wherein the second moment is located after the first moment; determining a second object parameter of the virtual object at a second moment based on the second behavior parameter; converting the second behavior parameters into events and adding the events to an event stream; determining an environmental state at a second time based on the environmental state at the first time and each event at the first time in the event stream; determining an object relationship at a second moment based on the object relationship at the first moment and each event at the first moment; and generating a picture at the second moment based on the second object parameter, the environmental state at the second moment and the object relation at the second moment. The second behavior parameters of the virtual object at the second moment are determined based on the first behavior parameters of the virtual object at the first moment and the first object parameters, so that the second object parameters of the virtual object at the second moment can be determined based on the second behavior parameters, and the second behavior parameters are converted into events to be added into an event stream, so that when the environment state and the object relation of the second moment are determined, the environment state at the first moment, the object relation at the first moment and each event in the event stream can be comprehensively considered, the content presented by a picture at the second moment generated based on the second object parameters, the environment state at the second moment and the object relation at the second moment is changed, the variety of virtual object evolution presented in the picture can be effectively improved, the individuation and the flexibility of virtual object evolution are improved, and the content presented by pictures of different users or the same user at different time periods is changed, and the display effect of the picture is effectively improved.
Drawings
FIG. 1 is an application environment diagram of a picture generation method in one embodiment;
FIG. 2 is a flow chart of a method of generating a frame in one embodiment;
FIG. 3 is a flowchart illustrating steps for determining an intent parameter of a virtual object at a first time and a second behavior parameter at a second time based on a first behavior parameter and a first object parameter in one embodiment;
FIG. 4 is a flowchart illustrating a step of determining a second behavior parameter of a virtual object at a second time based on an observation parameter, a memory parameter, a status parameter, a person setting parameter, and an intention parameter at the first time in one embodiment;
FIG. 5 is a schematic diagram of a basic architecture of a virtual person automatic deduction method in one embodiment;
FIG. 6 is a schematic diagram of an initial game screen in one embodiment;
FIG. 7 is a schematic diagram of a game screen at a certain moment in time in one embodiment;
FIG. 8 is a schematic diagram of displaying dialogue content between virtual objects in a game screen at a certain moment in time in one embodiment;
FIG. 9 is a block diagram showing a structure of a screen generating apparatus in one embodiment;
fig. 10 is an internal structural view of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Artificial intelligence (AI, artificial Intelligence) is a theory, method, technique, and application system that simulates, extends, and extends human intelligence using a digital computer or a machine controlled by a digital computer, perceives the environment, obtains knowledge, and uses the knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision.
The artificial intelligence technology is a comprehensive subject, and relates to the technology with wide fields, namely the technology with a hardware level and the technology with a software level. Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
With research and progress of artificial intelligence technology, research and application of artificial intelligence technology are being developed in various fields, such as common smart home, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned, autopilot, unmanned, robotic, smart medical, smart customer service, car networking, autopilot, smart transportation, etc., and it is believed that with the development of technology, artificial intelligence technology will be applied in more fields and will be of increasing importance.
Cloud technology (Cloud technology) refers to a hosting technology for integrating hardware, software, network and other series resources in a wide area network or a local area network to realize calculation, storage, processing and sharing of data.
Cloud technology (Cloud technology) is based on the general terms of network technology, information technology, integration technology, management platform technology, application technology and the like applied by Cloud computing business models, and can form a resource pool, so that the Cloud computing business model is flexible and convenient as required. Cloud computing technology will become an important support. The services of technical network systems require a lot of computing, storage resources, such as video websites, picture-like websites and more portals. Along with the high development and application of the internet industry, each article possibly has an own identification mark in the future, the identification mark needs to be transmitted to a system for logic processing, data with different levels can be processed separately, and various industry data needs strong system rear shield support and can be realized only through cloud computing.
Cloud storage (cloud storage) is a new concept that extends and develops in the concept of cloud computing, and a distributed cloud storage system (hereinafter referred to as a storage system for short) refers to a storage system that integrates a large number of storage devices (storage devices are also referred to as storage nodes) of various types in a network to work cooperatively through application software or application interfaces through functions such as cluster application, grid technology, and a distributed storage file system, so as to provide data storage and service access functions for the outside.
It should be noted that in the following description, the terms "first, second and third" are used merely to distinguish similar objects and do not represent a specific order for the objects, it being understood that the "first, second and third" may be interchanged with a specific order or sequence, if allowed, to enable embodiments of the application described herein to be practiced otherwise than as illustrated or described herein.
The picture generation method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. During the process of the user interacting with the game application in the terminal 102, the terminal 102 may determine an intent parameter of the virtual object at a first time and a second behavior parameter at a second time based on the first behavior parameter and the first object parameter of the virtual object at the first time; wherein the second moment is located after the first moment; the terminal 102 determines second object parameters of the virtual object at a second moment based on the second behavior parameters, converts the second behavior parameters into events, and adds the events to an event stream; further, the terminal 102 determines the environmental state at the second time based on the environmental state at the first time and each event in the event stream at the first time; the terminal 102 determines an object relationship at a second time based on the object relationship at the first time and each event at the first time; the terminal 102 generates a game screen at the second time based on the second object parameter, the environmental state at the second time, and the object relationship at the second time. Further, the terminal 102 may upload the generated game frame at the second time to the server 104, so that the server 104 may make secondary use of the game frame at the second time, for example, the server 104 may process the game frame at the second time and then perform secondary display.
The terminal 102 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, an internet of things device, and a portable wearable device, and the internet of things device may be a smart speaker, a smart television, a smart air conditioner, and a smart vehicle device. The portable wearable device may be a smart watch, smart bracelet, headset, or the like.
The server 104 may be a separate physical server or may be a service node in a blockchain system, where a Peer-To-Peer (P2P) network is formed between service nodes, and the P2P protocol is an application layer protocol that runs on top of a transmission control protocol (TCP, transmission Control Protocol) protocol.
The server 104 may be a server cluster formed by a plurality of physical servers, and may be a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN, content Delivery NetworkCDN), and basic cloud computing services such as big data and artificial intelligence platforms.
The terminal 102 and the server 104 may be connected by a communication connection manner such as bluetooth, USB (Universal Serial Bus ) or a network, which is not limited herein.
In one embodiment, as shown in fig. 2, a method for generating a picture is provided, which may be executed by a server or a terminal alone or by the server and the terminal together, and the method is applied to the terminal in fig. 1, for example, and includes the following steps:
step 202, determining an intention parameter of the virtual object at a first moment and a second behavior parameter at a second moment based on a first behavior parameter of the virtual object at the first moment and the first object parameter; wherein the second moment is located after the first moment.
The virtual object refers to each object in the virtual scene, for example, the virtual object in the application can be a virtual person in the virtual scene, the virtual person refers to a computer program simulating human thinking or behavior, and the virtual object is usually used in the fields of man-machine interaction, virtual reality, games and the like and can generally serve as intelligent customer service, virtual teacher, virtual actor and the like. For another example, the virtual object in the present application may be a Non-Player Character (NPC) in a virtual scene, where the Non-Player Character refers to a Non-Player Character appearing in a virtual environment such as a computer game, a virtual reality, etc., and is controlled by a computer program, where the Non-Player Character may be understood as one of virtual persons.
The virtual scene refers to a virtual scene environment generated by a computer, which can provide a multimedia virtual world, a user can control an operable virtual object in the virtual scene through an operation device or an operation interface, observe a virtual object such as an object, an animal, a person, a landscape in the virtual scene or interact with the virtual object such as the object, the animal, the person, the landscape in the virtual scene or other virtual objects through the visual angle of the virtual object. Virtual scenes are typically presented by application generation in a computer device such as a terminal based on hardware (such as a screen) in the terminal.
The first time refers to a certain time, for example, the first time in the present application may be a current time, and the current time may be denoted by t.
The first behavior parameter refers to a parameter for reflecting the behavior of the virtual object at the first moment, for example, the first behavior parameter may be denoted by a (t).
The first object parameter refers to a parameter for reflecting various states of the virtual object at a first moment, for example, the first object parameter may be represented by C (t), and in the present application, the first object parameter may include information such as a person setting parameter C (0), an observation parameter O (t), a state parameter S (t), a memory parameter M (t), an intention parameter I (t), and the like of the virtual object, for example, the first object parameter may be represented as: c (t) = [ O (t), M (t), S (t), I (t), C (0) ].
The person setting parameter C (0) refers to person information preset by the system, and is fixed, for example, the person setting parameter includes name (nickname), gender, age, background experience, and schedule (i.e. periodic event of daily card punching).
The observation parameters O (t), i.e. what the virtual object sees or hears, include the current environment and environmental events in the vicinity of the virtual object, etc.
The state parameters S (t) are divided into physical and psychological states. The physical state includes the location of the virtual object, money, fatigue, and feeling of fullness of the virtual object. The mental state may be a mood value, affected by a virtual object related event, such as an active event increasing the mood value and a passive event decreasing the mood value.
The memory parameters M (t) comprise historical events, historical observations, other virtual objects interacted with the virtual object, key conversations and the like experienced by the virtual object; different types of events decay to varying degrees over time, with initial memory parameters derived from background experience.
The intent parameter I (t) refers to a parameter for reflecting the intent of the virtual object, for example, the intent includes the current mental activity of the virtual object and a short-term goal, which affects the next behavior of the virtual object.
The second time is a time, for example, the second time in the present application may be a time next to the first time, and if the first time is the current time, the second time may be a time next to the current time, and the second time may be represented by (t+1). It will be appreciated that the first time and the second time are merely used to distinguish between different times, and that the second time is located after the first time.
The second behavior parameter refers to a parameter for reflecting the behavior of the virtual object at the second moment, for example, the second behavior parameter may be denoted by a (t+1).
Specifically, after a user starts a certain game application in the terminal, the terminal may determine an intent parameter of the virtual object at a first time and a second behavior parameter at a second time based on the first behavior parameter and the first object parameter of the virtual object at the first time, wherein the second time is located after the first time.
For example, a virtual object is described as a non-player character. After a user starts a certain game application A in the terminal, the terminal can determine an intention parameter I (t) of the virtual object A at a first moment based on a first behavior parameter A (t) of the virtual object A at the first moment in the game application A and an observation parameter O (t), a memory parameter M (t), a state parameter S (t) and a person setting parameter C (0) of the virtual object A at the first moment; further, the terminal may determine a second behavior parameter a (t+1) of the virtual object a at a second time based on the observed parameter O (t), the memory parameter M (t), the state parameter S (t), the person setting parameter C (0), and the intention parameter I (t) of the virtual object a at the first time, where the second time is located after the first time. The terminal can process a first behavior parameter A (t) of the virtual object A at a first moment, an observation parameter O (t) of the virtual object A at the first moment, a memory parameter M (t), a state parameter S (t) and a person setting parameter C (0) through a large language model (LLM, large Language Model), and output an intention parameter I (t) of the virtual object A at the first moment; similarly, the terminal can also process the observation parameter O (t), the memory parameter M (t), the state parameter S (t), the human setting parameter C (0) and the intention parameter I (t) of the virtual object A at the first moment through the large language model, and output a second behavior parameter A (t+1) of the virtual object A at the second moment.
Step 204, determining a second object parameter of the virtual object at a second moment in time based on the second behavior parameter.
The second object parameter refers to a parameter for reflecting various states of the virtual object at the second moment, where the second object parameter may be represented by C (t+1), and in the present application, the second object parameter may include information such as a person setting parameter C (0), an observation parameter O (t+1), a state parameter S (t+1), a memory parameter M (t+1), and an intention parameter I (t+1) of the virtual object, and for example, the second object parameter may be represented as: c (t+1) = [ O (t+1), M (t+1), S (t+1), I (t+1), C (0) ].
Specifically, after determining the intent parameter of the virtual object at the first time and the second behavior parameter of the virtual object at the second time based on the first behavior parameter and the first object parameter of the virtual object at the first time, the terminal may determine the second object parameter of the virtual object at the second time based on the second behavior parameter, for example, the terminal may process the second behavior parameter a (t+1) of the virtual object a at the second time through a large language model, and output the second object parameter C (t+1) of the virtual object a at the second time, where the output second object parameter of the virtual object a at the second time may be expressed as: c (t+1) = [ O (t+1), M (t+1), S (t+1), I (t+1), C (0) ].
Step 206, converting the second behavior parameters into events and adding the events to the event stream.
Wherein the event stream is made up of a series of historical events, each event triggered by the behavior of a virtual object (NPC or player) in the virtual scene, containing the necessary elements (time, event description, subject, other participants, etc.). The events are divided into periodic events and random events, wherein the periodic events are defined in advance from schedules of virtual characters or preset targets of the virtual characters; random events are generated by some random factor, possibly from a system setting or some disturbance of the player, etc.
Step 208, determining the environmental state at the second time based on the environmental state at the first time and each event in the event stream at the first time.
The environment state refers to an environment state in a virtual scene, for example, the environment state in the application comprises two parts of a physical environment and an event stream. Wherein the physical environment variable comprises world view, unit time, current moment, day and night, weather, position and the like in the virtual scene. The world view is a basic assumption of the virtual world in the virtual scene, is used as an initial input when the virtual world is constructed and is fixed, and is described by natural language. The unit time and the current time are global variables and are automatically updated based on preset rules. Day and night and weather are global variables that dynamically change based on rules and current time. The position variables include the position of a preset location in the virtual world (fixed) and the coordinates of the dynamic changes of the virtual object. The change rule of the global variable can be formulated and adjusted according to specific application and requirements.
Each event at the first time is an event occurring at the first time. The environmental state at the first time is the environmental state at the first time, and the environmental state at the second time is the environmental state at the second time. It will be appreciated that the environmental state at the first time and the environmental state at the second time in the present application are merely used to distinguish between the environmental states at different times.
In step 210, an object relationship at a second time is determined based on the object relationship at the first time and the events at the first time.
Where object relationships refer to relationships between virtual objects, for example, object relationships in the present application may include static relationships and dynamic relationships. Static relationships refer to long-term, stable relationships between virtual objects, such as parents, couples, many years of friends, etc., that do not change in the short term, or may be adjusted based on a few rules. The dynamic relationship is the goodness of the virtual objects, for example, the goodness matrix R of N corresponding to N among N virtual objects, the value range is [ -1,1], the higher the value is, the better the sense is represented, and the initial value is 0. The goodness can be influenced by interaction events between the human device and the virtual object, and positive events increase the goodness and otherwise decrease; r may be asymmetric.
Specifically, after determining the second object parameter of the virtual object at the second moment based on the second behavior parameter, the terminal may convert the second behavior parameter into an event and add the event to the event stream; further, the terminal may determine an environmental state at a second time based on the environmental state at the first time and each event in the event stream at the first time; meanwhile, the terminal can also determine the object relationship at the second moment based on the object relationship at the first moment and each event at the first moment. Namely, the deduction scene of the virtual object in the embodiment of the present application is a dynamic system essentially, and the key is to calculate the evolution rule of each step, for example, in some cases, a transfer function G may be learned (or formulated) in advance, so that the terminal may process { environmental state E (t), object parameter C (t), object relation R (t), action a (t) } at a given time t through the transfer function G to obtain { environmental state E (t+1), object parameter C (t+1), object relation R (t+1), and action a (t+1) } at a time t+1.
It can be appreciated that in the embodiment of the present application, the second behavior parameter is converted into an event, and the event is added to the event stream, because the second behavior parameter is used to reflect the behavior of the avatar, that is, the behavior of the avatar is added to the event stream as an event, which can be used as an reasoning basis for updating the environmental parameter.
For example, a virtual object is described as a non-player character. The terminal can process the environmental state E (t) at the first moment and each event E at the first moment in the event stream through a large language model to obtain the environmental state E (t+1) at the second moment; meanwhile, the terminal can process the object relation R (t) at the first moment and each event e at the first moment in the event stream through the large language model to obtain the object relation R (t+1) at the second moment, wherein the object relation R (t+1) at the second moment can be expressed as: r (t+1) = [ Rd (t+1), R(s) ], wherein Rd (t+1) represents a dynamic relationship, and R(s) represents a static relationship.
Step 212, generating a second time frame based on the second object parameter, the environmental status at the second time, and the object relationship at the second time.
The second time frame generated in the present application may include frames under different application scenarios, for example, the second time frame generated in the present application includes, but is not limited to, frames applied to virtual human scenarios, game frames in a certain game application, and the like.
Specifically, after determining the object relationship at the second time based on the object relationship at the first time and each event at the first time, the terminal may generate the screen at the second time based on the second object parameter, the environmental state at the second time, and the object relationship at the second time. For example, the terminal may render the game frame at the second moment through the graphics processor, that is, after the cpu in the terminal submits the drawing command in the case where the user interacts with the game application, the GPU may asynchronously execute the step of rendering the game frame, that is, after the GPU in the terminal receives the drawing command, the GPU starts rendering the game frame at the second moment, and displays the rendered game frame at the second moment in the screen.
It may be understood that, in the embodiment of the present application, after determining the object relationship at the second time based on the object relationship at the first time and each event at the first time, the terminal may also automatically generate metadata corresponding to the second time based on the second object parameter, the environmental state at the second time, and the object relationship at the second time, and display the metadata corresponding to the second time in a text form.
In this embodiment, based on a first behavior parameter and a first object parameter of a virtual object at a first time, an intention parameter of the virtual object at the first time and a second behavior parameter at a second time are determined; wherein the second moment is located after the first moment; determining a second object parameter of the virtual object at a second moment based on the second behavior parameter; converting the second behavior parameters into events and adding the events to an event stream; determining an environmental state at a second time based on the environmental state at the first time and each event at the first time in the event stream; determining an object relationship at a second moment based on the object relationship at the first moment and each event at the first moment; and generating a picture at the second moment based on the second object parameter, the environmental state at the second moment and the object relation at the second moment. The second behavior parameters of the virtual object at the second moment are determined based on the first behavior parameters of the virtual object at the first moment and the first object parameters, so that the second object parameters of the virtual object at the second moment can be determined based on the second behavior parameters, and the second behavior parameters are converted into events to be added into an event stream, so that when the environment state and the object relation of the second moment are determined, the environment state at the first moment, the object relation at the first moment and each event in the event stream can be comprehensively considered, the content presented by a picture at the second moment generated based on the second object parameters, the environment state at the second moment and the object relation at the second moment is changed, the variety of virtual object evolution presented in the picture can be effectively improved, the individuation and the flexibility of virtual object evolution are improved, and the content presented by pictures of different users or the same user at different time periods is changed, and the display effect of the picture is effectively improved.
In one embodiment, as shown in fig. 3, the first object parameters include a first observation parameter, a first memory parameter, a first status parameter, and a person setting parameter; a step of determining an intent parameter of the virtual object at a first time and a second behavior parameter at a second time based on the first behavior parameter and the first object parameter, comprising:
step 302, determining an intention parameter of the virtual object at a first moment based on the first behavior parameter, the first observation parameter, the first memory parameter, the first state parameter and the human setting parameter;
step 304, determining a second behavior parameter of the virtual object at a second moment based on the first observation parameter, the first memory parameter, the first state parameter, the human setting parameter, and the intention parameter at the first moment.
The first observation parameter refers to an observation parameter of the virtual object at a first moment, the first memory parameter refers to a memory parameter of the virtual object at the first moment, and the first state parameter refers to a state parameter for reflecting the virtual object at the first moment.
Specifically, a virtual object is described as an example of a non-player character. After a user starts a certain game application A in the terminal, the terminal can determine an intention parameter I (t) of the virtual object A at a first moment based on a first behavior parameter A (t) of the virtual object A at the first moment in the game application A and an observation parameter O (t), a memory parameter M (t), a state parameter S (t) and a person setting parameter C (0) of the virtual object A at the first moment; further, the terminal may determine the second behavior parameter a (t+1) of the virtual object a at the second moment based on the observed parameter O (t), the memory parameter M (t), the state parameter S (t), the person setting parameter C (0), and the intention parameter I (t) of the virtual object a at the first moment. The terminal can input a first behavior parameter A (t) of the virtual object A at a first moment, an observation parameter O (t) of the virtual object A at the first moment, a memory parameter M (t), a state parameter S (t) and a human setting parameter C (0) as input parameters into a large language model for processing, namely, an intention parameter I (t) of the virtual object A at the first moment can be output; similarly, the terminal can also process the observation parameter O (t), the memory parameter M (t), the state parameter S (t), the human setting parameter C (0) and the intention parameter I (t) of the virtual object A at the first moment through the large language model, and output a second behavior parameter A (t+1) of the virtual object A at the second moment. Therefore, the behavior of the virtual object is calculated through the large language model, and complex behavior rules are not required to be defined; meanwhile, by adding the human setting information of the virtual object into the input parameters, individuation and flexibility of virtual object deduction can be effectively improved, and the game device has certain randomness, so that the scenario deduced by the virtual object is more diversified, and further, the display effect of the game picture is effectively improved.
In one embodiment, as shown in fig. 4, the step of determining the second behavior parameter of the virtual object at the second time based on the observation parameter, the memory parameter, the state parameter, the human setting parameter, and the intention parameter at the first time includes:
step 402, processing the observation parameter, the memory parameter, the state parameter, the human setting parameter and the intention parameter at the first moment through a language model to obtain a second behavior parameter of the virtual object at the second moment; or,
and step 404, processing the prompt text, the observation parameters, the memory parameters, the state parameters, the human setting parameters and the intention parameters at the first moment through the language model to obtain second behavior parameters of the virtual object conforming to the prompt text at the second moment.
Where prompt text refers to a piece of text (discrete prompt) or a numerical vector (continuous prompt), in some cases, the prompt text may also be referred to as a prompt (prompt) intended to direct a language model to generate a particular output. Hints are typically written by a technician for specifying the tasks or content that the model needs to accomplish. In large language model applications, hints may help the model learn new tasks faster, and may also be used to control the content and form of model generation so that it better meets specific needs. For example, in the embodiment of the application, the text can be reasonably prompted by setting, so that the large language model can be used for reasoning the actions of the specific virtual object (NPC) and the state of the given environment, namely, the behavior and state parameters of the virtual object can be automatically deduced by using the large language model, metadata can be automatically generated, and the metadata contains necessary information of a rendering picture.
Specifically, a virtual object is described as an example of a non-player character. As shown in fig. 5, a basic architecture diagram of the automatic deduction method of the dummy is shown. After a user starts a certain game application A in a terminal, as shown in the processing flow in FIG. 5, the terminal can process a first behavior parameter A (t) of a virtual object A in the game application A at a first moment and an observation parameter O (t), a memory parameter M (t), a state parameter S (t) and a person setting parameter C (0) of the virtual object A at the first moment through a large language model, and output an intention parameter I (t) of the virtual object A at the first moment; further, the terminal can process the observation parameter O (t), the memory parameter M (t), the state parameter S (t), the human setting parameter C (0) and the intention parameter I (t) of the virtual object A at the first moment through the large language model, and output a second behavior parameter A (t+1) of the virtual object A at the second moment; or,
the terminal can process the prompt text A (discrete prompt), the observation parameter O (t), the memory parameter M (t), the state parameter S (t), the human setting parameter C (0) and the intention parameter I (t) of the virtual object A at the first moment through a large language model, and output a second behavior parameter A (t+1) of the virtual object A conforming to the prompt text A at the second moment. It will be appreciated that the neural network Model employed in embodiments of the present application includes, but is not limited to, a large Language Model, but may also be other models, such as a Language Model (LM), a pre-trained Language Model (PTM, pretrained Language Model), and the like.
In the embodiment, deduction calculation is carried out on the actions and the state transitions of the virtual object at each moment through the large language model, and corresponding metadata is automatically generated, namely, the behavior of the virtual object is driven through setting reasonable prompt text for the large language model, and complex behavior rules are not required to be defined; meanwhile, by adding the human setting information of the virtual object in the prompt text, individuation and flexibility of virtual object deduction can be effectively improved, so that a large language model can infer actions of a specific virtual object and states of a given environment, corresponding metadata can be automatically generated, the random performance is achieved, the situation of the deduction of the virtual object is diversified, game picture content generated based on the metadata is diversified, and the display effect of a game picture is effectively improved.
In one embodiment, the step of determining a second object parameter of the virtual object at a second time based on the second behavior parameter comprises:
processing the second behavior parameters through the language model to obtain second observation parameters, second memory parameters, second state parameters, human setting parameters and intention parameters of the virtual object at a second moment; wherein the second observation parameter, the second memory parameter, the second state parameter, the person setting parameter, and the intention parameter at the second time belong to the second object parameter.
The second observation parameter refers to an observation parameter of the virtual object at a second time, the second memory parameter refers to a memory parameter of the virtual object at the second time, the second state parameter refers to a state parameter for reflecting the virtual object at the second time, and the second intention parameter refers to an intention parameter of the virtual object at the second time.
Specifically, a virtual object is described as an example of a non-player character. As shown in fig. 5, a basic architecture diagram of the automatic deduction method of the dummy is shown. As shown in fig. 5, after determining the intention parameter I (t) of the virtual object at the first moment and the second behavior parameter a (t+1) at the second moment based on the first behavior parameter a (t) of the virtual object at the first moment and the first object parameter { the first observation parameter O (t), the first memory parameter M (t), the first state parameter S (t), the person setting parameter C (0) }, the terminal may process the second behavior parameter a (t+1) through the large language model, and output the second object parameter C (t+1) of the virtual object at the second moment, wherein the output second object parameter of the virtual object a at the second moment may be expressed as: c (t+1) = [ O (t+1), M (t+1), S (t+1), I (t+1), C (0) ]. Therefore, deduction calculation is realized on the actions and state transitions of the virtual object at each moment through the large language model, and complex behavior rules are not required to be defined; meanwhile, by adding the human setting information of the virtual object into the input parameters, individuation and flexibility of virtual object deduction can be effectively improved, so that a large language model can infer actions of a specific virtual object and states of a given environment, the method has certain randomness, the situation of the virtual object deduction is more diversified, and further the display effect of a game picture is effectively improved.
In one embodiment, the method further comprises:
when the second moment is deduction time t+1, let t=t+1, based on the second behavior parameter, the second object parameter, the environment state at t and the object relationship at t, continuing to determine the behavior parameter, the object parameter, the environment state and the object relationship of the virtual object at t+1;
when the deduction time t satisfies the deduction stop condition, a screen at t+1 is generated based on the behavior parameter, the object parameter, the environmental state, and the object relationship of the virtual object at t+1.
The deduction stopping condition may be a preset time condition for stopping deduction, for example, the deduction stopping condition may be: maximum evolution time T. It can be understood that, in the present application, the maximum evolution time T may be determined based on a preset number of evolution steps, for example, the preset number of evolution steps is 50, and the evolution time corresponding to each number of steps is 5s, so that the maximum evolution time t=number of steps=50×5=250 s.
Specifically, after the terminal generates the picture at the second time based on the second object parameter, the environmental state at the second time, and the object relationship at the second time, the terminal may continue deduction based on the second object parameter, the environmental state at the second time, and the object relationship at the second time, that is, the terminal may determine the behavior parameter, the object parameter, the environmental state, and the object relationship of the virtual object at the next time based on the second object parameter, the environmental state at the second time, and the object relationship at the second time, and generate the picture at the next time.
For example, a virtual object is described as a non-player character. As shown in the process flow in fig. 5, after the terminal generates the game screen at the second time based on the second object parameter C (t+1), the environmental state E (t+1) at the second time, and the object relation R (t+1) at the second time, when the second time is t+1, the terminal makes t=t+1, and continuously determines the behavior parameter, the object parameter, the environmental state, and the object relation of the virtual object at t+1 based on the second behavior parameter, the second object parameter, the environmental state, and the object relation at t; further, assume that the deduction stop condition is: and when the deduction time T reaches the maximum evolution time T, stopping deduction calculation by the terminal, and generating a game picture at the time of t+1 based on the behavior parameters, the object parameters, the environment states and the object relations of the virtual object at the time of t+1. In the embodiment of the present application, the terminal determines when to stop deduction based on a preset maximum evolution time T, for example, the preset evolution step number is 50, and the evolution time corresponding to each step number is 5s, so that the maximum evolution time t=step number=50x5=250s, that is, when the preset maximum evolution time t=250s, the terminal may cycle deduction to the 50 th step, and if each step corresponds to one frame of game picture, the terminal may generate 50 frames of game pictures corresponding to the evolution step number based on the behavior parameters, the object parameters, the environmental states and the object relationships of the virtual object at each step. Therefore, deduction calculation is realized on the actions and state transitions of the virtual object at each moment through the large language model, complex behavior rules are not required to be defined, deduction can be flexibly performed according to preset deduction stopping conditions, each frame of game picture containing diversified evolution results is rapidly and accurately generated, and further the display effect of the game picture is effectively improved.
In one embodiment, the method further comprises:
acquiring initial information; the initial information comprises environment configuration information, evolution constraint information, object parameters of the virtual object and object relations;
generating an initial picture based on the environment configuration information, the evolution constraint information, the object parameters of the virtual object and the object relation;
and displaying the action track and the interaction behavior of the virtual object in the initial picture.
The initial information refers to initialization information, for example, the initial information in the present application may be preset by a developer, and the initial information in the present application may include environment configuration information, evolution constraint information, object parameters of a virtual object, and an object relationship.
The evolution constraint information refers to evolution constraint information of a virtual world in a virtual scene, for example, the evolution constraint information in the present application may be a virtual world evolution rule in the virtual scene.
Specifically, as shown in fig. 6, a schematic diagram of an initial game screen is shown. After a user starts a certain game application in the terminal, the terminal can acquire initial information and generate an initial game screen as shown in fig. 6 based on environment configuration information, evolution constraint information, object parameters of the virtual object and object relationships in the initial information; further, the terminal may display the action trace and the interactive behavior of the virtual object in the initial game screen as shown in fig. 6. For example, for a visual interactive interface, after a user starts a game application in the terminal, the terminal may generate a base screen based on the initial information, and show the action track and the interactive behavior of each virtual NPC in a preset virtual world. Wherein the user may join the virtual world as an observer or as a character. When a user joins a virtual world as shown in fig. 6 with a virtual character, the user can choose to interact with the NPC beside the user, and here uncertainty is injected into the whole system, which may cause the story of the virtual world to develop in an unexpected direction, so as to increase interestingness and adventure.
In one embodiment, the method further comprises:
responding to the selection operation triggered on the picture, and displaying the human setting parameters, the state parameters, the memory parameters and the object relation of the target virtual object at the target position of the target virtual object corresponding to the selection operation; or,
in response to a pointing operation triggered on the screen, dialog content between virtual objects is displayed at a target location to which the pointing operation corresponds.
Here, the game screen refers to a screen of a virtual scene displayed in a screen, for example, a game screen as shown in fig. 6 is an initial game screen at the time of starting a game.
The selection operation refers to an operation for selecting a certain virtual object in the virtual scene, for example, the selection operation may be implemented by a user clicking a certain virtual object through a mouse.
The target virtual object refers to one or more selected virtual objects, for example, when a user points a mouse icon displayed in a game screen to a certain NPC, information such as a person setting, a current state parameter, a key event in memory, and a relationship with other NPCs of the NPC is displayed, and the NPC is the target virtual object.
The target position refers to a preset coordinate position for displaying information related to the virtual object, for example, the target position may be set as an upper right corner area of the virtual object, for example, when the user directs a mouse icon displayed in a game screen to a certain NPC, information such as a person setting, a current state parameter, a key event in memory, and a relationship with other NPCs of the NPC may be displayed at the target position in the game screen, that is, the upper right corner area of the NPC.
A pointing operation refers to an operation for pointing to a virtual object being interacted with in a virtual scene, for example, the pointing operation may be implemented by a user pointing to two virtual objects being interacted with by a mouse click.
The session content refers to session information between virtual objects, for example, session information between a certain virtual object having player properties and a certain NPC is displayed in a game screen.
Specifically, after a user starts a certain game application in the terminal, the terminal may acquire initial information and generate an initial game screen as shown in fig. 6 based on environment configuration information, evolution constraint information, object parameters of the virtual object, and object relationships in the initial information; further, the terminal may display the action trace and interaction behavior of the virtual object at the next moment of evolution in the initial game screen as shown in fig. 6.
For example, for a visual interactive interface, after a user starts a certain game application in the terminal, the terminal may generate a base screen as shown in fig. 6 based on the initial information. Further, the user may join the virtual world as an observer or as a character. As shown in fig. 7, a schematic diagram of a game screen at a certain moment is shown, when a user is used as an observer, if the user points a mouse at a certain NPC (virtual character 1) in the game screen shown in fig. 7, the terminal responds to a selection operation triggered by the user in the game screen shown in fig. 7, and displays information such as a person setting parameter, a state parameter, a memory parameter and an object relationship of the virtual character 1 at a target position (upper right corner area) of a target virtual object (virtual character 1) corresponding to the selection operation, that is, the terminal displays a person setting C, a current state parameter S, a key event M in memory of the NPC (virtual character 1) shown in fig. 7, and a relationship with other NPCs in the game screen.
Alternatively, when the user manipulates the mouse to point near two interacting virtual objects (virtual character 1 and virtual character 2) displayed in the game screen, the terminal may display session contents between them, for example, as shown in fig. 8, in which a schematic view of session contents between virtual objects is displayed in the game screen at a certain moment, and the session contents shown in fig. 8 are session contents between virtual character 1 and virtual character 2, in addition to information such as the person settings, current state parameters, key events in memory, and relationships with other NPCs. In addition, when the user joins the virtual world as a certain virtual character as shown in fig. 8, the user may select a certain preset character joining in the virtual world according to his own preference, or define a virtual character setting according to his own preference. When a user joins a virtual world as shown in fig. 8 with the identity of a virtual character (avatar 1), the user may choose to interact with his or her nearby NPC (avatar 2), where uncertainty may be injected into the entire virtual world, possibly resulting in the development of the virtual world's story in an unexpected direction, thereby increasing interest and adventure. In this embodiment, by constructing an open virtual world, a user can freely talk to a certain virtual character in the system, and randomly perturb the virtual environment, so that unexpected evolution results may be obtained, and each frame of game picture including diversified evolution results can be quickly and accurately generated, so that the display effect of the game picture is effectively improved.
In one embodiment, the method further comprises:
when the virtual object is an interactive virtual object and an interactive event occurs, outputting an interactive result corresponding to the interactive event and updating a dynamic relationship in the object relationship.
Wherein, the interactive virtual object refers to a virtual object related to interaction, namely, the virtual object can interact with other virtual objects. It will be appreciated that in certain game virtual scenarios there are virtual characters that are not involved in interactions, e.g., some pre-set NPC acts as an environmental character in the virtual world, not interacting with virtual characters having player attributes.
An interaction event refers to an event related to a virtual object, and an interaction result refers to a result of the interaction event, for example, the result of the interaction event in the present application may include a positive result and a negative result.
The dynamic relationship refers to a relationship between virtual characters, for example, the dynamic relationship in the present application may include emotion information, which may be a good feeling between virtual characters.
Specifically, when the virtual object in the picture is an interactive virtual object and an interaction event occurs, the terminal may output an interaction result corresponding to the interaction event and update a dynamic relationship in the object relationship of the virtual object. For example, when an interaction event is limited to an interaction between two virtual characters, the interaction content is an action and a dialogue; two virtual characters displayed in a picture are required to interact with each other in the same space and in adjacent positions (within a certain radius); in addition, the probability of interaction between the two is affected by factors such as the desirability, charm, and purchasing behavior. That is, in the embodiment of the present application, for the avatar that is undergoing interaction, the terminal outputs the interaction result and the updated object relationship parameter R corresponding to each avatar in addition to the state of each avatar at the next moment. The change of the goodness in the object relation parameter can be used as a random parameter to be input into an interaction control module of the NPC (namely, the change of the goodness of a person is preset in advance), the random performance brought by the parameter can influence the situation trend of the NPC which is automatically deducted, the larger the amplitude randomness is, the more open evolution result is also caused, otherwise, the situation tends to be converged circularly, so that each frame picture containing diversified evolution results can be rapidly and accurately generated, and the display effect of the picture is effectively improved.
In one embodiment, the dynamic relationship includes mood information; a step of updating a dynamic relationship in an object relationship, comprising:
determining the type of the interaction event based on the interaction result;
determining a change value of emotion information based on the human setting parameters of the interactive virtual object and the type of the interactive event;
the mood information is updated based on the change value.
The emotion information refers to emotion information of a virtual object, for example, the emotion information in the application can be measured by an index of sensitivity.
The types of the interaction events refer to that the interaction events can comprise different types, for example, the types of the interaction events can comprise active interaction events and passive interaction events in the application.
The change value of the emotion information in the present application may refer to a change value of the wellness, which may be affected by an interactive event between a person and a virtual character, for example, an active event increases the wellness and a passive event decreases the wellness.
Specifically, when the virtual object in the picture is an interactive virtual object and an interactive event occurs, the terminal can output an interactive result corresponding to the interactive event and determine the type of the interactive event based on the interactive result; for example, the terminal may determine the type of the interaction event as an active event based on the interaction result, the terminal may determine the change value of the emotion information as +1 based on the person setting parameter of the interactive virtual object and the type of the interaction event (active event), and the terminal may update the emotion information of the virtual object based on the change value (+1).
For example, as shown in fig. 8, when the virtual object 1 in the game screen is an interactive virtual object and an interactive event occurs, the terminal may output an interactive result corresponding to the interactive event between the virtual object 1 and the virtual object 2, and determine the type of the interactive event as an active event based on the interactive result, the terminal may determine a change value of the goodness of the virtual object 1 as +1 based on the person setting parameter of the virtual object 1 and the type of the interactive event (active event), and the terminal may update the goodness of the virtual object 1 based on the change value +1 as: rd=0+1=1. Wherein, the initial value of the goodness of the virtual object 1 may be set to rd=0.
In this embodiment, through the dynamic relationship (goodness) R between virtual objects updated in real time, the change of the goodness can be used as a random parameter to be input into the interaction control module of the NPC (i.e. the goodness change of the preset person), the randomness brought by the parameter can influence the scenario trend of the NPC in automatic deduction, and the randomness with larger amplitude also leads to a more open evolution result, otherwise, the scenario tends to be converged circularly. Therefore, each frame of game picture containing diversified evolution results can be rapidly and accurately generated, and the display effect of the game picture is effectively improved.
In one embodiment, the method further comprises:
when the virtual object has player attributes, responding to the triggered operation instruction, and determining target behaviors of the virtual object;
and verifying the target behavior through the verification model, and controlling the virtual object to execute the target behavior when the verification passes.
The player attribute refers to that the attribute of the virtual object is a player attribute, that is, the virtual object is controlled by a certain player, and under the view angle of the player, the player (operating user) only needs to output the next action, and the decision of whether to interact with the nearby NPC or not, and the decision may be in the form of text.
The target behavior refers to a behavior corresponding to an operation instruction, for example, an operation instruction that a player (operation user) triggers a next action about the virtual character by triggering an operation, and the terminal can determine the target behavior of the virtual object next step based on the operation instruction.
The verification model is used for verifying whether the behavior of the virtual object with the player attribute accords with the physical rule of the virtual world in the virtual scene, for example, the verification model can be a pre-trained common sense judging model, and can also be used for finishing the behavior verification of the virtual object with the player attribute by prompting the large language model, namely, in order to ensure that the behavior of the player accords with the physical rule of the virtual world, the player-triggered behavior can be used for verifying whether the behavior of the player is legal through the verification model, namely, the verification model is used for verifying the validity of the player-triggered behavior.
Specifically, when the virtual object has a player attribute, the terminal responds to an operation instruction triggered by a player (operation user), determines a target behavior of the virtual object, and verifies the target behavior of the virtual object through a verification model; when the target behavior of the virtual object is verified (verified to be legal), the terminal may control the virtual object to perform the corresponding target behavior. In the embodiment of the application, the virtual character with player attribute can automatically control the next action through the text, but the rationality of the character needs to be judged whether to be legal or not through a verification model, namely whether to violate the basic setting of the virtual world, if the character is legal through the verification model, the terminal can control the virtual object to execute the corresponding target action; if the verification model verifies that the virtual object is illegal, the terminal does not control the virtual object to execute the corresponding target behavior, namely, the target behavior of the virtual object triggered by the player (operating user) is not executed when the target behavior is illegal. Therefore, each event is triggered by the behavior of a virtual object (NPC or player) in the virtual world, the behavior of the player can produce random disturbance on the virtual environment, unexpected evolution results can be obtained, and accordingly various frames of pictures containing diversified evolution results can be rapidly and accurately generated, and the display effect of the pictures is effectively improved.
The application also provides an application scene, which applies the picture generation method. Specifically, the application of the picture generation method in the application scene is as follows:
in the process of interaction between the user and the game application, the above-mentioned image generating method may be adopted, for example, in a game scene of a certain game application, each user may select a virtual role in the game of the user, and interact with a virtual role controlled by the other party (such as other users or a computer program) by controlling one or more virtual roles, for example, the user controls one game role to interact with NPC in the game scene, so as to achieve the purpose of upgrading, that is, in the process of interaction between the user and the game application, the terminal may process a first behavior parameter and a first object parameter of the virtual object at a first moment through a large language model, output an intention parameter of the virtual object at the first moment and a second behavior parameter at a second moment, where the second moment is located after the first moment, and determine a second object parameter of the virtual object at the second moment based on the second behavior parameter; further, the terminal converts the second behavior parameters into events, and adds the events to an event stream, and the terminal determines the environmental state at the second moment based on the environmental state at the first moment and each event at the first moment in the event stream; meanwhile, the terminal can also determine the object relationship at the second moment based on the object relationship at the first moment and each event at the first moment; the terminal generates a game picture at the second moment based on the second object parameter, the environment state at the second moment and the object relation at the second moment, so that when a user starts a game application by using different mobile terminal equipment, an open virtual person automatic deduction scheme based on a large language model is provided, and the behavior of a virtual person is driven by setting a reasonable prompt for the large language model without defining a complex behavior rule; meanwhile, by adding the human setting information of the virtual human in the prompt, the individuation of the virtual human is improved; because LLM output is limited less (i.e. does not need to predefine a large amount of behavior space) and has certain randomness, the scenario deduced by the virtual person can be more diversified, and the display effect of the game picture is further effectively improved.
The method provided by the embodiment of the application can be applied to the scene of interaction between the user and various game applications. The screen generating method according to the embodiment of the present application will be described below by taking a scenario in which a user interacts with a narrative game application as an example.
Wherein, language Model (LM): a machine learning or deep learning model is trained according to an input text sequence, and the probability distribution of the next word or character is tried to be predicted, so that language rules and modes in natural language can be learned, and natural language texts can be generated.
Pre-trained language model (PTM, pretrained Language Model): an unsupervised pre-trained language model is performed on large-scale text, learning potential representations of natural language through contextual modeling. Based on PTM, fine tuning is performed in various natural language processing tasks, which can significantly improve the performance of downstream tasks.
Large language model (LLM, large Language Model): very large scale language models, with parameter sizes up to hundreds of millions or even billions, typically consume large amounts of data and computing resources. Generally has stronger generalization capability, and can be used for realizing efficient performance in many natural language processing tasks, such as text classification, language translation, question-answering systems and the like. In addition, LLM can also be used to generate high quality natural language text, such as articles, conversations, poems, and the like.
Prompt (prompt): refers to a piece of text (discrete prompt) or a numerical vector (continuous prompt) that is intended to direct a large language model to generate a particular output. Text prompts are typically written by humans for specifying the tasks or content that the model needs to accomplish. In large language model applications, hints may help the model learn new tasks faster, and may also be used to control the content and form of model generation so that it better meets specific needs.
Virtual man: computer programs simulating human thinking or behavior are commonly used in the fields of human-computer interaction, virtual reality, games, etc., and can generally serve as intelligent customer service, virtual teacher, virtual actor, etc.
Non-Player Character (NPC): refers to a non-player character that appears in a virtual environment such as a computer game or virtual reality, and is controlled by a computer program.
In the conventional manner, the dummy person behavior driving scheme can be classified into a rule driving and a model driving. The rule-driven scheme has higher controllability, but needs to write a large number of rules and scenes manually and needs to debug to reasonable rule parameters. For interactive virtual persons, it is generally divided into a language layer and a behavior layer. The language layer is usually a task-type dialogue system, which performs intention recognition based on player input, and then outputs reply contents in combination with rules and templates. At the behavior layer, only a small number of predefined behaviors are typically involved. Because of the rule driven, open virtual human conversations and behaviors cannot be supported. The model-driven technical scheme generally introduces reinforcement learning, namely, a specific rewarding function is set for each virtual person to guide the optimization of the virtual person action strategy, however, the scheme generally limits the candidate actions of the virtual person to a smaller action space, and the action strategy is easily influenced by disturbance of the top-level rule and has poor mobility.
That is, in the conventional manner, the dummy generated in the game has the following problems:
(1) A large number of manually formulated rules are required; (2) The virtual person lacks individuation and flexibility, and the action space is limited; (3) The evolution direction of the virtual person is limited, and the virtual person is easy to feel boring due to the proficiency of the user, so that the content presented by different users or the game pictures of the same user in different game periods is fixed, and the display effect of the game pictures is not ideal.
Therefore, in order to solve the above-mentioned problem, the present application provides a method for automatically deducting an open virtual person based on a large language model, which drives the behavior of the virtual person by setting a reasonable prompt for the large language model, without defining a complex behavior rule; meanwhile, by adding the human setting information of the virtual human in the prompt, the individuation of the virtual human is improved; because the LLM has less limitation on output (i.e. does not need to predefine a large amount of behavior space) and has certain randomness, namely, a principle of some randomness is additionally added into the system, the scenario deduced by the virtual person can be more diversified. In addition, the user can freely converse with a certain virtual person in the system, random disturbance is generated on the virtual environment, unexpected evolution results can be obtained, various frames of game pictures containing diversified evolution results can be rapidly and accurately generated, and further the display effect of the game pictures is effectively improved.
On the product side, the final product presentation form of the technical scheme provided by the application is divided into two layers, namely a text form and a visual interactive interface presentation. The text-form output is used for recording metadata of system evolution, and the metadata comprises four aspects of environment evolution, character interaction, event list and state evolution. The environment evolution records the evolution of basic environment variables, and the fields comprise: time, weather, and other periodic (preset) environmental events. The character interaction table is used for recording character interactions occurring in each unit time, and each interaction comprises basic elements: environments, characters, the beginning and ending of a scenario, etc., may include conversations when necessary. The event list records the event stream occurring per unit time, and each event contains key elements such as event properties, text descriptions, subjects, other participants and the like. The state evolution records the state change of each person, each person corresponds to a table, and the state, observation event, intention, behavior and the like of the person in each unit time are corresponding to each person.
For the visual interaction interface, the technical scheme of the application provides a basic picture to display the action track and interaction behavior of each virtual NPC in a preset virtual world. The user may join the virtual world as an observer or as a character. When the user is used as an observer, if the mouse is pointed to a certain NPC, the relationship among the person setting, the current state parameters, key events in the memory and other NPCs of the NPC is displayed. When the user points to the vicinity of two interacting virtual persons, in addition to the above information, the dialog content of both are displayed. When a user joins the virtual world as a certain character, the user can choose to join as a certain preset character in the world or define a virtual person setting according to his own preference. When a user joins the virtual world, the user can choose to interact with the NPC beside the user, uncertainty is injected into the whole system, and the story of the virtual world can be developed in an unexpected direction, so that interestingness and adventure are increased. In addition, the initial setting of the system also comprises an adjustable parameter for adding random disturbance to the deductive scenario so as to control the convergence of the evolution of the virtual world.
On the technical side, 1.1 overview
Fig. 5 is a schematic diagram of a basic architecture of an open-type virtual human automatic deduction method based on a large language model according to an embodiment of the present application. As shown in fig. 5, the technical solution provided by the present application relates to three main variable modules, namely, environment E, person C and relationship R, and the main flow of the whole system evolution is as follows:
(1) Setting initial information, including environment configuration and world evolution rules, basic parameters of characters and relation parameters among the characters; the above information is noted as state X (t) at time t=0;
(2) At a certain time t:
a) For each person, calculating the intention I (t) and the behavior A (t+1) of the person by information (marked as C (t)) such as person setting, observation, current state, memory and the like of the person;
b) Calculating all parameters C (t+1) of the person at the next moment t+1 according to the current parameters C (t) of the person and the intention and the behavior output in the previous step a);
c) Converting the behavior generated by each character into an event stream of an event joining environment;
d) Calculating the environmental state E (t+1) at the next time t+1 for all events generated at the time t by combining the current environmental parameters;
e) For all events generated at the moment t, calculating a relation matrix R (t+1) at the next moment t+1 by combining the current character relation R (t);
(3) Step (2) is looped until a stopping condition is fulfilled, for example stopping the deduction when T reaches a maximum evolution time T.
In the above-mentioned flow, the difficulty is that the person action calculation and the state transition calculation of each step are usually based on complicated rules in the traditional mode, and the technical scheme provided by the application only needs to be realized by adopting a small number of rules and combining LLM. Since LLM already has basic common sense reasoning capabilities, by reasonably prompting, LLM can be made to reason about the actions of a particular persona and the state of a given environment.
1.2 variable and rule settings
Environment variable (E): the environment variable (E) is divided into two parts, physical environment and event stream.
Wherein the physical environment variables include world view, unit time, current time, day and night, weather, location, etc. The world view is a basic assumption of the virtual world, and is described by natural language as an initial input when the virtual world is constructed and is fixed. The unit time and the current time are global variables and are automatically updated based on preset rules. The day and night and weather are global variables that dynamically change based on rules and current time. The position variables include the position of a preset location in the virtual world (fixed) and the coordinates of the dynamic change of the avatar. The rules of variation of the global variables mentioned above may be formulated and adjusted according to specific applications and requirements.
The event stream consists of a series of historical events, each triggered by the behavior of a character (NPC or player) in the virtual world, containing the necessary elements (time, event description, subject, other participants, etc.). Events are classified into periodic events, the former from a character schedule, or a preset goal of a character, which is predefined, and random events, the latter generated by some random factor, possibly from a system setting or some disturbance of a player, etc.
Character variable (C): the character variable (C) relates to five basic variables, which are respectively:
(1) Setting people, wherein the character information preset by the system is fixed and unchanged, and comprises names (nicknames), sexes, ages, background experiences and schedules (namely periodic events of daily card punching);
(2) Observations, i.e., what a person sees or hears, including the current environment and environmental events in the vicinity of the person, etc.;
(3) The state is divided into a physical state and a psychological state. Physical states include the location of the person, money, fatigue, and satiety of the person. The psychological state is a mood value, the influence of related events of the person is received, the mood value is increased by the positive event, and the mood value is reduced by the negative event;
(4) Memory including historical events experienced by the character, historical observations, other characters interacting with it, key conversations, etc.; different types of events decay to varying degrees over time, with initial memory derived from background experience;
(5) The intent includes the mental activities of the person at hand and short-term goals that affect the person's next behavior, but may be environmentally constrained from translating into real actions.
For NPC, the next action (a) of the character will be output by comprehensively considering the above information of the basic variable C, the environment variable E, the character relation R, etc., in combination with a small number of rules and LLM. Characters with player attributes can autonomously control the next action through text, but their rationality needs to go through a verification model to determine if they are legal, i.e. if they violate the basic settings of the virtual world.
Character relation (R):
the person relationship (R) is divided into a static relationship and a dynamic relationship. Static relationship refers to a long-term, stable relationship between people, such as parents, couples, many years of friends, etc., that does not change in the short term, or may be adjusted based on a few rules. The dynamic relation is the goodness of people between every two people, N people correspond to the goodness matrix R of N x N, the value range is [ -1,1], the higher the representation is, the better the feeling is, and the initial value is 0. The goodness can be influenced by the interaction event of the person and the person, and the positive event increases the goodness and otherwise decreases; wherein R may be asymmetric.
Character interaction rules:
the interaction between two persons is currently limited, and the interaction content is actions and conversations. Two people are interacted, which requires that the two people are in the same space and are in adjacent positions (within a certain radius); in addition, the probability of interaction between the two is affected by factors such as the desirability, charm, and purchasing behavior.
1.3 modeling behavior generation and State transfer functions with LLM
The virtual person deduction scene is a dynamic system, and the key of control is to calculate the evolution rule of each step, namely to learn (or formulate) a transfer function G, and given an environment E (t), a person C (t), a relation R (t) and an action A (t) at the moment t, the environment E (t+1), the person C (t+1), the relation R (t+1) and the action A (t+1) at the moment t+1 are generated.
Personage perspective: the character view includes an NPC view and a player view. Specifically, given an environment E, a person C, a relationship R, a control system of the person's viewing angle requires: for NPCs that do not involve interaction, outputting the person's intent I and the next action A; for the character satisfying the condition of occurrence of the interaction, whether the interaction occurs or not, and the behavior involved in the interaction are output.
At the player's perspective, the player need only output the next action, and a decision of whether (and how) to interact with the nearby NPC, in the form of text.
To ensure that the player's behavior complies with the physical laws of the virtual world, the player's selected behavior will determine whether it is legal through a verification model. The verification model can be a pre-trained common sense discrimination model, and can also finish 'validity judgment' by prompting the LLM.
Viewing angle of emperor: the LLM of the emperor's view is mainly responsible for computing reasonable state transitions and controlling person observations. The former can be expressed as the system requirement given the environment E, character C, relationship R, action A, and emperor perspective:
throwing event e= (time, event content, subject, other participants) and updating environmental parameter E;
for the state C of the next moment of the character which does not involve interaction, outputting the state C of the next moment of the character;
for the character that is interacting, in addition to the state of each character at the next moment, the interaction result and the updated character relationship (likeliness) R are output. The change of the wellness can be used as a random parameter to be input into an interaction control module of the NPC (namely, the wellness change of the character is preset in advance), the randomness brought by the parameter can influence the situation trend of the NPC which is automatically deducted, the randomness with larger amplitude can also lead to a more open evolution result, and otherwise, the situation tends to be converged circularly. In addition, the "emperor" view angle also needs to control the person to observe, i.e. input the environment E, the person C, and output the content O seen and heard by the person.
The technical scheme of the application has the beneficial effects that:
from the technical side, the method drives the behavior of the virtual person by setting reasonable campt for LLM without defining complex behavior rules; meanwhile, by adding the human setting information of the virtual human in the prompt, the individuation of the virtual human is improved; because the LLM has less limitation on output (i.e. does not need to predefine a large amount of behavior space) and has certain randomness, namely, a principle of some randomness is additionally added into the system, the scenario deduced by the virtual person can be more diversified. From the product, by constructing an open virtual world, a user can freely talk with a certain virtual person in the system, random disturbance is generated on the virtual environment, unexpected evolution results can be obtained, various frames of game pictures containing diversified evolution results can be rapidly and accurately generated, and further the display effect of the game pictures is effectively improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a picture generation device for realizing the picture generation method. The implementation of the solution provided by the apparatus is similar to the implementation described in the above method, so the specific limitation in the embodiments of the one or more picture generation apparatuses provided below may refer to the limitation of the picture generation method hereinabove, and will not be repeated here.
In one embodiment, as shown in fig. 9, there is provided a picture generation apparatus including: a determination module 902, a conversion module 904, and a generation module 906, wherein:
a determining module 902, configured to determine, based on a first behavior parameter of the virtual object at a first time and the first object parameter, an intent parameter of the virtual object at the first time and a second behavior parameter at a second time; wherein the second time is located after the first time; based on the second behavior parameters, second object parameters of the virtual object at a second time are determined.
The conversion module 904 is configured to convert the second behavior parameter into an event and add the event to the event stream.
The determining module 902 is further configured to determine an environmental state at a second time based on the environmental state at the first time and each event in the event stream at the first time; based on the object relationship at the first time and each event at the first time, an object relationship at the second time is determined.
A generating module 906, configured to generate a screen at the second time based on the second object parameter, the environmental state at the second time, and the object relationship at the second time.
In one embodiment, the first object parameters include a first observation parameter, a first memory parameter, a first status parameter, and a person setting parameter; the determining module is further configured to determine an intent parameter of the virtual object at the first moment based on the first behavior parameter, the first observation parameter, the first memory parameter, the first state parameter, and the person setting parameter; and determining a second behavior parameter of the virtual object at a second moment based on the first observation parameter, the first memory parameter, the first state parameter, the human setting parameter and the intention parameter at the first moment.
In one embodiment, the apparatus further comprises: the processing module is used for processing the observation parameters, the memory parameters, the state parameters, the human setting parameters and the intention parameters at the first moment through a language model to obtain second behavior parameters of the virtual object at the second moment; and processing the prompt text, the observation parameters, the memory parameters, the state parameters, the human setting parameters and the intention parameters at the first moment through a language model to obtain second behavior parameters of the virtual object conforming to the prompt text at the second moment.
In one embodiment, the processing module is further configured to process the second behavior parameter through a language model to obtain a second observed parameter, a second memory parameter, a second state parameter, a person setting parameter, and an intention parameter of the virtual object at a second moment; wherein the second observation parameter, the second memory parameter, the second state parameter, the person setting parameter, and the intention parameter at the second time belong to the second object parameter.
In one embodiment, the determining module is further configured to, when the second time is deduction time t+1, let t=t+1, continuously determine the behavior parameter, the object parameter, the environmental state and the object relationship of the virtual object at t+1 based on the second behavior parameter, the second object parameter, the environmental state at t and the object relationship at t; the generation module is further used for generating a picture at t+1 based on the behavior parameters, the object parameters, the environment states and the object relations of the virtual object at t+1 when the deduction time t meets deduction stop conditions.
In one embodiment, the apparatus further comprises: the system comprises an acquisition module and a display module, wherein the acquisition module is used for acquiring initial information; the initial information comprises environment configuration information, evolution constraint information, object parameters of the virtual object and object relations; the generation module is also used for generating an initial picture based on the environment configuration information, the evolution constraint information, the object parameters of the virtual object and the object relation; and the display module is used for displaying the action track and the interaction behavior of the virtual object in the initial picture.
In one embodiment, the display module is further configured to display, in response to a selection operation triggered on the screen, a person setting parameter, a state parameter, a memory parameter, and an object relationship of a target virtual object at a target position of the target virtual object corresponding to the selection operation; and responding to the pointing operation triggered on the screen, and displaying dialogue content between the virtual objects at the target positions corresponding to the pointing operation.
In one embodiment, the apparatus further comprises: and the updating module is used for outputting an interaction result corresponding to the interaction event and updating the dynamic relationship in the object relationship when the virtual object is an interactive virtual object and the interaction event occurs.
In one embodiment, the dynamic relationship includes mood information; the determining module is further used for determining the type of the interaction event based on the interaction result; determining a change value of the emotion information based on the person setting parameters of the interactive virtual object and the type of the interactive event; the updating module is also used for updating the emotion information based on the change value.
In one embodiment, the apparatus further comprises: the control module is also used for responding to the triggered operation instruction when the virtual object has the player attribute, and determining the target behavior of the virtual object; and the control module is used for verifying the target behavior through the verification model and controlling the virtual object to execute the target behavior when the verification passes.
Each of the modules in the screen generating apparatus described above may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal or a server, and in this embodiment, the computer device is described as an example of a terminal, and an internal structure thereof may be as shown in fig. 10. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a picture generation method. The display unit of the computer equipment is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device, wherein the display screen can be a liquid crystal display screen or an electronic ink display screen, the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on a shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 10 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (15)

1. A picture generation method, the method comprising:
determining an intention parameter of a virtual object at a first moment and a second behavior parameter of the virtual object at a second moment based on a first behavior parameter of the virtual object at the first moment and a first object parameter; wherein the second time is located after the first time;
determining a second object parameter of the virtual object at a second moment based on the second behavior parameter;
Converting the second behavior parameters into events and adding the events to an event stream;
determining the environmental state at the second moment based on the environmental state at the first moment and each event at the first moment in the event stream;
determining the object relation of the second moment based on the object relation of the first moment and each event of the first moment;
and generating a picture at the second moment based on the second object parameter, the environment state at the second moment and the object relation at the second moment.
2. The method of claim 1, wherein the first object parameters include a first observation parameter, a first memory parameter, a first status parameter, and a person setting parameter; the determining, based on the first behavior parameter and the first object parameter, an intent parameter of the virtual object at the first time and a second behavior parameter at a second time includes:
determining an intention parameter of the virtual object at the first moment based on the first behavior parameter, the first observation parameter, the first memory parameter, the first state parameter and the person setting parameter;
and determining a second behavior parameter of the virtual object at a second moment based on the first observation parameter, the first memory parameter, the first state parameter, the human setting parameter and the intention parameter at the first moment.
3. The method of claim 2, wherein the determining a second behavior parameter of the virtual object at a second time based on the observed parameter, the memory parameter, the status parameter, the person setting parameter, and the intent parameter at the first time comprises:
processing the observation parameters, the memory parameters, the state parameters, the human setting parameters and the intention parameters at the first moment through a language model to obtain second behavior parameters of the virtual object at the second moment; or,
and processing the prompt text, the observation parameters, the memory parameters, the state parameters, the human setting parameters and the intention parameters at the first moment through a language model to obtain second behavior parameters of the virtual object conforming to the prompt text at the second moment.
4. The method of claim 1, wherein determining a second object parameter for the virtual object at a second time based on the second behavior parameter comprises:
processing the second behavior parameters through a language model to obtain second observation parameters, second memory parameters, second state parameters, human setting parameters and intention parameters of the virtual object at a second moment; wherein the second observation parameter, the second memory parameter, the second state parameter, the person setting parameter, and the intention parameter at the second time belong to the second object parameter.
5. The method according to claim 1, wherein the method further comprises:
when the second moment is deduction time t+1, let t=t+1, and continuously determine the behavior parameter, object parameter, environment state and object relation of the virtual object at t+1 based on the second behavior parameter, the second object parameter, the environment state at t and the object relation at t;
when the deduction time t meets the deduction stopping condition, generating a picture at t+1 based on the behavior parameters, the object parameters, the environment states and the object relations of the virtual object at t+1.
6. The method according to claim 1, wherein the method further comprises:
acquiring initial information; the initial information comprises environment configuration information, evolution constraint information, object parameters of the virtual object and object relations;
generating an initial picture based on the environment configuration information, the evolution constraint information, the object parameters of the virtual object and the object relation;
and displaying the action track and the interaction behavior of the virtual object in the initial picture.
7. The method according to any one of claims 1 to 6, further comprising:
Responding to a selection operation triggered on the picture, and displaying a person setting parameter, a state parameter, a memory parameter and an object relation of a target virtual object at a target position of the target virtual object corresponding to the selection operation; or,
and responding to the pointing operation triggered on the screen, and displaying dialogue content between the virtual objects at the target positions corresponding to the pointing operation.
8. The method according to any one of claims 1 to 6, further comprising:
when the virtual object is an interactive virtual object and an interactive event occurs, outputting an interactive result corresponding to the interactive event and updating a dynamic relationship in the object relationship.
9. The method of claim 8, wherein the dynamic relationship comprises mood information; the updating the dynamic relationship in the object relationship comprises the following steps:
determining the type of the interaction event based on the interaction result;
determining a change value of the emotion information based on the person setting parameters of the interactive virtual object and the type of the interactive event;
updating the mood information based on the change value.
10. The method according to claim 1, wherein the method further comprises:
When the virtual object has player attributes, responding to the triggered operation instruction, and determining target behaviors of the virtual object;
and verifying the target behavior through a verification model, and controlling the virtual object to execute the target behavior when the verification passes.
11. A picture generation apparatus, characterized in that the apparatus comprises:
the determining module is used for determining an intention parameter of the virtual object at the first moment and a second behavior parameter of the virtual object at the second moment based on the first behavior parameter of the virtual object at the first moment and the first object parameter; wherein the second time is located after the first time; determining a second object parameter of the virtual object at a second moment based on the second behavior parameter;
the conversion module is used for converting the second behavior parameters into events and adding the events to an event stream;
the determining module is further configured to determine an environmental state at the second time based on the environmental state at the first time and each event at the first time in the event stream; determining the object relation of the second moment based on the object relation of the first moment and each event of the first moment;
And the generation module is used for generating a picture at the second moment based on the second object parameter, the environment state at the second moment and the object relation at the second moment.
12. The picture generation apparatus according to claim 11, wherein the apparatus further comprises:
the processing module is used for processing the observation parameters, the memory parameters, the state parameters, the human setting parameters and the intention parameters at the first moment through a language model to obtain second behavior parameters of the virtual object at the second moment; or processing the prompt text, the observation parameters, the memory parameters, the state parameters, the human setting parameters and the intention parameters at the first moment through a language model to obtain second behavior parameters of the virtual object conforming to the prompt text at the second moment.
13. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 10 when the computer program is executed.
14. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 10.
15. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 10.
CN202310696069.1A 2023-06-12 2023-06-12 Picture generation method, device, computer equipment and storage medium Pending CN116966568A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310696069.1A CN116966568A (en) 2023-06-12 2023-06-12 Picture generation method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310696069.1A CN116966568A (en) 2023-06-12 2023-06-12 Picture generation method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116966568A true CN116966568A (en) 2023-10-31

Family

ID=88480519

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310696069.1A Pending CN116966568A (en) 2023-06-12 2023-06-12 Picture generation method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116966568A (en)

Similar Documents

Publication Publication Date Title
US10726739B2 (en) Systems and methods for goal-based programming instruction
Mott et al. U-director: a decision-theoretic narrative planning architecture for storytelling environments
Gemrot et al. Pogamut 3 can assist developers in building AI (not only) for their videogame agents
US9595202B2 (en) Programming learning center
US11418848B2 (en) Device and method for interactive video presentation
WO2015153878A1 (en) Modeling social identity in digital media with dynamic group membership
Cotton Virtual reality, empathy and ethics
CN116543082A (en) Digital person generation method and device and digital person generation system
Teahan Artificial Intelligence–Agents and Environments
Zhang The relation between players' motivation, virtual communities and stickiness in augmented reality games
Toy et al. Metacognition is all you need? using introspection in generative agents to improve goal-directed behavior
Avinash et al. Specifying the Virtual Reality Approach in Mobile Gaming Using Unity Game Engine
Engström ‘I have a different kind of brain’—a script-centric approach to interactive narratives in games
Ford A further analysis of the ethics of representation in virtual reality: Multi-user environments
Ariffin et al. Edutourism augmented reality mobile application for forest conservation
Morie et al. Embodied conversational agent avatars in virtual worlds: Making today’s immersive environments more responsive to participants
Sun et al. VCAs as partners or servants? The effects of information sensitivity and anthropomorphism roles on privacy concerns
Bonn The impact of integrating Artificial Intelligence into the video games industry.: A case study.
Sureshbabu et al. User Persona Mapping Technique for Human Interaction with Augmented and Virtual Reality Environments
CN116966568A (en) Picture generation method, device, computer equipment and storage medium
Song et al. Developing an immersive game-based learning platform with generative artificial intelligence and virtual reality technologies–“LearningverseVR”
Malatesta et al. Agent personality traits in virtual environments based on appraisal theory predictions
Pérez et al. E-VOX: a socially enhanced semantic ECA
Leichtmann et al. Teaming with a Robot in Mixed Reality: Dynamics of Trust, Self-Efficacy, and Mental Models Affected by Information Richness
Fidas et al. Personalization of mobile applications in cultural heritage environments

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication