CN114288647B - Artificial intelligence game engine based on AI Designer, game rendering method and device - Google Patents

Artificial intelligence game engine based on AI Designer, game rendering method and device Download PDF

Info

Publication number
CN114288647B
CN114288647B CN202111658602.2A CN202111658602A CN114288647B CN 114288647 B CN114288647 B CN 114288647B CN 202111658602 A CN202111658602 A CN 202111658602A CN 114288647 B CN114288647 B CN 114288647B
Authority
CN
China
Prior art keywords
game
rendering
parameters
target
determining
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.)
Active
Application number
CN202111658602.2A
Other languages
Chinese (zh)
Other versions
CN114288647A (en
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.)
Shenzhen Fangzhou Interactive Technology Co ltd
Original Assignee
Shenzhen Fangzhou Interactive Technology 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 Shenzhen Fangzhou Interactive Technology Co ltd filed Critical Shenzhen Fangzhou Interactive Technology Co ltd
Priority to CN202111658602.2A priority Critical patent/CN114288647B/en
Publication of CN114288647A publication Critical patent/CN114288647A/en
Application granted granted Critical
Publication of CN114288647B publication Critical patent/CN114288647B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the application discloses an artificial intelligence game engine based on AI Designer, a game rendering method and a device, which are applied to electronic equipment comprising the artificial intelligence game engine based on AI Designer, and the method comprises the following steps: acquiring a current game scene of a game and P first game frames to be played corresponding to the current game scene, wherein P is an integer larger than 1; determining a target rendering parameter corresponding to the current game scene; rendering the P first game frames according to the target rendering parameters to obtain P second game frames; and playing the P second game frames. By adopting the method and the device, the intelligence of game rendering can be improved.

Description

Artificial intelligence game engine based on AI Designer, game rendering method and device
Technical Field
The application relates to the technical field of computers, in particular to an artificial intelligence game engine based on AI Designer, a game rendering method and a game rendering device.
Background
With the rapid development of network technology, network games are well received by users. Generally, in order to provide a user with a better game experience, a game engine is usually provided in a game device. The game engine refers to a core component of some edited computer game system or some interactive real-time image application program. These systems provide game designers with the various tools required to compose games, with the goal of allowing game designers to easily and quickly program games without starting from zero. The game engine can not only realize game loading, but also can finish game rendering, but the current game rendering effect is single, so the problem of how to improve the intelligence of game rendering is urgently needed to be solved.
Disclosure of Invention
The embodiment of the application provides an artificial intelligence game engine based on AI Designer, a game rendering method and a game rendering device, and the intelligence of game rendering can be improved.
In a first aspect, an embodiment of the present application provides a game rendering method, which is applied to an electronic device including an AI Designer-based artificial intelligence game engine, where the method includes:
acquiring a current game scene of a game and P first game frames to be played corresponding to the current game scene, wherein P is an integer larger than 1;
determining a target rendering parameter corresponding to the current game scene;
rendering the P first game frames according to the target rendering parameters to obtain P second game frames;
and playing the P second game frames.
In a second aspect, an embodiment of the present application provides a game rendering apparatus, which is applied to an electronic device including an AI Designer-based artificial intelligence game engine, where the apparatus includes: an acquisition unit, a determination unit, a rendering unit and a playback unit, wherein,
the acquisition unit is used for acquiring a current game scene of a game and P first game frames to be played corresponding to the current game scene, wherein P is an integer larger than 1;
the determining unit is used for determining a target rendering parameter corresponding to the current game scene;
the rendering unit is used for rendering the P first game frames according to the target rendering parameters to obtain P second game frames;
the playing unit is used for playing the P second game frames.
In a third aspect, an embodiment of the present application provides an AI Designer-based artificial intelligence game engine for performing part or all of the method as described in the first aspect.
In a fourth aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a human body communication chip, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the embodiment of the present application.
In a fifth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform some or all of the steps described in the first aspect of the present application.
In a sixth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application has the following beneficial effects:
it can be seen that the AI Designer-based artificial intelligence game engine, the game rendering method and the game rendering device described in the embodiments of the present application are applied to an electronic device including the AI Designer-based artificial intelligence game engine, the current game scene of a game and P first game frames to be played corresponding to the current game scene are obtained, where P is an integer greater than 1, a target rendering parameter corresponding to the current game scene is determined, the P first game frames are rendered according to the target rendering parameter to obtain P second game frames, the P second game frames are played, rendering can be achieved based on the game scene, a rendering effect consistent with the game scene is obtained, multiple frames can be rendered at one time, rendering data is prepared in advance, seamless efficient rendering is achieved, and rendering intelligence is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a game rendering method according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart of another game rendering method provided in the embodiments of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 4 is a block diagram illustrating functional units of a game rendering apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In an embodiment of the present application, the electronic device may include at least one of: the mobile phone, the tablet computer, the vehicle-mounted device (such as a navigator and a vehicle-mounted refrigerator), the scanner, the wearable device (such as a smart band, a smart watch, a smart headset, and the like), and the like, which are not limited herein, the electronic device may further include a cloud server. The electronic device may also be an artificial intelligence game engine of the AI Designer.
The following describes embodiments of the present application in detail.
Referring to fig. 1, fig. 1 is a schematic flowchart of a game rendering method according to an embodiment of the present application, applied to an electronic device including an AI Designer-based artificial intelligence game engine, where the game rendering method includes the following steps 101 to 104, specifically:
101. the method comprises the steps of obtaining a current game scene of a game and P first game frames to be played corresponding to the current game scene, wherein P is an integer larger than 1.
In a specific implementation, the game can be any network game or a stand-alone game. The P first game frames to be played may be stored in a buffer area in advance. The size of P may be related to device performance or the operating frequency of the user, e.g., the better the device performance, the larger P.
In the embodiment of the application, the AI Designer-based artificial intelligence game engine may be a Unity engine or other game engines.
In the embodiment of the present application, a game scene may generally be understood as restoring available elements in a game, such as buildings, trees, sky, roads, and the like, according to a planning requirement, different game scenes may correspond to different game scene identifiers, and the game scene identifiers are used to represent names or serial numbers of the game scenes.
Optionally, in step 101, the obtaining a current game scene of the game and P first game frames to be played corresponding to the current game scene may include the following steps:
11. acquiring a current frame of the game;
12. identifying the current frame to obtain the current game scene;
13. determining a first target area and a background area of the current frame;
14. predicting the first target area to obtain P second target areas;
15. determining the P first game frames from the P second target areas and the background area.
In a specific implementation, a screenshot operation may be performed to obtain a current frame of a game, and feature extraction may be performed on the current frame to obtain a target feature set, where the target feature set includes at least one feature, and the feature may include at least one of the following: feature points, feature vectors, keywords, feature contours, and the like, which are not limited herein, may be determined based on the target feature set, and then, a first target region and a background in the current frame may be determined, and then, a motion estimation algorithm may be adopted, so that a motion trend of the first target region may be predicted, and then, P second target regions may be obtained, the P second target regions are progressively changed, each of the P second target regions may correspond to a play sequence or a play time, and image fusion is performed on each of the P second target regions and the background region to obtain P first game frames, and each of the P first game frames may correspond to a play sequence or a play time.
102. And determining target rendering parameters corresponding to the current game scene.
In specific implementation, a mapping relationship between a preset game scene and rendering parameters may be pre-stored, and then, target rendering parameters corresponding to the current game scene may be determined based on the mapping relationship. In the embodiment of the present application, the rendering parameter may include at least one of: rendering resolution, rendering color, rendering algorithm, control parameter of rendering algorithm, rendering rate, rendering area, and the like, which are not limited herein, wherein the rendering algorithm may include at least one of: a radio energy transfer method, an Indirect illumination method, a Scanline Render method, a Raytracen ray tracing method, and the like, which are not limited herein, the control parameters of the rendering algorithm are parameters for controlling the rendering effect, and different rendering algorithms correspond to different control parameters.
Optionally, in the step 102, determining the target rendering parameter corresponding to the current game scene may include the following steps:
21. determining reference rendering parameters of the current game scene, wherein the reference rendering parameters comprise static area rendering parameters and dynamic area rendering parameters;
22. determining a static area and a dynamic area of each game frame in the P first game frames to obtain P dynamic areas and static areas;
23. determining the difference parameters of the dynamic areas in the P game frames to obtain P difference parameters;
24. determining P target dynamic region rendering parameters according to the P difference parameters and the dynamic region rendering parameters;
25. and determining the rendering parameters of each frame according to the P dynamic target area rendering parameters and the static area rendering parameters to obtain P groups of rendering parameters, and determining the P groups of rendering parameters as the target rendering parameters.
In specific implementation, the reference rendering parameter of the current game scene may be determined according to a pre-stored mapping relationship between the preset game scene and the rendering parameter. Specifically, the reference rendering parameters may include a static region rendering parameter and a dynamic region rendering parameter, where the static region rendering parameter is used for rendering a static region, and the dynamic region rendering parameter is used for rendering a dynamic region, and the static region may be understood as a region that may not be moved or changed, and the dynamic region may be understood as a region that may be moved or changed.
Furthermore, the static area and the dynamic area of each of the P first game frames may be determined to obtain P dynamic areas and static areas, the number of the static areas may be 1 or P, and since each frame is unique and changes in a latently moving manner, the difference parameter of the dynamic areas in the P game frames may be determined to obtain P difference parameters, and the difference parameter may reflect the change range between frames, for example, the change range between adjacent frames may be determined, and the change range may be implemented by an optical flow method or a motion estimation algorithm, for example, taking adjacent 3 frames as an example, the three frames are image 1, image 2 and image 3, the change range between image 1 and image 2 is a1, and the change range between image 2 and image 3 is a 2.
In the concrete implementation, different difference parameters may correspond to different adjustment parameters, the value range of the adjustment parameters may be-0.1 to 0.1, a preset mapping relationship between the difference parameters and the adjustment parameters may be stored in advance, the adjustment parameter corresponding to each difference parameter of the P difference parameters may be determined based on the mapping relationship to obtain P adjustment parameters, then P target dynamic region rendering parameters may be determined based on each dynamic region rendering parameter of the P adjustment parameters, that is, the target dynamic region rendering parameter = (1 + adjustment parameter) = dynamic region rendering parameter, then the rendering parameter of each frame may be determined according to the P target dynamic region rendering parameters and the static region rendering parameters to obtain P groups of rendering parameters, the P groups of rendering parameters are determined as the target rendering parameters, because the rendering parameters of the static region are kept unchanged, and the rendering effect of the dynamic region is dynamically adjusted based on the change amplitude of the dynamic region, so that the rendering efficiency is improved, and meanwhile, the change of the dynamic region can be fully displayed, the rendering effect is in accordance with the evolution progress depth of the game scene, and the user experience is favorably improved.
Optionally, in step 25, determining the rendering parameter of each frame according to the P target dynamic region rendering parameters and the static region rendering parameter to obtain P groups of rendering parameters, which may include the following steps:
251. acquiring target network parameters and target equipment parameters;
252. determining a first optimization factor according to the target equipment parameter;
253. determining a second optimization factor according to the target network parameter;
254. optimizing a target dynamic region rendering parameter i according to the first optimization factor and the second optimization factor to obtain an optimized target dynamic region rendering parameter, wherein the target dynamic region rendering parameter i is one of the P target dynamic region rendering parameters;
255. and determining corresponding rendering parameters according to the target dynamic region rendering parameter i and the static region rendering parameters.
In this embodiment, the network parameter may include at least one of the following: network rate, network bandwidth, network channel signal-to-noise ratio, etc., without limitation. The device parameters may include at least one of: device model, device configuration parameters, etc., without limitation. The device configuration parameters may include at least one of: CPU configuration parameters, GPU configuration parameters, memory size, etc., without limitation.
In specific implementation, a target network parameter and a target device parameter may be obtained, a first mapping relationship between a preset device parameter and an optimization factor may be stored in advance, a value range of the optimization factor may be 0.5-1, and a first optimization factor corresponding to the target device parameter is determined according to the first mapping relationship.
And then, a second mapping relation between the preset network parameters and the optimization factors can be stored in advance, the value range of the optimization factors can be-0.5, and the target network parameters are determined according to the second mapping relation to determine the second optimization factors.
Furthermore, taking the target dynamic region rendering parameter i as an example, the target dynamic region rendering parameter i may be one of P target dynamic region rendering parameters, and the target dynamic region rendering parameter i may be optimized according to the first optimization factor and the second optimization factor to obtain an optimized target dynamic region rendering parameter, which is specifically as follows: the optimized target dynamic region rendering parameter = target dynamic region rendering parameter i x first optimization factor (1 + second optimization factor), that is, the corresponding rendering parameter may be determined according to the target dynamic region rendering parameter i and the static region rendering parameter, and since the dynamic region and the static region constitute one complete image frame, the rendering parameter of the whole image frame may be determined according to the image pixel position relationship, and thus, the appropriate rendering parameter may be adapted based on the device itself and the network environment.
Optionally, in the step 21, determining the reference rendering parameter of the current game scene may include the following steps:
211. obtaining historical rendering parameters of the current game scene to obtain M historical rendering parameters, wherein each historical parameter corresponds to a game environment parameter;
212. acquiring current game environment parameters;
213. comparing the current game environment parameters with game environment parameters corresponding to the M historical rendering parameters to obtain M comparison values;
214. selecting the front N comparison values in the M comparison values, wherein N is a positive integer;
215. obtaining historical rendering parameters corresponding to the N comparison values to obtain N historical rendering parameters;
216. and determining the reference rendering parameters according to the N historical rendering parameters.
In a specific implementation, the game environment parameters may include: a hardware gaming environment, and/or a software gaming environment. The hardware game parameters may include at least one of: the working parameters of the AI Designer-based artificial intelligence game engine, the working parameters of the CPU, the working parameters of the GPU, the working parameters of the memory, and the like, which are not limited herein. The software gaming environment may include at least one of: device run scores, number of background applications, number of foreground applications, device modes, and the like, without limitation. M is an integer greater than 1, and N is a positive integer less than or equal to M.
In the specific implementation, historical rendering parameters of a current game scene can be acquired within a preset time period to obtain M historical rendering parameters, each historical parameter corresponds to one game environment parameter, the current game environment parameter can also be acquired, the current game environment parameter is compared with each game environment parameter in the M historical rendering parameters to obtain M comparison values, the former N comparison values in the M comparison values can be selected, N is a positive integer, the historical rendering parameters corresponding to the N comparison values are acquired to obtain N historical rendering parameters, the rendering parameters of the game scene closest to the current game scene can be obtained, and reference rendering parameters can be determined according to the N historical rendering parameters, so that the rendering parameters of the current game scene can be acquired based on historical game experience. The preset time period may be preset or default to the system, for example, the preset time period may be the last month.
Optionally, in step 216, determining the reference rendering parameter according to the N historical rendering parameters may include the following steps:
s1, determining the corresponding time of each historical rendering parameter in the N historical rendering parameters to obtain N times;
s2, determining the time length between each moment of the N moments and the current moment to obtain N time lengths;
s3, determining N first weights according to the N time lengths, and determining first rendering parameters according to the N first weights and the N historical rendering parameters;
s4, determining N second weights according to the comparison values corresponding to the N historical rendering parameters, and determining second rendering parameters according to the N second weights and the N historical rendering parameters;
s5, determining the reference rendering parameter according to the first rendering parameter and the second rendering parameter.
In specific implementation, a time corresponding to each of N historical rendering parameters may be determined to obtain N times, a time length between each of the N times and a current time is determined to obtain N time lengths, and the longer the time length is, the farther the time length is different from a current user experience, that is, the lighter the weight is, further, N first weights may be determined according to the N time lengths, and assuming that the N time lengths are t1, t2, …, and tN, the ratio corresponding to each time length may be determined as 1 minus the time length as the weight of each time length, taking t1 as an example, the corresponding first weight =1-t 1/(t 1+ t2+ … + tN), and so on, the N first weights may be obtained, and further, a weighting operation may be performed based on each first weight of the N first weights and the corresponding historical rendering parameter, the first rendering parameters are obtained, so that the reference rendering parameters can be preliminarily determined in a time dimension, and reasonable rendering parameters can be deduced by combining the dimension with the historical experience of the user and the memory feeling.
In addition, the N second weights can be determined according to comparison values corresponding to the N historical rendering parameters, in a specific implementation, the greater the comparison value is, the greater the weight is, and further, a weighting operation can be performed according to each second weight in the N second weights and the corresponding historical rendering parameter to obtain a second rendering parameter.
Finally, weighting operation can be carried out according to the first rendering parameter and the second rendering parameter to obtain a reference rendering parameter, so that the rendering parameter which is consistent with the historical game scene and accords with the game habit of the current user can be obtained, and the user experience is favorably improved.
103. And rendering the P first game frames according to the target rendering parameters to obtain P second game frames.
In a specific implementation, the P first game frames may be rendered according to the target rendering parameters to obtain P second game frames, and the P second game frames may be pre-rendered and stored in a preset cache region, where the preset cache region may be preset or default to the system.
104. And playing the P second game frames.
In a specific implementation, P second game frames may be played in sequence.
Optionally, the step 104 of playing the P second game frames may include the following steps:
41. detecting whether a user watches a game picture;
42. when detecting that the user does not watch the game picture, playing the P second game frames according to a first preset playing parameter;
43. and when the fact that the user gazes at the game picture is detected, playing the P second game frames according to a second preset playing parameter, wherein the playing effect of the second preset playing parameter is superior to that of the first preset playing parameter.
The first preset playing parameter may be preset or default to the system, and the second preset playing parameter may also be preset or default to the system.
In the concrete implementation, whether a user watches a game picture can be detected through the camera, when the user is detected not to watch the game picture, P second game frames are played according to a first preset playing parameter, namely the P second game frames can be displayed according to a lower-quality rendering effect, so that the power consumption of equipment is saved, when the user is detected to watch the game picture, the P second game frames are played according to a second preset playing parameter, wherein the playing effect of the second preset playing parameter is superior to the playing effect of the first preset playing parameter, namely under the condition of people, a high-quality rendering effect can be displayed, namely, the power consumption of the equipment is saved, and the user experience is also improved.
It can be seen that the game rendering method described in the embodiment of the present application is applied to an electronic device including an artificial intelligence game engine based on AI Designer, obtains a current game scene of a game and P first game frames to be played corresponding to the current game scene, where P is an integer greater than 1, determines a target rendering parameter corresponding to the current game scene, renders the P first game frames according to the target rendering parameter to obtain P second game frames, plays the P second game frames, can implement rendering based on the game scene, obtains a rendering effect corresponding to the game scene, and can render multiple frames at a time, prepare rendering data in advance, implement seamless efficient rendering, and improve rendering intelligence.
Referring to fig. 2, fig. 2 is a schematic flowchart of a game rendering method provided in an embodiment of the present application, and the game rendering method is applied to an electronic device including an AI Designer-based artificial intelligence game engine, as shown in the figure, the game rendering method includes:
201. it is detected whether the user gazes at the game screen.
Wherein eye tracking techniques may be utilized to detect whether a user is gazing at a game scene.
202. When detecting that a user does not watch a game picture, acquiring a current game scene of a game and P first game frames to be played corresponding to the current game scene, wherein P is an integer larger than 1.
When the situation that the user does not watch the game picture is detected, the situation that the user plays the game needs to be achieved.
203. And determining target rendering parameters corresponding to the current game scene.
204. And rendering the P first game frames according to the target rendering parameters to obtain P second game frames.
205. And playing the P second game frames.
The above steps 201 to 205 may refer to corresponding steps of the game rendering method shown in fig. 1, which is not limited herein.
It can be seen that the game rendering method described in the embodiment of the present application is applied to an electronic device including an AI Designer-based artificial intelligence game engine, and is configured to detect whether a user gazes at a game screen, and when it is detected that the user does not gaze at the game screen, obtain a current game scene of a game and P first game frames to be played corresponding to the current game scene, where P is an integer greater than 1, determine a target rendering parameter corresponding to the current game scene, render the P first game frames according to the target rendering parameter, obtain P second game frames, play the P second game frames, implement rendering based on the game scene, obtain a rendering effect consistent with the game scene, and render multiple frames at a time, prepare rendering data in advance, implement seamless and efficient rendering, and improve rendering intelligence.
In accordance with the foregoing embodiments, please refer to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where as shown in the drawing, the electronic device includes a processor, a memory, a communication interface, and one or more programs, the electronic device includes an AI Designer-based artificial intelligence game engine, the one or more programs are stored in the memory and configured to be executed by the processor, and in an embodiment of the present application, the programs include instructions for performing the following steps:
acquiring a current game scene of a game and P first game frames to be played corresponding to the current game scene, wherein P is an integer larger than 1;
determining a target rendering parameter corresponding to the current game scene;
rendering the P first game frames according to the target rendering parameters to obtain P second game frames;
and playing the P second game frames.
Optionally, in the aspect of determining the target rendering parameter corresponding to the current game scene, the program includes instructions for performing the following steps:
determining reference rendering parameters of the current game scene, wherein the reference rendering parameters comprise static area rendering parameters and dynamic area rendering parameters;
determining a static area and a dynamic area of each game frame in the P first game frames to obtain P dynamic areas and static areas;
determining the difference parameters of the dynamic areas in the P game frames to obtain P difference parameters;
determining P target dynamic region rendering parameters according to the P difference parameters and the dynamic region rendering parameters;
and determining the rendering parameters of each frame according to the P target dynamic area rendering parameters and the static area rendering parameters to obtain P groups of rendering parameters, and determining the P groups of rendering parameters as the target rendering parameters.
Optionally, in the aspect that the rendering parameter of each frame is determined according to the P target dynamic region rendering parameters and the static region rendering parameters to obtain P groups of rendering parameters, the program includes instructions for executing the following steps:
acquiring target network parameters and target equipment parameters;
determining a first optimization factor according to the target equipment parameter;
determining a second optimization factor according to the target network parameter;
optimizing a target dynamic region rendering parameter i according to the first optimization factor and the second optimization factor to obtain an optimized target dynamic region rendering parameter, wherein the target dynamic region rendering parameter i is one of the P target dynamic region rendering parameters;
and determining corresponding rendering parameters according to the target dynamic region rendering parameter i and the static region rendering parameters.
Optionally, in the aspect of determining the reference rendering parameter of the current game scene, the program includes instructions for performing the following steps:
obtaining historical rendering parameters of the current game scene to obtain M historical rendering parameters, wherein each historical parameter corresponds to a game environment parameter;
acquiring current game environment parameters;
comparing the current game environment parameters with game environment parameters corresponding to the M historical rendering parameters to obtain M comparison values;
selecting the front N comparison values in the M comparison values, wherein N is a positive integer;
obtaining historical rendering parameters corresponding to the N comparison values to obtain N historical rendering parameters;
and determining the reference rendering parameters according to the N historical rendering parameters.
Optionally, in the aspect of acquiring the current game scene of the game and the P first game frames to be played corresponding to the current game scene, the program includes instructions for executing the following steps:
acquiring a current frame of the game;
identifying the current frame to obtain the current game scene;
determining a first target area and a background area of the current frame;
predicting the first target area to obtain P second target areas;
determining the P first game frames from the P second target areas and the background area.
Optionally, in the aspect of playing the P second game frames, the program includes instructions for executing the following steps:
detecting whether a user gazes at a game picture;
when detecting that the user does not watch the game picture, playing the P second game frames according to a first preset playing parameter;
and when detecting that the user watches the game picture, playing the P second game frames by using a second preset playing parameter, wherein the playing effect of the second preset playing parameter is superior to that of the first preset playing parameter.
It can be seen that, in the electronic device described in the embodiment of the present application, a current game scene of a game and P first game frames to be played corresponding to the current game scene are obtained, where P is an integer greater than 1, a target rendering parameter corresponding to the current game scene is determined, the P first game frames are rendered according to the target rendering parameter to obtain P second game frames, and the P second game frames are played, so that rendering can be achieved based on the game scene, a rendering effect consistent with the game scene is obtained, multiple frames can be rendered at one time, rendering data is prepared in advance, seamless and efficient rendering is achieved, and rendering intelligence is improved.
Fig. 4 is a block diagram of functional units of a game rendering apparatus 400 according to an embodiment of the present application, where the game rendering apparatus 400 is applied to an electronic device including an AI Designer-based artificial intelligence game engine, and the apparatus 400 includes: an acquisition unit 401, a determination unit 402, a rendering unit 403, and a playback unit 404, wherein,
the obtaining unit 401 is configured to obtain a current game scene of a game and P first game frames to be played corresponding to the current game scene, where P is an integer greater than 1;
the determining unit 402 is configured to determine a target rendering parameter corresponding to the current game scene;
the rendering unit 403 is configured to render the P first game frames according to the target rendering parameter, so as to obtain P second game frames;
the playing unit 404 is configured to play the P second game frames.
Optionally, in the aspect of determining the target rendering parameter corresponding to the current game scene, the determining unit 402 is specifically configured to:
determining reference rendering parameters of the current game scene, wherein the reference rendering parameters comprise static area rendering parameters and dynamic area rendering parameters;
determining a static area and a dynamic area of each game frame in the P first game frames to obtain P dynamic areas and static areas;
determining the difference parameters of the dynamic areas in the P game frames to obtain P difference parameters;
determining P target dynamic region rendering parameters according to the P difference parameters and the dynamic region rendering parameters;
and determining the rendering parameters of each frame according to the P target dynamic area rendering parameters and the static area rendering parameters to obtain P groups of rendering parameters, and determining the P groups of rendering parameters as the target rendering parameters.
Optionally, in the aspect that the rendering parameter of each frame is determined according to the P target dynamic region rendering parameters and the static region rendering parameters to obtain P groups of rendering parameters, the determining unit 402 is specifically configured to:
acquiring target network parameters and target equipment parameters;
determining a first optimization factor according to the target equipment parameter;
determining a second optimization factor according to the target network parameter;
optimizing a target dynamic region rendering parameter i according to the first optimization factor and the second optimization factor to obtain an optimized target dynamic region rendering parameter, wherein the target dynamic region rendering parameter i is one of the P target dynamic region rendering parameters;
and determining corresponding rendering parameters according to the target dynamic region rendering parameter i and the static region rendering parameters.
Optionally, in the aspect of determining the reference rendering parameter of the current game scene, the determination unit 402 is specifically configured to:
obtaining historical rendering parameters of the current game scene to obtain M historical rendering parameters, wherein each historical parameter corresponds to a game environment parameter;
acquiring current game environment parameters;
comparing the current game environment parameters with game environment parameters corresponding to the M historical rendering parameters to obtain M comparison values;
selecting the front N comparison values in the M comparison values, wherein N is a positive integer;
obtaining historical rendering parameters corresponding to the N comparison values to obtain N historical rendering parameters;
and determining the reference rendering parameters according to the N historical rendering parameters.
Optionally, in terms of acquiring the current game scene of the game and the P first game frames to be played corresponding to the current game scene, the acquiring unit 401 is specifically configured to:
acquiring a current frame of the game;
identifying the current frame to obtain the current game scene;
determining a first target area and a background area of the current frame;
predicting the first target area to obtain P second target areas;
determining the P first game frames from the P second target areas and the background area.
Optionally, in the aspect of playing the P second game frames, the playing unit 404 is specifically configured to:
detecting whether a user watches a game picture;
when detecting that the user does not watch the game picture, playing the P second game frames according to a first preset playing parameter;
and when detecting that the user watches the game picture, playing the P second game frames by using a second preset playing parameter, wherein the playing effect of the second preset playing parameter is superior to that of the first preset playing parameter.
It can be seen that the game rendering apparatus described in the embodiment of the present application is applied to an electronic device including an artificial intelligence game engine based on AI Designer, obtains a current game scene of a game and P first game frames to be played corresponding to the current game scene, where P is an integer greater than 1, determines a target rendering parameter corresponding to the current game scene, renders the P first game frames according to the target rendering parameter to obtain P second game frames, plays the P second game frames, can implement rendering based on the game scene, obtains a rendering effect corresponding to the game scene, and can render multiple frames at a time, prepare rendering data in advance, implement seamless efficient rendering, and improve rendering intelligence.
It can be understood that the functions of each program module of the game rendering apparatus in this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the relevant description of the foregoing method embodiment, which is not described herein again.
The embodiment of the application also provides an artificial intelligence game engine based on the AI Designer, wherein the artificial intelligence game engine based on the AI Designer executes part or all of the steps of any one of the methods described in the method embodiments.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the methods as described in the above method embodiments.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art will recognize that the embodiments described in this specification are preferred embodiments and that acts or modules referred to are not necessarily required for this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to the related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, the specific implementation manner and the application scope may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (9)

1. A game rendering method applied to an electronic device including an AI Designer-based artificial intelligence game engine, the method comprising:
acquiring a current game scene of a game and P first game frames to be played corresponding to the current game scene, wherein P is an integer larger than 1;
determining a target rendering parameter corresponding to the current game scene;
rendering the P first game frames according to the target rendering parameters to obtain P second game frames;
playing the P second game frames;
wherein the determining of the target rendering parameter corresponding to the current game scene comprises:
determining reference rendering parameters of the current game scene, wherein the reference rendering parameters comprise static area rendering parameters and dynamic area rendering parameters;
determining a static area and a dynamic area of each game frame in the P first game frames to obtain P dynamic areas and static areas;
determining the difference parameters of the dynamic areas in the P game frames to obtain P difference parameters;
determining P target dynamic region rendering parameters according to the P difference parameters and the dynamic region rendering parameters;
and determining the rendering parameters of each frame according to the P target dynamic area rendering parameters and the static area rendering parameters to obtain P groups of rendering parameters, and determining the P groups of rendering parameters as the target rendering parameters.
2. The method of claim 1, wherein the determining rendering parameters for each frame according to the P target dynamic region rendering parameters and the static region rendering parameters to obtain P sets of rendering parameters comprises:
acquiring target network parameters and target equipment parameters;
determining a first optimization factor according to the target equipment parameter;
determining a second optimization factor according to the target network parameter;
optimizing a target dynamic region rendering parameter i according to the first optimization factor and the second optimization factor to obtain an optimized target dynamic region rendering parameter, wherein the target dynamic region rendering parameter i is one of the P target dynamic region rendering parameters;
and determining corresponding rendering parameters according to the target dynamic region rendering parameter i and the static region rendering parameters.
3. The method of claim 1, wherein determining the reference rendering parameters for the current game scene comprises:
obtaining historical rendering parameters of the current game scene to obtain M historical rendering parameters, wherein each historical parameter corresponds to a game environment parameter;
acquiring current game environment parameters;
comparing the current game environment parameters with game environment parameters corresponding to the M historical rendering parameters to obtain M comparison values;
selecting the front N comparison values in the M comparison values, wherein N is a positive integer;
obtaining historical rendering parameters corresponding to the N comparison values to obtain N historical rendering parameters;
and determining the reference rendering parameters according to the N historical rendering parameters.
4. The method according to any one of claims 1 to 3, wherein the acquiring a current game scene of a game and P first game frames to be played corresponding to the current game scene comprises:
acquiring a current frame of the game;
identifying the current frame to obtain the current game scene;
determining a first target area and a background area of the current frame;
predicting the first target area to obtain P second target areas;
determining the P first game frames from the P second target areas and the background area.
5. The method of any of claims 1-3, wherein said playing said P second game frames comprises:
detecting whether a user watches a game picture;
when detecting that the user does not watch the game picture, playing the P second game frames according to a first preset playing parameter;
and when detecting that the user watches the game picture, playing the P second game frames by using a second preset playing parameter, wherein the playing effect of the second preset playing parameter is superior to that of the first preset playing parameter.
6. A game rendering apparatus for use in an electronic device including an AI Designer-based artificial intelligence game engine, the apparatus comprising: an acquisition unit, a determination unit, a rendering unit and a playback unit, wherein,
the acquisition unit is used for acquiring a current game scene of a game and P first game frames to be played corresponding to the current game scene, wherein P is an integer larger than 1;
the determining unit is used for determining a target rendering parameter corresponding to the current game scene;
the rendering unit is used for rendering the P first game frames according to the target rendering parameters to obtain P second game frames;
the playing unit is used for playing the P second game frames;
wherein the determining of the target rendering parameter corresponding to the current game scene comprises:
determining reference rendering parameters of the current game scene, wherein the reference rendering parameters comprise static area rendering parameters and dynamic area rendering parameters;
determining a static area and a dynamic area of each game frame in the P first game frames to obtain P dynamic areas and static areas;
determining the difference parameters of the dynamic areas in the P game frames to obtain P difference parameters;
determining P target dynamic region rendering parameters according to the P difference parameters and the dynamic region rendering parameters;
and determining the rendering parameters of each frame according to the P target dynamic area rendering parameters and the static area rendering parameters to obtain P groups of rendering parameters, and determining the P groups of rendering parameters as the target rendering parameters.
7. An AI Designer based artificial intelligence game engine for performing the method of any of claims 1-5.
8. An electronic device comprising a processor and a memory, the memory storing one or more programs and configured for execution by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-5.
9. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-5.
CN202111658602.2A 2021-12-31 2021-12-31 Artificial intelligence game engine based on AI Designer, game rendering method and device Active CN114288647B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111658602.2A CN114288647B (en) 2021-12-31 2021-12-31 Artificial intelligence game engine based on AI Designer, game rendering method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111658602.2A CN114288647B (en) 2021-12-31 2021-12-31 Artificial intelligence game engine based on AI Designer, game rendering method and device

Publications (2)

Publication Number Publication Date
CN114288647A CN114288647A (en) 2022-04-08
CN114288647B true CN114288647B (en) 2022-07-08

Family

ID=80973603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111658602.2A Active CN114288647B (en) 2021-12-31 2021-12-31 Artificial intelligence game engine based on AI Designer, game rendering method and device

Country Status (1)

Country Link
CN (1) CN114288647B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109598777A (en) * 2018-12-07 2019-04-09 腾讯科技(深圳)有限公司 Image rendering method, device, equipment and storage medium
CN109600666A (en) * 2018-12-12 2019-04-09 网易(杭州)网络有限公司 Video broadcasting method, device, medium and electronic equipment in scene of game
CN113810587A (en) * 2020-05-29 2021-12-17 华为技术有限公司 Image processing method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101593344B1 (en) * 2011-11-10 2016-02-18 엠파이어 테크놀로지 디벨롭먼트 엘엘씨 Speculative rendering using historical player data
GB2587230B (en) * 2019-09-20 2022-09-28 Sony Interactive Entertainment Inc Graphical rendering method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109598777A (en) * 2018-12-07 2019-04-09 腾讯科技(深圳)有限公司 Image rendering method, device, equipment and storage medium
CN109600666A (en) * 2018-12-12 2019-04-09 网易(杭州)网络有限公司 Video broadcasting method, device, medium and electronic equipment in scene of game
CN113810587A (en) * 2020-05-29 2021-12-17 华为技术有限公司 Image processing method and device

Also Published As

Publication number Publication date
CN114288647A (en) 2022-04-08

Similar Documents

Publication Publication Date Title
US10306180B2 (en) Predictive virtual reality content streaming techniques
CN110147231B (en) Combined special effect generation method and device and storage medium
CN107018336B (en) The method and apparatus of method and apparatus and the video processing of image procossing
JP7511966B2 (en) Method, device, equipment, and computer program for displaying a virtual scene
CN111464834B (en) Video frame processing method and device, computing equipment and storage medium
CN110189246B (en) Image stylization generation method and device and electronic equipment
CN112199140B (en) Application frame inserting method and related device
WO2020098465A1 (en) Method and device for image display, storage medium and electronic device
CN110795056B (en) Method, device, terminal and storage medium for adjusting display parameters
US20090262139A1 (en) Video image display device and video image display method
CN111784817B (en) Shadow display method and device, storage medium and electronic device
CN113709560B (en) Video editing method, device, equipment and storage medium
US10839587B2 (en) Image processing methods and devices for moving a target object by using a target ripple
CN116071452A (en) Style image generation method and device, computer equipment and storage medium
CN108270971A (en) A kind of method, equipment and the computer readable storage medium of mobile terminal focusing
CN114344894A (en) Scene element processing method, device, equipment and medium
CN114288647B (en) Artificial intelligence game engine based on AI Designer, game rendering method and device
CN107820709A (en) A kind of broadcast interface method of adjustment and device
CN116109737A (en) Animation generation method, animation generation device, computer equipment and computer readable storage medium
CN118159341A (en) Image frame rendering method and related device
CN112256976A (en) Matching method and related device
WO2024174586A1 (en) Element display method and apparatus, and device, medium and program product
US11074452B1 (en) Methods and systems for generating multiscale data representing objects at different distances from a virtual vantage point
KR20230011432A (en) Method and device for determining transition type, electronic device and storage medium
CN117891330A (en) Screen display control method and device of intelligent glasses, computer equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant